blob: 50840ac15210554e2466ab168735c783b8a8fcdc [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
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200816with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700856PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner028f7342019-10-22 21:53:50 +02001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001400\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001465 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001493 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1494 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001503 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001504 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001505 --with-lto Enable Link Time Optimization in any build. Disabled
1506 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001510 enable AddressSanitizer (asan)
1511 --with-memory-sanitizer enable MemorySanitizer (msan)
1512 --with-undefined-behavior-sanitizer
1513 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001515 --with-system-expat build pyexpat module using an installed expat
1516 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001517 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001518 --with-system-libmpdec build _decimal module using an installed libmpdec
1519 library
Ned Deilyd819b932013-09-06 01:07:05 -07001520 --with-tcltk-includes='-I...'
1521 override search for Tcl and Tk include files
1522 --with-tcltk-libs='-L...'
1523 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001524 --with-dbmliborder=db1:db2:...
1525 order to check db backends for dbm. Valid value is a
1526 colon separated string with the backend names
1527 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001530 --with(out)-c-locale-coercion
1531 disable/enable C locale coercion to a UTF-8 based
1532 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001533 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001534 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-libm=STRING math library
1536 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001537 --with(out)-computed-gotos
1538 Use computed gotos in evaluation loop (enabled by
1539 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001540 --with(out)-ensurepip=[=upgrade]
1541 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001542 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001543 --with-ssl-default-suites=[python|openssl|STRING]
1544 Override default cipher suites string, python: use
1545 Python's preferred selection (default), openssl:
1546 leave OpenSSL's defaults untouched, STRING: use a
1547 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001559 PROFILE_TASK
1560 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001561 PKG_CONFIG path to pkg-config utility
1562 PKG_CONFIG_PATH
1563 directories to add to pkg-config's search path
1564 PKG_CONFIG_LIBDIR
1565 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
1567Use these variables to override the choices made by `configure' or to help
1568it to find libraries and programs with nonstandard names/locations.
1569
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001570Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
1574
1575if test "$ac_init_help" = "recursive"; then
1576 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -d "$ac_dir" ||
1579 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_builddir=.
1582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583case "$ac_dir" in
1584.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $ac_top_builddir_sub in
1590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592 esac ;;
1593esac
1594ac_abs_top_builddir=$ac_pwd
1595ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596# for backward compatibility:
1597ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001598
1599case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$ac_top_builddir_sub
1603 ac_abs_top_srcdir=$ac_pwd ;;
1604 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 ac_top_srcdir=$srcdir
1607 ac_abs_top_srcdir=$srcdir ;;
1608 *) # Relative name.
1609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610 ac_top_srcdir=$ac_top_build_prefix$srcdir
1611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001612esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 cd "$ac_dir" || { ac_status=$?; continue; }
1616 # Check for guested configure.
1617 if test -f "$ac_srcdir/configure.gnu"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620 elif test -f "$ac_srcdir/configure"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 fi || ac_status=$?
1626 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 done
1628fi
1629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if $ac_init_version; then
1632 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001633python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001635
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001637This configure script is free software; the Free Software Foundation
1638gives unlimited permission to copy, distribute and modify it.
1639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001642
1643## ------------------------ ##
1644## Autoconf initialization. ##
1645## ------------------------ ##
1646
1647# ac_fn_c_try_compile LINENO
1648# --------------------------
1649# Try to compile conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_compile ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 rm -f conftest.$ac_objext
1654 if { { ac_try="$ac_compile"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_compile") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } && {
1670 test -z "$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 } && test -s conftest.$ac_objext; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_compile
1684
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } > conftest.i && {
1707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
Matthias Kloseb9621712010-04-24 17:59:49 +00001722# ac_fn_c_try_link LINENO
1723# -----------------------
1724# Try to link conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_link ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext conftest$ac_exeext
1729 if { { ac_try="$ac_link"
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_link") 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; } && {
1745 test -z "$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest$ac_exeext && {
1748 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001749 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 }; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1759 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1760 # interfere with the next link command; also delete a directory that is
1761 # left behind by Apple's compiler. We do this before executing the actions.
1762 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_link
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1769# -------------------------------------------------------
1770# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771# the include files in INCLUDES and setting the cache variable VAR
1772# accordingly.
1773ac_fn_c_check_header_mongrel ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001779if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 $as_echo_n "(cached) " >&6
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785else
1786 # Is the header compilable?
1787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788$as_echo_n "checking $2 usability... " >&6; }
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791$4
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_compile "$LINENO"; then :
1795 ac_header_compiler=yes
1796else
1797 ac_header_compiler=no
1798fi
1799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801$as_echo "$ac_header_compiler" >&6; }
1802
1803# Is the header present?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805$as_echo_n "checking $2 presence... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_cpp "$LINENO"; then :
1811 ac_header_preproc=yes
1812else
1813 ac_header_preproc=no
1814fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001815rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817$as_echo "$ac_header_preproc" >&6; }
1818
1819# So? What about this header?
1820case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821 yes:no: )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826 ;;
1827 no:yes:* )
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1831$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1835$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001838( $as_echo "## --------------------------------------- ##
1839## Report this to https://bugs.python.org/ ##
1840## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 ) | sed "s/^/$as_me: WARNING: /" >&2
1842 ;;
1843esac
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=\$ac_header_compiler"
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001856
1857} # ac_fn_c_check_header_mongrel
1858
1859# ac_fn_c_try_run LINENO
1860# ----------------------
1861# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1862# that executables *can* be run.
1863ac_fn_c_try_run ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 if { { ac_try="$ac_link"
1867case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_link") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1877 { { case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_try") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; }; }; then :
1887 ac_retval=0
1888else
1889 $as_echo "$as_me: program exited with status $ac_status" >&5
1890 $as_echo "$as_me: failed program was:" >&5
1891sed 's/^/| /' conftest.$ac_ext >&5
1892
1893 ac_retval=$ac_status
1894fi
1895 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001896 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 as_fn_set_status $ac_retval
1898
1899} # ac_fn_c_try_run
1900
1901# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902# -------------------------------------------------------
1903# Tests whether HEADER exists and can be compiled using the include files in
1904# INCLUDES, setting the cache variable VAR accordingly.
1905ac_fn_c_check_header_compile ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 $as_echo_n "(cached) " >&6
1912else
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 eval "$3=yes"
1920else
1921 eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_check_header_compile
1931
Matthias Kloseb9621712010-04-24 17:59:49 +00001932# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1933# -------------------------------------------
1934# Tests whether TYPE exists after having included INCLUDES, setting cache
1935# variable VAR accordingly.
1936ac_fn_c_check_type ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$4
1948int
1949main ()
1950{
1951if (sizeof ($2))
1952 return 0;
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964if (sizeof (($2)))
1965 return 0;
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 eval "$3=yes"
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_check_type
1985
Matthias Kloseb9621712010-04-24 17:59:49 +00001986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=-1 ac_mid=-1
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
2128
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
2149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
2162
2163 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002164 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002165 as_fn_set_status $ac_retval
2166
2167} # ac_fn_c_compute_int
2168
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002177if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 $as_echo_n "(cached) " >&6
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002233
2234} # ac_fn_c_check_func
2235
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002236# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2237# ---------------------------------------------
2238# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2239# accordingly.
2240ac_fn_c_check_decl ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 as_decl_name=`echo $2|sed 's/ *(.*//'`
2244 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2246$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$4
2253int
2254main ()
2255{
2256#ifndef $as_decl_name
2257#ifdef __cplusplus
2258 (void) $as_decl_use;
2259#else
2260 (void) $as_decl_name;
2261#endif
2262#endif
2263
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$3=yes"
2270else
2271 eval "$3=no"
2272fi
2273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274fi
2275eval ac_res=\$$3
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277$as_echo "$ac_res" >&6; }
2278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279
2280} # ac_fn_c_check_decl
2281
Matthias Kloseb9621712010-04-24 17:59:49 +00002282# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2283# ----------------------------------------------------
2284# Tries to find if the field MEMBER exists in type AGGR, after including
2285# INCLUDES, setting cache variable VAR accordingly.
2286ac_fn_c_check_member ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2290$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (sizeof ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 eval "$4=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$4
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002342It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002343generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_files
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002521## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577 # We do not want a PATH search for config.site.
2578 case $CONFIG_SITE in #((
2579 -*) ac_site_file1=./$CONFIG_SITE;;
2580 */*) ac_site_file1=$CONFIG_SITE;;
2581 *) ac_site_file1=./$CONFIG_SITE;;
2582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597 . "$ac_site_file" \
2598 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002601See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603done
2604
2605if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 # Some versions of bash will fail to source /dev/null (special files
2607 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2608 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 esac
2615 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 >$cache_file
2620fi
2621
2622# Check that the precious variables saved in the cache have kept the same
2623# value.
2624ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 case $ac_old_set,$ac_new_set in
2631 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633$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 +00002634 ac_cache_corrupted=: ;;
2635 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_cache_corrupted=: ;;
2639 ,);;
2640 *)
2641 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 # differences in whitespace do not lead to failure.
2643 ac_old_val_w=`echo x $ac_old_val`
2644 ac_new_val_w=`echo x $ac_new_val`
2645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648 ac_cache_corrupted=:
2649 else
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652 eval $ac_var=\$ac_old_val
2653 fi
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2655$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2657$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 fi;;
2659 esac
2660 # Pass precious variables to config.status.
2661 if test "$ac_new_set" = set; then
2662 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 *) ac_arg=$ac_var=$ac_new_val ;;
2665 esac
2666 case " $ac_configure_args " in
2667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
2671done
2672if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002679## -------------------- ##
2680## Main body of script. ##
2681## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682
Guido van Rossum7f43da71994-08-01 12:15:30 +00002683ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691
Christian Heimesff5be6e2018-01-20 13:19:21 +01002692
2693
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002694if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Victor Stinner9ed34a82017-05-02 22:35:58 +02002713if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715# Extract the first word of "git", so it can be a program name with args.
2716set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 if test -n "$HAS_GIT"; then
2723 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
2742fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=$ac_cv_prog_HAS_GIT
2744if test -n "$HAS_GIT"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2746$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Xiang Zhang4c855572018-08-20 22:36:19 +08002758 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2759 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2760 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITVERSION=""
2763 GITTAG=""
2764 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if test -f "$ac_dir/install-sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install-sh -c"
2776 break
2777 elif test -f "$ac_dir/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884 $as_echo_n "(cached) " >&6
2885else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002886 if test -n "$PYTHON_FOR_REGEN"; then
2887 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002896 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002906PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2907if test -n "$PYTHON_FOR_REGEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2909$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
2921
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002922if test "$cross_compiling" = yes; then
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2924$as_echo_n "checking for python interpreter for cross build... " >&6; }
2925 if test -z "$PYTHON_FOR_BUILD"; then
2926 for interp in python$PACKAGE_VERSION python3 python; do
2927 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002928 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 +02002929 break
2930 fi
2931 interp=
2932 done
2933 if test x$interp = x; then
2934 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2935 fi
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2937$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002938 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 +02002939 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002940elif test "$cross_compiling" = maybe; then
2941 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002942else
2943 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Benjamin Petersond23f8222009-04-05 19:13:16 +00002948if test "$prefix" != "/"; then
2949 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
2954
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002955# We don't use PACKAGE_ variables, and they cause conflicts
2956# with other autoconf-based packages that include Python.h
2957grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2958rm confdefs.h
2959mv confdefs.h.new confdefs.h
2960
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002961
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002962VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002963
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002964# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002965
2966SOVERSION=1.0
2967
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968# The later defininition of _XOPEN_SOURCE disables certain features
2969# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2970
Matthias Kloseb9621712010-04-24 17:59:49 +00002971$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972
2973
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2976# them.
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979
2980
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2983# them.
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986
2987
Martin v. Löwisd6320502004-08-12 13:45:08 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002993
2994
2995
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002996define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002997
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002998# Arguments passed to configure.
2999
3000CONFIG_ARGS="$ac_configure_args"
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3003$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003005if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007 case $enableval in
3008 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003009 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 # information
3011 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003012 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003014 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3015 if test ! -d "${enableval}"
3016 then
3017 enableval=/
3018 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003019 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 ;;
3021 esac
3022 case $enableval in
3023 no)
3024 UNIVERSALSDK=
3025 enable_universalsdk=
3026 ;;
3027 *)
3028 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 if test ! -d "${UNIVERSALSDK}"
3030 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003031 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 ;;
3034 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003035
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037else
3038
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044if test -n "${UNIVERSALSDK}"
3045then
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3047$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048else
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3050$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003053
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deily87adb6e2013-10-18 21:09:56 -07003055ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003056
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057# For backward compatibility reasons we prefer to select '32-bit' if available,
3058# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003059UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060if test "`uname -s`" = "Darwin"
3061then
3062 if test -n "${UNIVERSALSDK}"
3063 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003064 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 then
3066 UNIVERSAL_ARCHS="intel"
3067 fi
3068 fi
3069fi
3070
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3073$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074
3075# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003076if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 UNIVERSAL_ARCHS="$withval"
3079
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080fi
3081
Ned Deily87adb6e2013-10-18 21:09:56 -07003082if test -n "${UNIVERSALSDK}"
3083then
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3085$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3086else
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3088$as_echo "no" >&6; }
3089fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091
3092# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003093if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094 withval=$with_framework_name;
3095 PYTHONFRAMEWORK=${withval}
3096 PYTHONFRAMEWORKDIR=${withval}.framework
3097 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3098
3099else
3100
3101 PYTHONFRAMEWORK=Python
3102 PYTHONFRAMEWORKDIR=Python.framework
3103 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3104
3105fi
3106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003110 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003112 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 esac
3114 case $enableval in
3115 no)
3116 PYTHONFRAMEWORK=
3117 PYTHONFRAMEWORKDIR=no-framework
3118 PYTHONFRAMEWORKPREFIX=
3119 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120 FRAMEWORKINSTALLFIRST=
3121 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 FRAMEWORKALTINSTALLFIRST=
3123 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003124 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 if test "x${prefix}" = "xNONE"; then
3126 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003131 ;;
3132 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003133 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003136 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003137 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3138 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 if test "x${prefix}" = "xNONE" ; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 else
3146 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3147 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
3149 case "${enableval}" in
3150 /System*)
3151 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3152 if test "${prefix}" = "NONE" ; then
3153 # See below
3154 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3155 fi
3156 ;;
3157
3158 /Library*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 ;;
3161
3162 */Library/Frameworks)
3163 MDIR="`dirname "${enableval}"`"
3164 MDIR="`dirname "${MDIR}"`"
3165 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3166
3167 if test "${prefix}" = "NONE"; then
3168 # User hasn't specified the
3169 # --prefix option, but wants to install
3170 # the framework in a non-default location,
3171 # ensure that the compatibility links get
3172 # installed relative to that prefix as well
3173 # instead of in /usr/local.
3174 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3175 fi
3176 ;;
3177
3178 *)
3179 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3180 ;;
3181 esac
3182
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003185 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003191 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3192
3193 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3194
Jack Jansene578a632001-08-15 01:27:14 +00003195 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Guido van Rossum563e7081996-09-10 18:20:48 +00003197else
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003201 PYTHONFRAMEWORKPREFIX=
3202 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST=
3204 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 FRAMEWORKALTINSTALLFIRST=
3206 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 if test "x${prefix}" = "xNONE" ; then
3209 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3210 else
3211 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3212 fi
Jack Jansene578a632001-08-15 01:27:14 +00003213 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003214
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216fi
3217
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
3219
Michael W. Hudson54241132001-12-07 15:38:26 +00003220
3221
3222
3223
Jack Jansene578a632001-08-15 01:27:14 +00003224
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225
3226
3227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003229
Ned Deilyb8f944f2013-11-21 22:42:25 -08003230
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231
3232cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003233#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003234_ACEOF
3235
3236
Jack Jansene578a632001-08-15 01:27:14 +00003237##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003238## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003239## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003240##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241# Set name for machine-dependent library files
3242
Matthias Kloseb9621712010-04-24 17:59:49 +00003243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3244$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003245if test -z "$MACHDEP"
3246then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 # avoid using uname for cross builds
3248 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003249 # ac_sys_system and ac_sys_release are used for setting
3250 # a lot of different things including 'define_xopen_source'
3251 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003253 *-*-linux-android*)
3254 ac_sys_system=Linux-android
3255 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003262 *-*-vxworks*)
3263 ac_sys_system=VxWorks
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *)
3266 # for now, limit cross builds to known configurations
3267 MACHDEP="unknown"
3268 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3269 esac
3270 ac_sys_release=
3271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003273 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003274 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 fi
3280 ac_md_system=`echo $ac_sys_system |
3281 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3282 ac_md_release=`echo $ac_sys_release |
3283 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3284 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003285
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003287 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003288 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003289 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003290 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003291 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3295$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003296
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003297
3298if test "$cross_compiling" = yes; then
3299 case "$host" in
3300 *-*-linux*)
3301 case "$host_cpu" in
3302 arm*)
3303 _host_cpu=arm
3304 ;;
3305 *)
3306 _host_cpu=$host_cpu
3307 esac
3308 ;;
3309 *-*-cygwin*)
3310 _host_cpu=
3311 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003312 *-*-vxworks*)
3313 _host_cpu=$host_cpu
3314 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 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 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3377 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3378 # identifies itself as Darwin/7.*
3379 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # disables platform specific features beyond repair.
3381 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # has no effect, don't bother defining them
3383 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003384 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003385 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3388 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3389 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003390 AIX/4)
3391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 AIX/5)
3393 if test `uname -r` -eq 1; then
3394 define_xopen_source=no
3395 fi
3396 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003397 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3398 # defining NI_NUMERICHOST.
3399 QNX/6.3.2)
3400 define_xopen_source=no
3401 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003402 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3403 # in network headers still using system V types.
3404 VxWorks/*)
3405 define_xopen_source=no
3406 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408esac
3409
3410if test $define_xopen_source = yes
3411then
Victor Stinner14d098d2011-09-07 22:29:43 +02003412 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Victor Stinner14d098d2011-09-07 22:29:43 +02003414$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3418 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3419 # several APIs are not declared. Since this is also needed in some
3420 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Matthias Kloseb9621712010-04-24 17:59:49 +00003422$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
3424
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003426$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428fi
3429
Christian Heimes647cd872013-12-07 23:39:33 +01003430# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3431case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432 hp*|HP*)
3433 define_stdc_a1=yes;;
3434 *)
3435 define_stdc_a1=no;;
3436esac
3437
3438if test $define_stdc_a1 = yes
3439then
Christian Heimes647cd872013-12-07 23:39:33 +01003440
3441$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3442
Christian Heimesb02bcae2013-12-08 15:21:08 +01003443fi
Christian Heimes647cd872013-12-07 23:39:33 +01003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3446# it may influence the way we can build extensions, so distutils
3447# needs to check it
3448
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003451EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003452
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003454
3455# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3456# for debug/optimization stuff. BASECFLAGS is for flags that are required
3457# just to get things to compile and link. Users are free to override OPT
3458# when running configure or make. The build should not break if they do.
3459# BASECFLAGS should generally not be messed with, however.
3460
Guido van Rossum8b131c51995-03-09 14:10:13 +00003461# If the user switches compilers, we can't believe the cache
3462if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3463then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003464 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003465(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003466fi
3467
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003468# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3469# when the compiler supports them, but we don't always want -O2, and
3470# we set -g later.
3471if test -z "$CFLAGS"; then
3472 CFLAGS=
3473fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003474
3475if test "$ac_sys_system" = "Darwin"
3476then
3477 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003478 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479 # information
3480 if test -z "${CC}"
3481 then
3482 found_gcc=
3483 found_clang=
3484 as_save_IFS=$IFS; IFS=:
3485 for as_dir in $PATH
3486 do
3487 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003488 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003489 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003490 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 fi
3492 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003493 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003495 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496 fi
3497 fi
3498 done
3499 IFS=$as_save_IFS
3500
3501 if test -n "$found_gcc" -a -n "$found_clang"
3502 then
3503 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3504 then
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3506$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3507 CC="$found_clang"
3508 CXX="$found_clang++"
3509 fi
3510
3511
3512 elif test -z "$found_gcc" -a -n "$found_clang"
3513 then
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3515$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3516 CC="$found_clang"
3517 CXX="$found_clang++"
3518
3519 elif test -z "$found_gcc" -a -z "$found_clang"
3520 then
3521 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3522 if test -n "${found_clang}"
3523 then
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3525$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3526 CC="${found_clang}"
3527 CXX="`/usr/bin/xcrun -find clang++`"
3528
3529 # else: use default behaviour
3530 fi
3531 fi
3532 fi
3533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534ac_ext=c
3535ac_cpp='$CPP $CPPFLAGS'
3536ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3537ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3538ac_compiler_gnu=$ac_cv_c_compiler_gnu
3539if test -n "$ac_tool_prefix"; then
3540 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3541set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3543$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003544if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003546else
3547 if test -n "$CC"; then
3548 ac_cv_prog_CC="$CC" # Let the user override the test.
3549else
Martin v. Löwis11437992002-04-12 09:54:03 +00003550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3551for as_dir in $PATH
3552do
3553 IFS=$as_save_IFS
3554 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 $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 +00003559 break 2
3560 fi
3561done
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
Jack Jansendd19cf82001-12-06 22:36:17 +00003565fi
3566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003567CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003568if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3570$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003571else
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3573$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003574fi
3575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576
Martin v. Löwis11437992002-04-12 09:54:03 +00003577fi
3578if test -z "$ac_cv_prog_CC"; then
3579 ac_ct_CC=$CC
3580 # Extract the first word of "gcc", so it can be a program name with args.
3581set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003584if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003586else
3587 if test -n "$ac_ct_CC"; then
3588 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3589else
3590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $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 +00003599 break 2
3600 fi
3601done
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003604
3605fi
3606fi
3607ac_ct_CC=$ac_cv_prog_ac_ct_CC
3608if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3610$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611else
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616 if test "x$ac_ct_CC" = x; then
3617 CC=""
3618 else
3619 case $cross_compiling:$ac_tool_warned in
3620yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623ac_tool_warned=yes ;;
3624esac
3625 CC=$ac_ct_CC
3626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003627else
3628 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003629fi
3630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632 if test -n "$ac_tool_prefix"; then
3633 # 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 +00003634set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3636$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003637if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003639else
3640 if test -n "$CC"; then
3641 ac_cv_prog_CC="$CC" # Let the user override the test.
3642else
Martin v. Löwis11437992002-04-12 09:54:03 +00003643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3644for as_dir in $PATH
3645do
3646 IFS=$as_save_IFS
3647 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $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 +00003652 break 2
3653 fi
3654done
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003657
3658fi
3659fi
3660CC=$ac_cv_prog_CC
3661if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3663$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664else
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3666$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667fi
3668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671fi
3672if test -z "$CC"; then
3673 # Extract the first word of "cc", so it can be a program name with args.
3674set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003677if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003679else
3680 if test -n "$CC"; then
3681 ac_cv_prog_CC="$CC" # Let the user override the test.
3682else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003683 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3685for as_dir in $PATH
3686do
3687 IFS=$as_save_IFS
3688 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3692 ac_prog_rejected=yes
3693 continue
3694 fi
3695 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 break 2
3698 fi
3699done
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003702
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703if test $ac_prog_rejected = yes; then
3704 # We found a bogon in the path, so make sure we never use it.
3705 set dummy $ac_cv_prog_CC
3706 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708 # We chose a different compiler from the bogus one.
3709 # However, it has the same basename, so the bogon will be chosen
3710 # first if we set CC to just the basename; use the full file name.
3711 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003712 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713 fi
3714fi
3715fi
3716fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003717CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3720$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721else
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3723$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724fi
3725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 do
3732 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3733set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003736if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003738else
3739 if test -n "$CC"; then
3740 ac_cv_prog_CC="$CC" # Let the user override the test.
3741else
Martin v. Löwis11437992002-04-12 09:54:03 +00003742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743for as_dir in $PATH
3744do
3745 IFS=$as_save_IFS
3746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 $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 +00003751 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003752 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753done
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003756
3757fi
3758fi
3759CC=$ac_cv_prog_CC
3760if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3762$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3765$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003766fi
3767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 test -n "$CC" && break
3770 done
3771fi
3772if test -z "$CC"; then
3773 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003775do
3776 # Extract the first word of "$ac_prog", so it can be a program name with args.
3777set dummy $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_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003782else
3783 if test -n "$ac_ct_CC"; then
3784 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3785else
3786as_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_ac_ct_CC="$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
3796 fi
3797done
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801fi
3802fi
3803ac_ct_CC=$ac_cv_prog_ac_ct_CC
3804if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3806$as_echo "$ac_ct_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; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 test -n "$ac_ct_CC" && break
3814done
Michael W. Hudson54241132001-12-07 15:38:26 +00003815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 if test "x$ac_ct_CC" = x; then
3817 CC=""
3818 else
3819 case $cross_compiling:$ac_tool_warned in
3820yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823ac_tool_warned=yes ;;
3824esac
3825 CC=$ac_ct_CC
3826 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003827fi
3828
3829fi
3830
3831
Matthias Kloseb9621712010-04-24 17:59:49 +00003832test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003834as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003835See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836
3837# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003838$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3839set X $ac_compile
3840ac_compiler=$2
3841for ac_option in --version -v -V -qversion; do
3842 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843case "(($ac_try" in
3844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3845 *) ac_try_echo=$ac_try;;
3846esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003847eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3848$as_echo "$ac_try_echo"; } >&5
3849 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003850 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 if test -s conftest.err; then
3852 sed '10a\
3853... rest of stderr output deleted ...
3854 10q' conftest.err >conftest.er1
3855 cat conftest.er1 >&5
3856 fi
3857 rm -f conftest.er1 conftest.err
3858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3859 test $ac_status = 0; }
3860done
Martin v. Löwis11437992002-04-12 09:54:03 +00003861
Matthias Kloseb9621712010-04-24 17:59:49 +00003862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003863/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003864
Martin v. Löwis11437992002-04-12 09:54:03 +00003865int
3866main ()
3867{
3868
3869 ;
3870 return 0;
3871}
3872_ACEOF
3873ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003874ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003875# Try to create an executable without -o first, disregard a.out.
3876# It will help us diagnose broken compilers, and finding out an intuition
3877# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3879$as_echo_n "checking whether the C compiler works... " >&6; }
3880ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3881
3882# The possible output files:
3883ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885ac_rmfiles=
3886for ac_file in $ac_files
3887do
3888 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3891 esac
3892done
3893rm -f $ac_rmfiles
3894
Matthias Kloseb9621712010-04-24 17:59:49 +00003895if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896case "(($ac_try" in
3897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898 *) ac_try_echo=$ac_try;;
3899esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3901$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3907# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3908# in a Makefile. We should not override ac_cv_exeext if it was cached,
3909# so that the user can short-circuit this test for compilers unknown to
3910# Autoconf.
3911for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003912do
3913 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003914 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003916 ;;
3917 [ab].out )
3918 # We found the default executable, but exeext='' is most
3919 # certainly right.
3920 break;;
3921 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 then :; else
3924 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3925 fi
3926 # We set ac_cv_exeext here because the later test for it is not
3927 # safe: cross compilers may not add the suffix if given an `-o'
3928 # argument, so we may need to know it at that point already.
3929 # Even if this section looks crufty: it has the advantage of
3930 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003931 break;;
3932 * )
3933 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 esac
3935done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936test "$ac_cv_exeext" = no && ac_cv_exeext=
3937
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003938else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 ac_file=''
3940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003941if test -z "$ac_file"; then :
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943$as_echo "no" >&6; }
3944$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003945sed 's/^/| /' conftest.$ac_ext >&5
3946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003949as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003950See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003951else
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3953$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3956$as_echo_n "checking for C compiler default output file name... " >&6; }
3957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3958$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003962ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3964$as_echo_n "checking for suffix of executables... " >&6; }
3965if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3971$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003976 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3977# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3978# work properly (i.e., refer to `conftest.exe'), while it won't with
3979# `rm'.
3980for ac_file in conftest.exe conftest conftest.*; do
3981 test -f "$ac_file" || continue
3982 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3985 break;;
3986 * ) break;;
3987 esac
3988done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989else
Matthias Kloseb9621712010-04-24 17:59:49 +00003990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003992as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003993See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003995rm -f conftest conftest$ac_cv_exeext
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3997$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998
3999rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004000EXEEXT=$ac_cv_exeext
4001ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4003/* end confdefs.h. */
4004#include <stdio.h>
4005int
4006main ()
4007{
4008FILE *f = fopen ("conftest.out", "w");
4009 return ferror (f) || fclose (f) != 0;
4010
4011 ;
4012 return 0;
4013}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004015ac_clean_files="$ac_clean_files conftest.out"
4016# Check that the compiler produces executables we can run. If not, either
4017# the compiler is broken, or we cross compile.
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4019$as_echo_n "checking whether we are cross compiling... " >&6; }
4020if test "$cross_compiling" != yes; then
4021 { { ac_try="$ac_link"
4022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
4026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
4028 (eval "$ac_link") 2>&5
4029 ac_status=$?
4030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }
4032 if { ac_try='./conftest$ac_cv_exeext'
4033 { { case "(($ac_try" in
4034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4035 *) ac_try_echo=$ac_try;;
4036esac
4037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4038$as_echo "$ac_try_echo"; } >&5
4039 (eval "$ac_try") 2>&5
4040 ac_status=$?
4041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4042 test $ac_status = 0; }; }; then
4043 cross_compiling=no
4044 else
4045 if test "$cross_compiling" = maybe; then
4046 cross_compiling=yes
4047 else
4048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004050as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004051If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004052See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 fi
4054 fi
4055fi
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4057$as_echo "$cross_compiling" >&6; }
4058
4059rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4060ac_clean_files=$ac_clean_files_save
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4062$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004063if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo_n "(cached) " >&6
4065else
4066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067/* end confdefs.h. */
4068
4069int
4070main ()
4071{
4072
4073 ;
4074 return 0;
4075}
4076_ACEOF
4077rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004078if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079case "(($ac_try" in
4080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4081 *) ac_try_echo=$ac_try;;
4082esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4084$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4088 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004089 for ac_file in conftest.o conftest.obj conftest.*; do
4090 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004091 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004093 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4094 break;;
4095 esac
4096done
4097else
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004099sed 's/^/| /' conftest.$ac_ext >&5
4100
Matthias Kloseb9621712010-04-24 17:59:49 +00004101{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004103as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004104See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4109$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004110OBJEXT=$ac_cv_objext
4111ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4113$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004114if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004116else
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004119
Martin v. Löwis11437992002-04-12 09:54:03 +00004120int
4121main ()
4122{
4123#ifndef __GNUC__
4124 choke me
4125#endif
4126
4127 ;
4128 return 0;
4129}
4130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 ac_compiler_gnu=yes
4133else
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004137ac_cv_c_compiler_gnu=$ac_compiler_gnu
4138
4139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4141$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4142if test $ac_compiler_gnu = yes; then
4143 GCC=yes
4144else
4145 GCC=
4146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004147ac_test_CFLAGS=${CFLAGS+set}
4148ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4150$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004151if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004153else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 ac_save_c_werror_flag=$ac_c_werror_flag
4155 ac_c_werror_flag=yes
4156 ac_cv_prog_cc_g=no
4157 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004160
Martin v. Löwis11437992002-04-12 09:54:03 +00004161int
4162main ()
4163{
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004169if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004170 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 CFLAGS=""
4173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174/* end confdefs.h. */
4175
4176int
4177main ()
4178{
4179
4180 ;
4181 return 0;
4182}
4183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004184if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185
Matthias Kloseb9621712010-04-24 17:59:49 +00004186else
4187 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190/* end confdefs.h. */
4191
4192int
4193main ()
4194{
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4208 ac_c_werror_flag=$ac_save_c_werror_flag
4209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4211$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004214elif test $ac_cv_prog_cc_g = yes; then
4215 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004216 CFLAGS="-g -O2"
4217 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004218 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219 fi
4220else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004221 if test "$GCC" = yes; then
4222 CFLAGS="-O2"
4223 else
4224 CFLAGS=
4225 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4228$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004229if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004231else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004233ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
4236#include <stdarg.h>
4237#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004238struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004239/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4240struct buf { int x; };
4241FILE * (*rcsopen) (struct buf *, struct stat *, int);
4242static char *e (p, i)
4243 char **p;
4244 int i;
4245{
4246 return p[i];
4247}
4248static char *f (char * (*g) (char **, int), char **p, ...)
4249{
4250 char *s;
4251 va_list v;
4252 va_start (v,p);
4253 s = g (p, va_arg (v,int));
4254 va_end (v);
4255 return s;
4256}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257
4258/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4259 function prototypes and stuff, but not '\xHH' hex character constants.
4260 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4263 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004265int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4268 inside strings and character constants. */
4269#define FOO(x) 'x'
4270int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4271
Skip Montanaro6dead952003-09-25 14:50:04 +00004272int test (int i, double x);
4273struct s1 {int (*f) (int a);};
4274struct s2 {int (*f) (double a);};
4275int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4276int argc;
4277char **argv;
4278int
4279main ()
4280{
4281return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4282 ;
4283 return 0;
4284}
4285_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4287 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004288do
4289 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293rm -f core conftest.err conftest.$ac_objext
4294 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004295done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004297CC=$ac_save_CC
4298
4299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300# AC_CACHE_VAL
4301case "x$ac_cv_prog_cc_c89" in
4302 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4304$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4307$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4311$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004312esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004313if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004314
Matthias Kloseb9621712010-04-24 17:59:49 +00004315fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004316
Martin v. Löwis11437992002-04-12 09:54:03 +00004317ac_ext=c
4318ac_cpp='$CPP $CPPFLAGS'
4319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4321ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004323ac_ext=c
4324ac_cpp='$CPP $CPPFLAGS'
4325ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4326ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4327ac_compiler_gnu=$ac_cv_c_compiler_gnu
4328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4329$as_echo_n "checking how to run the C preprocessor... " >&6; }
4330# On Suns, sometimes $CPP names a directory.
4331if test -n "$CPP" && test -d "$CPP"; then
4332 CPP=
4333fi
4334if test -z "$CPP"; then
4335 if ${ac_cv_prog_CPP+:} false; then :
4336 $as_echo_n "(cached) " >&6
4337else
4338 # Double quotes because CPP needs to be expanded
4339 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4340 do
4341 ac_preproc_ok=false
4342for ac_c_preproc_warn_flag in '' yes
4343do
4344 # Use a header file that comes with gcc, so configuring glibc
4345 # with a fresh cross-compiler works.
4346 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4347 # <limits.h> exists even on freestanding compilers.
4348 # On the NeXT, cc -E runs the code through the compiler's parser,
4349 # not just through cpp. "Syntax error" is here to catch this case.
4350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4351/* end confdefs.h. */
4352#ifdef __STDC__
4353# include <limits.h>
4354#else
4355# include <assert.h>
4356#endif
4357 Syntax error
4358_ACEOF
4359if ac_fn_c_try_cpp "$LINENO"; then :
4360
4361else
4362 # Broken: fails on valid input.
4363continue
4364fi
4365rm -f conftest.err conftest.i conftest.$ac_ext
4366
4367 # OK, works on sane cases. Now check whether nonexistent headers
4368 # can be detected and how.
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370/* end confdefs.h. */
4371#include <ac_nonexistent.h>
4372_ACEOF
4373if ac_fn_c_try_cpp "$LINENO"; then :
4374 # Broken: success on invalid input.
4375continue
4376else
4377 # Passes both tests.
4378ac_preproc_ok=:
4379break
4380fi
4381rm -f conftest.err conftest.i conftest.$ac_ext
4382
4383done
4384# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4385rm -f conftest.i conftest.err conftest.$ac_ext
4386if $ac_preproc_ok; then :
4387 break
4388fi
4389
4390 done
4391 ac_cv_prog_CPP=$CPP
4392
4393fi
4394 CPP=$ac_cv_prog_CPP
4395else
4396 ac_cv_prog_CPP=$CPP
4397fi
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4399$as_echo "$CPP" >&6; }
4400ac_preproc_ok=false
4401for ac_c_preproc_warn_flag in '' yes
4402do
4403 # Use a header file that comes with gcc, so configuring glibc
4404 # with a fresh cross-compiler works.
4405 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4406 # <limits.h> exists even on freestanding compilers.
4407 # On the NeXT, cc -E runs the code through the compiler's parser,
4408 # not just through cpp. "Syntax error" is here to catch this case.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#ifdef __STDC__
4412# include <limits.h>
4413#else
4414# include <assert.h>
4415#endif
4416 Syntax error
4417_ACEOF
4418if ac_fn_c_try_cpp "$LINENO"; then :
4419
4420else
4421 # Broken: fails on valid input.
4422continue
4423fi
4424rm -f conftest.err conftest.i conftest.$ac_ext
4425
4426 # OK, works on sane cases. Now check whether nonexistent headers
4427 # can be detected and how.
4428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429/* end confdefs.h. */
4430#include <ac_nonexistent.h>
4431_ACEOF
4432if ac_fn_c_try_cpp "$LINENO"; then :
4433 # Broken: success on invalid input.
4434continue
4435else
4436 # Passes both tests.
4437ac_preproc_ok=:
4438break
4439fi
4440rm -f conftest.err conftest.i conftest.$ac_ext
4441
4442done
4443# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4444rm -f conftest.i conftest.err conftest.$ac_ext
4445if $ac_preproc_ok; then :
4446
4447else
4448 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4450as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4451See \`config.log' for more details" "$LINENO" 5; }
4452fi
4453
4454ac_ext=c
4455ac_cpp='$CPP $CPPFLAGS'
4456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4458ac_compiler_gnu=$ac_cv_c_compiler_gnu
4459
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4461$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4462if ${ac_cv_path_GREP+:} false; then :
4463 $as_echo_n "(cached) " >&6
4464else
4465 if test -z "$GREP"; then
4466 ac_path_GREP_found=false
4467 # Loop through the user's path and test for each of PROGNAME-LIST
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
4473 for ac_prog in grep ggrep; do
4474 for ac_exec_ext in '' $ac_executable_extensions; do
4475 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4476 as_fn_executable_p "$ac_path_GREP" || continue
4477# Check for GNU ac_path_GREP and select it if it is found.
4478 # Check for GNU $ac_path_GREP
4479case `"$ac_path_GREP" --version 2>&1` in
4480*GNU*)
4481 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4482*)
4483 ac_count=0
4484 $as_echo_n 0123456789 >"conftest.in"
4485 while :
4486 do
4487 cat "conftest.in" "conftest.in" >"conftest.tmp"
4488 mv "conftest.tmp" "conftest.in"
4489 cp "conftest.in" "conftest.nl"
4490 $as_echo 'GREP' >> "conftest.nl"
4491 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4492 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4493 as_fn_arith $ac_count + 1 && ac_count=$as_val
4494 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4495 # Best one so far, save it but keep looking for a better one
4496 ac_cv_path_GREP="$ac_path_GREP"
4497 ac_path_GREP_max=$ac_count
4498 fi
4499 # 10*(2^10) chars as input seems more than enough
4500 test $ac_count -gt 10 && break
4501 done
4502 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4503esac
4504
4505 $ac_path_GREP_found && break 3
4506 done
4507 done
4508 done
4509IFS=$as_save_IFS
4510 if test -z "$ac_cv_path_GREP"; then
4511 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4512 fi
4513else
4514 ac_cv_path_GREP=$GREP
4515fi
4516
4517fi
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4519$as_echo "$ac_cv_path_GREP" >&6; }
4520 GREP="$ac_cv_path_GREP"
4521
4522
Łukasz Langaa785c872016-09-09 17:37:37 -07004523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4524$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4525if ${ac_cv_path_SED+:} false; then :
4526 $as_echo_n "(cached) " >&6
4527else
4528 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4529 for ac_i in 1 2 3 4 5 6 7; do
4530 ac_script="$ac_script$as_nl$ac_script"
4531 done
4532 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4533 { ac_script=; unset ac_script;}
4534 if test -z "$SED"; then
4535 ac_path_SED_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in sed gsed; do
4543 for ac_exec_ext in '' $ac_executable_extensions; do
4544 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4545 as_fn_executable_p "$ac_path_SED" || continue
4546# Check for GNU ac_path_SED and select it if it is found.
4547 # Check for GNU $ac_path_SED
4548case `"$ac_path_SED" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4551*)
4552 ac_count=0
4553 $as_echo_n 0123456789 >"conftest.in"
4554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
4559 $as_echo '' >> "conftest.nl"
4560 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_SED_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_SED="$ac_path_SED"
4566 ac_path_SED_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_SED_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_SED"; then
4580 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_SED=$SED
4584fi
4585
4586fi
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4588$as_echo "$ac_cv_path_SED" >&6; }
4589 SED="$ac_cv_path_SED"
4590 rm -f conftest.sed
4591
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004592
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594
Matthias Kloseb9621712010-04-24 17:59:49 +00004595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4596$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004599if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004600 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601
4602 case $withval in
4603 no) with_cxx_main=no
4604 MAINCC='$(CC)';;
4605 yes) with_cxx_main=yes
4606 MAINCC='$(CXX)';;
4607 *) with_cxx_main=yes
4608 MAINCC=$withval
4609 if test -z "$CXX"
4610 then
4611 CXX=$withval
4612 fi;;
4613 esac
4614else
4615
4616 with_cxx_main=no
4617 MAINCC='$(CC)'
4618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004619fi
4620
Matthias Kloseb9621712010-04-24 17:59:49 +00004621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4622$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623
4624preset_cxx="$CXX"
4625if test -z "$CXX"
4626then
4627 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 gcc) if test -n "$ac_tool_prefix"; then
4629 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4630set dummy ${ac_tool_prefix}g++; ac_word=$2
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if ${ac_cv_path_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 case $CXX in
4637 [\\/]* | ?:[\\/]*)
4638 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4639 ;;
4640 *)
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in notfound
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004648 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
4656 ;;
4657esac
4658fi
4659CXX=$ac_cv_path_CXX
4660if test -n "$CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4662$as_echo "$CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
4668
4669fi
4670if test -z "$ac_cv_path_CXX"; then
4671 ac_pt_CXX=$CXX
4672 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004676if ${ac_cv_path_ac_pt_CXX+:} false; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 case $ac_pt_CXX in
4680 [\\/]* | ?:[\\/]*)
4681 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4682 ;;
4683 *)
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in notfound
4686do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695done
4696 done
4697IFS=$as_save_IFS
4698
4699 ;;
4700esac
4701fi
4702ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4703if test -n "$ac_pt_CXX"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4705$as_echo "$ac_pt_CXX" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711 if test "x$ac_pt_CXX" = x; then
4712 CXX="g++"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715yes:)
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718ac_tool_warned=yes ;;
4719esac
4720 CXX=$ac_pt_CXX
4721 fi
4722else
4723 CXX="$ac_cv_path_CXX"
4724fi
4725 ;;
4726 cc) if test -n "$ac_tool_prefix"; then
4727 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4728set dummy ${ac_tool_prefix}c++; ac_word=$2
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004731if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733else
4734 case $CXX in
4735 [\\/]* | ?:[\\/]*)
4736 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4737 ;;
4738 *)
4739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in notfound
4741do
4742 IFS=$as_save_IFS
4743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748 break 2
4749 fi
4750done
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754 ;;
4755esac
4756fi
4757CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004758if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4760$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004761else
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766
4767fi
4768if test -z "$ac_cv_path_CXX"; then
4769 ac_pt_CXX=$CXX
4770 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4773$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004779 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 +00004780 ;;
4781 *)
4782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in notfound
4784do
4785 IFS=$as_save_IFS
4786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 break 2
4792 fi
4793done
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 ;;
4798esac
4799fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004800ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4801if test -n "$ac_pt_CXX"; then
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4803$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804else
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004808
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809 if test "x$ac_pt_CXX" = x; then
4810 CXX="c++"
4811 else
4812 case $cross_compiling:$ac_tool_warned in
4813yes:)
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4815$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4816ac_tool_warned=yes ;;
4817esac
4818 CXX=$ac_pt_CXX
4819 fi
4820else
4821 CXX="$ac_cv_path_CXX"
4822fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 clang|*/clang) if test -n "$ac_tool_prefix"; then
4825 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4826set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828$as_echo_n "checking for $ac_word... " >&6; }
4829if ${ac_cv_path_CXX+:} false; then :
4830 $as_echo_n "(cached) " >&6
4831else
4832 case $CXX in
4833 [\\/]* | ?:[\\/]*)
4834 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4835 ;;
4836 *)
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in notfound
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848done
4849 done
4850IFS=$as_save_IFS
4851
Ned Deilycbfb9a52012-06-23 16:02:19 -07004852 ;;
4853esac
4854fi
4855CXX=$ac_cv_path_CXX
4856if test -n "$CXX"; then
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4858$as_echo "$CXX" >&6; }
4859else
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
4862fi
4863
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864
4865fi
4866if test -z "$ac_cv_path_CXX"; then
4867 ac_pt_CXX=$CXX
4868 # Extract the first word of "clang++", so it can be a program name with args.
4869set dummy clang++; ac_word=$2
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if ${ac_cv_path_ac_pt_CXX+:} false; then :
4873 $as_echo_n "(cached) " >&6
4874else
4875 case $ac_pt_CXX in
4876 [\\/]* | ?:[\\/]*)
4877 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4878 ;;
4879 *)
4880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881for as_dir in notfound
4882do
4883 IFS=$as_save_IFS
4884 test -z "$as_dir" && as_dir=.
4885 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004887 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4889 break 2
4890 fi
4891done
4892 done
4893IFS=$as_save_IFS
4894
4895 ;;
4896esac
4897fi
4898ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4899if test -n "$ac_pt_CXX"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4901$as_echo "$ac_pt_CXX" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
4907 if test "x$ac_pt_CXX" = x; then
4908 CXX="clang++"
4909 else
4910 case $cross_compiling:$ac_tool_warned in
4911yes:)
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4914ac_tool_warned=yes ;;
4915esac
4916 CXX=$ac_pt_CXX
4917 fi
4918else
4919 CXX="$ac_cv_path_CXX"
4920fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004922 icc|*/icc) if test -n "$ac_tool_prefix"; then
4923 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4924set dummy ${ac_tool_prefix}icpc; ac_word=$2
4925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4926$as_echo_n "checking for $ac_word... " >&6; }
4927if ${ac_cv_path_CXX+:} false; then :
4928 $as_echo_n "(cached) " >&6
4929else
4930 case $CXX in
4931 [\\/]* | ?:[\\/]*)
4932 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4933 ;;
4934 *)
4935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936for as_dir in notfound
4937do
4938 IFS=$as_save_IFS
4939 test -z "$as_dir" && as_dir=.
4940 for ac_exec_ext in '' $ac_executable_extensions; do
4941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4942 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4944 break 2
4945 fi
4946done
4947 done
4948IFS=$as_save_IFS
4949
4950 ;;
4951esac
4952fi
4953CXX=$ac_cv_path_CXX
4954if test -n "$CXX"; then
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4956$as_echo "$CXX" >&6; }
4957else
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4959$as_echo "no" >&6; }
4960fi
4961
4962
4963fi
4964if test -z "$ac_cv_path_CXX"; then
4965 ac_pt_CXX=$CXX
4966 # Extract the first word of "icpc", so it can be a program name with args.
4967set dummy icpc; ac_word=$2
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969$as_echo_n "checking for $ac_word... " >&6; }
4970if ${ac_cv_path_ac_pt_CXX+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972else
4973 case $ac_pt_CXX in
4974 [\\/]* | ?:[\\/]*)
4975 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4976 ;;
4977 *)
4978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4979for as_dir in notfound
4980do
4981 IFS=$as_save_IFS
4982 test -z "$as_dir" && as_dir=.
4983 for ac_exec_ext in '' $ac_executable_extensions; do
4984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4985 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4987 break 2
4988 fi
4989done
4990 done
4991IFS=$as_save_IFS
4992
4993 ;;
4994esac
4995fi
4996ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4997if test -n "$ac_pt_CXX"; then
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4999$as_echo "$ac_pt_CXX" >&6; }
5000else
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
5003fi
5004
5005 if test "x$ac_pt_CXX" = x; then
5006 CXX="icpc"
5007 else
5008 case $cross_compiling:$ac_tool_warned in
5009yes:)
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5011$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5012ac_tool_warned=yes ;;
5013esac
5014 CXX=$ac_pt_CXX
5015 fi
5016else
5017 CXX="$ac_cv_path_CXX"
5018fi
5019 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005020 esac
5021 if test "$CXX" = "notfound"
5022 then
5023 CXX=""
5024 fi
5025fi
5026if test -z "$CXX"
5027then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005028 if test -n "$ac_tool_prefix"; then
5029 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5030 do
5031 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005035if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037else
5038 if test -n "$CXX"; then
5039 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5040else
5041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in $PATH
5043do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005048 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050 break 2
5051 fi
5052done
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005055
5056fi
5057fi
5058CXX=$ac_cv_prog_CXX
5059if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5061$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062else
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005065fi
5066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 test -n "$CXX" && break
5069 done
5070fi
5071if test -z "$CXX"; then
5072 ac_ct_CXX=$CXX
5073 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5074do
5075 # Extract the first word of "$ac_prog", so it can be a program name with args.
5076set dummy $ac_prog; ac_word=$2
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5078$as_echo_n "checking for $ac_word... " >&6; }
5079if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5080 $as_echo_n "(cached) " >&6
5081else
5082 if test -n "$ac_ct_CXX"; then
5083 ac_cv_prog_ac_ct_CXX="$ac_ct_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=.
5090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +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_ac_ct_CXX="$ac_prog"
5093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5094 break 2
5095 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 done
5098IFS=$as_save_IFS
5099
5100fi
5101fi
5102ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5103if test -n "$ac_ct_CXX"; then
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5105$as_echo "$ac_ct_CXX" >&6; }
5106else
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108$as_echo "no" >&6; }
5109fi
5110
5111
5112 test -n "$ac_ct_CXX" && break
5113done
5114
5115 if test "x$ac_ct_CXX" = x; then
5116 CXX="notfound"
5117 else
5118 case $cross_compiling:$ac_tool_warned in
5119yes:)
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5122ac_tool_warned=yes ;;
5123esac
5124 CXX=$ac_ct_CXX
5125 fi
5126fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005127
5128 if test "$CXX" = "notfound"
5129 then
5130 CXX=""
5131 fi
5132fi
5133if test "$preset_cxx" != "$CXX"
5134then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005135 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136
5137 By default, distutils will build C++ extension modules with \"$CXX\".
5138 If this is not intended, then set CXX on the configure command line.
5139 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005140$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141
5142 By default, distutils will build C++ extension modules with \"$CXX\".
5143 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005144 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005145fi
5146
5147
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5149
5150
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5152$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5153cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005154#undef bfin
5155#undef cris
5156#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005157#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005158#undef hppa
5159#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005160#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005161#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005162#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005163#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005164#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005165#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005166 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005167#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005168# if defined(__x86_64__) && defined(__LP64__)
5169 x86_64-linux-gnu
5170# elif defined(__x86_64__) && defined(__ILP32__)
5171 x86_64-linux-gnux32
5172# elif defined(__i386__)
5173 i386-linux-gnu
5174# elif defined(__aarch64__) && defined(__AARCH64EL__)
5175# if defined(__ILP32__)
5176 aarch64_ilp32-linux-gnu
5177# else
5178 aarch64-linux-gnu
5179# endif
5180# elif defined(__aarch64__) && defined(__AARCH64EB__)
5181# if defined(__ILP32__)
5182 aarch64_be_ilp32-linux-gnu
5183# else
5184 aarch64_be-linux-gnu
5185# endif
5186# elif defined(__alpha__)
5187 alpha-linux-gnu
5188# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5189# if defined(__ARMEL__)
5190 arm-linux-gnueabihf
5191# else
5192 armeb-linux-gnueabihf
5193# endif
5194# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5195# if defined(__ARMEL__)
5196 arm-linux-gnueabi
5197# else
5198 armeb-linux-gnueabi
5199# endif
5200# elif defined(__hppa__)
5201 hppa-linux-gnu
5202# elif defined(__ia64__)
5203 ia64-linux-gnu
5204# elif defined(__m68k__) && !defined(__mcoldfire__)
5205 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005206# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5207# if _MIPS_SIM == _ABIO32
5208 mipsisa32r6el-linux-gnu
5209# elif _MIPS_SIM == _ABIN32
5210 mipsisa64r6el-linux-gnuabin32
5211# elif _MIPS_SIM == _ABI64
5212 mipsisa64r6el-linux-gnuabi64
5213# else
5214# error unknown platform triplet
5215# endif
5216# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5217# if _MIPS_SIM == _ABIO32
5218 mipsisa32r6-linux-gnu
5219# elif _MIPS_SIM == _ABIN32
5220 mipsisa64r6-linux-gnuabin32
5221# elif _MIPS_SIM == _ABI64
5222 mipsisa64r6-linux-gnuabi64
5223# else
5224# error unknown platform triplet
5225# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226# elif defined(__mips_hard_float) && defined(_MIPSEL)
5227# if _MIPS_SIM == _ABIO32
5228 mipsel-linux-gnu
5229# elif _MIPS_SIM == _ABIN32
5230 mips64el-linux-gnuabin32
5231# elif _MIPS_SIM == _ABI64
5232 mips64el-linux-gnuabi64
5233# else
5234# error unknown platform triplet
5235# endif
5236# elif defined(__mips_hard_float)
5237# if _MIPS_SIM == _ABIO32
5238 mips-linux-gnu
5239# elif _MIPS_SIM == _ABIN32
5240 mips64-linux-gnuabin32
5241# elif _MIPS_SIM == _ABI64
5242 mips64-linux-gnuabi64
5243# else
5244# error unknown platform triplet
5245# endif
5246# elif defined(__or1k__)
5247 or1k-linux-gnu
5248# elif defined(__powerpc__) && defined(__SPE__)
5249 powerpc-linux-gnuspe
5250# elif defined(__powerpc64__)
5251# if defined(__LITTLE_ENDIAN__)
5252 powerpc64le-linux-gnu
5253# else
5254 powerpc64-linux-gnu
5255# endif
5256# elif defined(__powerpc__)
5257 powerpc-linux-gnu
5258# elif defined(__s390x__)
5259 s390x-linux-gnu
5260# elif defined(__s390__)
5261 s390-linux-gnu
5262# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5263 sh4-linux-gnu
5264# elif defined(__sparc__) && defined(__arch64__)
5265 sparc64-linux-gnu
5266# elif defined(__sparc__)
5267 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005268# elif defined(__riscv)
5269# if __riscv_xlen == 32
5270 riscv32-linux-gnu
5271# elif __riscv_xlen == 64
5272 riscv64-linux-gnu
5273# else
5274# error unknown platform triplet
5275# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005276# else
5277# error unknown platform triplet
5278# endif
5279#elif defined(__FreeBSD_kernel__)
5280# if defined(__LP64__)
5281 x86_64-kfreebsd-gnu
5282# elif defined(__i386__)
5283 i386-kfreebsd-gnu
5284# else
5285# error unknown platform triplet
5286# endif
5287#elif defined(__gnu_hurd__)
5288 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005289#elif defined(__APPLE__)
5290 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005291#elif defined(__VXWORKS__)
5292 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293#else
5294# error unknown platform triplet
5295#endif
5296
5297EOF
5298
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005299if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5302$as_echo "$PLATFORM_TRIPLET" >&6; }
5303else
5304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5305$as_echo "none" >&6; }
5306fi
5307rm -f conftest.c conftest.out
5308
5309if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5310 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5311 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5312 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005313elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5314 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005316
doko@ubuntu.com55532312016-06-14 08:55:19 +02005317if test x$MULTIARCH != x; then
5318 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5319fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320
5321
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5323$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5324save_LDFLAGS="$LDFLAGS"
5325LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005326
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5328/* end confdefs.h. */
5329
5330int
5331main ()
5332{
5333
5334 ;
5335 return 0;
5336}
5337_ACEOF
5338if ac_fn_c_try_link "$LINENO"; then :
5339 NO_AS_NEEDED="-Wl,--no-as-needed"
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5341$as_echo "yes" >&6; }
5342else
5343 NO_AS_NEEDED=""
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347rm -f core conftest.err conftest.$ac_objext \
5348 conftest$ac_exeext conftest.$ac_ext
5349LDFLAGS="$save_LDFLAGS"
5350
5351
5352
5353# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354
Matthias Kloseb9621712010-04-24 17:59:49 +00005355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5356$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005357if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359else
5360 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5361 then ac_cv_path_EGREP="$GREP -E"
5362 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 # Loop through the user's path and test for each of PROGNAME-LIST
5366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005367for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5368do
5369 IFS=$as_save_IFS
5370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 for ac_prog in egrep; do
5372 for ac_exec_ext in '' $ac_executable_extensions; do
5373 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005374 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005375# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 # Check for GNU $ac_path_EGREP
5377case `"$ac_path_EGREP" --version 2>&1` in
5378*GNU*)
5379 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5380*)
5381 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 while :
5384 do
5385 cat "conftest.in" "conftest.in" >"conftest.tmp"
5386 mv "conftest.tmp" "conftest.in"
5387 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5390 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5393 # Best one so far, save it but keep looking for a better one
5394 ac_cv_path_EGREP="$ac_path_EGREP"
5395 ac_path_EGREP_max=$ac_count
5396 fi
5397 # 10*(2^10) chars as input seems more than enough
5398 test $ac_count -gt 10 && break
5399 done
5400 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5401esac
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $ac_path_EGREP_found && break 3
5404 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005409 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 +00005410 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411else
5412 ac_cv_path_EGREP=$EGREP
5413fi
5414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 fi
5416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5418$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005420
5421
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5423$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005424if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 $as_echo_n "(cached) " >&6
5426else
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005428/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005429#include <stdlib.h>
5430#include <stdarg.h>
5431#include <string.h>
5432#include <float.h>
5433
5434int
5435main ()
5436{
5437
5438 ;
5439 return 0;
5440}
5441_ACEOF
5442if ac_fn_c_try_compile "$LINENO"; then :
5443 ac_cv_header_stdc=yes
5444else
5445 ac_cv_header_stdc=no
5446fi
5447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5448
5449if test $ac_cv_header_stdc = yes; then
5450 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452/* end confdefs.h. */
5453#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005454
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005455_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005459else
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005461fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005462rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
Matthias Kloseb9621712010-04-24 17:59:49 +00005464fi
5465
5466if test $ac_cv_header_stdc = yes; then
5467 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470#include <stdlib.h>
5471
5472_ACEOF
5473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5474 $EGREP "free" >/dev/null 2>&1; then :
5475
5476else
5477 ac_cv_header_stdc=no
5478fi
5479rm -f conftest*
5480
5481fi
5482
5483if test $ac_cv_header_stdc = yes; then
5484 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5485 if test "$cross_compiling" = yes; then :
5486 :
5487else
5488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5489/* end confdefs.h. */
5490#include <ctype.h>
5491#include <stdlib.h>
5492#if ((' ' & 0x0FF) == 0x020)
5493# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5494# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5495#else
5496# define ISLOWER(c) \
5497 (('a' <= (c) && (c) <= 'i') \
5498 || ('j' <= (c) && (c) <= 'r') \
5499 || ('s' <= (c) && (c) <= 'z'))
5500# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5501#endif
5502
5503#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5504int
5505main ()
5506{
5507 int i;
5508 for (i = 0; i < 256; i++)
5509 if (XOR (islower (i), ISLOWER (i))
5510 || toupper (i) != TOUPPER (i))
5511 return 2;
5512 return 0;
5513}
5514_ACEOF
5515if ac_fn_c_try_run "$LINENO"; then :
5516
5517else
5518 ac_cv_header_stdc=no
5519fi
5520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5521 conftest.$ac_objext conftest.beam conftest.$ac_ext
5522fi
5523
5524fi
5525fi
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5527$as_echo "$ac_cv_header_stdc" >&6; }
5528if test $ac_cv_header_stdc = yes; then
5529
5530$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5531
5532fi
5533
5534# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5535for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5536 inttypes.h stdint.h unistd.h
5537do :
5538 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5539ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5540"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005541if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005542 cat >>confdefs.h <<_ACEOF
5543#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5544_ACEOF
5545
5546fi
5547
5548done
5549
5550
5551
5552 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 +02005553if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 MINIX=yes
5555else
5556 MINIX=
5557fi
5558
5559
5560 if test "$MINIX" = yes; then
5561
5562$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5563
5564
5565$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5566
5567
5568$as_echo "#define _MINIX 1" >>confdefs.h
5569
5570 fi
5571
5572
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5574$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005575if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 $as_echo_n "(cached) " >&6
5577else
5578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5579/* end confdefs.h. */
5580
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005581# define __EXTENSIONS__ 1
5582 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005583int
5584main ()
5585{
5586
5587 ;
5588 return 0;
5589}
5590_ACEOF
5591if ac_fn_c_try_compile "$LINENO"; then :
5592 ac_cv_safe_to_define___extensions__=yes
5593else
5594 ac_cv_safe_to_define___extensions__=no
5595fi
5596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5597fi
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5599$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5600 test $ac_cv_safe_to_define___extensions__ = yes &&
5601 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5602
5603 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5604
5605 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5606
5607 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5608
5609 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5610
5611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5614$as_echo_n "checking for the Android API level... " >&6; }
5615cat >> conftest.c <<EOF
5616#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005617android_api = __ANDROID_API__
5618arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619#else
5620#error not Android
5621#endif
5622EOF
5623
5624if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005625 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5626 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5628$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005629 if test -z "$ANDROID_API_LEVEL"; then
5630 echo 'Fatal: you must define __ANDROID_API__'
5631 exit 1
5632 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633
5634cat >>confdefs.h <<_ACEOF
5635#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5636_ACEOF
5637
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5640$as_echo_n "checking for the Android arm ABI... " >&6; }
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5642$as_echo "$_arm_arch" >&6; }
5643 if test "$_arm_arch" = 7; then
5644 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5645 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5646 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005647else
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5649$as_echo "not Android" >&6; }
5650fi
5651rm -f conftest.c conftest.out
5652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653# Check for unsupported systems
5654case $ac_sys_system/$ac_sys_release in
5655atheos*|Linux*/1*)
5656 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5657 echo See README for details.
5658 exit 1;;
5659esac
5660
5661
Matthias Kloseb9621712010-04-24 17:59:49 +00005662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5663$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664
5665# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005666if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 withval=$with_suffix;
5668 case $withval in
5669 no) EXEEXT=;;
5670 yes) EXEEXT=.exe;;
5671 *) EXEEXT=$withval;;
5672 esac
5673fi
5674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5676$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677
5678# Test whether we're running on a non-case-sensitive system, in which
5679# case we give a warning if no ext is given
5680
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5682$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683if test ! -d CaseSensitiveTestDir; then
5684mkdir CaseSensitiveTestDir
5685fi
5686
5687if test -d casesensitivetestdir
5688then
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5690$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691 BUILDEXEEXT=.exe
5692else
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695 BUILDEXEEXT=$EXEEXT
5696fi
5697rmdir CaseSensitiveTestDir
5698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699case $ac_sys_system in
5700hp*|HP*)
5701 case $CC in
5702 cc|*/cc) CC="$CC -Ae";;
5703 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704esac
5705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5708$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709if test -z "$LIBRARY"
5710then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005711 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5714$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
5716# LDLIBRARY is the name of the library to link against (as opposed to the
5717# name of the library into which to insert object files). BLDLIBRARY is also
5718# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5719# is blank as the main program is not linked directly against LDLIBRARY.
5720# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5721# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5722# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5723# DLLLIBRARY is the shared (i.e., DLL) library.
5724#
5725# RUNSHARED is used to run shared python without installed libraries
5726#
5727# INSTSONAME is the name of the shared library that will be use to install
5728# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005729#
5730# LDVERSION is the shared library version number, normally the Python version
5731# with the ABI build flags appended.
5732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734
5735
5736
5737
5738
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740LDLIBRARY="$LIBRARY"
5741BLDLIBRARY='$(LDLIBRARY)'
5742INSTSONAME='$(LDLIBRARY)'
5743DLLLIBRARY=''
5744LDLIBRARYDIR=''
5745RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005746LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# LINKCC is the command that links the python executable -- default is $(CC).
5749# If CXX is set, and if it is needed to link a main function that was
5750# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5751# python might then depend on the C++ runtime
5752# This is altered for AIX in order to build the export list before
5753# linking.
5754
Matthias Kloseb9621712010-04-24 17:59:49 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5756$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757if test -z "$LINKCC"
5758then
5759 LINKCC='$(PURIFY) $(MAINCC)'
5760 case $ac_sys_system in
5761 AIX*)
5762 exp_extra="\"\""
5763 if test $ac_sys_release -ge 5 -o \
5764 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5765 exp_extra="."
5766 fi
5767 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 QNX*)
5769 # qcc must be used because the other compilers do not
5770 # support -N.
5771 LINKCC=qcc;;
5772 esac
5773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5775$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5778# make sure we default having it set to "no": this is used by
5779# distutils.unixccompiler to know if it should add --enable-new-dtags
5780# to linker command lines, and failing to detect GNU ld simply results
5781# in the same bahaviour as before.
5782
Matthias Kloseb9621712010-04-24 17:59:49 +00005783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5784$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785ac_prog=ld
5786if test "$GCC" = yes; then
5787 ac_prog=`$CC -print-prog-name=ld`
5788fi
5789case `"$ac_prog" -V 2>&1 < /dev/null` in
5790 *GNU*)
5791 GNULD=yes;;
5792 *)
5793 GNULD=no;;
5794esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5796$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5799$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005801if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 enableval=$enable_shared;
5803fi
5804
5805
5806if test -z "$enable_shared"
5807then
5808 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005809 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810 enable_shared="yes";;
5811 *)
5812 enable_shared="no";;
5813 esac
5814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5816$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5819$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005821if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005822 enableval=$enable_profiling;
5823fi
5824
5825if test "x$enable_profiling" = xyes; then
5826 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005827 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829/* end confdefs.h. */
5830int main() { return 0; }
5831_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832if ac_fn_c_try_link "$LINENO"; then :
5833
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005835 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837rm -f core conftest.err conftest.$ac_objext \
5838 conftest$ac_exeext conftest.$ac_ext
5839 CC="$ac_save_cc"
5840else
5841 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5844$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846if test "x$enable_profiling" = xyes; then
5847 BASECFLAGS="-pg $BASECFLAGS"
5848 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
5850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5852$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
5854# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5855# library that we build, but we do not want to link against it (we
5856# will find it with a -framework option). For this reason there is an
5857# extra variable BLDLIBRARY against which Python and the extension
5858# modules are linked, BLDLIBRARY. This is normally the same as
5859# LDLIBRARY, but empty for MacOSX framework builds.
5860if test "$enable_framework"
5861then
5862 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005863 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 BLDLIBRARY=''
5865else
5866 BLDLIBRARY='$(LDLIBRARY)'
5867fi
5868
5869# Other platforms follow
5870if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005871 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
Matthias Kloseb9621712010-04-24 17:59:49 +00005873$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
5875 case $ac_sys_system in
5876 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 LDLIBRARY='libpython$(LDVERSION).dll.a'
5878 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 ;;
5880 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005881 LDLIBRARY='libpython$(LDVERSION).so'
5882 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005883 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005885 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005886 then
5887 PY3LIBRARY=libpython3.so
5888 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005890 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005891 LDLIBRARY='libpython$(LDVERSION).so'
5892 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005893 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005895 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005896 then
5897 PY3LIBRARY=libpython3.so
5898 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ;;
5900 hp*|HP*)
5901 case `uname -m` in
5902 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ;;
5908 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005910 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).dylib'
5914 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005917 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005920 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921
5922 esac
5923else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005924 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 case $ac_sys_system in
5926 CYGWIN*)
5927 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005928 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 esac
5931fi
5932
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005933if test "$cross_compiling" = yes; then
5934 RUNSHARED=
5935fi
5936
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5938$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005941if test -n "$ac_tool_prefix"; then
5942 for ac_prog in ar aal
5943 do
5944 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5945set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005948if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950else
5951 if test -n "$AR"; then
5952 ac_cv_prog_AR="$AR" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957 IFS=$as_save_IFS
5958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005961 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 break 2
5964 fi
5965done
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AR=$ac_cv_prog_AR
5972if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5974$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975else
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
5979
5980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005981 test -n "$AR" && break
5982 done
5983fi
5984if test -z "$AR"; then
5985 ac_ct_AR=$AR
5986 for ac_prog in ar aal
5987do
5988 # Extract the first word of "$ac_prog", so it can be a program name with args.
5989set dummy $ac_prog; ac_word=$2
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if ${ac_cv_prog_ac_ct_AR+:} false; then :
5993 $as_echo_n "(cached) " >&6
5994else
5995 if test -n "$ac_ct_AR"; then
5996 ac_cv_prog_ac_ct_AR="$ac_ct_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=.
6003 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +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_ac_ct_AR="$ac_prog"
6006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6007 break 2
6008 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 done
6011IFS=$as_save_IFS
6012
6013fi
6014fi
6015ac_ct_AR=$ac_cv_prog_ac_ct_AR
6016if test -n "$ac_ct_AR"; then
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6018$as_echo "$ac_ct_AR" >&6; }
6019else
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
6022fi
6023
6024
6025 test -n "$ac_ct_AR" && break
6026done
6027
6028 if test "x$ac_ct_AR" = x; then
6029 AR="ar"
6030 else
6031 case $cross_compiling:$ac_tool_warned in
6032yes:)
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6035ac_tool_warned=yes ;;
6036esac
6037 AR=$ac_ct_AR
6038 fi
6039fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040
6041
6042# tweak ARFLAGS only if the user didn't set it on the command line
6043
6044if test -z "$ARFLAGS"
6045then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006046 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047fi
6048
doko@ubuntu.com58844492012-06-30 18:25:32 +02006049if test -n "$ac_tool_prefix"; then
6050 for ac_prog in readelf
6051 do
6052 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6053set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6055$as_echo_n "checking for $ac_word... " >&6; }
6056if ${ac_cv_prog_READELF+:} false; then :
6057 $as_echo_n "(cached) " >&6
6058else
6059 if test -n "$READELF"; then
6060 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6061else
6062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065 IFS=$as_save_IFS
6066 test -z "$as_dir" && as_dir=.
6067 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006069 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071 break 2
6072 fi
6073done
6074 done
6075IFS=$as_save_IFS
6076
6077fi
6078fi
6079READELF=$ac_cv_prog_READELF
6080if test -n "$READELF"; then
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6082$as_echo "$READELF" >&6; }
6083else
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6085$as_echo "no" >&6; }
6086fi
6087
6088
6089 test -n "$READELF" && break
6090 done
6091fi
6092if test -z "$READELF"; then
6093 ac_ct_READELF=$READELF
6094 for ac_prog in readelf
6095do
6096 # Extract the first word of "$ac_prog", so it can be a program name with args.
6097set dummy $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_ac_ct_READELF+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102else
6103 if test -n "$ac_ct_READELF"; then
6104 ac_cv_prog_ac_ct_READELF="$ac_ct_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_ac_ct_READELF="$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
6123ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6124if test -n "$ac_ct_READELF"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6126$as_echo "$ac_ct_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 "$ac_ct_READELF" && break
6134done
6135
6136 if test "x$ac_ct_READELF" = x; then
6137 READELF=":"
6138 else
6139 case $cross_compiling:$ac_tool_warned in
6140yes:)
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6143ac_tool_warned=yes ;;
6144esac
6145 READELF=$ac_ct_READELF
6146 fi
6147fi
6148
6149if test "$cross_compiling" = yes; then
6150 case "$READELF" in
6151 readelf|:)
6152 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6153 ;;
6154 esac
6155fi
6156
6157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006160hp*|HP*)
6161 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162 if test -z "$INSTALL"
6163 then
6164 INSTALL="${srcdir}/install-sh -c"
6165 fi
6166esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167# Find a good install program. We prefer a C program (faster),
6168# so one script is as good as another. But avoid the broken or
6169# incompatible versions:
6170# SysV /etc/install, /usr/sbin/install
6171# SunOS /usr/etc/install
6172# IRIX /sbin/install
6173# AIX /bin/install
6174# AmigaOS /C/install, which installs bootblocks on floppy discs
6175# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6176# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6177# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6178# OS/2's system install, which has a completely different semantic
6179# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006180# Reject install programs that cannot install multiple files.
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6182$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006184if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186else
6187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 # Account for people who put trailing slashes in PATH elements.
6193case $as_dir/ in #((
6194 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197 /usr/ucb/* ) ;;
6198 *)
6199 # OSF1 and SCO ODT 3.0 have their own names for install.
6200 # Don't use installbsd from OSF since it installs stuff as root
6201 # by default.
6202 for ac_prog in ginstall scoinst install; do
6203 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006204 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205 if test $ac_prog = install &&
6206 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6207 # AIX install. It has an incompatible calling convention.
6208 :
6209 elif test $ac_prog = install &&
6210 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6211 # program-specific install script used by HP pwplus--don't use.
6212 :
6213 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 rm -rf conftest.one conftest.two conftest.dir
6215 echo one > conftest.one
6216 echo two > conftest.two
6217 mkdir conftest.dir
6218 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6219 test -s conftest.one && test -s conftest.two &&
6220 test -s conftest.dir/conftest.one &&
6221 test -s conftest.dir/conftest.two
6222 then
6223 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6224 break 3
6225 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226 fi
6227 fi
6228 done
6229 done
6230 ;;
6231esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006232
6233 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234IFS=$as_save_IFS
6235
Matthias Kloseb9621712010-04-24 17:59:49 +00006236rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
6238fi
6239 if test "${ac_cv_path_install+set}" = set; then
6240 INSTALL=$ac_cv_path_install
6241 else
6242 # As a last resort, use the slow shell script. Don't cache a
6243 # value for INSTALL within a source directory, because that will
6244 # break other packages using the cache if that directory is
6245 # removed, or if the value is a relative name.
6246 INSTALL=$ac_install_sh
6247 fi
6248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6250$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251
6252# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6253# It thinks the first close brace ends the variable substitution.
6254test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6255
6256test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6257
6258test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6259
Matthias Klose93a0ef12012-03-15 18:08:34 +01006260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6261$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6262if test -z "$MKDIR_P"; then
6263 if ${ac_cv_path_mkdir+:} false; then :
6264 $as_echo_n "(cached) " >&6
6265else
6266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6268do
6269 IFS=$as_save_IFS
6270 test -z "$as_dir" && as_dir=.
6271 for ac_prog in mkdir gmkdir; do
6272 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006273 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006274 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6275 'mkdir (GNU coreutils) '* | \
6276 'mkdir (coreutils) '* | \
6277 'mkdir (fileutils) '4.1*)
6278 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6279 break 3;;
6280 esac
6281 done
6282 done
6283 done
6284IFS=$as_save_IFS
6285
6286fi
6287
6288 test -d ./--version && rmdir ./--version
6289 if test "${ac_cv_path_mkdir+set}" = set; then
6290 MKDIR_P="$ac_cv_path_mkdir -p"
6291 else
6292 # As a last resort, use the slow shell script. Don't cache a
6293 # value for MKDIR_P within a source directory, because that will
6294 # break other packages using the cache if that directory is
6295 # removed, or if the value is a relative name.
6296 MKDIR_P="$ac_install_sh -d"
6297 fi
6298fi
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6300$as_echo "$MKDIR_P" >&6; }
6301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302
6303# Not every filesystem supports hard links
6304
6305if test -z "$LN" ; then
6306 case $ac_sys_system in
6307 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 *) LN=ln;;
6309 esac
6310fi
6311
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006312# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006313
6314ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006315
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6318$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319
6320# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 withval=$with_pydebug;
6323if test "$withval" != no
6324then
6325
Matthias Kloseb9621712010-04-24 17:59:49 +00006326$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6329$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006331 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006332else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334fi
6335else
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338fi
6339
6340
Victor Stinnerf4e47032019-04-25 00:56:28 +02006341# Check for --with-trace-refs
6342# --with-trace-refs
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6344$as_echo_n "checking for --with-trace-refs... " >&6; }
6345
6346# Check whether --with-trace-refs was given.
6347if test "${with_trace_refs+set}" = set; then :
6348 withval=$with_trace_refs;
6349else
6350 with_trace_refs=no
6351fi
6352
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6354$as_echo "$with_trace_refs" >&6; }
6355
6356if test "$with_trace_refs" = "yes"
6357then
6358
6359$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6360
6361fi
6362
6363# Check for --with-assertions.
6364# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006365assertions='false'
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6367$as_echo_n "checking for --with-assertions... " >&6; }
6368
6369# Check whether --with-assertions was given.
6370if test "${with_assertions+set}" = set; then :
6371 withval=$with_assertions;
6372if test "$withval" != no
6373then
6374 assertions='true'
6375fi
6376fi
6377
6378if test "$assertions" = 'true'; then
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6380$as_echo "yes" >&6; }
6381elif test "$Py_DEBUG" = 'true'; then
6382 assertions='true'
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6384$as_echo "implied by --with-pydebug" >&6; }
6385else
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
Brett Cannon63d98bc2016-09-06 17:12:40 -07006390# Enable optimization flags
6391
6392
6393Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6395$as_echo_n "checking for --enable-optimizations... " >&6; }
6396# Check whether --enable-optimizations was given.
6397if test "${enable_optimizations+set}" = set; then :
6398 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006399if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006400then
6401 Py_OPT='true'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
6404else
6405 Py_OPT='false'
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; };
6408fi
6409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006415 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6416 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006417 # 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 +00006418 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006419 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006420 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006421 DEF_MAKE_RULE="build_all"
6422else
6423 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006424 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006425 DEF_MAKE_RULE="all"
6426fi
6427
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006428
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6430$as_echo_n "checking PROFILE_TASK... " >&6; }
6431if test -z "$PROFILE_TASK"
6432then
6433 PROFILE_TASK='-m test --pgo'
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6436$as_echo "$PROFILE_TASK" >&6; }
6437
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006438# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6439# normal names in the default $PATH (ie: Ubuntu). They exist under the
6440# non-suffixed name in their versioned llvm directory.
6441
6442llvm_bin_dir=''
6443llvm_path="${PATH}"
6444if test "${CC}" = "clang"
6445then
6446 clang_bin=`which clang`
6447 # Some systems install clang elsewhere as a symlink to the real path
6448 # which is where the related llvm tools are located.
6449 if test -L "${clang_bin}"
6450 then
6451 clang_dir=`dirname "${clang_bin}"`
6452 clang_bin=`readlink "${clang_bin}"`
6453 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6454 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6455 fi
6456fi
6457
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006458# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6460$as_echo_n "checking for --with-lto... " >&6; }
6461
6462# Check whether --with-lto was given.
6463if test "${with_lto+set}" = set; then :
6464 withval=$with_lto;
6465if test "$withval" != no
6466then
6467 Py_LTO='true'
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6469$as_echo "yes" >&6; };
6470else
6471 Py_LTO='false'
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; };
6474fi
6475else
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; }
6478fi
6479
6480if test "$Py_LTO" = 'true' ; then
6481 case $CC in
6482 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006483
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006484 if test -n "$ac_tool_prefix"; then
6485 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6486set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_LLVM_AR+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491else
6492 case $LLVM_AR in
6493 [\\/]* | ?:[\\/]*)
6494 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6495 ;;
6496 *)
6497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in ${llvm_path}
6499do
6500 IFS=$as_save_IFS
6501 test -z "$as_dir" && as_dir=.
6502 for ac_exec_ext in '' $ac_executable_extensions; do
6503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506 break 2
6507 fi
6508done
6509 done
6510IFS=$as_save_IFS
6511
6512 ;;
6513esac
6514fi
6515LLVM_AR=$ac_cv_path_LLVM_AR
6516if test -n "$LLVM_AR"; then
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6518$as_echo "$LLVM_AR" >&6; }
6519else
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006525fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006526if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006527 ac_pt_LLVM_AR=$LLVM_AR
6528 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006529set dummy llvm-ar; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534else
6535 case $ac_pt_LLVM_AR in
6536 [\\/]* | ?:[\\/]*)
6537 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6538 ;;
6539 *)
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in ${llvm_path}
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551done
6552 done
6553IFS=$as_save_IFS
6554
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006555 ;;
6556esac
6557fi
6558ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6559if test -n "$ac_pt_LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6561$as_echo "$ac_pt_LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006567 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006568 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006569 else
6570 case $cross_compiling:$ac_tool_warned in
6571yes:)
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6574ac_tool_warned=yes ;;
6575esac
6576 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006577 fi
6578else
6579 LLVM_AR="$ac_cv_path_LLVM_AR"
6580fi
6581
6582
6583 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6584 then
6585 LLVM_AR_FOUND="found"
6586 else
6587 LLVM_AR_FOUND="not-found"
6588 fi
6589 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6590 then
6591 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6592 if test -n "${found_llvm_ar}"
6593 then
6594 LLVM_AR='/usr/bin/xcrun llvm-ar'
6595 LLVM_AR_FOUND=found
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6597$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6598 fi
6599 fi
6600 if test $LLVM_AR_FOUND = not-found
6601 then
6602 LLVM_PROFR_ERR=yes
6603 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6604 else
6605 LLVM_AR_ERR=no
6606 fi
6607 AR="${LLVM_AR}"
6608 case $ac_sys_system in
6609 Darwin*)
6610 # Any changes made here should be reflected in the GCC+Darwin case below
6611 LTOFLAGS="-flto -Wl,-export_dynamic"
6612 ;;
6613 *)
6614 LTOFLAGS="-flto"
6615 ;;
6616 esac
6617 ;;
6618 *gcc*)
6619 case $ac_sys_system in
6620 Darwin*)
6621 LTOFLAGS="-flto -Wl,-export_dynamic"
6622 ;;
6623 *)
6624 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6625 ;;
6626 esac
6627 ;;
6628 esac
6629
6630 if test "$ac_cv_prog_cc_g" = "yes"
6631 then
6632 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6633 # to get debug symbols.
6634 LTOFLAGS="$LTOFLAGS -g"
6635 fi
6636
stratakisf92c7aa2018-12-04 15:54:01 +01006637 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006638 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006639fi
6640
6641# Enable PGO flags.
6642
6643
6644
6645
6646
6647
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006648if test -n "$ac_tool_prefix"; then
6649 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6650set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6652$as_echo_n "checking for $ac_word... " >&6; }
6653if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6654 $as_echo_n "(cached) " >&6
6655else
6656 case $LLVM_PROFDATA in
6657 [\\/]* | ?:[\\/]*)
6658 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6659 ;;
6660 *)
6661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663do
6664 IFS=$as_save_IFS
6665 test -z "$as_dir" && as_dir=.
6666 for ac_exec_ext in '' $ac_executable_extensions; do
6667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6670 break 2
6671 fi
6672done
6673 done
6674IFS=$as_save_IFS
6675
Gregory P. Smith799520c2016-09-07 16:10:00 -07006676 ;;
6677esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006678fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006679LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6680if test -n "$LLVM_PROFDATA"; then
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6682$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683else
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
6686fi
6687
6688
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006689fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006690if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006691 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6692 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006693set dummy llvm-profdata; ac_word=$2
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695$as_echo_n "checking for $ac_word... " >&6; }
6696if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6697 $as_echo_n "(cached) " >&6
6698else
6699 case $ac_pt_LLVM_PROFDATA in
6700 [\\/]* | ?:[\\/]*)
6701 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6702 ;;
6703 *)
6704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6705for as_dir in ${llvm_path}
6706do
6707 IFS=$as_save_IFS
6708 test -z "$as_dir" && as_dir=.
6709 for ac_exec_ext in '' $ac_executable_extensions; do
6710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6711 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6713 break 2
6714 fi
6715done
6716 done
6717IFS=$as_save_IFS
6718
Gregory P. Smith799520c2016-09-07 16:10:00 -07006719 ;;
6720esac
6721fi
6722ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6723if test -n "$ac_pt_LLVM_PROFDATA"; then
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6725$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6726else
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6728$as_echo "no" >&6; }
6729fi
6730
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006731 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006732 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006733 else
6734 case $cross_compiling:$ac_tool_warned in
6735yes:)
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6738ac_tool_warned=yes ;;
6739esac
6740 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006741 fi
6742else
6743 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6744fi
6745
6746
6747if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6748then
6749 LLVM_PROF_FOUND="found"
6750else
6751 LLVM_PROF_FOUND="not-found"
6752fi
6753if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6754then
6755 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6756 if test -n "${found_llvm_profdata}"
6757 then
6758 # llvm-profdata isn't directly in $PATH in some cases.
6759 # https://apple.stackexchange.com/questions/197053/
6760 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6761 LLVM_PROF_FOUND=found
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6763$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6764 fi
6765fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006766LLVM_PROF_ERR=no
6767case $CC in
6768 *clang*)
6769 # Any changes made here should be reflected in the GCC+Darwin case below
6770 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6771 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006772 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006773 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6774 if test $LLVM_PROF_FOUND = not-found
6775 then
6776 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 if test "${REQUIRE_PGO}" = "yes"
6778 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006779 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 -07006780 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006781 fi
6782 ;;
6783 *gcc*)
6784 case $ac_sys_system in
6785 Darwin*)
6786 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6787 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006788 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006791 then
6792 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006793 if test "${REQUIRE_PGO}" = "yes"
6794 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006795 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 -07006796 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797 fi
6798 ;;
6799 *)
6800 PGO_PROF_GEN_FLAG="-fprofile-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6802 LLVM_PROF_MERGER="true"
6803 LLVM_PROF_FILE=""
6804 ;;
6805 esac
6806 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006807 *icc*)
6808 PGO_PROF_GEN_FLAG="-prof-gen"
6809 PGO_PROF_USE_FLAG="-prof-use"
6810 LLVM_PROF_MERGER="true"
6811 LLVM_PROF_FILE=""
6812 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813esac
6814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6816# merged with this chunk of code?
6817
6818# Optimizer/debugger flags
6819# ------------------------
6820# (The following bit of code is complicated enough - please keep things
6821# indented properly. Just pretend you're editing Python code. ;-)
6822
6823# There are two parallel sets of case statements below, one that checks to
6824# see if OPT was set and one that does BASECFLAGS setting based upon
6825# compiler and platform. BASECFLAGS tweaks need to be made even if the
6826# user set OPT.
6827
Victor Stinner23a683a2019-04-12 21:27:37 +02006828case $CC in
6829 *clang*)
6830 cc_is_clang=1
6831 ;;
6832 *)
6833 if $CC --version 2>&1 | grep -q clang
6834 then
6835 cc_is_clang=1
6836 else
6837 cc_is_clang=
6838 fi
6839esac
6840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841# tweak OPT based on compiler and platform, only if the user didn't set
6842# it on the command line
6843
Victor Stinner9ed34a82017-05-02 22:35:58 +02006844
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006845if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846then
6847 case $GCC in
6848 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6850 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6851 WRAP="-fwrapv"
6852 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006853
Victor Stinner35f3d242017-04-21 12:35:24 +02006854 if test -n "${cc_is_clang}"
6855 then
6856 # Clang also needs -fwrapv
6857 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006858 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6859 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006860 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006861 fi
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 case $ac_cv_prog_cc_g in
6864 yes)
6865 if test "$Py_DEBUG" = 'true' ; then
6866 # Optimization messes up debuggers, so turn it off for
6867 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006868 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006869 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006870 else
Victor Stinner28205b22017-04-21 11:24:34 +02006871 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006872 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873 else
Victor Stinner28205b22017-04-21 11:24:34 +02006874 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 fi
6876 ;;
6877 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006878 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 ;;
6880 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 case $ac_sys_system in
6883 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6884 ;;
6885 esac
6886 ;;
6887
6888 *)
6889 OPT="-O"
6890 ;;
6891 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892fi
6893
6894
6895
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006896
stratakiscf10a752018-12-19 18:19:01 +01006897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898# The -arch flags for universal builds on OSX
6899UNIVERSAL_ARCH_FLAGS=
6900
6901
6902# tweak BASECFLAGS based on compiler and platform
6903case $GCC in
6904yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006905 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006906
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6908$as_echo_n "checking for -Wextra... " >&6; }
6909 ac_save_cc="$CC"
6910 CC="$CC -Wextra -Werror"
6911 if ${ac_cv_extra_warnings+:} false; then :
6912 $as_echo_n "(cached) " >&6
6913else
6914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6915/* end confdefs.h. */
6916
6917
6918int
6919main ()
6920{
6921
6922 ;
6923 return 0;
6924}
6925
6926_ACEOF
6927if ac_fn_c_try_compile "$LINENO"; then :
6928
6929 ac_cv_extra_warnings=yes
6930
6931else
6932
6933 ac_cv_extra_warnings=no
6934
6935fi
6936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6937fi
6938
6939 CC="$ac_save_cc"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6941$as_echo "$ac_cv_extra_warnings" >&6; }
6942
6943 if test $ac_cv_extra_warnings = yes
6944 then
6945 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6946 fi
6947
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006948 # Python doesn't violate C99 aliasing rules, but older versions of
6949 # GCC produce warnings for legal Python code. Enable
6950 # -fno-strict-aliasing on versions of GCC that support but produce
6951 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6953$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954 ac_save_cc="$CC"
6955 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006957 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006959else
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006962
Matthias Kloseb159a552010-04-25 21:00:44 +00006963
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006964int
6965main ()
6966{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006967
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006968 ;
6969 return 0;
6970}
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006973if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
6975 CC="$ac_save_cc -fstrict-aliasing"
6976 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978/* end confdefs.h. */
6979
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006980 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981int
6982main ()
6983{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006984double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985 ;
6986 return 0;
6987}
Matthias Kloseb159a552010-04-25 21:00:44 +00006988
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006990if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006991
6992 ac_cv_no_strict_aliasing=no
6993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994else
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
6996 ac_cv_no_strict_aliasing=yes
6997
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006998fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001else
Matthias Kloseb159a552010-04-25 21:00:44 +00007002
7003 ac_cv_no_strict_aliasing=no
7004
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007007fi
7008
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7012$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014 then
7015 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7016 fi
7017
Zachary Ware5af85642015-12-21 12:09:17 -06007018 # ICC doesn't recognize the option, but only emits a warning
7019 ## XXX does it emit an unused result warning and can it be disabled?
7020 case "$CC" in
7021 *icc*)
7022 ac_cv_disable_unused_result_warning=no
7023 ;;
7024 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7026$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7027 ac_save_cc="$CC"
7028 CC="$CC -Wunused-result -Werror"
7029 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007030 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007031 $as_echo_n "(cached) " >&6
7032else
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034/* end confdefs.h. */
7035
7036
7037int
7038main ()
7039{
7040
7041 ;
7042 return 0;
7043}
7044
7045_ACEOF
7046if ac_fn_c_try_compile "$LINENO"; then :
7047
7048 ac_cv_disable_unused_result_warning=yes
7049
7050else
7051
7052 ac_cv_disable_unused_result_warning=no
7053
7054fi
7055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056fi
7057
7058 CFLAGS="$save_CFLAGS"
7059 CC="$ac_save_cc"
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7061$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007062 ;;
7063 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007064
7065 if test $ac_cv_disable_unused_result_warning = yes
7066 then
7067 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007068 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7069 fi
7070
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7072$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7073 ac_save_cc="$CC"
7074 CC="$CC -Wunused-parameter -Werror"
7075 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7076 $as_echo_n "(cached) " >&6
7077else
7078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7079/* end confdefs.h. */
7080
7081
7082int
7083main ()
7084{
7085
7086 ;
7087 return 0;
7088}
7089
7090_ACEOF
7091if ac_fn_c_try_compile "$LINENO"; then :
7092
7093 ac_cv_disable_unused_parameter_warning=yes
7094
7095else
7096
7097 ac_cv_disable_unused_parameter_warning=no
7098
7099fi
7100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7101fi
7102
7103 CC="$ac_save_cc"
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7105$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7106
7107 if test $ac_cv_disable_unused_parameter_warning = yes
7108 then
7109 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7110 fi
7111
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7113$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7114 ac_save_cc="$CC"
7115 CC="$CC -Wmissing-field-initializers -Werror"
7116 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7117 $as_echo_n "(cached) " >&6
7118else
7119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120/* end confdefs.h. */
7121
7122
7123int
7124main ()
7125{
7126
7127 ;
7128 return 0;
7129}
7130
7131_ACEOF
7132if ac_fn_c_try_compile "$LINENO"; then :
7133
7134 ac_cv_disable_missing_field_initializers=yes
7135
7136else
7137
7138 ac_cv_disable_missing_field_initializers=no
7139
7140fi
7141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7142fi
7143
7144 CC="$ac_save_cc"
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7146$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7147
7148 if test $ac_cv_disable_missing_field_initializers = yes
7149 then
7150 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007151 fi
7152
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7154$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7155 ac_save_cc="$CC"
7156 CC="$CC -Wsign-compare"
7157 save_CFLAGS="$CFLAGS"
7158 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7159 $as_echo_n "(cached) " >&6
7160else
7161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162/* end confdefs.h. */
7163
7164
7165int
7166main ()
7167{
7168
7169 ;
7170 return 0;
7171}
7172
7173_ACEOF
7174if ac_fn_c_try_compile "$LINENO"; then :
7175
7176 ac_cv_enable_sign_compare_warning=yes
7177
7178else
7179
7180 ac_cv_enable_sign_compare_warning=no
7181
7182fi
7183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7184fi
7185
7186 CFLAGS="$save_CFLAGS"
7187 CC="$ac_save_cc"
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7189$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7190
7191 if test $ac_cv_enable_sign_compare_warning = yes
7192 then
7193 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7194 fi
7195
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7197$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7198 ac_save_cc="$CC"
7199 CC="$CC -Wunreachable-code"
7200 save_CFLAGS="$CFLAGS"
7201 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7202 $as_echo_n "(cached) " >&6
7203else
7204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7205/* end confdefs.h. */
7206
7207
7208int
7209main ()
7210{
7211
7212 ;
7213 return 0;
7214}
7215
7216_ACEOF
7217if ac_fn_c_try_compile "$LINENO"; then :
7218
7219 ac_cv_enable_unreachable_code_warning=yes
7220
7221else
7222
7223 ac_cv_enable_unreachable_code_warning=no
7224
7225fi
7226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7227fi
7228
7229 CFLAGS="$save_CFLAGS"
7230 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007231
7232 # Don't enable unreachable code warning in debug mode, since it usually
7233 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007234 # Issue #24324: Unfortunately, the unreachable code warning does not work
7235 # correctly on gcc and has been silently removed from the compiler.
7236 # It is supported on clang but on OS X systems gcc may be an alias
7237 # for clang. Try to determine if the compiler is not really gcc and,
7238 # if so, only then enable the warning.
7239 if test $ac_cv_enable_unreachable_code_warning = yes && \
7240 test "$Py_DEBUG" != "true" && \
7241 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007242 then
7243 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007244 else
7245 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007246 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7248$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007249
INADA Naokie3364842018-06-05 20:40:53 +09007250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7251$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7252 ac_save_cc="$CC"
7253 CC="$CC -Werror -Wstrict-prototypes"
7254 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7255 $as_echo_n "(cached) " >&6
7256else
7257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7258/* end confdefs.h. */
7259
7260
7261int
7262main ()
7263{
7264
7265 ;
7266 return 0;
7267}
7268
7269_ACEOF
7270if ac_fn_c_try_compile "$LINENO"; then :
7271
7272 ac_cv_enable_strict_prototypes_warning=yes
7273
7274else
7275
7276 ac_cv_enable_strict_prototypes_warning=no
7277
7278fi
7279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7280fi
7281
7282 CC="$ac_save_cc"
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7284$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7285
7286 if test $ac_cv_enable_strict_prototypes_warning = yes
7287 then
7288 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7289 fi
7290
Victor Stinner193ee0a2017-02-06 14:24:00 +01007291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7292$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7293 ac_save_cc="$CC"
7294 CC="$CC -Werror=implicit-function-declaration"
7295 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7296 $as_echo_n "(cached) " >&6
7297else
7298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7299/* end confdefs.h. */
7300
7301
7302int
7303main ()
7304{
7305
7306 ;
7307 return 0;
7308}
7309
7310_ACEOF
7311if ac_fn_c_try_compile "$LINENO"; then :
7312
7313 ac_cv_enable_implicit_function_declaration_error=yes
7314
7315else
7316
7317 ac_cv_enable_implicit_function_declaration_error=no
7318
7319fi
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321fi
7322
7323 CC="$ac_save_cc"
7324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7325$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7326
7327 if test $ac_cv_enable_implicit_function_declaration_error = yes
7328 then
7329 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7330 fi
7331
Vinay Sajip0b60f642019-10-15 08:26:12 +01007332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7333$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7334 ac_save_cc="$CC"
7335 CC="$CC -fvisibility=hidden"
7336 if ${ac_cv_enable_visibility+:} false; then :
7337 $as_echo_n "(cached) " >&6
7338else
7339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7340/* end confdefs.h. */
7341
7342
7343int
7344main ()
7345{
7346
7347 ;
7348 return 0;
7349}
7350
7351_ACEOF
7352if ac_fn_c_try_compile "$LINENO"; then :
7353
7354 ac_cv_enable_visibility=yes
7355
7356else
7357
7358 ac_cv_enable_visibility=no
7359
7360fi
7361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7362fi
7363
7364 CC="$ac_save_cc"
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7366$as_echo "$ac_cv_enable_visibility" >&6; }
7367
7368 if test $ac_cv_enable_visibility = yes
7369 then
7370 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7371 fi
7372
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7374 # support. Without this, treatment of subnormals doesn't follow
7375 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007376 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377 alpha*)
7378 BASECFLAGS="$BASECFLAGS -mieee"
7379 ;;
7380 esac
7381
7382 case $ac_sys_system in
7383 SCO_SV*)
7384 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7385 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007386
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 Darwin*)
7388 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7389 # used to be here, but non-Apple gcc doesn't accept them.
7390 if test "${CC}" = gcc
7391 then
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007393$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007394 case "${UNIVERSALSDK}" in
7395 */MacOSX10.4u.sdk)
7396 # Build using 10.4 SDK, force usage of gcc when the
7397 # compiler is gcc, otherwise the user will get very
7398 # confusing error messages when building on OSX 10.6
7399 CC=gcc-4.0
7400 CPP=cpp-4.0
7401 ;;
7402 esac
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007404$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007405 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406
Ned Deily87adb6e2013-10-18 21:09:56 -07007407 if test "${enable_universalsdk}"
7408 then
7409 case "$UNIVERSAL_ARCHS" in
7410 32-bit)
7411 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7412 LIPO_32BIT_FLAGS=""
7413 ARCH_RUN_32BIT=""
7414 ;;
7415 64-bit)
7416 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7417 LIPO_32BIT_FLAGS=""
7418 ARCH_RUN_32BIT="true"
7419 ;;
7420 all)
7421 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7422 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7423 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7424 ;;
7425 intel)
7426 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7427 LIPO_32BIT_FLAGS="-extract i386"
7428 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7429 ;;
7430 intel-32)
7431 UNIVERSAL_ARCH_FLAGS="-arch i386"
7432 LIPO_32BIT_FLAGS=""
7433 ARCH_RUN_32BIT=""
7434 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007435 intel-64)
7436 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7437 LIPO_32BIT_FLAGS=""
7438 ARCH_RUN_32BIT="true"
7439 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007440 3-way)
7441 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7442 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7443 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7444 ;;
7445 *)
7446 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7447 ;;
7448 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 if test "${UNIVERSALSDK}" != "/"
7451 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007452 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7453 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007454 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007455 else
7456 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7457 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007458 fi
7459 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460
Ned Deily87adb6e2013-10-18 21:09:56 -07007461 # Calculate an appropriate deployment target for this build:
7462 # The deployment target value is used explicitly to enable certain
7463 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007464 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007465 # component of the string returned by distutils.get_platform().
7466 #
7467 # Use the value from:
7468 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7469 # 2. the operating system version of the build machine if >= 10.6
7470 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7471 # below to pick either 10.3, 10.4, or 10.5 as the target.
7472 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473
Ned Deily87adb6e2013-10-18 21:09:56 -07007474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7475$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007476 cur_target_major=`sw_vers -productVersion | \
7477 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7478 cur_target_minor=`sw_vers -productVersion | \
7479 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7480 cur_target="${cur_target_major}.${cur_target_minor}"
7481 if test ${cur_target_major} -eq 10 && \
7482 test ${cur_target_minor} -ge 3 && \
7483 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007484 then
Ned Deily36820b62014-06-25 13:44:22 -07007485 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 cur_target=10.3
7487 if test ${enable_universalsdk}
7488 then
7489 case "$UNIVERSAL_ARCHS" in
7490 all|3-way|intel|64-bit)
7491 # These configurations were first supported in 10.5
7492 cur_target='10.5'
7493 ;;
7494 esac
7495 else
7496 if test `/usr/bin/arch` = "i386"
7497 then
7498 # 10.4 was the first release to support Intel archs
7499 cur_target="10.4"
7500 fi
7501 fi
7502 fi
7503 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007504
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7506 # environment with a value that is the same as what we'll use
7507 # in the Makefile to ensure that we'll get the same compiler
7508 # environment during configure and build time.
7509 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7510 export MACOSX_DEPLOYMENT_TARGET
7511 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7513$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007514
Ned Deily87adb6e2013-10-18 21:09:56 -07007515 # end of Darwin* tests
7516 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517 esac
7518 ;;
7519
7520*)
7521 case $ac_sys_system in
7522 OpenUNIX*|UnixWare*)
7523 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7524 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525 SCO_SV*)
7526 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7527 ;;
7528 esac
7529 ;;
7530esac
7531
Zachary Ware5af85642015-12-21 12:09:17 -06007532# ICC needs -fp-model strict or floats behave badly
7533case "$CC" in
7534*icc*)
7535 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7536 ;;
7537esac
7538
T. Woutersddbfa2c2017-05-23 01:30:49 +02007539if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540 :
7541else
7542 OPT="-DNDEBUG $OPT"
7543fi
7544
7545if test "$ac_arch_flags"
7546then
7547 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7548fi
7549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550# On some compilers, pthreads are available without further options
7551# (e.g. MacOS X). On some of these systems, the compiler will not
7552# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7553# So we have to see first whether pthreads are available without
7554# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7556$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007557if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 ac_cv_pthread_is_default=no
7562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564/* end confdefs.h. */
7565
Stefan Krah7dba5942012-11-22 22:49:11 +01007566#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567#include <pthread.h>
7568
7569void* routine(void* p){return NULL;}
7570
7571int main(){
7572 pthread_t p;
7573 if(pthread_create(&p,NULL,routine,NULL)!=0)
7574 return 1;
7575 (void)pthread_detach(p);
7576 return 0;
7577}
7578
7579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007580if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581
7582 ac_cv_pthread_is_default=yes
7583 ac_cv_kthread=no
7584 ac_cv_pthread=no
7585
7586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591fi
7592
7593
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594fi
7595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7597$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598
7599
7600if test $ac_cv_pthread_is_default = yes
7601then
7602 ac_cv_kpthread=no
7603else
7604# -Kpthread, if available, provides the right #defines
7605# and linker options to make pthread_create available
7606# Some compilers won't report that they do not support -Kpthread,
7607# so we need to run a program to see whether it really made the
7608# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7610$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007611if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613else
7614 ac_save_cc="$CC"
7615CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007616if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617 ac_cv_kpthread=no
7618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620/* end confdefs.h. */
7621
Stefan Krah7dba5942012-11-22 22:49:11 +01007622#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623#include <pthread.h>
7624
7625void* routine(void* p){return NULL;}
7626
7627int main(){
7628 pthread_t p;
7629 if(pthread_create(&p,NULL,routine,NULL)!=0)
7630 return 1;
7631 (void)pthread_detach(p);
7632 return 0;
7633}
7634
7635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007636if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637 ac_cv_kpthread=yes
7638else
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7642 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643fi
7644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645CC="$ac_save_cc"
7646fi
7647
Matthias Kloseb9621712010-04-24 17:59:49 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7649$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007650fi
7651
7652if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7653then
7654# -Kthread, if available, provides the right #defines
7655# and linker options to make pthread_create available
7656# Some compilers won't report that they do not support -Kthread,
7657# so we need to run a program to see whether it really made the
7658# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7660$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007661if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663else
7664 ac_save_cc="$CC"
7665CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007666if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667 ac_cv_kthread=no
7668else
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670/* end confdefs.h. */
7671
Stefan Krah7dba5942012-11-22 22:49:11 +01007672#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673#include <pthread.h>
7674
7675void* routine(void* p){return NULL;}
7676
7677int main(){
7678 pthread_t p;
7679 if(pthread_create(&p,NULL,routine,NULL)!=0)
7680 return 1;
7681 (void)pthread_detach(p);
7682 return 0;
7683}
7684
7685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007686if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687 ac_cv_kthread=yes
7688else
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695CC="$ac_save_cc"
7696fi
7697
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7699$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700fi
7701
7702if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7703then
7704# -pthread, if available, provides the right #defines
7705# and linker options to make pthread_create available
7706# Some compilers won't report that they do not support -pthread,
7707# so we need to run a program to see whether it really made the
7708# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7710$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007711if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713else
7714 ac_save_cc="$CC"
7715CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007716if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717 ac_cv_pthread=no
7718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720/* end confdefs.h. */
7721
Stefan Krah7dba5942012-11-22 22:49:11 +01007722#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723#include <pthread.h>
7724
7725void* routine(void* p){return NULL;}
7726
7727int main(){
7728 pthread_t p;
7729 if(pthread_create(&p,NULL,routine,NULL)!=0)
7730 return 1;
7731 (void)pthread_detach(p);
7732 return 0;
7733}
7734
7735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007736if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737 ac_cv_pthread=yes
7738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743fi
7744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745CC="$ac_save_cc"
7746fi
7747
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7749$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750fi
7751
7752# If we have set a CC compiler flag for thread support then
7753# check if it works for CXX, too.
7754ac_cv_cxx_thread=no
7755if test ! -z "$CXX"
7756then
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7758$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759ac_save_cxx="$CXX"
7760
7761if test "$ac_cv_kpthread" = "yes"
7762then
7763 CXX="$CXX -Kpthread"
7764 ac_cv_cxx_thread=yes
7765elif test "$ac_cv_kthread" = "yes"
7766then
7767 CXX="$CXX -Kthread"
7768 ac_cv_cxx_thread=yes
7769elif test "$ac_cv_pthread" = "yes"
7770then
7771 CXX="$CXX -pthread"
7772 ac_cv_cxx_thread=yes
7773fi
7774
7775if test $ac_cv_cxx_thread = yes
7776then
7777 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7778 $CXX -c conftest.$ac_ext 2>&5
7779 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7780 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7781 then
7782 ac_cv_cxx_thread=yes
7783 else
7784 ac_cv_cxx_thread=no
7785 fi
7786 rm -fr conftest*
7787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7789$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
7791CXX="$ac_save_cxx"
7792
7793
7794# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7796$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007797if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801/* end confdefs.h. */
7802#include <stdlib.h>
7803#include <stdarg.h>
7804#include <string.h>
7805#include <float.h>
7806
7807int
7808main ()
7809{
7810
7811 ;
7812 return 0;
7813}
7814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007815if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007816 ac_cv_header_stdc=yes
7817else
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007819fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7821
7822if test $ac_cv_header_stdc = yes; then
7823 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825/* end confdefs.h. */
7826#include <string.h>
7827
7828_ACEOF
7829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 $EGREP "memchr" >/dev/null 2>&1; then :
7831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007832else
7833 ac_cv_header_stdc=no
7834fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007835rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007836
7837fi
7838
7839if test $ac_cv_header_stdc = yes; then
7840 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842/* end confdefs.h. */
7843#include <stdlib.h>
7844
7845_ACEOF
7846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 $EGREP "free" >/dev/null 2>&1; then :
7848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849else
7850 ac_cv_header_stdc=no
7851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007852rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007853
7854fi
7855
7856if test $ac_cv_header_stdc = yes; then
7857 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859 :
7860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007862/* end confdefs.h. */
7863#include <ctype.h>
7864#include <stdlib.h>
7865#if ((' ' & 0x0FF) == 0x020)
7866# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7867# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7868#else
7869# define ISLOWER(c) \
7870 (('a' <= (c) && (c) <= 'i') \
7871 || ('j' <= (c) && (c) <= 'r') \
7872 || ('s' <= (c) && (c) <= 'z'))
7873# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7874#endif
7875
7876#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7877int
7878main ()
7879{
7880 int i;
7881 for (i = 0; i < 256; i++)
7882 if (XOR (islower (i), ISLOWER (i))
7883 || toupper (i) != TOUPPER (i))
7884 return 2;
7885 return 0;
7886}
7887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007888if ac_fn_c_try_run "$LINENO"; then :
7889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007895fi
7896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007897fi
7898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7900$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901if test $ac_cv_header_stdc = yes; then
7902
Matthias Kloseb9621712010-04-24 17:59:49 +00007903$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007904
7905fi
7906
stratakise768c862018-01-23 16:11:24 +01007907for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007908fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007909ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007910sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007911utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007912poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007913sys/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 +01007914sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007915sys/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 +01007916sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007917sys/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 -07007918libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007919linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007920sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007921do :
7922 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7923ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007924if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007926#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007927_ACEOF
7928
7929fi
7930
Guido van Rossum627b2d71993-12-24 10:39:16 +00007931done
7932
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007933ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007934for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7937$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007938if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007940else
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007942/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007943#include <sys/types.h>
7944#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
Martin v. Löwis11437992002-04-12 09:54:03 +00007946int
7947main ()
7948{
7949if ((DIR *) 0)
7950return 0;
7951 ;
7952 return 0;
7953}
7954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007957else
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962eval ac_res=\$$as_ac_Header
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7964$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007965if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007967#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007968_ACEOF
7969
7970ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973done
7974# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7975if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7977$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007980else
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985/* Override any GCC internal prototype to avoid an error.
7986 Use char because int might match the return type of a GCC
7987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988#ifdef __cplusplus
7989extern "C"
7990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007991char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007992int
7993main ()
7994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 ;
7997 return 0;
7998}
7999_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000for ac_lib in '' dir; do
8001 if test -z "$ac_lib"; then
8002 ac_res="none required"
8003 else
8004 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010rm -f core conftest.err conftest.$ac_objext \
8011 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008012 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015done
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008017
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018else
8019 ac_cv_search_opendir=no
8020fi
8021rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008022LIBS=$ac_func_search_save_LIBS
8023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8025$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008027if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
Michael W. Hudson54241132001-12-07 15:38:26 +00008032else
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8034$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008035if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008037else
8038 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042/* Override any GCC internal prototype to avoid an error.
8043 Use char because int might match the return type of a GCC
8044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008045#ifdef __cplusplus
8046extern "C"
8047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008048char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008049int
8050main ()
8051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008053 ;
8054 return 0;
8055}
8056_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057for ac_lib in '' x; do
8058 if test -z "$ac_lib"; then
8059 ac_res="none required"
8060 else
8061 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008062 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008067rm -f core conftest.err conftest.$ac_objext \
8068 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008069 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072done
Victor Stinnere0be4232011-10-25 13:06:09 +02008073if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075else
8076 ac_cv_search_opendir=no
8077fi
8078rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008079LIBS=$ac_func_search_save_LIBS
8080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8082$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008084if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008087fi
8088
8089fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8092$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008093if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008095else
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008097/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008098#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008099int
8100main ()
8101{
8102return makedev(0, 0);
8103 ;
8104 return 0;
8105}
8106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008108 ac_cv_header_sys_types_h_makedev=yes
8109else
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008112rm -f core conftest.err conftest.$ac_objext \
8113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008114
8115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8117$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008118
8119if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008120ac_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 +02008121if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008124
8125fi
8126
8127
8128
8129 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 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 +02008131if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008132
Matthias Kloseb9621712010-04-24 17:59:49 +00008133$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008134
8135fi
8136
8137
8138 fi
8139fi
8140
Michael W. Hudson54241132001-12-07 15:38:26 +00008141
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008142# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8143# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8144SAVE_CFLAGS=$CFLAGS
8145CFLAGS="-std=c99 $CFLAGS"
8146for ac_header in bluetooth/bluetooth.h
8147do :
8148 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8149if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8150 cat >>confdefs.h <<_ACEOF
8151#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8152_ACEOF
8153
8154fi
8155
8156done
8157
8158CFLAGS=$SAVE_CFLAGS
8159
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008160# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8161for ac_header in net/if.h
8162do :
8163 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8164#ifdef STDC_HEADERS
8165# include <stdlib.h>
8166# include <stddef.h>
8167#else
8168# ifdef HAVE_STDLIB_H
8169# include <stdlib.h>
8170# endif
8171#endif
8172#ifdef HAVE_SYS_SOCKET_H
8173# include <sys/socket.h>
8174#endif
8175
8176"
Victor Stinnere0be4232011-10-25 13:06:09 +02008177if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008178 cat >>confdefs.h <<_ACEOF
8179#define HAVE_NET_IF_H 1
8180_ACEOF
8181
8182fi
8183
8184done
8185
8186
Martin v. Löwis11017b12006-01-14 18:12:57 +00008187# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008188for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008189do :
8190 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 +00008191#ifdef HAVE_ASM_TYPES_H
8192#include <asm/types.h>
8193#endif
8194#ifdef HAVE_SYS_SOCKET_H
8195#include <sys/socket.h>
8196#endif
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198"
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008201#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008202_ACEOF
8203
8204fi
8205
8206done
8207
8208
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008209# On Linux, qrtr.h requires asm/types.h
8210for ac_header in linux/qrtr.h
8211do :
8212 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8213#ifdef HAVE_ASM_TYPES_H
8214#include <asm/types.h>
8215#endif
8216#ifdef HAVE_SYS_SOCKET_H
8217#include <sys/socket.h>
8218#endif
8219
8220"
8221if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8222 cat >>confdefs.h <<_ACEOF
8223#define HAVE_LINUX_QRTR_H 1
8224_ACEOF
8225
8226fi
8227
8228done
8229
8230
caaveryeffc12f2017-09-06 18:18:10 -04008231for ac_header in linux/vm_sockets.h
8232do :
8233 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8234#ifdef HAVE_SYS_SOCKET_H
8235#include <sys/socket.h>
8236#endif
8237
8238"
8239if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8240 cat >>confdefs.h <<_ACEOF
8241#define HAVE_LINUX_VM_SOCKETS_H 1
8242_ACEOF
8243
8244fi
8245
8246done
8247
8248
Charles-François Natali47413c12011-10-06 19:47:44 +02008249# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008250for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008251do :
8252 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8253ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8254#ifdef HAVE_SYS_SOCKET_H
8255#include <sys/socket.h>
8256#endif
8257
8258"
8259if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8260 cat >>confdefs.h <<_ACEOF
8261#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8262_ACEOF
8263
8264fi
8265
8266done
8267
8268
Guido van Rossum627b2d71993-12-24 10:39:16 +00008269# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008270was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8272$as_echo_n "checking for clock_t in time.h... " >&6; }
8273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008274/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008275#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008280 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008281else
Martin v. Löwis11437992002-04-12 09:54:03 +00008282
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008285
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008286
Guido van Rossum627b2d71993-12-24 10:39:16 +00008287fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008288rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8291$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008292
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8294$as_echo_n "checking for makedev... " >&6; }
8295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008296/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008297
Jesus Cea740f53a2010-04-28 11:35:30 +00008298#if defined(MAJOR_IN_MKDEV)
8299#include <sys/mkdev.h>
8300#elif defined(MAJOR_IN_SYSMACROS)
8301#include <sys/sysmacros.h>
8302#else
8303#include <sys/types.h>
8304#endif
8305
Neal Norwitz11690112002-07-30 01:08:28 +00008306int
8307main ()
8308{
Jesus Cea740f53a2010-04-28 11:35:30 +00008309
8310 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008311 ;
8312 return 0;
8313}
Matthias Kloseb159a552010-04-25 21:00:44 +00008314
Neal Norwitz11690112002-07-30 01:08:28 +00008315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008316if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008317 ac_cv_has_makedev=yes
8318else
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321rm -f core conftest.err conftest.$ac_objext \
8322 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8324$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008325if test "$ac_cv_has_makedev" = "yes"; then
8326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008328
8329fi
8330
Christian Heimes985ecdc2013-11-20 11:46:18 +01008331# byte swapping
8332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8333$as_echo_n "checking for le64toh... " >&6; }
8334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8335/* end confdefs.h. */
8336
8337#ifdef HAVE_ENDIAN_H
8338#include <endian.h>
8339#elif defined(HAVE_SYS_ENDIAN_H)
8340#include <sys/endian.h>
8341#endif
8342
8343int
8344main ()
8345{
8346
8347 le64toh(1)
8348 ;
8349 return 0;
8350}
8351
8352_ACEOF
8353if ac_fn_c_try_link "$LINENO"; then :
8354 ac_cv_has_le64toh=yes
8355else
8356 ac_cv_has_le64toh=no
8357fi
8358rm -f core conftest.err conftest.$ac_objext \
8359 conftest$ac_exeext conftest.$ac_ext
8360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8361$as_echo "$ac_cv_has_le64toh" >&6; }
8362if test "$ac_cv_has_le64toh" = "yes"; then
8363
8364$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8365
8366fi
8367
Martin v. Löwis399a6892002-10-04 10:22:02 +00008368use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008369# Don't use largefile support for GNU/Hurd
8370case $ac_sys_system in GNU*)
8371 use_lfs=no
8372esac
8373
Martin v. Löwis399a6892002-10-04 10:22:02 +00008374if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008375# Two defines needed to enable largefile support on various platforms
8376# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008377case $ac_sys_system/$ac_sys_release in
8378AIX*)
8379
8380$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8381
8382 ;;
8383esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
8387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008389
Martin v. Löwis399a6892002-10-04 10:22:02 +00008390fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008391
Guido van Rossum84e7b241996-08-19 21:59:00 +00008392# Add some code to confdefs.h so that the test for off_t works on SCO
8393cat >> confdefs.h <<\EOF
8394#if defined(SCO_DS)
8395#undef _OFF_T
8396#endif
8397EOF
8398
Guido van Rossumef2255b2000-03-10 22:30:29 +00008399# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008400ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008403else
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
8405cat >>confdefs.h <<_ACEOF
8406#define mode_t int
8407_ACEOF
8408
8409fi
8410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008412if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414else
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
8416cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008418_ACEOF
8419
8420fi
8421
Matthias Kloseb9621712010-04-24 17:59:49 +00008422ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008425else
Martin v. Löwis11437992002-04-12 09:54:03 +00008426
8427cat >>confdefs.h <<_ACEOF
8428#define pid_t int
8429_ACEOF
8430
8431fi
8432
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008435#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008436_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008439if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008440
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008441else
Martin v. Löwis11437992002-04-12 09:54:03 +00008442
8443cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008445_ACEOF
8446
8447fi
8448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8450$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008456#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
8458_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008461 ac_cv_type_uid_t=yes
8462else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463 ac_cv_type_uid_t=no
8464fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008465rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008466
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8469$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008470if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
8474
Matthias Kloseb9621712010-04-24 17:59:49 +00008475$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008476
8477fi
8478
Mark Dickinson983bc162012-12-02 12:11:38 +00008479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008481if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
Matthias Kloseb9621712010-04-24 17:59:49 +00008483$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008484
8485fi
8486
Stefan Krah1919b7e2012-03-21 18:25:23 +01008487ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8488if test "x$ac_cv_type___uint128_t" = xyes; then :
8489
8490$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8491
8492fi
8493
Jack Jansendd19cf82001-12-06 22:36:17 +00008494
Michael W. Hudson54241132001-12-07 15:38:26 +00008495# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008496# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497# The cast to long int works around a bug in the HP C Compiler
8498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8500# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8502$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008503if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 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 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 if test "$ac_cv_type_int" = yes; then
8510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008512as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008513See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514 else
8515 ac_cv_sizeof_int=0
8516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8521$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
8523
8524
Martin v. Löwis11437992002-04-12 09:54:03 +00008525cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008526#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008527_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008528
8529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530# The cast to long int works around a bug in the HP C Compiler
8531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8533# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8535$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008536if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 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 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541else
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 if test "$ac_cv_type_long" = yes; then
8543 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008545as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008546See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547 else
8548 ac_cv_sizeof_long=0
8549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8554$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555
8556
8557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008559#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008560_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008561
8562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563# The cast to long int works around a bug in the HP C Compiler
8564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8566# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8568$as_echo_n "checking size of long long... " >&6; }
8569if ${ac_cv_sizeof_long_long+:} false; then :
8570 $as_echo_n "(cached) " >&6
8571else
8572 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8573
8574else
8575 if test "$ac_cv_type_long_long" = yes; then
8576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8578as_fn_error 77 "cannot compute sizeof (long long)
8579See \`config.log' for more details" "$LINENO" 5; }
8580 else
8581 ac_cv_sizeof_long_long=0
8582 fi
8583fi
8584
8585fi
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8587$as_echo "$ac_cv_sizeof_long_long" >&6; }
8588
8589
8590
8591cat >>confdefs.h <<_ACEOF
8592#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8593_ACEOF
8594
8595
8596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8601$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 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 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607else
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 if test "$ac_cv_type_void_p" = yes; then
8609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008611as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008612See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 else
8614 ac_cv_sizeof_void_p=0
8615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8620$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621
8622
8623
Martin v. Löwis11437992002-04-12 09:54:03 +00008624cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008625#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008626_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008627
8628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629# The cast to long int works around a bug in the HP C Compiler
8630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8634$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008635if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008637else
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 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 +00008639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 if test "$ac_cv_type_short" = yes; then
8642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008644as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008645See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646 else
8647 ac_cv_sizeof_short=0
8648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8653$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654
8655
8656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008658#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008659_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008660
8661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662# The cast to long int works around a bug in the HP C Compiler
8663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8667$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008668if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 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 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673else
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 if test "$ac_cv_type_float" = yes; then
8675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008677as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008678See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 else
8680 ac_cv_sizeof_float=0
8681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8686$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687
8688
8689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008691#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008692_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008693
8694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695# The cast to long int works around a bug in the HP C Compiler
8696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8700$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008703else
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 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 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if test "$ac_cv_type_double" = yes; then
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008710as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008711See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712 else
8713 ac_cv_sizeof_double=0
8714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8719$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720
8721
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008724#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008725_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008726
8727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728# The cast to long int works around a bug in the HP C Compiler
8729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8733$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008734if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 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 +00008738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if test "$ac_cv_type_fpos_t" = yes; then
8741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008743as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745 else
8746 ac_cv_sizeof_fpos_t=0
8747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749
Martin v. Löwis11437992002-04-12 09:54:03 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8752$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753
8754
8755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008757#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008758_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008759
Michael W. Hudson54241132001-12-07 15:38:26 +00008760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761# The cast to long int works around a bug in the HP C Compiler
8762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8766$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008767if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 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 +00008771
Martin v. Löwis18e16552006-02-15 17:27:45 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if test "$ac_cv_type_size_t" = yes; then
8774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008776as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008777See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778 else
8779 ac_cv_sizeof_size_t=0
8780 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782
Martin v. Löwis18e16552006-02-15 17:27:45 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8785$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786
8787
8788
Martin v. Löwis18e16552006-02-15 17:27:45 +00008789cat >>confdefs.h <<_ACEOF
8790#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8791_ACEOF
8792
8793
Christian Heimes400adb02008-02-01 08:12:03 +00008794# The cast to long int works around a bug in the HP C Compiler
8795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8799$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008800if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008802else
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 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 +00008804
Christian Heimes400adb02008-02-01 08:12:03 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 if test "$ac_cv_type_pid_t" = yes; then
8807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008809as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008810See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008811 else
8812 ac_cv_sizeof_pid_t=0
8813 fi
8814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815
Christian Heimes400adb02008-02-01 08:12:03 +00008816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8818$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008819
8820
8821
8822cat >>confdefs.h <<_ACEOF
8823#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8824_ACEOF
8825
8826
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008827# The cast to long int works around a bug in the HP C Compiler
8828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8830# This bug is HP SR number 8606223364.
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8832$as_echo_n "checking size of uintptr_t... " >&6; }
8833if ${ac_cv_sizeof_uintptr_t+:} false; then :
8834 $as_echo_n "(cached) " >&6
8835else
8836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8837
8838else
8839 if test "$ac_cv_type_uintptr_t" = yes; then
8840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8842as_fn_error 77 "cannot compute sizeof (uintptr_t)
8843See \`config.log' for more details" "$LINENO" 5; }
8844 else
8845 ac_cv_sizeof_uintptr_t=0
8846 fi
8847fi
8848
8849fi
8850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8851$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8852
8853
8854
8855cat >>confdefs.h <<_ACEOF
8856#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8857_ACEOF
8858
8859
Michael W. Hudson54241132001-12-07 15:38:26 +00008860
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008861
Eitan Adler3055c942018-05-15 22:58:09 -07008862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8863$as_echo_n "checking for long double... " >&6; }
8864if ${ac_cv_type_long_double+:} false; then :
8865 $as_echo_n "(cached) " >&6
8866else
8867 if test "$GCC" = yes; then
8868 ac_cv_type_long_double=yes
8869 else
8870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871/* end confdefs.h. */
8872/* The Stardent Vistra knows sizeof (long double), but does
8873 not support it. */
8874 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008875int
8876main ()
8877{
Eitan Adler3055c942018-05-15 22:58:09 -07008878static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8879 sizeof (double) <= sizeof (long double))];
8880test_array [0] = 0;
8881return test_array [0];
8882
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008883 ;
8884 return 0;
8885}
8886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008888 ac_cv_type_long_double=yes
8889else
8890 ac_cv_type_long_double=no
8891fi
8892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8893 fi
8894fi
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8896$as_echo "$ac_cv_type_long_double" >&6; }
8897 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008900
Eitan Adler3055c942018-05-15 22:58:09 -07008901 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008902
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903# The cast to long int works around a bug in the HP C Compiler
8904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8906# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8908$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008909if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 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 +00008913
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 if test "$ac_cv_type_long_double" = yes; then
8916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008918as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008919See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008920 else
8921 ac_cv_sizeof_long_double=0
8922 fi
8923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8927$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008928
8929
8930
8931cat >>confdefs.h <<_ACEOF
8932#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8933_ACEOF
8934
8935
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937# The cast to long int works around a bug in the HP C Compiler
8938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8940# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8942$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008943if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 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 +00008947
Thomas Woutersb2137042007-02-01 18:02:27 +00008948else
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 if test "$ac_cv_type__Bool" = yes; then
8950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008952as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008953See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954 else
8955 ac_cv_sizeof__Bool=0
8956 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008958
Thomas Woutersb2137042007-02-01 18:02:27 +00008959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8961$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962
8963
8964
Thomas Woutersb2137042007-02-01 18:02:27 +00008965cat >>confdefs.h <<_ACEOF
8966#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8967_ACEOF
8968
8969
Thomas Woutersb2137042007-02-01 18:02:27 +00008970
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008971# The cast to long int works around a bug in the HP C Compiler
8972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8974# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8976$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008977if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979else
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008981#ifdef HAVE_SYS_TYPES_H
8982#include <sys/types.h>
8983#endif
8984
Matthias Kloseb9621712010-04-24 17:59:49 +00008985"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987else
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 if test "$ac_cv_type_off_t" = yes; then
8989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008991as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008992See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993 else
8994 ac_cv_sizeof_off_t=0
8995 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9000$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002
9003
Martin v. Löwis11437992002-04-12 09:54:03 +00009004cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009005#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009006_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009007
Michael W. Hudson54241132001-12-07 15:38:26 +00009008
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009
Matthias Kloseb9621712010-04-24 17:59:49 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9011$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009012if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009013 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9018$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009022fi
9023
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009024# The cast to long int works around a bug in the HP C Compiler
9025# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9026# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9027# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9029$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009030if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009032else
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009034#ifdef HAVE_SYS_TYPES_H
9035#include <sys/types.h>
9036#endif
9037#ifdef HAVE_TIME_H
9038#include <time.h>
9039#endif
9040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043else
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 if test "$ac_cv_type_time_t" = yes; then
9045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009047as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009048See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009049 else
9050 ac_cv_sizeof_time_t=0
9051 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009053
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9056$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009058
9059
Martin v. Löwis11437992002-04-12 09:54:03 +00009060cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009061#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009063
Michael W. Hudson54241132001-12-07 15:38:26 +00009064
9065
Trent Mick635f6fb2000-08-23 21:33:05 +00009066# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009067ac_save_cc="$CC"
9068if test "$ac_cv_kpthread" = "yes"
9069then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009070elif test "$ac_cv_kthread" = "yes"
9071then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009072elif test "$ac_cv_pthread" = "yes"
9073then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009074fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9077$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009078have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009080/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009081
9082 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009083int
9084main ()
9085{
Guido van Rossum12580492000-09-24 16:47:19 +00009086pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 ;
9088 return 0;
9089}
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009092if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009093 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9097$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009098if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9102# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9104$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009105if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107else
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009109#ifdef HAVE_PTHREAD_H
9110#include <pthread.h>
9111#endif
9112
Matthias Kloseb9621712010-04-24 17:59:49 +00009113"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115else
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 if test "$ac_cv_type_pthread_t" = yes; then
9117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009119as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009120See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009121 else
9122 ac_cv_sizeof_pthread_t=0
9123 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009125
Trent Mick635f6fb2000-08-23 21:33:05 +00009126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9128$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009130
9131
Martin v. Löwis11437992002-04-12 09:54:03 +00009132cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009133#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009134_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009136
Trent Mick635f6fb2000-08-23 21:33:05 +00009137fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009138
9139# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9140# This checking will be unnecessary after removing deprecated TLS API.
9141# The cast to long int works around a bug in the HP C Compiler
9142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9144# This bug is HP SR number 8606223364.
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9146$as_echo_n "checking size of pthread_key_t... " >&6; }
9147if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9148 $as_echo_n "(cached) " >&6
9149else
9150 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9151"; then :
9152
9153else
9154 if test "$ac_cv_type_pthread_key_t" = yes; then
9155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9157as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9158See \`config.log' for more details" "$LINENO" 5; }
9159 else
9160 ac_cv_sizeof_pthread_key_t=0
9161 fi
9162fi
9163
9164fi
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9166$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9167
9168
9169
9170cat >>confdefs.h <<_ACEOF
9171#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9172_ACEOF
9173
9174
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9176$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9177if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9179/* end confdefs.h. */
9180#include <pthread.h>
9181int
9182main ()
9183{
9184pthread_key_t k; k * 1;
9185 ;
9186 return 0;
9187}
9188_ACEOF
9189if ac_fn_c_try_compile "$LINENO"; then :
9190 ac_pthread_key_t_is_arithmetic_type=yes
9191else
9192 ac_pthread_key_t_is_arithmetic_type=no
9193
9194fi
9195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9197$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9198 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9199
9200$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9201
9202 fi
9203else
9204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9205$as_echo "no" >&6; }
9206fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009207CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009208
Michael W. Hudson54241132001-12-07 15:38:26 +00009209
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009210case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009211 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009212 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9213 ;;
9214 Darwin/*)
9215 OTHER_LIBTOOL_OPT=""
9216 ;;
9217esac
9218
9219
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009220
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009221case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009222 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009223 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9224 if test "${enable_universalsdk}"; then
9225 :
9226 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009227 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009228 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009229 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009230 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009231 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009232 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009233 if test ${gcc_version} '<' 4.0
9234 then
9235 LIBTOOL_CRUFT="-lcc_dynamic"
9236 else
9237 LIBTOOL_CRUFT=""
9238 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009240 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009241else
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009243/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009244
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009245 #include <unistd.h>
9246 int main(int argc, char*argv[])
9247 {
9248 if (sizeof(long) == 4) {
9249 return 0;
9250 } else {
9251 return 1;
9252 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009253 }
9254
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009256if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 ac_osx_32bit=yes
9258else
Matthias Kloseb9621712010-04-24 17:59:49 +00009259 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009263fi
9264
9265
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009266 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009267 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009268 i386)
9269 MACOSX_DEFAULT_ARCH="i386"
9270 ;;
9271 ppc)
9272 MACOSX_DEFAULT_ARCH="ppc"
9273 ;;
9274 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009275 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009276 ;;
9277 esac
9278 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009279 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009280 i386)
9281 MACOSX_DEFAULT_ARCH="x86_64"
9282 ;;
9283 ppc)
9284 MACOSX_DEFAULT_ARCH="ppc64"
9285 ;;
9286 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009287 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009288 ;;
9289 esac
9290
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009291 fi
9292
9293 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009294 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9298$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009299if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009300then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009301 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009303 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9308$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009309 if test $enable_shared = "yes"
9310 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009311 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 +00009312 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313else
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316fi
9317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9319$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009320case $ac_sys_system/$ac_sys_release in
9321 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322
Matthias Kloseb9621712010-04-24 17:59:49 +00009323$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009324
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9326$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009327 ;;
9328 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9330$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009331 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009332esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009333
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335
Michael W. Hudson54241132001-12-07 15:38:26 +00009336
9337
9338
9339
Benjamin Peterson99f03762010-04-11 22:15:28 +00009340
Thomas Wouters477c8d52006-05-27 19:21:47 +00009341
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009342# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9343# -- usually .so, .sl on HP-UX, .dll on Cygwin
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9345$as_echo_n "checking the extension of shared libraries... " >&6; }
9346if test -z "$SHLIB_SUFFIX"; then
9347 case $ac_sys_system in
9348 hp*|HP*)
9349 case `uname -m` in
9350 ia64) SHLIB_SUFFIX=.so;;
9351 *) SHLIB_SUFFIX=.sl;;
9352 esac
9353 ;;
9354 CYGWIN*) SHLIB_SUFFIX=.dll;;
9355 *) SHLIB_SUFFIX=.so;;
9356 esac
9357fi
9358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9359$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009360
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009362# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363# (Shared libraries in this instance are shared modules to be loaded into
9364# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9366$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367if test -z "$LDSHARED"
9368then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009369 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009370 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009371 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009372 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009373 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009375 if test "$GCC" = "yes" ; then
9376 LDSHARED='$(CC) -shared'
9377 LDCXXSHARED='$(CXX) -shared'
9378 else
9379 LDSHARED='$(CC) -G'
9380 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009381 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009382 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009383 if test "$GCC" = "yes" ; then
9384 LDSHARED='$(CC) -shared'
9385 LDCXXSHARED='$(CXX) -shared'
9386 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009387 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009388 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009389 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009390 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009391 LDSHARED='$(CC) -bundle'
9392 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009395 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009397 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009398 else
9399 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009400 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009401 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009402 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009403 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009404 LDSHARED='$(CC) -bundle'
9405 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009406 if test "$enable_framework" ; then
9407 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009408 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9409 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009410 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009411 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009412 # No framework, use the Python app as bundle-loader
9413 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009414 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009415 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009416 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009417 Darwin/*)
9418 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9419 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009420
Ned Deily36820b62014-06-25 13:44:22 -07009421 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9422 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9423 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9424 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9425 if test ${dep_target_major} -eq 10 && \
9426 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009427 then
Ned Deily36820b62014-06-25 13:44:22 -07009428 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009429 LDSHARED='$(CC) -bundle'
9430 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009431 if test "$enable_framework" ; then
9432 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009433 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9434 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009435 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009436 else
9437 # No framework, use the Python app as bundle-loader
9438 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9439 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009440 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009441 fi
Ned Deily36820b62014-06-25 13:44:22 -07009442 else
9443 # building for OS X 10.3 and later
9444 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9445 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9446 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009447 fi
9448 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009449 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009450 LDSHARED='$(CC) -shared'
9451 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009452 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009453 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009454 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009455 LDSHARED='$(CC) -shared'
9456 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009457 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009458 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009459 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009460 OpenBSD*)
9461 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9462 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009463 LDSHARED='$(CC) -shared $(CCSHARED)'
9464 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009465 else
9466 case `uname -r` in
9467 [01].* | 2.[0-7] | 2.[0-7].*)
9468 LDSHARED="ld -Bshareable ${LDFLAGS}"
9469 ;;
9470 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009471 LDSHARED='$(CC) -shared $(CCSHARED)'
9472 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009473 ;;
9474 esac
9475 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009476 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009477 LDSHARED='$(CC) -shared'
9478 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009479 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009480 if test "$GCC" = "yes" ; then
9481 LDSHARED='$(CC) -shared'
9482 LDCXXSHARED='$(CXX) -shared'
9483 else
9484 LDSHARED='$(CC) -G'
9485 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009486 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009487 SCO_SV*)
9488 LDSHARED='$(CC) -Wl,-G,-Bexport'
9489 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9490 CYGWIN*)
9491 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9492 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493 *) LDSHARED="ld";;
9494 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9497$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009498LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009499BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009500# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009501# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9503$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009504if test -z "$CCSHARED"
9505then
Guido van Rossum07397971997-04-29 21:49:50 +00009506 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009507 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009508 then CCSHARED="-fPIC";
9509 elif test `uname -p` = sparc;
9510 then CCSHARED="-xcode=pic32";
9511 else CCSHARED="-Kpic";
9512 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009513 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009514 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009515 else CCSHARED="+z";
9516 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009517 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009518 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009519 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009520 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009521 if test "$GCC" = "yes"
9522 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009523 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009524 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009525 SCO_SV*)
9526 if test "$GCC" = "yes"
9527 then CCSHARED="-fPIC"
9528 else CCSHARED="-Kpic -belf"
9529 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009530 VxWorks*)
9531 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009532 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9535$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009536# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009537# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9539$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009540if test -z "$LINKFORSHARED"
9541then
Guido van Rossum07397971997-04-29 21:49:50 +00009542 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009543 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009544 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009545 LINKFORSHARED="-Wl,-E -Wl,+s";;
9546# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009547 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009548 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009549 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009551 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009552
9553 # Issue #18075: the default maximum stack size (8MBytes) is too
9554 # small for the default recursion limit. Increase the stack size
9555 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009556 # Note: This matches the value of THREAD_STACK_SIZE in
9557 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009558 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9559
Jack Jansene578a632001-08-15 01:27:14 +00009560 if test "$enable_framework"
9561 then
Jack Jansenda49e192005-01-07 13:08:22 +00009562 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009563 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009564 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009565 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009566 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009567 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009568 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009569 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9570 then
9571 LINKFORSHARED="-Wl,--export-dynamic"
9572 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009573 SunOS/5*) case $CC in
9574 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009575 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009576 then
9577 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009578 fi;;
9579 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009580 CYGWIN*)
9581 if test $enable_shared = "no"
9582 then
9583 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9584 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009585 QNX*)
9586 # -Wl,-E causes the symbols to be added to the dynamic
9587 # symbol table so that they can be found when a module
9588 # is loaded. -N 2048K causes the stack size to be set
9589 # to 2048 kilobytes so that the stack doesn't overflow
9590 # when running test_compile.py.
9591 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009592 VxWorks*)
9593 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009594 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9597$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009598
Michael W. Hudson54241132001-12-07 15:38:26 +00009599
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009600
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9602$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009603if test ! "$LIBRARY" = "$LDLIBRARY"
9604then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009605 case $ac_sys_system in
9606 CYGWIN*)
9607 # Cygwin needs CCSHARED when building extension DLLs
9608 # but not when building the interpreter DLL.
9609 CFLAGSFORSHARED='';;
9610 *)
9611 CFLAGSFORSHARED='$(CCSHARED)'
9612 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9615$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009616
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009617# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9618# library (with --enable-shared).
9619# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009620# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9621# if it is not required, since it creates a dependency of the shared library
9622# to LIBS. This, in turn, means that applications linking the shared libpython
9623# don't need to link LIBS explicitly. The default should be only changed
9624# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9627$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009628case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009629 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009630 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009631esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9633$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009634
9635
Guido van Rossum627b2d71993-12-24 10:39:16 +00009636# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9638$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009639if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009640 $as_echo_n "(cached) " >&6
9641else
9642 ac_check_lib_save_LIBS=$LIBS
9643LIBS="-lsendfile $LIBS"
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645/* end confdefs.h. */
9646
9647/* Override any GCC internal prototype to avoid an error.
9648 Use char because int might match the return type of a GCC
9649 builtin and then its argument prototype would still apply. */
9650#ifdef __cplusplus
9651extern "C"
9652#endif
9653char sendfile ();
9654int
9655main ()
9656{
9657return sendfile ();
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662if ac_fn_c_try_link "$LINENO"; then :
9663 ac_cv_lib_sendfile_sendfile=yes
9664else
9665 ac_cv_lib_sendfile_sendfile=no
9666fi
9667rm -f core conftest.err conftest.$ac_objext \
9668 conftest$ac_exeext conftest.$ac_ext
9669LIBS=$ac_check_lib_save_LIBS
9670fi
9671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9672$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009674 cat >>confdefs.h <<_ACEOF
9675#define HAVE_LIBSENDFILE 1
9676_ACEOF
9677
9678 LIBS="-lsendfile $LIBS"
9679
9680fi
9681
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9683$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009684if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009686else
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009688LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692/* Override any GCC internal prototype to avoid an error.
9693 Use char because int might match the return type of a GCC
9694 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695#ifdef __cplusplus
9696extern "C"
9697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009698char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009699int
9700main ()
9701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ;
9704 return 0;
9705}
9706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009709else
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712rm -f core conftest.err conftest.$ac_objext \
9713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009714LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9717$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 cat >>confdefs.h <<_ACEOF
9720#define HAVE_LIBDL 1
9721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009723 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009724
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009725fi
9726 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9728$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009729if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009733LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737/* Override any GCC internal prototype to avoid an error.
9738 Use char because int might match the return type of a GCC
9739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740#ifdef __cplusplus
9741extern "C"
9742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009743char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ;
9749 return 0;
9750}
9751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009757rm -f core conftest.err conftest.$ac_objext \
9758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9762$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 cat >>confdefs.h <<_ACEOF
9765#define HAVE_LIBDLD 1
9766_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009767
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009768 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009769
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009770fi
9771 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009772
Michael Felt0d3ccb42017-12-30 22:39:20 +01009773# checks for uuid.h location
9774for ac_header in uuid/uuid.h uuid.h
9775do :
9776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9777ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9779 cat >>confdefs.h <<_ACEOF
9780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9781_ACEOF
9782
9783fi
9784
9785done
9786
9787
Berker Peksag9a10ff42017-11-08 23:09:16 +03009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9789$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791/* end confdefs.h. */
9792#include <uuid/uuid.h>
9793int
9794main ()
9795{
9796
9797#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009798void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009799#endif
9800
9801 ;
9802 return 0;
9803}
9804_ACEOF
9805if ac_fn_c_try_compile "$LINENO"; then :
9806
9807$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9808
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9810$as_echo "yes" >&6; }
9811else
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
9814
9815fi
9816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9817
Michael Felt0d3ccb42017-12-30 22:39:20 +01009818# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009819# FreeBSD and OpenBSD provides support as well
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9821$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9823/* end confdefs.h. */
9824#include <uuid.h>
9825int
9826main ()
9827{
9828
9829#ifndef uuid_create
9830void *x = uuid_create
9831#endif
9832
9833 ;
9834 return 0;
9835}
9836_ACEOF
9837if ac_fn_c_try_compile "$LINENO"; then :
9838
9839$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9840
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9842$as_echo "yes" >&6; }
9843else
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845$as_echo "no" >&6; }
9846
9847fi
9848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9849
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009850# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9851# stream in big-endian byte-order
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9853$as_echo_n "checking for uuid_enc_be... " >&6; }
9854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855/* end confdefs.h. */
9856#include <uuid.h>
9857int
9858main ()
9859{
9860
9861#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009862void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009863#endif
9864
9865 ;
9866 return 0;
9867}
9868_ACEOF
9869if ac_fn_c_try_compile "$LINENO"; then :
9870
9871$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9872
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9874$as_echo "yes" >&6; }
9875else
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9877$as_echo "no" >&6; }
9878
9879fi
9880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9881
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009882# 'Real Time' functions on Solaris
9883# posix4 on Solaris 2.6
9884# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009886$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009887if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009889else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009890 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894/* Override any GCC internal prototype to avoid an error.
9895 Use char because int might match the return type of a GCC
9896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009897#ifdef __cplusplus
9898extern "C"
9899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009900char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009901int
9902main ()
9903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 ;
9906 return 0;
9907}
9908_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909for ac_lib in '' pthread rt posix4; do
9910 if test -z "$ac_lib"; then
9911 ac_res="none required"
9912 else
9913 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009919rm -f core conftest.err conftest.$ac_objext \
9920 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009921 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924done
Victor Stinnere0be4232011-10-25 13:06:09 +02009925if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927else
9928 ac_cv_search_sem_init=no
9929fi
9930rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009931LIBS=$ac_func_search_save_LIBS
9932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9934$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009938
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009939fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009940
Martin v. Löwis519adae2003-09-20 10:47:47 +00009941
Martin v. Löwis19d17342003-06-14 21:03:05 +00009942# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9944$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009945if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947else
9948 ac_check_lib_save_LIBS=$LIBS
9949LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953/* Override any GCC internal prototype to avoid an error.
9954 Use char because int might match the return type of a GCC
9955 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009956#ifdef __cplusplus
9957extern "C"
9958#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009960int
9961main ()
9962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964 ;
9965 return 0;
9966}
9967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969 ac_cv_lib_intl_textdomain=yes
9970else
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973rm -f core conftest.err conftest.$ac_objext \
9974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009975LIBS=$ac_check_lib_save_LIBS
9976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9978$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009979if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009980
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009982
Brett Cannonc6d936e2009-06-07 20:09:53 +00009983 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009984fi
9985
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009986
9987# checks for system dependent C++ extensions support
9988case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9990$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009993
Georg Brandl59e87bd2011-02-15 19:48:59 +00009994 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009995int
9996main ()
9997{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009998loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 ;
10000 return 0;
10001}
Matthias Kloseb159a552010-04-25 21:00:44 +000010002
Martin v. Löwis11437992002-04-12 09:54:03 +000010003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010005
Matthias Kloseb159a552010-04-25 21:00:44 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010008
Matthias Kloseb159a552010-04-25 21:00:44 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010011
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010012else
Matthias Kloseb159a552010-04-25 21:00:44 +000010013
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010016
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010018rm -f core conftest.err conftest.$ac_objext \
10019 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010020 *) ;;
10021esac
10022
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023# check for systems that require aligned memory access
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10025$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010026if ${ac_cv_aligned_required+:} false; then :
10027 $as_echo_n "(cached) " >&6
10028else
10029 if test "$cross_compiling" = yes; then :
10030 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010031else
10032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10033/* end confdefs.h. */
10034
10035int main()
10036{
10037 char s[16];
10038 int i, *p1, *p2;
10039 for (i=0; i < 16; i++)
10040 s[i] = i;
10041 p1 = (int*)(s+1);
10042 p2 = (int*)(s+2);
10043 if (*p1 == *p2)
10044 return 1;
10045 return 0;
10046}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010047_ACEOF
10048if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010049 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010050else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010051 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010052fi
10053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10054 conftest.$ac_objext conftest.beam conftest.$ac_ext
10055fi
10056
10057
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010058fi
10059
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10061$as_echo "$ac_cv_aligned_required" >&6; }
10062if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010063
10064$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10065
10066fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010067
10068# str, bytes and memoryview hash algorithm
10069
10070
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10072$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10073
10074# Check whether --with-hash_algorithm was given.
10075if test "${with_hash_algorithm+set}" = set; then :
10076 withval=$with_hash_algorithm;
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10078$as_echo "$withval" >&6; }
10079case "$withval" in
10080 siphash24)
10081 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10082
10083 ;;
10084 fnv)
10085 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10086
10087 ;;
10088 *)
10089 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10090 ;;
10091esac
10092
10093else
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10095$as_echo "default" >&6; }
10096fi
10097
10098
Charles-François Natalid30b0222014-05-08 23:08:51 +010010099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10100$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10101
10102# Check whether --with-address_sanitizer was given.
10103if test "${with_address_sanitizer+set}" = set; then :
10104 withval=$with_address_sanitizer;
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10106$as_echo "$withval" >&6; }
10107BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10108LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010109# ASan works by controlling memory allocation, our own malloc interferes.
10110with_pymalloc="no"
10111
10112else
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10119$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10120
10121# Check whether --with-memory_sanitizer was given.
10122if test "${with_memory_sanitizer+set}" = set; then :
10123 withval=$with_memory_sanitizer;
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10125$as_echo "$withval" >&6; }
10126BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10127LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10128# MSan works by controlling memory allocation, our own malloc interferes.
10129with_pymalloc="no"
10130
10131else
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10138$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10139
10140# Check whether --with-undefined_behavior_sanitizer was given.
10141if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10142 withval=$with_undefined_behavior_sanitizer;
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10144$as_echo "$withval" >&6; }
10145BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10146LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010147
10148else
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150$as_echo "no" >&6; }
10151fi
10152
10153
Guido van Rossum70c7f481998-03-26 18:44:10 +000010154# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10156$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010157if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010159else
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010161LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165/* Override any GCC internal prototype to avoid an error.
10166 Use char because int might match the return type of a GCC
10167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168#ifdef __cplusplus
10169extern "C"
10170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010171char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010172int
10173main ()
10174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185rm -f core conftest.err conftest.$ac_objext \
10186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010187LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10190$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010191if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010192 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010193fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010194 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10196$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010201LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205/* Override any GCC internal prototype to avoid an error.
10206 Use char because int might match the return type of a GCC
10207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#ifdef __cplusplus
10209extern "C"
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010222else
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225rm -f core conftest.err conftest.$ac_objext \
10226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010227LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10230$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010231if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010232 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010233fi
10234 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010235
Matthias Kloseb9621712010-04-24 17:59:49 +000010236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10237$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010240if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10243$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010244LIBS="$withval $LIBS"
10245
10246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249fi
10250
Guido van Rossum7f43da71994-08-01 12:15:30 +000010251
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010252
10253
10254
10255
10256
10257
Victor Stinner23a683a2019-04-12 21:27:37 +020010258
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010259if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10260 if test -n "$ac_tool_prefix"; then
10261 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10262set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10264$as_echo_n "checking for $ac_word... " >&6; }
10265if ${ac_cv_path_PKG_CONFIG+:} false; then :
10266 $as_echo_n "(cached) " >&6
10267else
10268 case $PKG_CONFIG in
10269 [\\/]* | ?:[\\/]*)
10270 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10271 ;;
10272 *)
10273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10274for as_dir in $PATH
10275do
10276 IFS=$as_save_IFS
10277 test -z "$as_dir" && as_dir=.
10278 for ac_exec_ext in '' $ac_executable_extensions; do
10279 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10280 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10281 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10282 break 2
10283 fi
10284done
10285 done
10286IFS=$as_save_IFS
10287
10288 ;;
10289esac
10290fi
10291PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10292if test -n "$PKG_CONFIG"; then
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10294$as_echo "$PKG_CONFIG" >&6; }
10295else
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10297$as_echo "no" >&6; }
10298fi
10299
10300
10301fi
10302if test -z "$ac_cv_path_PKG_CONFIG"; then
10303 ac_pt_PKG_CONFIG=$PKG_CONFIG
10304 # Extract the first word of "pkg-config", so it can be a program name with args.
10305set dummy pkg-config; ac_word=$2
10306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10307$as_echo_n "checking for $ac_word... " >&6; }
10308if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10309 $as_echo_n "(cached) " >&6
10310else
10311 case $ac_pt_PKG_CONFIG in
10312 [\\/]* | ?:[\\/]*)
10313 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10314 ;;
10315 *)
10316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10317for as_dir in $PATH
10318do
10319 IFS=$as_save_IFS
10320 test -z "$as_dir" && as_dir=.
10321 for ac_exec_ext in '' $ac_executable_extensions; do
10322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10323 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10325 break 2
10326 fi
10327done
10328 done
10329IFS=$as_save_IFS
10330
10331 ;;
10332esac
10333fi
10334ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10335if test -n "$ac_pt_PKG_CONFIG"; then
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10337$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10338else
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
10341fi
10342
10343 if test "x$ac_pt_PKG_CONFIG" = x; then
10344 PKG_CONFIG=""
10345 else
10346 case $cross_compiling:$ac_tool_warned in
10347yes:)
10348{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10349$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10350ac_tool_warned=yes ;;
10351esac
10352 PKG_CONFIG=$ac_pt_PKG_CONFIG
10353 fi
10354else
10355 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10356fi
10357
10358fi
10359if test -n "$PKG_CONFIG"; then
10360 _pkg_min_version=0.9.0
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10362$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10363 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10365$as_echo "yes" >&6; }
10366 else
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369 PKG_CONFIG=""
10370 fi
10371fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010372
10373# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10375$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010376
10377# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010379 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010380else
10381 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010382fi
10383
10384
Matthias Kloseb9621712010-04-24 17:59:49 +000010385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10386$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010387
10388# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10390$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010391
10392# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010394 withval=$with_system_ffi;
10395fi
10396
10397
Zachary Waref40d4dd2016-09-17 01:25:24 -050010398if test "$ac_sys_system" = "Darwin"
10399then
10400 case "$with_system_ffi" in
10401 "")
10402 with_system_ffi="no"
10403 ;;
10404 yes|no)
10405 ;;
10406 *)
10407 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10408 ;;
10409 esac
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10411$as_echo "$with_system_ffi" >&6; }
10412else
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10414$as_echo "yes" >&6; }
10415 if test "$with_system_ffi" != ""
10416 then
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10418$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10419 fi
10420 with_system_ffi="yes"
10421fi
Zachary Ware935043d2016-09-09 17:01:21 -070010422
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010423if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010424 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10425else
10426 LIBFFI_INCLUDEDIR=""
10427fi
10428
10429
Stefan Krah60187b52012-03-23 19:06:27 +010010430# Check for use of the system libmpdec library
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10432$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10433
10434# Check whether --with-system_libmpdec was given.
10435if test "${with_system_libmpdec+set}" = set; then :
10436 withval=$with_system_libmpdec;
10437else
10438 with_system_libmpdec="no"
10439fi
10440
10441
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10443$as_echo "$with_system_libmpdec" >&6; }
10444
Benjamin Peterson076ed002010-10-31 17:11:02 +000010445# Check for support for loadable sqlite extensions
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10447$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10448# Check whether --enable-loadable-sqlite-extensions was given.
10449if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10450 enableval=$enable_loadable_sqlite_extensions;
10451else
10452 enable_loadable_sqlite_extensions="no"
10453fi
10454
10455
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10457$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10458
Ned Deilyd819b932013-09-06 01:07:05 -070010459# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10460
10461
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10463$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10464
10465# Check whether --with-tcltk-includes was given.
10466if test "${with_tcltk_includes+set}" = set; then :
10467 withval=$with_tcltk_includes;
10468else
10469 with_tcltk_includes="default"
10470fi
10471
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10473$as_echo "$with_tcltk_includes" >&6; }
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10475$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10476
10477# Check whether --with-tcltk-libs was given.
10478if test "${with_tcltk_libs+set}" = set; then :
10479 withval=$with_tcltk_libs;
10480else
10481 with_tcltk_libs="default"
10482fi
10483
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10485$as_echo "$with_tcltk_libs" >&6; }
10486if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10487then
10488 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10489 then
10490 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10491 fi
10492 TCLTK_INCLUDES=""
10493 TCLTK_LIBS=""
10494else
10495 TCLTK_INCLUDES="$with_tcltk_includes"
10496 TCLTK_LIBS="$with_tcltk_libs"
10497fi
10498
Matthias Klose55708cc2009-04-30 08:06:49 +000010499# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10501$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010502
10503# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010504if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010505 withval=$with_dbmliborder;
10506if test x$with_dbmliborder = xyes
10507then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010508as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010509else
10510 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10511 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10512 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010513 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010514 fi
10515 done
10516fi
10517fi
10518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10520$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010521
Martin v. Löwis11437992002-04-12 09:54:03 +000010522# Templates for things AC_DEFINEd more than once.
10523# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010524
10525
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010526if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010527then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010528 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010530
10531 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010532 if test "$ac_sys_system" = "SunOS"; then
10533 CFLAGS="$CFLAGS -D_REENTRANT"
10534 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010535elif test "$ac_cv_kpthread" = "yes"
10536then
10537 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010538 if test "$ac_cv_cxx_thread" = "yes"; then
10539 CXX="$CXX -Kpthread"
10540 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010541 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010542elif test "$ac_cv_kthread" = "yes"
10543then
10544 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010545 if test "$ac_cv_cxx_thread" = "yes"; then
10546 CXX="$CXX -Kthread"
10547 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010548 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549elif test "$ac_cv_pthread" = "yes"
10550then
10551 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010552 if test "$ac_cv_cxx_thread" = "yes"; then
10553 CXX="$CXX -pthread"
10554 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010556else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010557 if test ! -z "$withval" -a -d "$withval"
10558 then LDFLAGS="$LDFLAGS -L$withval"
10559 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010560
10561 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010562 # define _POSIX_THREADS in unistd.h. Some apparently don't
10563 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10565$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010568
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010569#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010570#ifdef _POSIX_THREADS
10571yes
10572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010573
10574_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010575if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010577 unistd_defines_pthreads=yes
10578else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010579 unistd_defines_pthreads=no
10580fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010581rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010582
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10584$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010587
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010588 # Just looking for pthread_create in libpthread is not enough:
10589 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10590 # So we really have to include pthread.h, and then link.
10591 _libs=$LIBS
10592 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10594$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010597
10598#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010599#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010600
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010601void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010602int
10603main ()
10604{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010605
10606pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 ;
10608 return 0;
10609}
10610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10614$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010615 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010616
Guido van Rossum02a1c402000-02-25 19:26:31 +000010617else
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010619 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010621if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010622
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010623 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010624
Guido van Rossumad678af1998-10-02 14:42:15 +000010625else
Guido van Rossumad678af1998-10-02 14:42:15 +000010626
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10628$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010629if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010631else
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010633LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637/* Override any GCC internal prototype to avoid an error.
10638 Use char because int might match the return type of a GCC
10639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010640#ifdef __cplusplus
10641extern "C"
10642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010643char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010644int
10645main ()
10646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ;
10649 return 0;
10650}
10651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010654else
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657rm -f core conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010659LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10662$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010663if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010664
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010665 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010666 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010667
Greg Steinadf63d62000-07-05 10:38:09 +000010668else
Greg Steinadf63d62000-07-05 10:38:09 +000010669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10671$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010672if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010674else
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010676LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680/* Override any GCC internal prototype to avoid an error.
10681 Use char because int might match the return type of a GCC
10682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010683#ifdef __cplusplus
10684extern "C"
10685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010686char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010687int
10688main ()
10689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 ;
10692 return 0;
10693}
10694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700rm -f core conftest.err conftest.$ac_objext \
10701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10705$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010706if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010707
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010708 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010709 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010710
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010711else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10714$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010715if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010717else
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010719LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723/* Override any GCC internal prototype to avoid an error.
10724 Use char because int might match the return type of a GCC
10725 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010726#ifdef __cplusplus
10727extern "C"
10728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010729char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010730int
10731main ()
10732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ;
10735 return 0;
10736}
10737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010743rm -f core conftest.err conftest.$ac_objext \
10744 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10748$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010749if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010750
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010751 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010752 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010753
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010754else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10757$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010758if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010760else
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010762LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766/* Override any GCC internal prototype to avoid an error.
10767 Use char because int might match the return type of a GCC
10768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010769#ifdef __cplusplus
10770extern "C"
10771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010772char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010773int
10774main ()
10775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ;
10778 return 0;
10779}
10780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786rm -f core conftest.err conftest.$ac_objext \
10787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010788LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10791$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010792if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010793
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010794 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010795 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010796
Guido van Rossumb93a8621998-05-07 13:27:32 +000010797else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010798
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010799 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10800
Guido van Rossum2d38f911996-06-26 19:47:01 +000010801fi
10802
Guido van Rossum627b2d71993-12-24 10:39:16 +000010803
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010804fi
10805
Guido van Rossum0be3e491997-05-22 20:33:33 +000010806fi
10807
Guido van Rossum49545951997-12-02 19:28:29 +000010808fi
10809
Guido van Rossumb93a8621998-05-07 13:27:32 +000010810fi
10811
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010813rm -f core conftest.err conftest.$ac_objext \
10814 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10817$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010818if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010820else
Martin v. Löwis11437992002-04-12 09:54:03 +000010821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010822LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826/* Override any GCC internal prototype to avoid an error.
10827 Use char because int might match the return type of a GCC
10828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010829#ifdef __cplusplus
10830extern "C"
10831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010832char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010833int
10834main ()
10835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 ;
10838 return 0;
10839}
10840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843else
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846rm -f core conftest.err conftest.$ac_objext \
10847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10851$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010852if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010853
Martin v. Löwis130fb172001-07-19 11:00:41 +000010854 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010855
Guido van Rossum627b2d71993-12-24 10:39:16 +000010856fi
10857
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010858
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010860
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861if test "$posix_threads" = "yes"; then
10862 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010863
Matthias Kloseb9621712010-04-24 17:59:49 +000010864$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010865
10866 fi
10867
10868 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10869 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010870 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010871$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010872
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873 ;;
10874 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010875$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876
10877 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010878 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010879$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010880
10881 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010882 esac
10883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10885$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010886 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010890 ac_cv_pthread_system_supported=no
10891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010893/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010894
10895 #include <stdio.h>
10896 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897 void *foo(void *parm) {
10898 return NULL;
10899 }
10900 main() {
10901 pthread_attr_t attr;
10902 pthread_t id;
10903 if (pthread_attr_init(&attr)) exit(-1);
10904 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10905 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10906 exit(0);
10907 }
10908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010910 ac_cv_pthread_system_supported=yes
10911else
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10915 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010916fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918
Guido van Rossum627b2d71993-12-24 10:39:16 +000010919fi
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10922$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010923 if test "$ac_cv_pthread_system_supported" = "yes"; then
10924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010926
10927 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 for ac_func in pthread_sigmask
10929do :
10930 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010932 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010934_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010935 case $ac_sys_system in
10936 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010939
10940 ;;
10941 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010942fi
10943done
10944
pdoxe14679c2017-10-05 00:01:56 -070010945 for ac_func in pthread_getcpuclockid
10946do :
10947 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10948if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10949 cat >>confdefs.h <<_ACEOF
10950#define HAVE_PTHREAD_GETCPUCLOCKID 1
10951_ACEOF
10952
10953fi
10954done
10955
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010956fi
10957
10958
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10962$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10968$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969 ipv6=no
10970 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10972$as_echo "yes" >&6; }
10973 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974
10975 ipv6=yes
10976 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010978else
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010981/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982 /* AF_INET6 available check */
10983#include <sys/types.h>
10984#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010985int
10986main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010988int domain = AF_INET6;
10989 ;
10990 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991}
Martin v. Löwis11437992002-04-12 09:54:03 +000010992_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010993if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10996$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999else
Matthias Kloseb159a552010-04-25 21:00:44 +000011000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011004
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011008if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11010$as_echo_n "checking if RFC2553 API is available... " >&6; }
11011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011012/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011013
11014 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011015#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011016int
11017main ()
11018{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011019struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011020 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 ;
11022 return 0;
11023}
Matthias Kloseb159a552010-04-25 21:00:44 +000011024
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011026if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011027
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011029$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011030 ipv6=yes
11031
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011032else
Matthias Kloseb159a552010-04-25 21:00:44 +000011033
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011035$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011036 ipv6=no
11037
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011040fi
11041
11042if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011044
11045fi
11046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047fi
11048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049
11050ipv6type=unknown
11051ipv6lib=none
11052ipv6trylibc=no
11053
11054if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11056$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011057 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11058 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059 case $i in
11060 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011063
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011064#include <netinet/in.h>
11065#ifdef IPV6_INRIA_VERSION
11066yes
11067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011068_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011071 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011073rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074
11075 ;;
11076 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011079
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080#include <netinet/in.h>
11081#ifdef __KAME__
11082yes
11083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011084_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011087 ipv6type=$i;
11088 ipv6lib=inet6
11089 ipv6libdir=/usr/local/v6/lib
11090 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011092rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093
11094 ;;
11095 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011097/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099#include <features.h>
11100#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11101yes
11102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011103_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106 ipv6type=$i;
11107 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011109rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110
11111 ;;
11112 linux-inet6)
11113 if test -d /usr/inet6; then
11114 ipv6type=$i
11115 ipv6lib=inet6
11116 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011117 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118 fi
11119 ;;
11120 solaris)
11121 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011122 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123 ipv6type=$i
11124 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125 fi
11126 fi
11127 ;;
11128 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132#include <sys/param.h>
11133#ifdef _TOSHIBA_INET6
11134yes
11135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011136_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139 ipv6type=$i;
11140 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011141 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011143rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144
11145 ;;
11146 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011149
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150#include </usr/local/v6/include/sys/v6config.h>
11151#ifdef __V6D__
11152yes
11153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157 ipv6type=$i;
11158 ipv6lib=v6;
11159 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011160 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011162rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163
11164 ;;
11165 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011169#include <sys/param.h>
11170#ifdef _ZETA_MINAMI_INET6
11171yes
11172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011173_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176 ipv6type=$i;
11177 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011178 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011180rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011181
11182 ;;
11183 esac
11184 if test "$ipv6type" != "unknown"; then
11185 break
11186 fi
11187 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11189$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190fi
11191
11192if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11193 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11194 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11195 echo "using lib$ipv6lib"
11196 else
11197 if test $ipv6trylibc = "yes"; then
11198 echo "using libc"
11199 else
11200 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11201 echo "You need to fetch lib$ipv6lib.a from appropriate"
11202 echo 'ipv6 kit and compile beforehand.'
11203 exit 1
11204 fi
11205 fi
11206fi
11207
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11209$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11211/* end confdefs.h. */
11212 /* CAN_RAW_FD_FRAMES available check */
11213#include <linux/can/raw.h>
11214int
11215main ()
11216{
11217int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11218 ;
11219 return 0;
11220}
11221_ACEOF
11222if ac_fn_c_try_compile "$LINENO"; then :
11223
11224
11225$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11226
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11228$as_echo "yes" >&6; }
11229
11230else
11231
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
11234
11235fi
11236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11237
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011238# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11240$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011243if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244 withval=$with_doc_strings;
11245fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011246
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011247
11248if test -z "$with_doc_strings"
11249then with_doc_strings="yes"
11250fi
11251if test "$with_doc_strings" != "no"
11252then
11253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011255
11256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11258$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011259
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011260# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11262$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266 withval=$with_pymalloc;
11267fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011268
Neil Schemenauera35c6882001-02-27 04:45:05 +000011269
Neil Schemenauer16c22972002-03-22 15:34:49 +000011270if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011271then
11272 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011273fi
11274if test "$with_pymalloc" != "no"
11275then
Martin v. Löwis11437992002-04-12 09:54:03 +000011276
Matthias Kloseb9621712010-04-24 17:59:49 +000011277$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011278
11279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11281$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011282
Nick Coghlan6ea41862017-06-11 13:16:15 +100011283# Check for --with-c-locale-coercion
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11285$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11286
11287# Check whether --with-c-locale-coercion was given.
11288if test "${with_c_locale_coercion+set}" = set; then :
11289 withval=$with_c_locale_coercion;
11290fi
11291
11292
11293if test -z "$with_c_locale_coercion"
11294then
11295 with_c_locale_coercion="yes"
11296fi
11297if test "$with_c_locale_coercion" != "no"
11298then
11299
11300$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11301
11302fi
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11304$as_echo "$with_c_locale_coercion" >&6; }
11305
Benjamin Peterson05159c42009-12-03 03:01:27 +000011306# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11308$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011309
11310# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011311if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011312 withval=$with_valgrind;
11313else
11314 with_valgrind=no
11315fi
11316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11318$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011319if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 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 +020011321if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011324
11325else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011326 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011327
11328fi
11329
11330
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011331 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011332fi
11333
Łukasz Langaa785c872016-09-09 17:37:37 -070011334# Check for DTrace support
11335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11336$as_echo_n "checking for --with-dtrace... " >&6; }
11337
11338# Check whether --with-dtrace was given.
11339if test "${with_dtrace+set}" = set; then :
11340 withval=$with_dtrace;
11341else
11342 with_dtrace=no
11343fi
11344
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11346$as_echo "$with_dtrace" >&6; }
11347
11348
11349
11350
11351
11352DTRACE=
11353DFLAGS=
11354DTRACE_HEADERS=
11355DTRACE_OBJS=
11356
11357if test "$with_dtrace" = "yes"
11358then
11359 # Extract the first word of "dtrace", so it can be a program name with args.
11360set dummy dtrace; ac_word=$2
11361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11362$as_echo_n "checking for $ac_word... " >&6; }
11363if ${ac_cv_path_DTRACE+:} false; then :
11364 $as_echo_n "(cached) " >&6
11365else
11366 case $DTRACE in
11367 [\\/]* | ?:[\\/]*)
11368 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11369 ;;
11370 *)
11371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11372for as_dir in $PATH
11373do
11374 IFS=$as_save_IFS
11375 test -z "$as_dir" && as_dir=.
11376 for ac_exec_ext in '' $ac_executable_extensions; do
11377 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11378 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11380 break 2
11381 fi
11382done
11383 done
11384IFS=$as_save_IFS
11385
11386 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11387 ;;
11388esac
11389fi
11390DTRACE=$ac_cv_path_DTRACE
11391if test -n "$DTRACE"; then
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11393$as_echo "$DTRACE" >&6; }
11394else
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
11397fi
11398
11399
11400 if test "$DTRACE" = "not found"; then
11401 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11402 fi
11403
11404$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11405
11406 DTRACE_HEADERS="Include/pydtrace_probes.h"
11407
11408 # On OS X, DTrace providers do not need to be explicitly compiled and
11409 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11410 # generation flag '-G'. We check for presence of this flag, rather than
11411 # hardcoding support by OS, in the interest of robustness.
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11413$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11414if ${ac_cv_dtrace_link+:} false; then :
11415 $as_echo_n "(cached) " >&6
11416else
11417 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011418 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011419 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11420 ac_cv_dtrace_link=yes
11421
11422fi
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11424$as_echo "$ac_cv_dtrace_link" >&6; }
11425 if test "$ac_cv_dtrace_link" = "yes"; then
11426 DTRACE_OBJS="Python/pydtrace.o"
11427 fi
11428fi
11429
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011430# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011431
Guido van Rossum98935bf2001-09-05 19:13:16 +000011432DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011433
Guido van Rossume97ee181999-12-20 21:27:22 +000011434# the dlopen() function means we might want to use dynload_shlib.o. some
11435# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011436for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011437do :
11438 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011439if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011441#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011442_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011443
Guido van Rossume97ee181999-12-20 21:27:22 +000011444fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011445done
Guido van Rossume97ee181999-12-20 21:27:22 +000011446
Michael W. Hudson54241132001-12-07 15:38:26 +000011447
Guido van Rossume97ee181999-12-20 21:27:22 +000011448# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11449# loading of modules.
11450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11452$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011453if test -z "$DYNLOADFILE"
11454then
11455 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011456 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11457 if test "$ac_cv_func_dlopen" = yes
11458 then DYNLOADFILE="dynload_shlib.o"
11459 else DYNLOADFILE="dynload_aix.o"
11460 fi
11461 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011462 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011463 *)
11464 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11465 # out any dynamic loading
11466 if test "$ac_cv_func_dlopen" = yes
11467 then DYNLOADFILE="dynload_shlib.o"
11468 else DYNLOADFILE="dynload_stub.o"
11469 fi
11470 ;;
11471 esac
11472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11474$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011475if test "$DYNLOADFILE" != "dynload_stub.o"
11476then
Martin v. Löwis11437992002-04-12 09:54:03 +000011477
Matthias Kloseb9621712010-04-24 17:59:49 +000011478$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011479
11480fi
11481
Neil Schemenauer4e425612001-06-19 15:44:15 +000011482# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11483
Michael W. Hudson54241132001-12-07 15:38:26 +000011484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11486$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011487if test -z "$MACHDEP_OBJS"
11488then
Jack Jansene578a632001-08-15 01:27:14 +000011489 MACHDEP_OBJS=$extra_machdep_objs
11490else
11491 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011492fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011493if test -z "$MACHDEP_OBJS"; then
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11495$as_echo "none" >&6; }
11496else
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11498$as_echo "$MACHDEP_OBJS" >&6; }
11499fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011500
Guido van Rossum627b2d71993-12-24 10:39:16 +000011501# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011502for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011503 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11504 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011505 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011506 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011507 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011508 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011509 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011510 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011511 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011512 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011513 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011514 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011515 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11516 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011517 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011518 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011519 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011520 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11521 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011522 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011523 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011524 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011525 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011526 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011527do :
11528 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11529ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011530if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011532#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011533_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011534
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011535fi
11536done
11537
Michael W. Hudson54241132001-12-07 15:38:26 +000011538
Benjamin Peterson40caa052018-09-12 15:52:40 -070011539# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11540# links. Some libc implementations have a stub lchmod implementation that always
11541# returns an error.
11542if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011543 for ac_func in lchmod
11544do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011545 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11546if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011547 cat >>confdefs.h <<_ACEOF
11548#define HAVE_LCHMOD 1
11549_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011550
11551fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011552done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011553
11554fi
11555
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011556ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11557 #include <dirent.h>
11558"
11559if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11560
11561$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11562
11563fi
11564
11565
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011566# For some functions, having a definition is not sufficient, since
11567# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11569$as_echo_n "checking for chroot... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573int
11574main ()
11575{
11576void *x=chroot
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584
Matthias Kloseb159a552010-04-25 21:00:44 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011590
11591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11594$as_echo_n "checking for link... " >&6; }
11595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598int
11599main ()
11600{
11601void *x=link
11602 ;
11603 return 0;
11604}
11605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609
Matthias Kloseb159a552010-04-25 21:00:44 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011615
11616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11619$as_echo_n "checking for symlink... " >&6; }
11620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011621/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011622#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011623int
11624main ()
11625{
11626void *x=symlink
11627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011634
Matthias Kloseb159a552010-04-25 21:00:44 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011640
11641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11644$as_echo_n "checking for fchdir... " >&6; }
11645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647#include <unistd.h>
11648int
11649main ()
11650{
11651void *x=fchdir
11652 ;
11653 return 0;
11654}
11655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011659
Matthias Kloseb159a552010-04-25 21:00:44 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011662else
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11664$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011665
11666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11669$as_echo_n "checking for fsync... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011671/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011672#include <unistd.h>
11673int
11674main ()
11675{
11676void *x=fsync
11677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011684
Matthias Kloseb159a552010-04-25 21:00:44 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011690
11691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11694$as_echo_n "checking for fdatasync... " >&6; }
11695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011697#include <unistd.h>
11698int
11699main ()
11700{
11701void *x=fdatasync
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011709
Matthias Kloseb159a552010-04-25 21:00:44 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011715
11716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11719$as_echo_n "checking for epoll... " >&6; }
11720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011721/* end confdefs.h. */
11722#include <sys/epoll.h>
11723int
11724main ()
11725{
11726void *x=epoll_create
11727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011734
Matthias Kloseb159a552010-04-25 21:00:44 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011740
11741fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11744$as_echo_n "checking for epoll_create1... " >&6; }
11745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11746/* end confdefs.h. */
11747#include <sys/epoll.h>
11748int
11749main ()
11750{
11751void *x=epoll_create1
11752 ;
11753 return 0;
11754}
11755_ACEOF
11756if ac_fn_c_try_compile "$LINENO"; then :
11757
11758$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11759
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11761$as_echo "yes" >&6; }
11762else
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11764$as_echo "no" >&6; }
11765
11766fi
11767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11769$as_echo_n "checking for kqueue... " >&6; }
11770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011771/* end confdefs.h. */
11772
11773#include <sys/types.h>
11774#include <sys/event.h>
11775
11776int
11777main ()
11778{
11779int x=kqueue()
11780 ;
11781 return 0;
11782}
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011787
Matthias Kloseb159a552010-04-25 21:00:44 +000011788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11792$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011793
11794fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11797$as_echo_n "checking for prlimit... " >&6; }
11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799/* end confdefs.h. */
11800
11801#include <sys/time.h>
11802#include <sys/resource.h>
11803
11804int
11805main ()
11806{
11807void *x=prlimit
11808 ;
11809 return 0;
11810}
11811_ACEOF
11812if ac_fn_c_try_compile "$LINENO"; then :
11813
11814$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11815
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11817$as_echo "yes" >&6; }
11818else
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11820$as_echo "no" >&6; }
11821
11822fi
11823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11824
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11826$as_echo_n "checking for memfd_create... " >&6; }
11827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11828/* end confdefs.h. */
11829
11830#ifdef HAVE_SYS_MMAN_H
11831#include <sys/mman.h>
11832#endif
11833#ifdef HAVE_SYS_MEMFD_H
11834#include <sys/memfd.h>
11835#endif
11836
11837int
11838main ()
11839{
11840void *x=memfd_create
11841 ;
11842 return 0;
11843}
11844_ACEOF
11845if ac_fn_c_try_compile "$LINENO"; then :
11846
11847$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11848
11849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11850$as_echo "yes" >&6; }
11851else
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
11854
11855fi
11856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11857
Martin v. Löwisd5843682002-11-21 20:41:28 +000011858# On some systems (eg. FreeBSD 5), we would find a definition of the
11859# functions ctermid_r, setgroups in the library, but no prototype
11860# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11861# address to avoid compiler warnings and potential miscompilations
11862# because of the missing prototypes.
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11865$as_echo_n "checking for ctermid_r... " >&6; }
11866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011867/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011868
Martin v. Löwisd5843682002-11-21 20:41:28 +000011869#include <stdio.h>
11870
Martin v. Löwisd5843682002-11-21 20:41:28 +000011871int
11872main ()
11873{
11874void* p = ctermid_r
11875 ;
11876 return 0;
11877}
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011882
Matthias Kloseb159a552010-04-25 21:00:44 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011888
11889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11891
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11893$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011895 $as_echo_n "(cached) " >&6
11896else
11897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011898/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011899#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011900int
11901main ()
11902{
11903void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011904
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011910 ac_cv_flock_decl=yes
11911else
11912 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011913
11914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011916
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011917fi
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11919$as_echo "$ac_cv_flock_decl" >&6; }
11920if test "x${ac_cv_flock_decl}" = xyes; then
11921 for ac_func in flock
11922do :
11923 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011924if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011925 cat >>confdefs.h <<_ACEOF
11926#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011927_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011928
Antoine Pitroua3000072010-09-07 14:52:42 +000011929else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011931$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011932if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011933 $as_echo_n "(cached) " >&6
11934else
11935 ac_check_lib_save_LIBS=$LIBS
11936LIBS="-lbsd $LIBS"
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938/* end confdefs.h. */
11939
11940/* Override any GCC internal prototype to avoid an error.
11941 Use char because int might match the return type of a GCC
11942 builtin and then its argument prototype would still apply. */
11943#ifdef __cplusplus
11944extern "C"
11945#endif
11946char flock ();
11947int
11948main ()
11949{
11950return flock ();
11951 ;
11952 return 0;
11953}
11954_ACEOF
11955if ac_fn_c_try_link "$LINENO"; then :
11956 ac_cv_lib_bsd_flock=yes
11957else
11958 ac_cv_lib_bsd_flock=no
11959fi
11960rm -f core conftest.err conftest.$ac_objext \
11961 conftest$ac_exeext conftest.$ac_ext
11962LIBS=$ac_check_lib_save_LIBS
11963fi
11964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11965$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011966if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011967 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011968
11969
11970$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11971
11972
11973fi
11974
11975
11976fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011977done
11978
Antoine Pitroua3000072010-09-07 14:52:42 +000011979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11982$as_echo_n "checking for getpagesize... " >&6; }
11983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011984/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011985
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011986#include <unistd.h>
11987
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011988int
11989main ()
11990{
11991void* p = getpagesize
11992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011999
Matthias Kloseb159a552010-04-25 21:00:44 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12004$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012005
12006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012008
Victor Stinner984890f2011-11-24 13:53:38 +010012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12010$as_echo_n "checking for broken unsetenv... " >&6; }
12011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012/* end confdefs.h. */
12013
12014#include <stdlib.h>
12015
12016int
12017main ()
12018{
12019int res = unsetenv("DUMMY")
12020 ;
12021 return 0;
12022}
12023_ACEOF
12024if ac_fn_c_try_compile "$LINENO"; then :
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
12027else
12028
12029$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12030
12031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12032$as_echo "yes" >&6; }
12033
12034fi
12035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12036
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012037for ac_prog in true
12038do
12039 # Extract the first word of "$ac_prog", so it can be a program name with args.
12040set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12042$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012043if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012045else
12046 if test -n "$TRUE"; then
12047 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12048else
12049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12050for as_dir in $PATH
12051do
12052 IFS=$as_save_IFS
12053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012056 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 $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 +000012058 break 2
12059 fi
12060done
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012063
12064fi
12065fi
12066TRUE=$ac_cv_prog_TRUE
12067if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12069$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12072$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012073fi
12074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012076 test -n "$TRUE" && break
12077done
12078test -n "$TRUE" || TRUE="/bin/true"
12079
12080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12082$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012083if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085else
12086 ac_check_lib_save_LIBS=$LIBS
12087LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091/* Override any GCC internal prototype to avoid an error.
12092 Use char because int might match the return type of a GCC
12093 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012094#ifdef __cplusplus
12095extern "C"
12096#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012098int
12099main ()
12100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012102 ;
12103 return 0;
12104}
12105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012106if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012107 ac_cv_lib_c_inet_aton=yes
12108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012111rm -f core conftest.err conftest.$ac_objext \
12112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012113LIBS=$ac_check_lib_save_LIBS
12114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12116$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012117if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012118 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12121$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012124else
12125 ac_check_lib_save_LIBS=$LIBS
12126LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130/* Override any GCC internal prototype to avoid an error.
12131 Use char because int might match the return type of a GCC
12132 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012133#ifdef __cplusplus
12134extern "C"
12135#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012136char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012137int
12138main ()
12139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012141 ;
12142 return 0;
12143}
12144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012146 ac_cv_lib_resolv_inet_aton=yes
12147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150rm -f core conftest.err conftest.$ac_objext \
12151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012152LIBS=$ac_check_lib_save_LIBS
12153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12155$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012156if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012157 cat >>confdefs.h <<_ACEOF
12158#define HAVE_LIBRESOLV 1
12159_ACEOF
12160
12161 LIBS="-lresolv $LIBS"
12162
12163fi
12164
12165
12166fi
12167
12168
Christian Heimesd0764e22007-12-04 15:00:33 +000012169# On Tru64, chflags seems to be present, but calling it will
12170# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12172$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012173if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012177 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012180/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012181
Christian Heimesd0764e22007-12-04 15:00:33 +000012182#include <sys/stat.h>
12183#include <unistd.h>
12184int main(int argc, char*argv[])
12185{
12186 if(chflags(argv[0], 0) != 0)
12187 return 1;
12188 return 0;
12189}
Ned Deily3eb67d52011-06-28 00:00:28 -070012190
Christian Heimesd0764e22007-12-04 15:00:33 +000012191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012193 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012199fi
12200
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12204$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012205if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012207if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012208 ac_cv_have_chflags="yes"
12209else
12210 ac_cv_have_chflags="no"
12211fi
12212
12213fi
12214if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012217
12218fi
12219
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12221$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012222if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012226 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012227else
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012229/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012230
Christian Heimesd0764e22007-12-04 15:00:33 +000012231#include <sys/stat.h>
12232#include <unistd.h>
12233int main(int argc, char*argv[])
12234{
12235 if(lchflags(argv[0], 0) != 0)
12236 return 1;
12237 return 0;
12238}
Ned Deily3eb67d52011-06-28 00:00:28 -070012239
Christian Heimesd0764e22007-12-04 15:00:33 +000012240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012242 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012243else
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012248fi
12249
12250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12253$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012254if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012256if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012257 ac_cv_have_lchflags="yes"
12258else
12259 ac_cv_have_lchflags="no"
12260fi
12261
12262fi
12263if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012266
12267fi
12268
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012269case $ac_sys_system/$ac_sys_release in
12270Darwin/*)
12271 _CUR_CFLAGS="${CFLAGS}"
12272 _CUR_LDFLAGS="${LDFLAGS}"
12273 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12274 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12275 ;;
12276esac
12277
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12279$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012280if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012282else
12283 ac_check_lib_save_LIBS=$LIBS
12284LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012286/* end confdefs.h. */
12287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288/* Override any GCC internal prototype to avoid an error.
12289 Use char because int might match the return type of a GCC
12290 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012291#ifdef __cplusplus
12292extern "C"
12293#endif
12294char inflateCopy ();
12295int
12296main ()
12297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012304 ac_cv_lib_z_inflateCopy=yes
12305else
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012308rm -f core conftest.err conftest.$ac_objext \
12309 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012310LIBS=$ac_check_lib_save_LIBS
12311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12313$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012314if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012317
12318fi
12319
12320
12321case $ac_sys_system/$ac_sys_release in
12322Darwin/*)
12323 CFLAGS="${_CUR_CFLAGS}"
12324 LDFLAGS="${_CUR_LDFLAGS}"
12325 ;;
12326esac
12327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12329$as_echo_n "checking for hstrerror... " >&6; }
12330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012332
Martin v. Löwise9416172003-05-03 10:12:45 +000012333#include <netdb.h>
12334
Martin v. Löwise9416172003-05-03 10:12:45 +000012335int
12336main ()
12337{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012338void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012346
Matthias Kloseb159a552010-04-25 21:00:44 +000012347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012352
12353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012354rm -f core conftest.err conftest.$ac_objext \
12355 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12358$as_echo_n "checking for inet_aton... " >&6; }
12359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012361
Martin v. Löwis86d66262006-02-17 08:40:11 +000012362#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012363#include <sys/socket.h>
12364#include <netinet/in.h>
12365#include <arpa/inet.h>
12366
Martin v. Löwise9416172003-05-03 10:12:45 +000012367int
12368main ()
12369{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012370void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012371 ;
12372 return 0;
12373}
12374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012378
Matthias Kloseb159a552010-04-25 21:00:44 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012381else
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12383$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012384
12385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012386rm -f core conftest.err conftest.$ac_objext \
12387 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12390$as_echo_n "checking for inet_pton... " >&6; }
12391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012393
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012394#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012395#include <sys/socket.h>
12396#include <netinet/in.h>
12397#include <arpa/inet.h>
12398
Martin v. Löwise9416172003-05-03 10:12:45 +000012399int
12400main ()
12401{
12402void* p = inet_pton
12403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012410
Matthias Kloseb159a552010-04-25 21:00:44 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12415$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012416
12417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012419
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012420# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12422$as_echo_n "checking for setgroups... " >&6; }
12423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012425
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012426#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012427#ifdef HAVE_GRP_H
12428#include <grp.h>
12429#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012430
Martin v. Löwisd5843682002-11-21 20:41:28 +000012431int
12432main ()
12433{
12434void* p = setgroups
12435 ;
12436 return 0;
12437}
12438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012442
Matthias Kloseb159a552010-04-25 21:00:44 +000012443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012444$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012445else
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12447$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012448
12449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012451
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012452# check for openpty and forkpty
12453
12454for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012455do :
12456 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012460_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012461
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12464$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467else
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012469LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473/* Override any GCC internal prototype to avoid an error.
12474 Use char because int might match the return type of a GCC
12475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012476#ifdef __cplusplus
12477extern "C"
12478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012479char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012480int
12481main ()
12482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 ;
12485 return 0;
12486}
12487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012490else
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012493rm -f core conftest.err conftest.$ac_objext \
12494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012495LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12498$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012499if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12504$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012505if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012507else
12508 ac_check_lib_save_LIBS=$LIBS
12509LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012511/* end confdefs.h. */
12512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513/* Override any GCC internal prototype to avoid an error.
12514 Use char because int might match the return type of a GCC
12515 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012516#ifdef __cplusplus
12517extern "C"
12518#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012519char openpty ();
12520int
12521main ()
12522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012529 ac_cv_lib_bsd_openpty=yes
12530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core conftest.err conftest.$ac_objext \
12534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012535LIBS=$ac_check_lib_save_LIBS
12536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12538$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012539if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012541 LIBS="$LIBS -lbsd"
12542fi
12543
12544
12545fi
12546
Fred Drake8cef4cf2000-06-28 16:40:38 +000012547
12548fi
12549done
12550
12551for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012552do :
12553 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012554if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012557_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012558
Fred Drake8cef4cf2000-06-28 16:40:38 +000012559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12561$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012562if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012564else
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012566LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570/* Override any GCC internal prototype to avoid an error.
12571 Use char because int might match the return type of a GCC
12572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012573#ifdef __cplusplus
12574extern "C"
12575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012576char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012577int
12578main ()
12579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 ;
12582 return 0;
12583}
12584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012590rm -f core conftest.err conftest.$ac_objext \
12591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012592LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12595$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012596if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012598 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12601$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012602if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012604else
12605 ac_check_lib_save_LIBS=$LIBS
12606LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012608/* end confdefs.h. */
12609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610/* Override any GCC internal prototype to avoid an error.
12611 Use char because int might match the return type of a GCC
12612 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012613#ifdef __cplusplus
12614extern "C"
12615#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012616char forkpty ();
12617int
12618main ()
12619{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012621 ;
12622 return 0;
12623}
12624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012626 ac_cv_lib_bsd_forkpty=yes
12627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012630rm -f core conftest.err conftest.$ac_objext \
12631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012632LIBS=$ac_check_lib_save_LIBS
12633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12635$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012636if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012638 LIBS="$LIBS -lbsd"
12639fi
12640
12641
12642fi
12643
Fred Drake8cef4cf2000-06-28 16:40:38 +000012644
12645fi
12646done
12647
Jack Jansendd19cf82001-12-06 22:36:17 +000012648
Michael W. Hudson54241132001-12-07 15:38:26 +000012649# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012650for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012651do :
12652 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12653ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012654if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012657_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012660done
12661
Michael W. Hudson54241132001-12-07 15:38:26 +000012662
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012663ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012665 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012666
Martin v. Löwis1142de32002-03-29 16:28:31 +000012667else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012669 *" dup2.$ac_objext "* ) ;;
12670 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012672esac
12673
Martin v. Löwis1142de32002-03-29 16:28:31 +000012674fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012675
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012676ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012677if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012678 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12679
12680else
12681 case " $LIBOBJS " in
12682 *" strdup.$ac_objext "* ) ;;
12683 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12684 ;;
12685esac
12686
12687fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012688
12689
12690for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012691do :
12692 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012693if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012698/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012700int
12701main ()
12702{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ;
12705 return 0;
12706}
12707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012708if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012711
Guido van Rossum627b2d71993-12-24 10:39:16 +000012712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012714
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012716done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012717
Jack Jansen150753c2003-03-29 22:07:47 +000012718for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012719do :
12720 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012721if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012722 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012726/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012727#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012728int
12729main ()
12730{
12731setpgrp(0,0);
12732 ;
12733 return 0;
12734}
12735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012739
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012742
12743fi
12744done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012745
Michael W. Hudson54241132001-12-07 15:38:26 +000012746
Gregory P. Smith387512c2018-12-30 15:42:32 -080012747# We search for both crypt and crypt_r as one or the other may be defined
12748# This gets us our -lcrypt in LIBS when required on the target platform.
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12750$as_echo_n "checking for library containing crypt... " >&6; }
12751if ${ac_cv_search_crypt+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753else
12754 ac_func_search_save_LIBS=$LIBS
12755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756/* end confdefs.h. */
12757
12758/* Override any GCC internal prototype to avoid an error.
12759 Use char because int might match the return type of a GCC
12760 builtin and then its argument prototype would still apply. */
12761#ifdef __cplusplus
12762extern "C"
12763#endif
12764char crypt ();
12765int
12766main ()
12767{
12768return crypt ();
12769 ;
12770 return 0;
12771}
12772_ACEOF
12773for ac_lib in '' crypt; do
12774 if test -z "$ac_lib"; then
12775 ac_res="none required"
12776 else
12777 ac_res=-l$ac_lib
12778 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12779 fi
12780 if ac_fn_c_try_link "$LINENO"; then :
12781 ac_cv_search_crypt=$ac_res
12782fi
12783rm -f core conftest.err conftest.$ac_objext \
12784 conftest$ac_exeext
12785 if ${ac_cv_search_crypt+:} false; then :
12786 break
12787fi
12788done
12789if ${ac_cv_search_crypt+:} false; then :
12790
12791else
12792 ac_cv_search_crypt=no
12793fi
12794rm conftest.$ac_ext
12795LIBS=$ac_func_search_save_LIBS
12796fi
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12798$as_echo "$ac_cv_search_crypt" >&6; }
12799ac_res=$ac_cv_search_crypt
12800if test "$ac_res" != no; then :
12801 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12802
12803fi
12804
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12806$as_echo_n "checking for library containing crypt_r... " >&6; }
12807if ${ac_cv_search_crypt_r+:} false; then :
12808 $as_echo_n "(cached) " >&6
12809else
12810 ac_func_search_save_LIBS=$LIBS
12811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12812/* end confdefs.h. */
12813
12814/* Override any GCC internal prototype to avoid an error.
12815 Use char because int might match the return type of a GCC
12816 builtin and then its argument prototype would still apply. */
12817#ifdef __cplusplus
12818extern "C"
12819#endif
12820char crypt_r ();
12821int
12822main ()
12823{
12824return crypt_r ();
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829for ac_lib in '' crypt; do
12830 if test -z "$ac_lib"; then
12831 ac_res="none required"
12832 else
12833 ac_res=-l$ac_lib
12834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12835 fi
12836 if ac_fn_c_try_link "$LINENO"; then :
12837 ac_cv_search_crypt_r=$ac_res
12838fi
12839rm -f core conftest.err conftest.$ac_objext \
12840 conftest$ac_exeext
12841 if ${ac_cv_search_crypt_r+:} false; then :
12842 break
12843fi
12844done
12845if ${ac_cv_search_crypt_r+:} false; then :
12846
12847else
12848 ac_cv_search_crypt_r=no
12849fi
12850rm conftest.$ac_ext
12851LIBS=$ac_func_search_save_LIBS
12852fi
12853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12854$as_echo "$ac_cv_search_crypt_r" >&6; }
12855ac_res=$ac_cv_search_crypt_r
12856if test "$ac_res" != no; then :
12857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12858
12859fi
12860
12861
12862ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12863if test "x$ac_cv_func_crypt_r" = xyes; then :
12864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12865/* end confdefs.h. */
12866
12867#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12868#include <crypt.h>
12869
12870int
12871main ()
12872{
12873
12874struct crypt_data d;
12875char *r = crypt_r("", "", &d);
12876
12877 ;
12878 return 0;
12879}
12880_ACEOF
12881if ac_fn_c_try_compile "$LINENO"; then :
12882
12883$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12884
12885fi
12886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12887
12888fi
12889
12890
Victor Stinnere0be4232011-10-25 13:06:09 +020012891for ac_func in clock_gettime
12892do :
12893 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12894if test "x$ac_cv_func_clock_gettime" = xyes; then :
12895 cat >>confdefs.h <<_ACEOF
12896#define HAVE_CLOCK_GETTIME 1
12897_ACEOF
12898
12899else
12900
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12902$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12903if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12904 $as_echo_n "(cached) " >&6
12905else
12906 ac_check_lib_save_LIBS=$LIBS
12907LIBS="-lrt $LIBS"
12908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909/* end confdefs.h. */
12910
12911/* Override any GCC internal prototype to avoid an error.
12912 Use char because int might match the return type of a GCC
12913 builtin and then its argument prototype would still apply. */
12914#ifdef __cplusplus
12915extern "C"
12916#endif
12917char clock_gettime ();
12918int
12919main ()
12920{
12921return clock_gettime ();
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926if ac_fn_c_try_link "$LINENO"; then :
12927 ac_cv_lib_rt_clock_gettime=yes
12928else
12929 ac_cv_lib_rt_clock_gettime=no
12930fi
12931rm -f core conftest.err conftest.$ac_objext \
12932 conftest$ac_exeext conftest.$ac_ext
12933LIBS=$ac_check_lib_save_LIBS
12934fi
12935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12936$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12937if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12938
Victor Stinner7efb8332014-08-29 15:41:08 +020012939 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012940 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12941
12942
12943$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12944
12945
12946fi
12947
12948
12949fi
12950done
12951
12952
12953for ac_func in clock_getres
12954do :
12955 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12956if test "x$ac_cv_func_clock_getres" = xyes; then :
12957 cat >>confdefs.h <<_ACEOF
12958#define HAVE_CLOCK_GETRES 1
12959_ACEOF
12960
12961else
12962
12963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12964$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12965if ${ac_cv_lib_rt_clock_getres+:} false; then :
12966 $as_echo_n "(cached) " >&6
12967else
12968 ac_check_lib_save_LIBS=$LIBS
12969LIBS="-lrt $LIBS"
12970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12971/* end confdefs.h. */
12972
12973/* Override any GCC internal prototype to avoid an error.
12974 Use char because int might match the return type of a GCC
12975 builtin and then its argument prototype would still apply. */
12976#ifdef __cplusplus
12977extern "C"
12978#endif
12979char clock_getres ();
12980int
12981main ()
12982{
12983return clock_getres ();
12984 ;
12985 return 0;
12986}
12987_ACEOF
12988if ac_fn_c_try_link "$LINENO"; then :
12989 ac_cv_lib_rt_clock_getres=yes
12990else
12991 ac_cv_lib_rt_clock_getres=no
12992fi
12993rm -f core conftest.err conftest.$ac_objext \
12994 conftest$ac_exeext conftest.$ac_ext
12995LIBS=$ac_check_lib_save_LIBS
12996fi
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12998$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12999if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13000
13001 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13002
13003
13004fi
13005
13006
13007fi
13008done
13009
13010
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013011for ac_func in clock_settime
13012do :
13013 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13014if test "x$ac_cv_func_clock_settime" = xyes; then :
13015 cat >>confdefs.h <<_ACEOF
13016#define HAVE_CLOCK_SETTIME 1
13017_ACEOF
13018
13019else
13020
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13022$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13023if ${ac_cv_lib_rt_clock_settime+:} false; then :
13024 $as_echo_n "(cached) " >&6
13025else
13026 ac_check_lib_save_LIBS=$LIBS
13027LIBS="-lrt $LIBS"
13028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13029/* end confdefs.h. */
13030
13031/* Override any GCC internal prototype to avoid an error.
13032 Use char because int might match the return type of a GCC
13033 builtin and then its argument prototype would still apply. */
13034#ifdef __cplusplus
13035extern "C"
13036#endif
13037char clock_settime ();
13038int
13039main ()
13040{
13041return clock_settime ();
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046if ac_fn_c_try_link "$LINENO"; then :
13047 ac_cv_lib_rt_clock_settime=yes
13048else
13049 ac_cv_lib_rt_clock_settime=no
13050fi
13051rm -f core conftest.err conftest.$ac_objext \
13052 conftest$ac_exeext conftest.$ac_ext
13053LIBS=$ac_check_lib_save_LIBS
13054fi
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13056$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13057if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13058
13059 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13060
13061
13062fi
13063
13064
13065fi
13066done
13067
13068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13070$as_echo_n "checking for major... " >&6; }
13071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013073
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013074#if defined(MAJOR_IN_MKDEV)
13075#include <sys/mkdev.h>
13076#elif defined(MAJOR_IN_SYSMACROS)
13077#include <sys/sysmacros.h>
13078#else
13079#include <sys/types.h>
13080#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013081
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013082int
13083main ()
13084{
13085
13086 makedev(major(0),minor(0));
13087
13088 ;
13089 return 0;
13090}
13091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013092if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013093
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13098$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013099
13100else
Skip Montanaro6dead952003-09-25 14:50:04 +000013101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013104
13105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013106rm -f core conftest.err conftest.$ac_objext \
13107 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013108
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013109# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013110# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13112$as_echo_n "checking for getaddrinfo... " >&6; }
13113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013114/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013115
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013116#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013117#include <sys/socket.h>
13118#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013119#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013124getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ;
13126 return 0;
13127}
13128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013129if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013130 have_getaddrinfo=yes
13131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013134rm -f core conftest.err conftest.$ac_objext \
13135 conftest$ac_exeext conftest.$ac_ext
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13137$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013138if test $have_getaddrinfo = yes
13139then
Matthias Kloseb9621712010-04-24 17:59:49 +000013140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13141$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013142 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013144else
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013146
13147if test "${enable_ipv6+set}" = set; then
13148 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13149else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013151fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013154/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013155
Stefan Krah19c21392012-11-22 23:47:32 +010013156#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157#include <sys/types.h>
13158#include <netdb.h>
13159#include <string.h>
13160#include <sys/socket.h>
13161#include <netinet/in.h>
13162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013163int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013164{
13165 int passive, gaierr, inet4 = 0, inet6 = 0;
13166 struct addrinfo hints, *ai, *aitop;
13167 char straddr[INET6_ADDRSTRLEN], strport[16];
13168
13169 for (passive = 0; passive <= 1; passive++) {
13170 memset(&hints, 0, sizeof(hints));
13171 hints.ai_family = AF_UNSPEC;
13172 hints.ai_flags = passive ? AI_PASSIVE : 0;
13173 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013174 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13176 (void)gai_strerror(gaierr);
13177 goto bad;
13178 }
13179 for (ai = aitop; ai; ai = ai->ai_next) {
13180 if (ai->ai_addr == NULL ||
13181 ai->ai_addrlen == 0 ||
13182 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13183 straddr, sizeof(straddr), strport, sizeof(strport),
13184 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13185 goto bad;
13186 }
13187 switch (ai->ai_family) {
13188 case AF_INET:
13189 if (strcmp(strport, "54321") != 0) {
13190 goto bad;
13191 }
13192 if (passive) {
13193 if (strcmp(straddr, "0.0.0.0") != 0) {
13194 goto bad;
13195 }
13196 } else {
13197 if (strcmp(straddr, "127.0.0.1") != 0) {
13198 goto bad;
13199 }
13200 }
13201 inet4++;
13202 break;
13203 case AF_INET6:
13204 if (strcmp(strport, "54321") != 0) {
13205 goto bad;
13206 }
13207 if (passive) {
13208 if (strcmp(straddr, "::") != 0) {
13209 goto bad;
13210 }
13211 } else {
13212 if (strcmp(straddr, "::1") != 0) {
13213 goto bad;
13214 }
13215 }
13216 inet6++;
13217 break;
13218 case AF_UNSPEC:
13219 goto bad;
13220 break;
13221 default:
13222 /* another family support? */
13223 break;
13224 }
13225 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013226 freeaddrinfo(aitop);
13227 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228 }
13229
13230 if (!(inet4 == 0 || inet4 == 2))
13231 goto bad;
13232 if (!(inet6 == 0 || inet6 == 2))
13233 goto bad;
13234
13235 if (aitop)
13236 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013237 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238
13239 bad:
13240 if (aitop)
13241 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243}
13244
Martin v. Löwis11437992002-04-12 09:54:03 +000013245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013255fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13260$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13261
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013262if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263then
13264 if test $ipv6 = yes
13265 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266 echo 'Fatal: You must get working getaddrinfo() function.'
13267 echo ' or you can specify "--disable-ipv6"'.
13268 exit 1
13269 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013270else
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013273
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013275
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013276for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013277do :
13278 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013279if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013282_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284fi
13285done
13286
Michael W. Hudson54241132001-12-07 15:38:26 +000013287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13290$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013291if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013295/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296#include <sys/types.h>
13297#include <sys/time.h>
13298#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300int
13301main ()
13302{
13303if ((struct tm *) 0)
13304return 0;
13305 ;
13306 return 0;
13307}
13308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013309if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13317$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013318if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321
13322fi
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13325$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013326if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013330/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331#include <sys/types.h>
13332#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334int
13335main ()
13336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337struct tm tm;
13338 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 ;
13341 return 0;
13342}
13343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345 ac_cv_struct_tm=time.h
13346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13352$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013353if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356
13357fi
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359ac_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 +000013360#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362"
Victor Stinnere0be4232011-10-25 13:06:09 +020013363if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
13365cat >>confdefs.h <<_ACEOF
13366#define HAVE_STRUCT_TM_TM_ZONE 1
13367_ACEOF
13368
13369
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375
13376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13378"
Victor Stinnere0be4232011-10-25 13:06:09 +020013379if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381else
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383fi
13384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013386#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387_ACEOF
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13390$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013391if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013396#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397#if !HAVE_DECL_TZNAME
13398extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013405 ;
13406 return 0;
13407}
13408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410 ac_cv_var_tzname=yes
13411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013414rm -f core conftest.err conftest.$ac_objext \
13415 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13418$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013419 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013422
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423 fi
13424fi
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426ac_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 +020013427if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
13429cat >>confdefs.h <<_ACEOF
13430#define HAVE_STRUCT_STAT_ST_RDEV 1
13431_ACEOF
13432
13433
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013434fi
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436ac_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 +020013437if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439cat >>confdefs.h <<_ACEOF
13440#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13441_ACEOF
13442
13443
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013444fi
13445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446ac_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 +020013447if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013448
13449cat >>confdefs.h <<_ACEOF
13450#define HAVE_STRUCT_STAT_ST_FLAGS 1
13451_ACEOF
13452
13453
13454fi
13455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456ac_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 +020013457if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013458
13459cat >>confdefs.h <<_ACEOF
13460#define HAVE_STRUCT_STAT_ST_GEN 1
13461_ACEOF
13462
13463
13464fi
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466ac_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 +020013467if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013468
13469cat >>confdefs.h <<_ACEOF
13470#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13471_ACEOF
13472
13473
13474fi
13475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476ac_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 +020013477if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013478
Martin v. Löwis11437992002-04-12 09:54:03 +000013479cat >>confdefs.h <<_ACEOF
13480#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13481_ACEOF
13482
13483
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013484fi
13485
Stefan Krah267b6392016-04-26 01:09:18 +020013486ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13487 #include <sys/types.h>
13488 #include <pwd.h>
13489
13490"
13491if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13492
13493cat >>confdefs.h <<_ACEOF
13494#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13495_ACEOF
13496
13497
13498fi
13499ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13500 #include <sys/types.h>
13501 #include <pwd.h>
13502
13503"
13504if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13505
13506cat >>confdefs.h <<_ACEOF
13507#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13508_ACEOF
13509
13510
13511fi
13512
Zachary Ware6a6967e2016-10-01 00:47:27 -050013513# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13514ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13515"
13516if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13517
13518cat >>confdefs.h <<_ACEOF
13519#define HAVE_SIGINFO_T_SI_BAND 1
13520_ACEOF
13521
13522
13523fi
13524
Michael W. Hudson54241132001-12-07 15:38:26 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13527$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013528if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530else
Matthias Kloseb159a552010-04-25 21:00:44 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013533/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013534#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013535int
13536main ()
13537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ;
13540 return 0;
13541}
13542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013543if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544 ac_cv_header_time_altzone=yes
13545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550fi
13551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13553$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013554if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013557
13558fi
13559
Guido van Rossumda88dad1995-01-26 00:46:29 +000013560was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13562$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013564/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013565
13566#include <sys/types.h>
13567#include <sys/select.h>
13568#include <sys/time.h>
13569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570int
13571main ()
13572{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573;
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 ;
13575 return 0;
13576}
13577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013582
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013583 was_it_defined=yes
13584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13588$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13591$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013592if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013597#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013598int
13599main ()
13600{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013601struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013607 ac_cv_struct_addrinfo=yes
13608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13612fi
13613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13615$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619
13620fi
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13623$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013624if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629
13630# include <sys/types.h>
13631# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013632int
13633main ()
13634{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641 ac_cv_struct_sockaddr_storage=yes
13642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646fi
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13649$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653
13654fi
13655
Christian Heimesdffa3942016-09-05 23:54:41 +020013656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13657$as_echo_n "checking for sockaddr_alg... " >&6; }
13658if ${ac_cv_struct_sockaddr_alg+:} false; then :
13659 $as_echo_n "(cached) " >&6
13660else
13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662/* end confdefs.h. */
13663
13664# include <sys/types.h>
13665# include <sys/socket.h>
13666# include <linux/if_alg.h>
13667int
13668main ()
13669{
13670struct sockaddr_alg s
13671 ;
13672 return 0;
13673}
13674_ACEOF
13675if ac_fn_c_try_compile "$LINENO"; then :
13676 ac_cv_struct_sockaddr_alg=yes
13677else
13678 ac_cv_struct_sockaddr_alg=no
13679fi
13680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13681fi
13682
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13684$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13685if test $ac_cv_struct_sockaddr_alg = yes; then
13686
13687$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13688
13689fi
13690
Guido van Rossum627b2d71993-12-24 10:39:16 +000013691# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13694$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013695if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013700$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013701int
13702main ()
13703{
13704static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013705test_array [0] = 0;
13706return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
13708 ;
13709 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013710}
Martin v. Löwis11437992002-04-12 09:54:03 +000013711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013713 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13720$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723
13724fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13727$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013728if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013730else
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734int
13735main ()
13736{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013737
Martin v. Löwis11437992002-04-12 09:54:03 +000013738#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013739 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013741 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743 char const *const *pcpcc;
13744 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 /* NEC SVR4.0.2 mips cc rejects this. */
13746 struct point {int x, y;};
13747 static struct point const zero = {0,0};
13748 /* AIX XL C 1.02.0.0 rejects this.
13749 It does not let you subtract one const X* pointer from another in
13750 an arm of an if-expression whose if-part is not a constant
13751 expression */
13752 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 ++pcpcc;
13756 ppc = (char**) pcpcc;
13757 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013758 { /* SCO 3.2v4 cc rejects this sort of thing. */
13759 char tx;
13760 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013762
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 }
13766 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13767 int x[] = {25, 17};
13768 const int *foo = &x[0];
13769 ++foo;
13770 }
13771 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13772 typedef const int *iptr;
13773 iptr p = 0;
13774 ++p;
13775 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013776 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013778 struct s { int j; const int *ap[3]; } bx;
13779 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 }
13781 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13782 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013783 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ;
13789 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790}
Martin v. Löwis11437992002-04-12 09:54:03 +000013791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013792if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013793 ac_cv_c_const=yes
13794else
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13800$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804
13805fi
13806
Michael W. Hudson54241132001-12-07 15:38:26 +000013807
Guido van Rossumda88dad1995-01-26 00:46:29 +000013808works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13810$as_echo_n "checking for working signed char... " >&6; }
13811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013812/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814int
13815main ()
13816{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 ;
13819 return 0;
13820}
13821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013823 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013824else
Skip Montanaro6dead952003-09-25 14:50:04 +000013825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013827
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013828
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13832$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013833
Guido van Rossumda88dad1995-01-26 00:46:29 +000013834have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13836$as_echo_n "checking for prototypes... " >&6; }
13837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013838/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013840int
13841main ()
13842{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 ;
13845 return 0;
13846}
13847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013851
Matthias Kloseb159a552010-04-25 21:00:44 +000013852 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13856$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857
Guido van Rossumda88dad1995-01-26 00:46:29 +000013858works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13860$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013862/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863
13864#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013865int foo(int x, ...) {
13866 va_list va;
13867 va_start(va, x);
13868 va_arg(va, int);
13869 va_arg(va, char *);
13870 va_arg(va, double);
13871 return 0;
13872}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Guido van Rossum90eea071996-08-30 20:58:57 +000013877return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013883
13884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013887 works=yes
13888
Guido van Rossum627b2d71993-12-24 10:39:16 +000013889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13892$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013893
Martin v. Löwisd6320502004-08-12 13:45:08 +000013894# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13896$as_echo_n "checking for socketpair... " >&6; }
13897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013898/* end confdefs.h. */
13899
13900#include <sys/types.h>
13901#include <sys/socket.h>
13902
13903int
13904main ()
13905{
13906void *x=socketpair
13907 ;
13908 return 0;
13909}
13910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013911if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013914
Matthias Kloseb159a552010-04-25 21:00:44 +000013915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013916$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13919$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013920
13921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013923
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13926$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013928/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929#include <sys/types.h>
13930#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013931int
13932main ()
13933{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013934struct sockaddr x;
13935x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ;
13937 return 0;
13938}
13939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013940if ac_fn_c_try_compile "$LINENO"; then :
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13942$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013945
13946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13948$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013949
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013952
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013953# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
13955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013957if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13962$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013963 OLD_CFLAGS=$CFLAGS
13964 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013967
13968# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970int
13971main ()
13972{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013973
13974 char *name;
13975 struct hostent *he, *res;
13976 char buffer[2048];
13977 int buflen = 2048;
13978 int h_errnop;
13979
13980 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
13982 ;
13983 return 0;
13984}
13985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13994$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013996else
Skip Montanaro6dead952003-09-25 14:50:04 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13999$as_echo "no" >&6; }
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14001$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014004
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007int
14008main ()
14009{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010
14011 char *name;
14012 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014013 char buffer[2048];
14014 int buflen = 2048;
14015 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016
Matthias Kloseb159a552010-04-25 21:00:44 +000014017 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
14019 ;
14020 return 0;
14021}
14022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014023if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014026
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Matthias Kloseb159a552010-04-25 21:00:44 +000014028$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14031$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014032
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014033else
Skip Montanaro6dead952003-09-25 14:50:04 +000014034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14036$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14038$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040/* end confdefs.h. */
14041
14042# include <netdb.h>
14043
14044int
14045main ()
14046{
14047
14048 char *name;
14049 struct hostent *he;
14050 struct hostent_data data;
14051
14052 (void) gethostbyname_r(name, he, &data);
14053
14054 ;
14055 return 0;
14056}
14057_ACEOF
14058if ac_fn_c_try_compile "$LINENO"; then :
14059
14060 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14061
14062
14063$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14064
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14066$as_echo "yes" >&6; }
14067
14068else
14069
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14071$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014081 CFLAGS=$OLD_CFLAGS
14082
14083else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 for ac_func in gethostbyname
14086do :
14087 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014090#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014091_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014094done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095
Michael W. Hudson54241132001-12-07 15:38:26 +000014096
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014097fi
14098
Michael W. Hudson54241132001-12-07 15:38:26 +000014099
14100
14101
14102
14103
14104
Guido van Rossum627b2d71993-12-24 10:39:16 +000014105# checks for system services
14106# (none yet)
14107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014108# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014109ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014111
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014112else
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14114$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014117else
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014119LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123/* Override any GCC internal prototype to avoid an error.
14124 Use char because int might match the return type of a GCC
14125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014126#ifdef __cplusplus
14127extern "C"
14128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014129char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014130int
14131main ()
14132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ;
14135 return 0;
14136}
14137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014140else
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014143rm -f core conftest.err conftest.$ac_objext \
14144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14148$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014149if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 cat >>confdefs.h <<_ACEOF
14151#define HAVE_LIBIEEE 1
14152_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014153
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014154 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014155
Guido van Rossum627b2d71993-12-24 10:39:16 +000014156fi
14157
Michael W. Hudson54241132001-12-07 15:38:26 +000014158
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014159fi
14160
Michael W. Hudson54241132001-12-07 15:38:26 +000014161
Guido van Rossum7f43da71994-08-01 12:15:30 +000014162# check for --with-libm=...
14163
Guido van Rossum563e7081996-09-10 18:20:48 +000014164case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014165Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014166*) LIBM=-lm
14167esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14169$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014172if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014174if test "$withval" = no
14175then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14177$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014178elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014179then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14181$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014182else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014183fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14186$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187fi
14188
Guido van Rossum7f43da71994-08-01 12:15:30 +000014189
14190# check for --with-libc=...
14191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14193$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014196if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014198if test "$withval" = no
14199then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14201$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014202elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014203then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14205$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014206else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014207fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14210$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211fi
14212
Guido van Rossum7f43da71994-08-01 12:15:30 +000014213
Stefan Krah1919b7e2012-03-21 18:25:23 +010014214# **************************************
14215# * Check for gcc x64 inline assembler *
14216# **************************************
14217
14218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14219$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14221/* end confdefs.h. */
14222
14223int
14224main ()
14225{
14226
14227 __asm__ __volatile__ ("movq %rcx, %rax");
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014233if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014234 have_gcc_asm_for_x64=yes
14235else
14236 have_gcc_asm_for_x64=no
14237fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014238rm -f core conftest.err conftest.$ac_objext \
14239 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14241$as_echo "$have_gcc_asm_for_x64" >&6; }
14242if test "$have_gcc_asm_for_x64" = yes
14243then
14244
14245$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14246
14247fi
14248
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014249# **************************************************
14250# * Check for various properties of floating point *
14251# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014252
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14254$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14255if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014257else
14258
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014259
14260ax_cv_c_float_words_bigendian=unknown
14261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014262/* end confdefs.h. */
14263
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014264
14265double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14266
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014267
14268_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014269if ac_fn_c_try_compile "$LINENO"; then :
14270
14271
14272if grep noonsees conftest.$ac_objext >/dev/null ; then
14273 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014274fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014275if grep seesnoon conftest.$ac_objext >/dev/null ; then
14276 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14277 ax_cv_c_float_words_bigendian=no
14278 else
14279 ax_cv_c_float_words_bigendian=unknown
14280 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014281fi
14282
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014283
14284fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014286fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14288$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014289
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014290case $ax_cv_c_float_words_bigendian in
14291 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014292
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014293$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14294 ;;
14295 no)
14296 ;;
14297 *)
14298 as_fn_error $? "
14299
14300Unknown float word ordering. You need to manually preset
14301ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14302
14303 " "$LINENO" 5 ;;
14304esac
14305
14306
14307if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308then
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014311
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014312elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014313then
14314
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014315$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14316
14317else
14318 # Some ARM platforms use a mixed-endian representation for doubles.
14319 # While Python doesn't currently have full support for these platforms
14320 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14321 # conversions work.
14322 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14323 # or little, then it must be this?
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014326
14327fi
14328
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014329# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014330# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014331# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014332# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014333# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014334# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014335
14336# This inline assembler syntax may also work for suncc and icc,
14337# so we try it on all platforms.
14338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14340$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014342/* end confdefs.h. */
14343
14344int
14345main ()
14346{
14347
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014348 unsigned short cw;
14349 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14350 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014351
14352 ;
14353 return 0;
14354}
14355_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014356if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014357 have_gcc_asm_for_x87=yes
14358else
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014360fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014361rm -f core conftest.err conftest.$ac_objext \
14362 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14364$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014365if test "$have_gcc_asm_for_x87" = yes
14366then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014369
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14373$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14375/* end confdefs.h. */
14376
14377int
14378main ()
14379{
14380
14381 unsigned int fpcr;
14382 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14383 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14384
14385 ;
14386 return 0;
14387}
14388_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014389if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014390 have_gcc_asm_for_mc68881=yes
14391else
14392 have_gcc_asm_for_mc68881=no
14393fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014394rm -f core conftest.err conftest.$ac_objext \
14395 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14397$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14398if test "$have_gcc_asm_for_mc68881" = yes
14399then
14400
14401$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14402
14403fi
14404
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014405# Detect whether system arithmetic is subject to x87-style double
14406# rounding issues. The result of this test has little meaning on non
14407# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14408# mode is round-to-nearest and double rounding issues are present, and
14409# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14411$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014412# $BASECFLAGS may affect the result
14413ac_save_cc="$CC"
14414CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014415if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014416 ac_cv_x87_double_rounding=no
14417else
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014419/* end confdefs.h. */
14420
14421#include <stdlib.h>
14422#include <math.h>
14423int main() {
14424 volatile double x, y, z;
14425 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14426 x = 0.99999999999999989; /* 1-2**-53 */
14427 y = 1./x;
14428 if (y != 1.)
14429 exit(0);
14430 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14431 x = 1e16;
14432 y = 2.99999;
14433 z = x + y;
14434 if (z != 1e16+4.)
14435 exit(0);
14436 /* both tests show evidence of double rounding */
14437 exit(1);
14438}
14439
14440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014441if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014442 ac_cv_x87_double_rounding=no
14443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14447 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014448fi
14449
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014450CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14452$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014453if test "$ac_cv_x87_double_rounding" = yes
14454then
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014457
14458fi
14459
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014460# ************************************
14461# * Check for mathematical functions *
14462# ************************************
14463
14464LIBS_SAVE=$LIBS
14465LIBS="$LIBS $LIBM"
14466
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014467for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14468do :
14469 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14470ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014471if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014472 cat >>confdefs.h <<_ACEOF
14473#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14474_ACEOF
14475
14476fi
14477done
14478
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014479for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014480do :
14481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14482ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014483if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014484 cat >>confdefs.h <<_ACEOF
14485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14486_ACEOF
14487
14488fi
14489done
14490
14491ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14492"
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014494 ac_have_decl=1
14495else
14496 ac_have_decl=0
14497fi
14498
14499cat >>confdefs.h <<_ACEOF
14500#define HAVE_DECL_ISINF $ac_have_decl
14501_ACEOF
14502ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14503"
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014505 ac_have_decl=1
14506else
14507 ac_have_decl=0
14508fi
14509
14510cat >>confdefs.h <<_ACEOF
14511#define HAVE_DECL_ISNAN $ac_have_decl
14512_ACEOF
14513ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14514"
Victor Stinnere0be4232011-10-25 13:06:09 +020014515if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014516 ac_have_decl=1
14517else
14518 ac_have_decl=0
14519fi
14520
14521cat >>confdefs.h <<_ACEOF
14522#define HAVE_DECL_ISFINITE $ac_have_decl
14523_ACEOF
14524
14525
Mark Dickinsona614f042009-11-28 12:48:43 +000014526# For multiprocessing module, check that sem_open
14527# actually works. For FreeBSD versions <= 7.2,
14528# the kernel module that provides POSIX semaphores
14529# isn't loaded by default, so an attempt to call
14530# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14532$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014533if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014535else
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014537 ac_cv_posix_semaphores_enabled=yes
14538else
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014540/* end confdefs.h. */
14541
14542#include <unistd.h>
14543#include <fcntl.h>
14544#include <stdio.h>
14545#include <semaphore.h>
14546#include <sys/stat.h>
14547
14548int main(void) {
14549 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14550 if (a == SEM_FAILED) {
14551 perror("sem_open");
14552 return 1;
14553 }
14554 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014555 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014556 return 0;
14557}
14558
14559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014560if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014561 ac_cv_posix_semaphores_enabled=yes
14562else
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014567fi
14568
14569
Mark Dickinsona614f042009-11-28 12:48:43 +000014570fi
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14573$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014574if test $ac_cv_posix_semaphores_enabled = no
14575then
14576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014578
14579fi
14580
Mark Dickinson10683072009-04-18 21:18:19 +000014581# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14583$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014584if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014586else
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014589else
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014591/* end confdefs.h. */
14592
14593#include <unistd.h>
14594#include <fcntl.h>
14595#include <stdio.h>
14596#include <semaphore.h>
14597#include <sys/stat.h>
14598
14599int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014600 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014601 int count;
14602 int res;
14603 if(a==SEM_FAILED){
14604 perror("sem_open");
14605 return 1;
14606
14607 }
14608 res = sem_getvalue(a, &count);
14609 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014610 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014611 return res==-1 ? 1 : 0;
14612}
14613
Mark Dickinson10683072009-04-18 21:18:19 +000014614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014615if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014616 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014617else
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014622fi
14623
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014624
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014625fi
14626
Matthias Kloseb9621712010-04-24 17:59:49 +000014627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14628$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014629if test $ac_cv_broken_sem_getvalue = yes
14630then
14631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014633
14634fi
14635
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014636ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14637"
14638if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14639 ac_have_decl=1
14640else
14641 ac_have_decl=0
14642fi
14643
14644cat >>confdefs.h <<_ACEOF
14645#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14646_ACEOF
14647ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14648"
14649if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14650 ac_have_decl=1
14651else
14652 ac_have_decl=0
14653fi
14654
14655cat >>confdefs.h <<_ACEOF
14656#define HAVE_DECL_RTLD_NOW $ac_have_decl
14657_ACEOF
14658ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14659"
14660if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14661 ac_have_decl=1
14662else
14663 ac_have_decl=0
14664fi
14665
14666cat >>confdefs.h <<_ACEOF
14667#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14668_ACEOF
14669ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14670"
14671if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14672 ac_have_decl=1
14673else
14674 ac_have_decl=0
14675fi
14676
14677cat >>confdefs.h <<_ACEOF
14678#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14679_ACEOF
14680ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14681"
14682if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14683 ac_have_decl=1
14684else
14685 ac_have_decl=0
14686fi
14687
14688cat >>confdefs.h <<_ACEOF
14689#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14690_ACEOF
14691ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14692"
14693if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14694 ac_have_decl=1
14695else
14696 ac_have_decl=0
14697fi
14698
14699cat >>confdefs.h <<_ACEOF
14700#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14701_ACEOF
14702ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14703"
14704if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14705 ac_have_decl=1
14706else
14707 ac_have_decl=0
14708fi
14709
14710cat >>confdefs.h <<_ACEOF
14711#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14712_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014713ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14714"
14715if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14716 ac_have_decl=1
14717else
14718 ac_have_decl=0
14719fi
14720
14721cat >>confdefs.h <<_ACEOF
14722#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14723_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014724
14725
Mark Dickinsonbd792642009-03-18 20:06:12 +000014726# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14728$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014729# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014730if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014731 enableval=$enable_big_digits; case $enable_big_digits in
14732yes)
14733 enable_big_digits=30 ;;
14734no)
14735 enable_big_digits=15 ;;
1473615|30)
14737 ;;
14738*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014739 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 +000014740esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14742$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014743
14744cat >>confdefs.h <<_ACEOF
14745#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14746_ACEOF
14747
14748
14749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14751$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014752fi
14753
14754
Guido van Rossumef2255b2000-03-10 22:30:29 +000014755# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014756ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014757if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
14759
Matthias Kloseb9621712010-04-24 17:59:49 +000014760$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014761
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014762 wchar_h="yes"
14763
Guido van Rossumef2255b2000-03-10 22:30:29 +000014764else
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766
14767fi
14768
Michael W. Hudson54241132001-12-07 15:38:26 +000014769
Martin v. Löwis11437992002-04-12 09:54:03 +000014770
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014771# determine wchar_t size
14772if test "$wchar_h" = yes
14773then
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14779$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014780if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014782else
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14784"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
Martin v. Löwis11437992002-04-12 09:54:03 +000014786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 if test "$ac_cv_type_wchar_t" = yes; then
14788 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014790as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014791See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014792 else
14793 ac_cv_sizeof_wchar_t=0
14794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014796
Martin v. Löwis11437992002-04-12 09:54:03 +000014797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14799$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800
14801
14802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014804#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014805_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014806
Michael W. Hudson54241132001-12-07 15:38:26 +000014807
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014808fi
14809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14811$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014812have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014814/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014815
14816#include <tcl.h>
14817#if TCL_UTF_MAX != 6
14818# error "NOT UCS4_TCL"
14819#endif
14820int
14821main ()
14822{
14823
14824 ;
14825 return 0;
14826}
14827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014828if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014829
14830
Matthias Kloseb9621712010-04-24 17:59:49 +000014831$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014832
14833 have_ucs4_tcl=yes
14834
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14838$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014839
Skip Montanaro6dead952003-09-25 14:50:04 +000014840# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014841if test "$wchar_h" = yes
14842then
14843 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14845$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014846 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014847 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014848else
14849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014851 ac_cv_wchar_t_signed=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014854/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014855
14856 #include <wchar.h>
14857 int main()
14858 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014859 /* Success: exit code 0 */
14860 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014861 }
14862
14863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014864if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014865 ac_cv_wchar_t_signed=yes
14866else
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014871fi
14872
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014873fi
14874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14876$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877fi
14878
Michael Osipov3738fad2018-08-24 18:17:19 +020014879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14880$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014881# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014882if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014883 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014884then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014885
Matthias Kloseb9621712010-04-24 17:59:49 +000014886$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014887
Michael Osipov3738fad2018-08-24 18:17:19 +020014888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14889$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014890else
Michael Osipov3738fad2018-08-24 18:17:19 +020014891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14892$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014893fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014894
14895# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14897$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014898if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014900else
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 ac_cv_c_bigendian=unknown
14902 # See if we're dealing with a universal compiler.
14903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14904/* end confdefs.h. */
14905#ifndef __APPLE_CC__
14906 not a universal capable compiler
14907 #endif
14908 typedef int dummy;
14909
Skip Montanaro6dead952003-09-25 14:50:04 +000014910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911if ac_fn_c_try_compile "$LINENO"; then :
14912
14913 # Check for potential -arch flags. It is not universal unless
14914 # there are at least two -arch flags with different values.
14915 ac_arch=
14916 ac_prev=
14917 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14918 if test -n "$ac_prev"; then
14919 case $ac_word in
14920 i?86 | x86_64 | ppc | ppc64)
14921 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14922 ac_arch=$ac_word
14923 else
14924 ac_cv_c_bigendian=universal
14925 break
14926 fi
14927 ;;
14928 esac
14929 ac_prev=
14930 elif test "x$ac_word" = "x-arch"; then
14931 ac_prev=arch
14932 fi
14933 done
14934fi
14935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14936 if test $ac_cv_c_bigendian = unknown; then
14937 # See if sys/param.h defines the BYTE_ORDER macro.
14938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014939/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014940#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943int
14944main ()
14945{
Matthias Kloseb9621712010-04-24 17:59:49 +000014946#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14947 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14948 && LITTLE_ENDIAN)
14949 bogus endian macros
14950 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014951
14952 ;
14953 return 0;
14954}
14955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014956if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014960#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014962
Martin v. Löwis11437992002-04-12 09:54:03 +000014963int
14964main ()
14965{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014966#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 not big endian
14968 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014969
14970 ;
14971 return 0;
14972}
14973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014974if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014975 ac_cv_c_bigendian=yes
14976else
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014980fi
14981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14982 fi
14983 if test $ac_cv_c_bigendian = unknown; then
14984 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014986/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014987#include <limits.h>
14988
Martin v. Löwis11437992002-04-12 09:54:03 +000014989int
14990main ()
14991{
Matthias Kloseb9621712010-04-24 17:59:49 +000014992#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14993 bogus endian macros
14994 #endif
14995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ;
14997 return 0;
14998}
14999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015000if ac_fn_c_try_compile "$LINENO"; then :
15001 # It does; now see whether it defined to _BIG_ENDIAN or not.
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003/* end confdefs.h. */
15004#include <limits.h>
15005
15006int
15007main ()
15008{
15009#ifndef _BIG_ENDIAN
15010 not big endian
15011 #endif
15012
15013 ;
15014 return 0;
15015}
15016_ACEOF
15017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015019else
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15023fi
15024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15025 fi
15026 if test $ac_cv_c_bigendian = unknown; then
15027 # Compile a test program.
15028 if test "$cross_compiling" = yes; then :
15029 # Try to guess by grepping values from an object file.
15030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15031/* end confdefs.h. */
15032short int ascii_mm[] =
15033 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15034 short int ascii_ii[] =
15035 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15036 int use_ascii (int i) {
15037 return ascii_mm[i] + ascii_ii[i];
15038 }
15039 short int ebcdic_ii[] =
15040 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15041 short int ebcdic_mm[] =
15042 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15043 int use_ebcdic (int i) {
15044 return ebcdic_mm[i] + ebcdic_ii[i];
15045 }
15046 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047
Matthias Kloseb9621712010-04-24 17:59:49 +000015048int
15049main ()
15050{
15051return use_ascii (foo) == use_ebcdic (foo);
15052 ;
15053 return 0;
15054}
15055_ACEOF
15056if ac_fn_c_try_compile "$LINENO"; then :
15057 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15058 ac_cv_c_bigendian=yes
15059 fi
15060 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15061 if test "$ac_cv_c_bigendian" = unknown; then
15062 ac_cv_c_bigendian=no
15063 else
15064 # finding both strings is unlikely to happen, but who knows?
15065 ac_cv_c_bigendian=unknown
15066 fi
15067 fi
15068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015070else
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015072/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015074int
15075main ()
15076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 /* Are we little or big endian? From Harbison&Steele. */
15079 union
15080 {
15081 long int l;
15082 char c[sizeof (long int)];
15083 } u;
15084 u.l = 1;
15085 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086
15087 ;
15088 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015089}
Martin v. Löwis11437992002-04-12 09:54:03 +000015090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015091if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015092 ac_cv_c_bigendian=no
15093else
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15103$as_echo "$ac_cv_c_bigendian" >&6; }
15104 case $ac_cv_c_bigendian in #(
15105 yes)
15106 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15107;; #(
15108 no)
15109 ;; #(
15110 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 ;; #(
15115 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015116 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015117 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015119
Michael W. Hudson54241132001-12-07 15:38:26 +000015120
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015121# ABI version string for Python extension modules. This appears between the
15122# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15123# from the following attributes which affect the ABI of this Python build (in
15124# this order):
15125#
15126# * The Python implementation (always 'cpython-' for us)
15127# * The major and minor version numbers
15128# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015129#
15130# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015131# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15132# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015133#
15134# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15135# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015136
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15138$as_echo_n "checking ABIFLAGS... " >&6; }
15139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15140$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15142$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015143SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15145$as_echo "$SOABI" >&6; }
15146
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015147# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15148if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015149 # Similar to SOABI but remove "d" flag from ABIFLAGS
15150
15151 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15152
15153cat >>confdefs.h <<_ACEOF
15154#define ALT_SOABI "${ALT_SOABI}"
15155_ACEOF
15156
15157fi
15158
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015159
15160case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015161 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015162 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15163 *)
15164 EXT_SUFFIX=${SHLIB_SUFFIX};;
15165esac
15166
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15168$as_echo_n "checking LDVERSION... " >&6; }
15169LDVERSION='$(VERSION)$(ABIFLAGS)'
15170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15171$as_echo "$LDVERSION" >&6; }
15172
E. M. Brayc994c8f2019-05-24 17:33:47 +020015173# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015174
E. M. Brayb1fc4172019-05-24 18:39:39 +020015175if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015176 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015177else
15178 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015179fi
15180
doko@python.org87421192013-01-26 11:39:31 +010015181
doko@ubuntu.com55532312016-06-14 08:55:19 +020015182if test x$PLATFORM_TRIPLET = x; then
15183 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15184else
15185 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15186fi
doko@python.org87421192013-01-26 11:39:31 +010015187
15188
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015189# Check whether right shifting a negative integer extends the sign bit
15190# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15192$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015193if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015195else
Martin v. Löwis11437992002-04-12 09:54:03 +000015196
Matthias Kloseb9621712010-04-24 17:59:49 +000015197if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015198 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015199else
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015201/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015202
15203int main()
15204{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015205 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015206}
15207
Martin v. Löwis11437992002-04-12 09:54:03 +000015208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015209if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015210 ac_cv_rshift_extends_sign=yes
15211else
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015216fi
15217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218fi
15219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15221$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015222if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015223then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015226
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015227fi
15228
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015229# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15231$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015232if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015234else
Martin v. Löwis11437992002-04-12 09:54:03 +000015235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015237/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015238#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015239int
15240main ()
15241{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015242
15243 FILE *f = fopen("/dev/null", "r");
15244 flockfile(f);
15245 getc_unlocked(f);
15246 funlockfile(f);
15247
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ;
15249 return 0;
15250}
15251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015252if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015253 ac_cv_have_getc_unlocked=yes
15254else
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 ac_cv_have_getc_unlocked=no
15256fi
15257rm -f core conftest.err conftest.$ac_objext \
15258 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15262$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015263if test "$ac_cv_have_getc_unlocked" = yes
15264then
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
Matthias Kloseb9621712010-04-24 17:59:49 +000015266$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015267
15268fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015269
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015270# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015271# save the value of LIBS so we don't actually link Python with readline
15272LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015273
Gregory P. Smith18820942008-09-07 06:24:49 +000015274# On some systems we need to link readline to a termcap compatible
15275# library. NOTE: Keep the precedence of listed libraries synchronised
15276# with setup.py.
15277py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15279$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015280for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015281 if test -z "$py_libtermcap"; then
15282 READLINE_LIBS="-lreadline"
15283 else
15284 READLINE_LIBS="-lreadline -l$py_libtermcap"
15285 fi
15286 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015288/* end confdefs.h. */
15289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290/* Override any GCC internal prototype to avoid an error.
15291 Use char because int might match the return type of a GCC
15292 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015293#ifdef __cplusplus
15294extern "C"
15295#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015296char readline ();
15297int
15298main ()
15299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015301 ;
15302 return 0;
15303}
15304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015305if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015306 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015308rm -f core conftest.err conftest.$ac_objext \
15309 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015310 if test $py_cv_lib_readline = yes; then
15311 break
15312 fi
15313done
15314# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15315#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015316if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15318$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015319else
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15321$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015324
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015325fi
15326
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015327# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015329/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015330#include <readline/readline.h>
15331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015332if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015333 have_readline=yes
15334else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015335 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015336
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015337fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015338rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015339if test $have_readline = yes
15340then
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015342/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015343#include <readline/readline.h>
15344
15345_ACEOF
15346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015350
15351fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015352rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015353
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015355/* end confdefs.h. */
15356#include <readline/readline.h>
15357
15358_ACEOF
15359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015363
15364fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015365rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015366
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015367fi
15368
Martin v. Löwis0daad592001-09-30 21:09:59 +000015369# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15371$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015372if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015374else
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015376LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380/* Override any GCC internal prototype to avoid an error.
15381 Use char because int might match the return type of a GCC
15382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015383#ifdef __cplusplus
15384extern "C"
15385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015386char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015387int
15388main ()
15389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ;
15392 return 0;
15393}
15394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015397else
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015400rm -f core conftest.err conftest.$ac_objext \
15401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015402LIBS=$ac_check_lib_save_LIBS
15403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15405$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015406if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015407
Matthias Kloseb9621712010-04-24 17:59:49 +000015408$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015409
Martin v. Löwis0daad592001-09-30 21:09:59 +000015410fi
15411
Michael W. Hudson54241132001-12-07 15:38:26 +000015412
Thomas Wouters89d996e2007-09-08 17:39:28 +000015413# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15415$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015416if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015418else
15419 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015420LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015422/* end confdefs.h. */
15423
15424/* Override any GCC internal prototype to avoid an error.
15425 Use char because int might match the return type of a GCC
15426 builtin and then its argument prototype would still apply. */
15427#ifdef __cplusplus
15428extern "C"
15429#endif
15430char rl_completion_display_matches_hook ();
15431int
15432main ()
15433{
15434return rl_completion_display_matches_hook ();
15435 ;
15436 return 0;
15437}
15438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015439if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015440 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15441else
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015444rm -f core conftest.err conftest.$ac_objext \
15445 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015446LIBS=$ac_check_lib_save_LIBS
15447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15449$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015450if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015451
Matthias Kloseb9621712010-04-24 17:59:49 +000015452$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015453
15454fi
15455
15456
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015457# also in 4.0, but not in editline
15458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15459$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15460if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15461 $as_echo_n "(cached) " >&6
15462else
15463 ac_check_lib_save_LIBS=$LIBS
15464LIBS="-lreadline $READLINE_LIBS $LIBS"
15465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15466/* end confdefs.h. */
15467
15468/* Override any GCC internal prototype to avoid an error.
15469 Use char because int might match the return type of a GCC
15470 builtin and then its argument prototype would still apply. */
15471#ifdef __cplusplus
15472extern "C"
15473#endif
15474char rl_resize_terminal ();
15475int
15476main ()
15477{
15478return rl_resize_terminal ();
15479 ;
15480 return 0;
15481}
15482_ACEOF
15483if ac_fn_c_try_link "$LINENO"; then :
15484 ac_cv_lib_readline_rl_resize_terminal=yes
15485else
15486 ac_cv_lib_readline_rl_resize_terminal=no
15487fi
15488rm -f core conftest.err conftest.$ac_objext \
15489 conftest$ac_exeext conftest.$ac_ext
15490LIBS=$ac_check_lib_save_LIBS
15491fi
15492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15493$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15494if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15495
15496$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15497
15498fi
15499
15500
Martin v. Löwis0daad592001-09-30 21:09:59 +000015501# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15503$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015504if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015506else
Martin v. Löwis11437992002-04-12 09:54:03 +000015507 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015508LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512/* Override any GCC internal prototype to avoid an error.
15513 Use char because int might match the return type of a GCC
15514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015515#ifdef __cplusplus
15516extern "C"
15517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015518char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015519int
15520main ()
15521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 ;
15524 return 0;
15525}
15526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015529else
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015532rm -f core conftest.err conftest.$ac_objext \
15533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015534LIBS=$ac_check_lib_save_LIBS
15535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15537$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015538if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015541
Guido van Rossum353ae582001-07-10 16:45:32 +000015542fi
15543
Jack Jansendd19cf82001-12-06 22:36:17 +000015544
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015545# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015547/* end confdefs.h. */
15548#include <readline/readline.h>
15549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015550if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015551 have_readline=yes
15552else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015553 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015554
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015555fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015556rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015557if test $have_readline = yes
15558then
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015560/* end confdefs.h. */
15561#include <readline/readline.h>
15562
15563_ACEOF
15564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015568
15569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015570rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015571
15572fi
15573
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15575$as_echo_n "checking for append_history in -lreadline... " >&6; }
15576if ${ac_cv_lib_readline_append_history+:} false; then :
15577 $as_echo_n "(cached) " >&6
15578else
15579 ac_check_lib_save_LIBS=$LIBS
15580LIBS="-lreadline $READLINE_LIBS $LIBS"
15581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15582/* end confdefs.h. */
15583
15584/* Override any GCC internal prototype to avoid an error.
15585 Use char because int might match the return type of a GCC
15586 builtin and then its argument prototype would still apply. */
15587#ifdef __cplusplus
15588extern "C"
15589#endif
15590char append_history ();
15591int
15592main ()
15593{
15594return append_history ();
15595 ;
15596 return 0;
15597}
15598_ACEOF
15599if ac_fn_c_try_link "$LINENO"; then :
15600 ac_cv_lib_readline_append_history=yes
15601else
15602 ac_cv_lib_readline_append_history=no
15603fi
15604rm -f core conftest.err conftest.$ac_objext \
15605 conftest$ac_exeext conftest.$ac_ext
15606LIBS=$ac_check_lib_save_LIBS
15607fi
15608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15609$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15610if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15611
15612$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15613
15614fi
15615
15616
Martin v. Löwis82bca632006-02-10 20:49:30 +000015617# End of readline checks: restore LIBS
15618LIBS=$LIBS_no_readline
15619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15621$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015622if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015624else
Martin v. Löwis11437992002-04-12 09:54:03 +000015625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015627 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015628else
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015630/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015631
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015632#include <stdlib.h>
15633#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015634int main()
15635{
15636 int val1 = nice(1);
15637 if (val1 != -1 && val1 == nice(2))
15638 exit(0);
15639 exit(1);
15640}
15641
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015643if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015644 ac_cv_broken_nice=yes
15645else
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015650fi
15651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652fi
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15655$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015656if test "$ac_cv_broken_nice" = yes
15657then
Martin v. Löwis11437992002-04-12 09:54:03 +000015658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015660
15661fi
15662
Matthias Kloseb9621712010-04-24 17:59:49 +000015663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15664$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015665if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015667else
Matthias Kloseb9621712010-04-24 17:59:49 +000015668 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015669 ac_cv_broken_poll=no
15670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015672/* end confdefs.h. */
15673
15674#include <poll.h>
15675
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015676int main()
15677{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015678 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015679 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015680
15681 close (42);
15682
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015683 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015684 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015685 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015686 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015687 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015688 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015689 return 1;
15690}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015691
15692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015693if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015694 ac_cv_broken_poll=yes
15695else
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015702fi
15703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15705$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015706if test "$ac_cv_broken_poll" = yes
15707then
15708
Matthias Kloseb9621712010-04-24 17:59:49 +000015709$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015710
15711fi
15712
Martin v. Löwis1d459062005-03-14 21:23:33 +000015713# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15715$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015716if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015718else
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721 ac_cv_working_tzset=no
15722else
Matthias Kloseb9621712010-04-24 17:59:49 +000015723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015724/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725
15726#include <stdlib.h>
15727#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015728#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015729
15730#if HAVE_TZNAME
15731extern char *tzname[];
15732#endif
15733
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015734int main()
15735{
Brett Cannon18367812003-09-19 00:59:16 +000015736 /* Note that we need to ensure that not only does tzset(3)
15737 do 'something' with localtime, but it works as documented
15738 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015739 This includes making sure that tzname is set properly if
15740 tm->tm_zone does not exist since it is the alternative way
15741 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015742
15743 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015744 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015745 */
15746
Martin v. Löwis1d459062005-03-14 21:23:33 +000015747 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015748 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15749
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015750 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015751 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015752 if (localtime(&groundhogday)->tm_hour != 0)
15753 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015754#if HAVE_TZNAME
15755 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15756 if (strcmp(tzname[0], "UTC") ||
15757 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15758 exit(1);
15759#endif
Brett Cannon18367812003-09-19 00:59:16 +000015760
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015761 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015762 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015763 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015764 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015765#if HAVE_TZNAME
15766 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15767 exit(1);
15768#endif
Brett Cannon18367812003-09-19 00:59:16 +000015769
15770 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15771 tzset();
15772 if (localtime(&groundhogday)->tm_hour != 11)
15773 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015774#if HAVE_TZNAME
15775 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15776 exit(1);
15777#endif
15778
15779#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015780 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15781 exit(1);
15782 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15783 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015784#endif
Brett Cannon18367812003-09-19 00:59:16 +000015785
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015786 exit(0);
15787}
15788
15789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015790if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015791 ac_cv_working_tzset=yes
15792else
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015797fi
15798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799fi
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15802$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015803if test "$ac_cv_working_tzset" = yes
15804then
15805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015807
15808fi
15809
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015810# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15812$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015813if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015815else
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015817/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015818#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015819int
15820main ()
15821{
15822
15823struct stat st;
15824st.st_mtim.tv_nsec = 1;
15825
15826 ;
15827 return 0;
15828}
15829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015831 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015832else
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15836fi
15837
Matthias Kloseb9621712010-04-24 17:59:49 +000015838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15839$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015840if test "$ac_cv_stat_tv_nsec" = yes
15841then
15842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015844
15845fi
15846
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015847# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15849$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015850if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015852else
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015854/* end confdefs.h. */
15855#include <sys/stat.h>
15856int
15857main ()
15858{
15859
15860struct stat st;
15861st.st_mtimespec.tv_nsec = 1;
15862
15863 ;
15864 return 0;
15865}
15866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015868 ac_cv_stat_tv_nsec2=yes
15869else
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15873fi
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15876$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015877if test "$ac_cv_stat_tv_nsec2" = yes
15878then
15879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015881
15882fi
15883
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015884# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015885ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015886if test "$cross_compiling" = no; then
15887 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15888fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015889
15890for ac_header in curses.h ncurses.h
15891do :
15892 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15893ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15894if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15895 cat >>confdefs.h <<_ACEOF
15896#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15897_ACEOF
15898
15899fi
15900
15901done
15902
15903
15904# On Solaris, term.h requires curses.h
15905for ac_header in term.h
15906do :
15907 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15908#ifdef HAVE_CURSES_H
15909#include <curses.h>
15910#endif
15911
15912"
15913if test "x$ac_cv_header_term_h" = xyes; then :
15914 cat >>confdefs.h <<_ACEOF
15915#define HAVE_TERM_H 1
15916_ACEOF
15917
15918fi
15919
15920done
15921
15922
Jack Jansen666b1e72001-10-31 12:11:48 +000015923# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15925$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015926if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015931#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015932int
15933main ()
15934{
Jack Jansen666b1e72001-10-31 12:11:48 +000015935
15936 int rtn;
15937 rtn = mvwdelch(0,0,0);
15938
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 ;
15940 return 0;
15941}
15942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015943if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015944 ac_cv_mvwdelch_is_expression=yes
15945else
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15949fi
15950
Matthias Kloseb9621712010-04-24 17:59:49 +000015951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15952$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015953
15954if test "$ac_cv_mvwdelch_is_expression" = yes
15955then
Martin v. Löwis11437992002-04-12 09:54:03 +000015956
Matthias Kloseb9621712010-04-24 17:59:49 +000015957$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015958
15959fi
15960
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015961# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15962# structs since version 5.7. If the macro is defined as zero before including
15963# [n]curses.h, ncurses will expose fields of the structs regardless of the
15964# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15966$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015967if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015968 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015969else
Matthias Kloseb9621712010-04-24 17:59:49 +000015970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015971/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015972
15973 #define NCURSES_OPAQUE 0
15974 #include <curses.h>
15975
Martin v. Löwis11437992002-04-12 09:54:03 +000015976int
15977main ()
15978{
Jack Jansen666b1e72001-10-31 12:11:48 +000015979
15980 WINDOW *w;
15981 w->_flags = 0;
15982
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 ;
15984 return 0;
15985}
15986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015987if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015988 ac_cv_window_has_flags=yes
15989else
Matthias Kloseb9621712010-04-24 17:59:49 +000015990 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15993fi
15994
Matthias Kloseb9621712010-04-24 17:59:49 +000015995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15996$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015997
Jack Jansen666b1e72001-10-31 12:11:48 +000015998
15999if test "$ac_cv_window_has_flags" = yes
16000then
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
Matthias Kloseb9621712010-04-24 17:59:49 +000016002$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016003
16004fi
16005
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16007$as_echo_n "checking for is_pad... " >&6; }
16008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16009/* end confdefs.h. */
16010#include <curses.h>
16011int
16012main ()
16013{
16014
16015#ifndef is_pad
16016void *x=is_pad
16017#endif
16018
16019 ;
16020 return 0;
16021}
16022_ACEOF
16023if ac_fn_c_try_compile "$LINENO"; then :
16024
16025$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16026
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16028$as_echo "yes" >&6; }
16029else
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16031$as_echo "no" >&6; }
16032
16033fi
16034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16037$as_echo_n "checking for is_term_resized... " >&6; }
16038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016039/* end confdefs.h. */
16040#include <curses.h>
16041int
16042main ()
16043{
16044void *x=is_term_resized
16045 ;
16046 return 0;
16047}
16048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016049if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016052
Matthias Kloseb159a552010-04-25 21:00:44 +000016053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016054$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016055else
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16057$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016058
16059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16061
Matthias Kloseb9621712010-04-24 17:59:49 +000016062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16063$as_echo_n "checking for resize_term... " >&6; }
16064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016065/* end confdefs.h. */
16066#include <curses.h>
16067int
16068main ()
16069{
16070void *x=resize_term
16071 ;
16072 return 0;
16073}
16074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016075if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016078
Matthias Kloseb159a552010-04-25 21:00:44 +000016079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016080$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016081else
Matthias Kloseb9621712010-04-24 17:59:49 +000016082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16083$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016084
16085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16089$as_echo_n "checking for resizeterm... " >&6; }
16090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016091/* end confdefs.h. */
16092#include <curses.h>
16093int
16094main ()
16095{
16096void *x=resizeterm
16097 ;
16098 return 0;
16099}
16100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016101if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016102
Matthias Kloseb9621712010-04-24 17:59:49 +000016103$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016104
Matthias Kloseb159a552010-04-25 21:00:44 +000016105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016106$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016107else
Matthias Kloseb9621712010-04-24 17:59:49 +000016108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16109$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016110
16111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016113
16114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16115$as_echo_n "checking for immedok... " >&6; }
16116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16117/* end confdefs.h. */
16118#include <curses.h>
16119int
16120main ()
16121{
16122
16123#ifndef immedok
16124void *x=immedok
16125#endif
16126
16127 ;
16128 return 0;
16129}
16130_ACEOF
16131if ac_fn_c_try_compile "$LINENO"; then :
16132
16133$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16134
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16136$as_echo "yes" >&6; }
16137else
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16139$as_echo "no" >&6; }
16140
16141fi
16142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16143
16144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16145$as_echo_n "checking for syncok... " >&6; }
16146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16147/* end confdefs.h. */
16148#include <curses.h>
16149int
16150main ()
16151{
16152
16153#ifndef syncok
16154void *x=syncok
16155#endif
16156
16157 ;
16158 return 0;
16159}
16160_ACEOF
16161if ac_fn_c_try_compile "$LINENO"; then :
16162
16163$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16164
16165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16166$as_echo "yes" >&6; }
16167else
16168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16169$as_echo "no" >&6; }
16170
16171fi
16172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16173
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16175$as_echo_n "checking for wchgat... " >&6; }
16176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
16178#include <curses.h>
16179int
16180main ()
16181{
16182
16183#ifndef wchgat
16184void *x=wchgat
16185#endif
16186
16187 ;
16188 return 0;
16189}
16190_ACEOF
16191if ac_fn_c_try_compile "$LINENO"; then :
16192
16193$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16194
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16196$as_echo "yes" >&6; }
16197else
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16199$as_echo "no" >&6; }
16200
16201fi
16202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16203
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16205$as_echo_n "checking for filter... " >&6; }
16206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16207/* end confdefs.h. */
16208#include <curses.h>
16209int
16210main ()
16211{
16212
16213#ifndef filter
16214void *x=filter
16215#endif
16216
16217 ;
16218 return 0;
16219}
16220_ACEOF
16221if ac_fn_c_try_compile "$LINENO"; then :
16222
16223$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16224
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16226$as_echo "yes" >&6; }
16227else
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16229$as_echo "no" >&6; }
16230
16231fi
16232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16233
16234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16235$as_echo_n "checking for has_key... " >&6; }
16236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16237/* end confdefs.h. */
16238#include <curses.h>
16239int
16240main ()
16241{
16242
16243#ifndef has_key
16244void *x=has_key
16245#endif
16246
16247 ;
16248 return 0;
16249}
16250_ACEOF
16251if ac_fn_c_try_compile "$LINENO"; then :
16252
16253$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16254
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16256$as_echo "yes" >&6; }
16257else
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16259$as_echo "no" >&6; }
16260
16261fi
16262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16263
16264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16265$as_echo_n "checking for typeahead... " >&6; }
16266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h. */
16268#include <curses.h>
16269int
16270main ()
16271{
16272
16273#ifndef typeahead
16274void *x=typeahead
16275#endif
16276
16277 ;
16278 return 0;
16279}
16280_ACEOF
16281if ac_fn_c_try_compile "$LINENO"; then :
16282
16283$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16284
16285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16286$as_echo "yes" >&6; }
16287else
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16289$as_echo "no" >&6; }
16290
16291fi
16292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16293
16294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16295$as_echo_n "checking for use_env... " >&6; }
16296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16297/* end confdefs.h. */
16298#include <curses.h>
16299int
16300main ()
16301{
16302
16303#ifndef use_env
16304void *x=use_env
16305#endif
16306
16307 ;
16308 return 0;
16309}
16310_ACEOF
16311if ac_fn_c_try_compile "$LINENO"; then :
16312
16313$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16314
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16316$as_echo "yes" >&6; }
16317else
16318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16319$as_echo "no" >&6; }
16320
16321fi
16322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016323# last curses configure check
16324CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016325
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16327$as_echo "$as_me: checking for device files" >&6;}
16328
16329if test "x$cross_compiling" = xyes; then
16330 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16332$as_echo_n "checking for /dev/ptmx... " >&6; }
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16334$as_echo "not set" >&6; }
16335 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16336 fi
16337 if test "${ac_cv_file__dev_ptc+set}" != set; then
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16339$as_echo_n "checking for /dev/ptc... " >&6; }
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16341$as_echo "not set" >&6; }
16342 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16343 fi
16344fi
16345
Matthias Kloseb9621712010-04-24 17:59:49 +000016346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16347$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016348if ${ac_cv_file__dev_ptmx+:} false; then :
16349 $as_echo_n "(cached) " >&6
16350else
16351 test "$cross_compiling" = yes &&
16352 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16353if test -r "/dev/ptmx"; then
16354 ac_cv_file__dev_ptmx=yes
16355else
16356 ac_cv_file__dev_ptmx=no
16357fi
16358fi
16359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16360$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16361if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016362
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016363fi
16364
16365if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016366
Matthias Kloseb9621712010-04-24 17:59:49 +000016367$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016368
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16371$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016372if ${ac_cv_file__dev_ptc+:} false; then :
16373 $as_echo_n "(cached) " >&6
16374else
16375 test "$cross_compiling" = yes &&
16376 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16377if test -r "/dev/ptc"; then
16378 ac_cv_file__dev_ptc=yes
16379else
16380 ac_cv_file__dev_ptc=no
16381fi
16382fi
16383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16384$as_echo "$ac_cv_file__dev_ptc" >&6; }
16385if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016386
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016387fi
16388
16389if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016390
Matthias Kloseb9621712010-04-24 17:59:49 +000016391$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016392
Neal Norwitz865400f2003-03-21 01:42:58 +000016393fi
16394
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016395if test $ac_sys_system = Darwin
16396then
16397 LIBS="$LIBS -framework CoreFoundation"
16398fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016399
Matthias Kloseb9621712010-04-24 17:59:49 +000016400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16401$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016402if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016403 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016404else
Matthias Kloseb9621712010-04-24 17:59:49 +000016405 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016406 ac_cv_have_size_t_format="cross -- assuming yes"
16407
Thomas Wouters477c8d52006-05-27 19:21:47 +000016408else
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016410/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016411
Thomas Wouters477c8d52006-05-27 19:21:47 +000016412#include <stdio.h>
16413#include <stddef.h>
16414#include <string.h>
16415
Christian Heimes2c181612007-12-17 20:04:13 +000016416#ifdef HAVE_SYS_TYPES_H
16417#include <sys/types.h>
16418#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016419
16420#ifdef HAVE_SSIZE_T
16421typedef ssize_t Py_ssize_t;
16422#elif SIZEOF_VOID_P == SIZEOF_LONG
16423typedef long Py_ssize_t;
16424#else
16425typedef int Py_ssize_t;
16426#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016427
Christian Heimes2c181612007-12-17 20:04:13 +000016428int main()
16429{
16430 char buffer[256];
16431
Thomas Wouters477c8d52006-05-27 19:21:47 +000016432 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16433 return 1;
16434
Thomas Wouters89f507f2006-12-13 04:49:30 +000016435 if (strcmp(buffer, "123"))
16436 return 1;
16437
16438 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16439 return 1;
16440
16441 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016442 return 1;
16443
16444 return 0;
16445}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016446
Thomas Wouters477c8d52006-05-27 19:21:47 +000016447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016448if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016449 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016450else
Matthias Kloseb9621712010-04-24 17:59:49 +000016451 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016455fi
16456
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16459$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016460if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016461
Matthias Kloseb9621712010-04-24 17:59:49 +000016462$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016463
16464fi
16465
Matthias Kloseb9621712010-04-24 17:59:49 +000016466ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016467#ifdef HAVE_SYS_TYPES_H
16468#include <sys/types.h>
16469#endif
16470#ifdef HAVE_SYS_SOCKET_H
16471#include <sys/socket.h>
16472#endif
16473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474"
Victor Stinnere0be4232011-10-25 13:06:09 +020016475if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016476
Martin v. Löwis11437992002-04-12 09:54:03 +000016477else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016480
16481fi
16482
Michael W. Hudson54241132001-12-07 15:38:26 +000016483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16485$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016486if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016488else
Matthias Kloseb9621712010-04-24 17:59:49 +000016489 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016490 ac_cv_broken_mbstowcs=no
16491else
Matthias Kloseb9621712010-04-24 17:59:49 +000016492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016493/* end confdefs.h. */
16494
Stefan Krah19c21392012-11-22 23:47:32 +010016495#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016496#include<stdlib.h>
16497int main() {
16498 size_t len = -1;
16499 const char *str = "text";
16500 len = mbstowcs(NULL, str, 0);
16501 return (len != 4);
16502}
16503
16504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016505if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016506 ac_cv_broken_mbstowcs=no
16507else
Matthias Kloseb9621712010-04-24 17:59:49 +000016508 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016512fi
16513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016514fi
16515
Matthias Kloseb9621712010-04-24 17:59:49 +000016516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16517$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016518if test "$ac_cv_broken_mbstowcs" = yes
16519then
16520
Matthias Kloseb9621712010-04-24 17:59:49 +000016521$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016522
16523fi
16524
Antoine Pitroub52ec782009-01-25 16:34:23 +000016525# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16527$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016528
16529# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016530if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016531 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016532if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016533then
16534
Matthias Kloseb9621712010-04-24 17:59:49 +000016535$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016536
Matthias Kloseb9621712010-04-24 17:59:49 +000016537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16538$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016539fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016540if test "$withval" = no
16541then
16542
16543$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16544
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16546$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016547fi
16548
Antoine Pitrou042b1282010-08-13 21:15:58 +000016549else
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16551$as_echo "no value specified" >&6; }
16552fi
16553
Antoine Pitroub52ec782009-01-25 16:34:23 +000016554
Matthias Kloseb17289e2012-03-15 19:51:34 +010016555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16556$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16557if ${ac_cv_computed_gotos+:} false; then :
16558 $as_echo_n "(cached) " >&6
16559else
16560 if test "$cross_compiling" = yes; then :
16561 if test "${with_computed_gotos+set}" = set; then
16562 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16563 else
16564 ac_cv_computed_gotos=no
16565 fi
16566else
16567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568/* end confdefs.h. */
16569
16570int main(int argc, char **argv)
16571{
16572 static void *targets[1] = { &&LABEL1 };
16573 goto LABEL2;
16574LABEL1:
16575 return 0;
16576LABEL2:
16577 goto *targets[0];
16578 return 1;
16579}
16580
16581_ACEOF
16582if ac_fn_c_try_run "$LINENO"; then :
16583 ac_cv_computed_gotos=yes
16584else
16585 ac_cv_computed_gotos=no
16586fi
16587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16588 conftest.$ac_objext conftest.beam conftest.$ac_ext
16589fi
16590
16591fi
16592
16593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16594$as_echo "$ac_cv_computed_gotos" >&6; }
16595case "$ac_cv_computed_gotos" in yes*)
16596
16597$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16598
16599esac
16600
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016601case $ac_sys_system in
16602AIX*)
16603
16604$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16605 ;;
16606esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016607
Michael W. Hudson54241132001-12-07 15:38:26 +000016608
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016609
16610
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016611for h in `(cd $srcdir;echo Python/thread_*.h)`
16612do
16613 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16614done
16615
Michael W. Hudson54241132001-12-07 15:38:26 +000016616
Victor Stinner21a74a92019-04-11 22:28:12 +020016617SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16619$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016620for dir in $SRCDIRS; do
16621 if test ! -d $dir; then
16622 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016623 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016624done
Matthias Kloseb9621712010-04-24 17:59:49 +000016625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16626$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016627
Stefan Krah1919b7e2012-03-21 18:25:23 +010016628# Availability of -O2:
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16630$as_echo_n "checking for -O2... " >&6; }
16631saved_cflags="$CFLAGS"
16632CFLAGS="-O2"
16633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16634/* end confdefs.h. */
16635
16636int
16637main ()
16638{
16639
16640
16641 ;
16642 return 0;
16643}
16644_ACEOF
16645if ac_fn_c_try_compile "$LINENO"; then :
16646 have_O2=yes
16647else
16648 have_O2=no
16649fi
16650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16652$as_echo "$have_O2" >&6; }
16653CFLAGS="$saved_cflags"
16654
16655# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16656# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16658$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16659saved_cflags="$CFLAGS"
16660CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16661if test "$have_O2" = no; then
16662 CFLAGS=""
16663fi
16664if test "$cross_compiling" = yes; then :
16665 have_glibc_memmove_bug=undefined
16666else
16667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16668/* end confdefs.h. */
16669
16670#include <stdio.h>
16671#include <stdlib.h>
16672#include <string.h>
16673void foo(void *p, void *q) { memmove(p, q, 19); }
16674int main() {
16675 char a[32] = "123456789000000000";
16676 foo(&a[9], a);
16677 if (strcmp(a, "123456789123456789000000000") != 0)
16678 return 1;
16679 foo(a, &a[9]);
16680 if (strcmp(a, "123456789000000000") != 0)
16681 return 1;
16682 return 0;
16683}
16684
16685_ACEOF
16686if ac_fn_c_try_run "$LINENO"; then :
16687 have_glibc_memmove_bug=no
16688else
16689 have_glibc_memmove_bug=yes
16690fi
16691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16692 conftest.$ac_objext conftest.beam conftest.$ac_ext
16693fi
16694
16695CFLAGS="$saved_cflags"
16696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16697$as_echo "$have_glibc_memmove_bug" >&6; }
16698if test "$have_glibc_memmove_bug" = yes; then
16699
16700$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16701
16702fi
16703
16704if test "$have_gcc_asm_for_x87" = yes; then
16705 # Some versions of gcc miscompile inline asm:
16706 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16707 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16708 case $CC in
16709 *gcc*)
16710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16711$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16712 saved_cflags="$CFLAGS"
16713 CFLAGS="-O2"
16714 if test "$cross_compiling" = yes; then :
16715 have_ipa_pure_const_bug=undefined
16716else
16717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16718/* end confdefs.h. */
16719
16720 __attribute__((noinline)) int
16721 foo(int *p) {
16722 int r;
16723 asm ( "movl \$6, (%1)\n\t"
16724 "xorl %0, %0\n\t"
16725 : "=r" (r) : "r" (p) : "memory"
16726 );
16727 return r;
16728 }
16729 int main() {
16730 int p = 8;
16731 if ((foo(&p) ? : p) != 6)
16732 return 1;
16733 return 0;
16734 }
16735
16736_ACEOF
16737if ac_fn_c_try_run "$LINENO"; then :
16738 have_ipa_pure_const_bug=no
16739else
16740 have_ipa_pure_const_bug=yes
16741fi
16742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16743 conftest.$ac_objext conftest.beam conftest.$ac_ext
16744fi
16745
16746 CFLAGS="$saved_cflags"
16747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16748$as_echo "$have_ipa_pure_const_bug" >&6; }
16749 if test "$have_ipa_pure_const_bug" = yes; then
16750
16751$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16752
16753 fi
16754 ;;
16755 esac
16756fi
16757
Victor Stinner4f5366e2015-01-09 02:13:19 +010016758# Check for stdatomic.h
16759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16760$as_echo_n "checking for stdatomic.h... " >&6; }
16761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16762/* end confdefs.h. */
16763
16764
16765 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016766 atomic_int int_var;
16767 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016768 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016769 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16770 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16771 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016772 return 0;
16773 }
16774
16775
16776_ACEOF
16777if ac_fn_c_try_link "$LINENO"; then :
16778 have_stdatomic_h=yes
16779else
16780 have_stdatomic_h=no
16781fi
16782rm -f core conftest.err conftest.$ac_objext \
16783 conftest$ac_exeext conftest.$ac_ext
16784
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16786$as_echo "$have_stdatomic_h" >&6; }
16787
16788if test "$have_stdatomic_h" = yes; then
16789
16790$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16791
16792fi
16793
16794# Check for GCC >= 4.7 __atomic builtins
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16796$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16798/* end confdefs.h. */
16799
16800
16801 volatile int val = 1;
16802 int main() {
16803 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16804 return 0;
16805 }
16806
16807
16808_ACEOF
16809if ac_fn_c_try_link "$LINENO"; then :
16810 have_builtin_atomic=yes
16811else
16812 have_builtin_atomic=no
16813fi
16814rm -f core conftest.err conftest.$ac_objext \
16815 conftest$ac_exeext conftest.$ac_ext
16816
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16818$as_echo "$have_builtin_atomic" >&6; }
16819
16820if test "$have_builtin_atomic" = yes; then
16821
16822$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16823
16824fi
16825
Ned Deily322f5ba2013-11-21 23:01:59 -080016826# ensurepip option
16827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16828$as_echo_n "checking for ensurepip... " >&6; }
16829
16830# Check whether --with-ensurepip was given.
16831if test "${with_ensurepip+set}" = set; then :
16832 withval=$with_ensurepip;
16833else
16834 with_ensurepip=upgrade
16835fi
16836
16837case $with_ensurepip in #(
16838 yes|upgrade) :
16839 ENSUREPIP=upgrade ;; #(
16840 install) :
16841 ENSUREPIP=install ;; #(
16842 no) :
16843 ENSUREPIP=no ;; #(
16844 *) :
16845 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16846esac
16847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16848$as_echo "$ENSUREPIP" >&6; }
16849
16850
Victor Stinner35a97c02015-03-08 02:59:09 +010016851# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16853$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16855/* end confdefs.h. */
16856
16857
16858 #include <dirent.h>
16859
16860 int main() {
16861 struct dirent entry;
16862 return entry.d_type == DT_UNKNOWN;
16863 }
16864
16865
16866_ACEOF
16867if ac_fn_c_try_link "$LINENO"; then :
16868 have_dirent_d_type=yes
16869else
16870 have_dirent_d_type=no
16871fi
16872rm -f core conftest.err conftest.$ac_objext \
16873 conftest$ac_exeext conftest.$ac_ext
16874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16875$as_echo "$have_dirent_d_type" >&6; }
16876
16877if test "$have_dirent_d_type" = yes; then
16878
16879$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16880
16881fi
16882
Victor Stinner9eb57c52015-03-19 22:21:49 +010016883# check if the Linux getrandom() syscall is available
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16885$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16887/* end confdefs.h. */
16888
16889
Victor Stinner1b80b242016-04-12 22:34:58 +020016890 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016891 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016892 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016893
16894 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016895 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016896 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016897 const int flags = GRND_NONBLOCK;
16898 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016899 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016900 return 0;
16901 }
16902
16903
16904_ACEOF
16905if ac_fn_c_try_link "$LINENO"; then :
16906 have_getrandom_syscall=yes
16907else
16908 have_getrandom_syscall=no
16909fi
16910rm -f core conftest.err conftest.$ac_objext \
16911 conftest$ac_exeext conftest.$ac_ext
16912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16913$as_echo "$have_getrandom_syscall" >&6; }
16914
16915if test "$have_getrandom_syscall" = yes; then
16916
16917$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16918
16919fi
16920
Victor Stinner3abf44e2015-09-18 15:38:37 +020016921# check if the getrandom() function is available
16922# the test was written for the Solaris function of <sys/random.h>
16923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16924$as_echo_n "checking for the getrandom() function... " >&6; }
16925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16926/* end confdefs.h. */
16927
16928
16929 #include <sys/random.h>
16930
16931 int main() {
16932 char buffer[1];
16933 const size_t buflen = sizeof(buffer);
16934 const int flags = 0;
16935 /* ignore the result, Python checks for ENOSYS at runtime */
16936 (void)getrandom(buffer, buflen, flags);
16937 return 0;
16938 }
16939
16940
16941_ACEOF
16942if ac_fn_c_try_link "$LINENO"; then :
16943 have_getrandom=yes
16944else
16945 have_getrandom=no
16946fi
16947rm -f core conftest.err conftest.$ac_objext \
16948 conftest$ac_exeext conftest.$ac_ext
16949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16950$as_echo "$have_getrandom" >&6; }
16951
16952if test "$have_getrandom" = yes; then
16953
16954$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16955
16956fi
16957
Neil Schemenauer5741c452019-02-08 10:48:46 -080016958# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16959# shm_* may only be available if linking against librt
16960save_LIBS="$LIBS"
16961save_includes_default="$ac_includes_default"
16962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16963$as_echo_n "checking for library containing shm_open... " >&6; }
16964if ${ac_cv_search_shm_open+:} false; then :
16965 $as_echo_n "(cached) " >&6
16966else
16967 ac_func_search_save_LIBS=$LIBS
16968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16969/* end confdefs.h. */
16970
16971/* Override any GCC internal prototype to avoid an error.
16972 Use char because int might match the return type of a GCC
16973 builtin and then its argument prototype would still apply. */
16974#ifdef __cplusplus
16975extern "C"
16976#endif
16977char shm_open ();
16978int
16979main ()
16980{
16981return shm_open ();
16982 ;
16983 return 0;
16984}
16985_ACEOF
16986for ac_lib in '' rt; do
16987 if test -z "$ac_lib"; then
16988 ac_res="none required"
16989 else
16990 ac_res=-l$ac_lib
16991 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16992 fi
16993 if ac_fn_c_try_link "$LINENO"; then :
16994 ac_cv_search_shm_open=$ac_res
16995fi
16996rm -f core conftest.err conftest.$ac_objext \
16997 conftest$ac_exeext
16998 if ${ac_cv_search_shm_open+:} false; then :
16999 break
17000fi
17001done
17002if ${ac_cv_search_shm_open+:} false; then :
17003
17004else
17005 ac_cv_search_shm_open=no
17006fi
17007rm conftest.$ac_ext
17008LIBS=$ac_func_search_save_LIBS
17009fi
17010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17011$as_echo "$ac_cv_search_shm_open" >&6; }
17012ac_res=$ac_cv_search_shm_open
17013if test "$ac_res" != no; then :
17014 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17015
17016fi
17017
17018if test "$ac_cv_search_shm_open" = "-lrt"; then
17019
17020$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17021
17022fi
17023for ac_header in sys/mman.h
17024do :
17025 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17026if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17027 cat >>confdefs.h <<_ACEOF
17028#define HAVE_SYS_MMAN_H 1
17029_ACEOF
17030
17031fi
17032
17033done
17034
17035# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17036ac_includes_default="\
17037${ac_includes_default}
17038#ifndef __cplusplus
17039# ifdef HAVE_SYS_MMAN_H
17040# include <sys/mman.h>
17041# endif
17042#endif
17043"
17044for ac_func in shm_open shm_unlink
17045do :
17046 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17047ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17048if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17049 cat >>confdefs.h <<_ACEOF
17050#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17051_ACEOF
17052
17053fi
17054done
17055
17056# we don't want to link with librt always, restore LIBS
17057LIBS="$save_LIBS"
17058ac_includes_default="$save_includes_default"
17059
Christian Heimesff5be6e2018-01-20 13:19:21 +010017060# Check for usable OpenSSL
17061
17062 found=false
17063
17064# Check whether --with-openssl was given.
17065if test "${with_openssl+set}" = set; then :
17066 withval=$with_openssl;
17067 case "$withval" in
17068 "" | y | ye | yes | n | no)
17069 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17070 ;;
17071 *) ssldirs="$withval"
17072 ;;
17073 esac
17074
17075else
17076
17077 # if pkg-config is installed and openssl has installed a .pc file,
17078 # then use that information and don't search ssldirs
17079 if test -n "$ac_tool_prefix"; then
17080 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17081set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17083$as_echo_n "checking for $ac_word... " >&6; }
17084if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17085 $as_echo_n "(cached) " >&6
17086else
17087 if test -n "$PKG_CONFIG"; then
17088 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17089else
17090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17091for as_dir in $PATH
17092do
17093 IFS=$as_save_IFS
17094 test -z "$as_dir" && as_dir=.
17095 for ac_exec_ext in '' $ac_executable_extensions; do
17096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17097 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17099 break 2
17100 fi
17101done
17102 done
17103IFS=$as_save_IFS
17104
17105fi
17106fi
17107PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17108if test -n "$PKG_CONFIG"; then
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17110$as_echo "$PKG_CONFIG" >&6; }
17111else
17112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17113$as_echo "no" >&6; }
17114fi
17115
17116
17117fi
17118if test -z "$ac_cv_prog_PKG_CONFIG"; then
17119 ac_ct_PKG_CONFIG=$PKG_CONFIG
17120 # Extract the first word of "pkg-config", so it can be a program name with args.
17121set dummy pkg-config; ac_word=$2
17122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17123$as_echo_n "checking for $ac_word... " >&6; }
17124if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17125 $as_echo_n "(cached) " >&6
17126else
17127 if test -n "$ac_ct_PKG_CONFIG"; then
17128 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17129else
17130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17131for as_dir in $PATH
17132do
17133 IFS=$as_save_IFS
17134 test -z "$as_dir" && as_dir=.
17135 for ac_exec_ext in '' $ac_executable_extensions; do
17136 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17137 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17139 break 2
17140 fi
17141done
17142 done
17143IFS=$as_save_IFS
17144
17145fi
17146fi
17147ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17148if test -n "$ac_ct_PKG_CONFIG"; then
17149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17150$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17151else
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17153$as_echo "no" >&6; }
17154fi
17155
17156 if test "x$ac_ct_PKG_CONFIG" = x; then
17157 PKG_CONFIG=""
17158 else
17159 case $cross_compiling:$ac_tool_warned in
17160yes:)
17161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17163ac_tool_warned=yes ;;
17164esac
17165 PKG_CONFIG=$ac_ct_PKG_CONFIG
17166 fi
17167else
17168 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17169fi
17170
17171 if test x"$PKG_CONFIG" != x""; then
17172 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17173 if test $? = 0; then
17174 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17175 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17176 found=true
17177 fi
17178 fi
17179
17180 # no such luck; use some default ssldirs
17181 if ! $found; then
17182 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17183 fi
17184
17185
17186fi
17187
17188
17189
17190 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17191 # an 'openssl' subdirectory
17192
17193 if ! $found; then
17194 OPENSSL_INCLUDES=
17195 for ssldir in $ssldirs; do
17196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17197$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17198 if test -f "$ssldir/include/openssl/ssl.h"; then
17199 OPENSSL_INCLUDES="-I$ssldir/include"
17200 OPENSSL_LDFLAGS="-L$ssldir/lib"
17201 OPENSSL_LIBS="-lssl -lcrypto"
17202 found=true
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17204$as_echo "yes" >&6; }
17205 break
17206 else
17207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17208$as_echo "no" >&6; }
17209 fi
17210 done
17211
17212 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17213 # it will just work!
17214 fi
17215
17216 # try the preprocessor and linker with our new flags,
17217 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17218
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17220$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17221 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17222 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17223
17224 save_LIBS="$LIBS"
17225 save_LDFLAGS="$LDFLAGS"
17226 save_CPPFLAGS="$CPPFLAGS"
17227 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17228 LIBS="$OPENSSL_LIBS $LIBS"
17229 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17231/* end confdefs.h. */
17232#include <openssl/ssl.h>
17233int
17234main ()
17235{
17236SSL_new(NULL)
17237 ;
17238 return 0;
17239}
17240_ACEOF
17241if ac_fn_c_try_link "$LINENO"; then :
17242
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17244$as_echo "yes" >&6; }
17245 have_openssl=yes
17246
17247else
17248
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17250$as_echo "no" >&6; }
17251 have_openssl=no
17252
17253fi
17254rm -f core conftest.err conftest.$ac_objext \
17255 conftest$ac_exeext conftest.$ac_ext
17256 CPPFLAGS="$save_CPPFLAGS"
17257 LDFLAGS="$save_LDFLAGS"
17258 LIBS="$save_LIBS"
17259
17260
17261
17262
17263
17264
17265if test "$have_openssl" = yes; then
17266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17267$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17268
17269 save_LIBS="$LIBS"
17270 save_LDFLAGS="$LDFLAGS"
17271 save_CPPFLAGS="$CPPFLAGS"
17272 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17273 LIBS="$OPENSSL_LIBS $LIBS"
17274 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17275
17276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17277/* end confdefs.h. */
17278
17279 #include <openssl/x509_vfy.h>
17280
17281int
17282main ()
17283{
17284
17285 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17286 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17287 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17288 X509_VERIFY_PARAM_set_hostflags(p, 0);
17289
17290 ;
17291 return 0;
17292}
17293
17294_ACEOF
17295if ac_fn_c_try_link "$LINENO"; then :
17296
17297 ac_cv_has_x509_verify_param_set1_host=yes
17298
17299else
17300
17301 ac_cv_has_x509_verify_param_set1_host=no
17302
17303fi
17304rm -f core conftest.err conftest.$ac_objext \
17305 conftest$ac_exeext conftest.$ac_ext
17306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17307$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17308 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17309
17310$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17311
17312 fi
17313
17314 CPPFLAGS="$save_CPPFLAGS"
17315 LDFLAGS="$save_LDFLAGS"
17316 LIBS="$save_LIBS"
17317fi
17318
Christian Heimes892d66e2018-01-29 14:10:18 +010017319# ssl module default cipher suite string
17320
17321
17322
17323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17324$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17325
17326# Check whether --with-ssl-default-suites was given.
17327if test "${with_ssl_default_suites+set}" = set; then :
17328 withval=$with_ssl_default_suites;
17329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17330$as_echo "$withval" >&6; }
17331case "$withval" in
17332 python)
17333 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17334
17335 ;;
17336 openssl)
17337 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17338
17339 ;;
17340 *)
17341 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17342
17343 cat >>confdefs.h <<_ACEOF
17344#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17345_ACEOF
17346
17347 ;;
17348esac
17349
17350else
17351
17352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17353$as_echo "python" >&6; }
17354$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17355
17356
17357fi
17358
17359
17360
Guido van Rossum627b2d71993-12-24 10:39:16 +000017361# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017362ac_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 +000017363
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017364ac_config_files="$ac_config_files Modules/ld_so_aix"
17365
Martin v. Löwis11437992002-04-12 09:54:03 +000017366cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017367# This file is a shell script that caches the results of configure
17368# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017369# scripts and configure runs, see configure's option --config-cache.
17370# It is not useful on other systems. If it contains results you don't
17371# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017372#
Martin v. Löwis11437992002-04-12 09:54:03 +000017373# config.status only pays attention to the cache file if you give it
17374# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017375#
Skip Montanaro6dead952003-09-25 14:50:04 +000017376# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017377# loading this file, other *unset* `ac_cv_foo' will be assigned the
17378# following values.
17379
17380_ACEOF
17381
Guido van Rossumf78abae1997-01-21 22:02:36 +000017382# The following way of writing the cache mishandles newlines in values,
17383# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017385# Ultrix sh set writes to stderr and can't be redirected directly,
17386# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387(
17388 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17389 eval ac_val=\$$ac_var
17390 case $ac_val in #(
17391 *${as_nl}*)
17392 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017393 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17394$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 esac
17396 case $ac_var in #(
17397 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17399 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 esac ;;
17401 esac
17402 done
17403
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17406 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017407 # `set' does not quote correctly, so add quotes: double-quote
17408 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017409 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017410 "s/'/'\\\\''/g;
17411 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 *)
17414 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 esac |
17418 sort
17419) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017420 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17425 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17427 :end' >>confcache
17428if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17429 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017430 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017431 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17432$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017433 if test ! -f "$cache_file" || test -h "$cache_file"; then
17434 cat confcache >"$cache_file"
17435 else
17436 case $cache_file in #(
17437 */* | ?:*)
17438 mv -f confcache "$cache_file"$$ &&
17439 mv -f "$cache_file"$$ "$cache_file" ;; #(
17440 *)
17441 mv -f confcache "$cache_file" ;;
17442 esac
17443 fi
17444 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017445 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017446 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17447$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017448 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017449fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017450rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017451
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017452test "x$prefix" = xNONE && prefix=$ac_default_prefix
17453# Let make expand exec_prefix.
17454test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017455
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017456DEFS=-DHAVE_CONFIG_H
17457
Skip Montanaro6dead952003-09-25 14:50:04 +000017458ac_libobjs=
17459ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017460U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017461for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17462 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017464 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17466 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17468 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017469done
17470LIBOBJS=$ac_libobjs
17471
17472LTLIBOBJS=$ac_ltlibobjs
17473
17474
Martin v. Löwis11437992002-04-12 09:54:03 +000017475
Matthias Kloseb9621712010-04-24 17:59:49 +000017476
Victor Stinnere0be4232011-10-25 13:06:09 +020017477: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017478ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017479ac_clean_files_save=$ac_clean_files
17480ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017481{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17482$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17483as_write_fail=0
17484cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017485#! $SHELL
17486# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017487# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017488# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017489# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017490
Martin v. Löwis11437992002-04-12 09:54:03 +000017491debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017492ac_cs_recheck=false
17493ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017494
Matthias Kloseb9621712010-04-24 17:59:49 +000017495SHELL=\${CONFIG_SHELL-$SHELL}
17496export SHELL
17497_ASEOF
17498cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17499## -------------------- ##
17500## M4sh Initialization. ##
17501## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503# Be more Bourne compatible
17504DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017505if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017506 emulate sh
17507 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017509 # is contrary to our usage. Disable this feature.
17510 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017512else
Matthias Kloseb9621712010-04-24 17:59:49 +000017513 case `(set -o) 2>/dev/null` in #(
17514 *posix*) :
17515 set -o posix ;; #(
17516 *) :
17517 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017519fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017520
17521
Matthias Kloseb9621712010-04-24 17:59:49 +000017522as_nl='
17523'
17524export as_nl
17525# Printing a long string crashes Solaris 7 /usr/bin/printf.
17526as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17527as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17528as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17529# Prefer a ksh shell builtin over an external printf program on Solaris,
17530# but without wasting forks for bash or zsh.
17531if test -z "$BASH_VERSION$ZSH_VERSION" \
17532 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17533 as_echo='print -r --'
17534 as_echo_n='print -rn --'
17535elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17536 as_echo='printf %s\n'
17537 as_echo_n='printf %s'
17538else
17539 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17540 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17541 as_echo_n='/usr/ucb/echo -n'
17542 else
17543 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17544 as_echo_n_body='eval
17545 arg=$1;
17546 case $arg in #(
17547 *"$as_nl"*)
17548 expr "X$arg" : "X\\(.*\\)$as_nl";
17549 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17550 esac;
17551 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17552 '
17553 export as_echo_n_body
17554 as_echo_n='sh -c $as_echo_n_body as_echo'
17555 fi
17556 export as_echo_body
17557 as_echo='sh -c $as_echo_body as_echo'
17558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017559
17560# The user is always right.
17561if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 PATH_SEPARATOR=:
17563 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17564 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17565 PATH_SEPARATOR=';'
17566 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569
17570# IFS
17571# We need space, tab and new line, in precisely that order. Quoting is
17572# there to prevent editors from complaining about space-tab.
17573# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17574# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575IFS=" "" $as_nl"
17576
17577# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017578as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017579case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580 *[\\/]* ) as_myself=$0 ;;
17581 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017582for as_dir in $PATH
17583do
17584 IFS=$as_save_IFS
17585 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017586 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17587 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590 ;;
17591esac
17592# We did not find ourselves, most probably we were run as `sh COMMAND'
17593# in which case we are not to be found in the path.
17594if test "x$as_myself" = x; then
17595 as_myself=$0
17596fi
17597if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017598 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17599 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600fi
17601
Matthias Kloseb9621712010-04-24 17:59:49 +000017602# Unset variables that we do not need and which cause bugs (e.g. in
17603# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17604# suppresses any "Segmentation fault" message there. '((' could
17605# trigger a bug in pdksh 5.2.14.
17606for as_var in BASH_ENV ENV MAIL MAILPATH
17607do eval test x\${$as_var+set} = xset \
17608 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609done
17610PS1='$ '
17611PS2='> '
17612PS4='+ '
17613
17614# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017615LC_ALL=C
17616export LC_ALL
17617LANGUAGE=C
17618export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619
Matthias Kloseb9621712010-04-24 17:59:49 +000017620# CDPATH.
17621(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17622
17623
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017624# as_fn_error STATUS ERROR [LINENO LOG_FD]
17625# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017626# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17627# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017628# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017629as_fn_error ()
17630{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017631 as_status=$1; test $as_status -eq 0 && as_status=1
17632 if test "$4"; then
17633 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17634 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017635 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017636 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017637 as_fn_exit $as_status
17638} # as_fn_error
17639
17640
17641# as_fn_set_status STATUS
17642# -----------------------
17643# Set $? to STATUS, without forking.
17644as_fn_set_status ()
17645{
17646 return $1
17647} # as_fn_set_status
17648
17649# as_fn_exit STATUS
17650# -----------------
17651# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17652as_fn_exit ()
17653{
17654 set +e
17655 as_fn_set_status $1
17656 exit $1
17657} # as_fn_exit
17658
17659# as_fn_unset VAR
17660# ---------------
17661# Portably unset VAR.
17662as_fn_unset ()
17663{
17664 { eval $1=; unset $1;}
17665}
17666as_unset=as_fn_unset
17667# as_fn_append VAR VALUE
17668# ----------------------
17669# Append the text in VALUE to the end of the definition contained in VAR. Take
17670# advantage of any shell optimizations that allow amortized linear growth over
17671# repeated appends, instead of the typical quadratic growth present in naive
17672# implementations.
17673if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17674 eval 'as_fn_append ()
17675 {
17676 eval $1+=\$2
17677 }'
17678else
17679 as_fn_append ()
17680 {
17681 eval $1=\$$1\$2
17682 }
17683fi # as_fn_append
17684
17685# as_fn_arith ARG...
17686# ------------------
17687# Perform arithmetic evaluation on the ARGs, and store the result in the
17688# global $as_val. Take advantage of shells that can avoid forks. The arguments
17689# must be portable across $(()) and expr.
17690if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17691 eval 'as_fn_arith ()
17692 {
17693 as_val=$(( $* ))
17694 }'
17695else
17696 as_fn_arith ()
17697 {
17698 as_val=`expr "$@" || test $? -eq 1`
17699 }
17700fi # as_fn_arith
17701
17702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703if expr a : '\(a\)' >/dev/null 2>&1 &&
17704 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17705 as_expr=expr
17706else
17707 as_expr=false
17708fi
17709
17710if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17711 as_basename=basename
17712else
17713 as_basename=false
17714fi
17715
Matthias Kloseb9621712010-04-24 17:59:49 +000017716if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17717 as_dirname=dirname
17718else
17719 as_dirname=false
17720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722as_me=`$as_basename -- "$0" ||
17723$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17724 X"$0" : 'X\(//\)$' \| \
17725 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017726$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 sed '/^.*\/\([^/][^/]*\)\/*$/{
17728 s//\1/
17729 q
17730 }
17731 /^X\/\(\/\/\)$/{
17732 s//\1/
17733 q
17734 }
17735 /^X\/\(\/\).*/{
17736 s//\1/
17737 q
17738 }
17739 s/.*/./; q'`
17740
Matthias Kloseb9621712010-04-24 17:59:49 +000017741# Avoid depending upon Character Ranges.
17742as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17743as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17744as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17745as_cr_digits='0123456789'
17746as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747
17748ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017749case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017751 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 xy) ECHO_C='\c';;
17754 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17755 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 esac;;
17757*)
17758 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017760
Martin v. Löwis11437992002-04-12 09:54:03 +000017761rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762if test -d conf$$.dir; then
17763 rm -f conf$$.dir/conf$$.file
17764else
17765 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017766 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017768if (echo >conf$$.file) 2>/dev/null; then
17769 if ln -s conf$$.file conf$$ 2>/dev/null; then
17770 as_ln_s='ln -s'
17771 # ... but there are two gotchas:
17772 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17773 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017774 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017776 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017777 elif ln conf$$.file conf$$ 2>/dev/null; then
17778 as_ln_s=ln
17779 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017780 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017782else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017783 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17786rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017787
Matthias Kloseb9621712010-04-24 17:59:49 +000017788
17789# as_fn_mkdir_p
17790# -------------
17791# Create "$as_dir" as a directory, including parents if necessary.
17792as_fn_mkdir_p ()
17793{
17794
17795 case $as_dir in #(
17796 -*) as_dir=./$as_dir;;
17797 esac
17798 test -d "$as_dir" || eval $as_mkdir_p || {
17799 as_dirs=
17800 while :; do
17801 case $as_dir in #(
17802 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17803 *) as_qdir=$as_dir;;
17804 esac
17805 as_dirs="'$as_qdir' $as_dirs"
17806 as_dir=`$as_dirname -- "$as_dir" ||
17807$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17808 X"$as_dir" : 'X\(//\)[^/]' \| \
17809 X"$as_dir" : 'X\(//\)$' \| \
17810 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17811$as_echo X"$as_dir" |
17812 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17813 s//\1/
17814 q
17815 }
17816 /^X\(\/\/\)[^/].*/{
17817 s//\1/
17818 q
17819 }
17820 /^X\(\/\/\)$/{
17821 s//\1/
17822 q
17823 }
17824 /^X\(\/\).*/{
17825 s//\1/
17826 q
17827 }
17828 s/.*/./; q'`
17829 test -d "$as_dir" && break
17830 done
17831 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017832 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017833
17834
17835} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017836if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017837 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017838else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017839 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017840 as_mkdir_p=false
17841fi
17842
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017843
17844# as_fn_executable_p FILE
17845# -----------------------
17846# Test if FILE is an executable regular file.
17847as_fn_executable_p ()
17848{
17849 test -f "$1" && test -x "$1"
17850} # as_fn_executable_p
17851as_test_x='test -x'
17852as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017853
17854# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017855as_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 +000017856
17857# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017858as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017859
17860
Martin v. Löwis11437992002-04-12 09:54:03 +000017861exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017862## ----------------------------------- ##
17863## Main body of $CONFIG_STATUS script. ##
17864## ----------------------------------- ##
17865_ASEOF
17866test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17869# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017870# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871# values after options handling.
17872ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017873This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017874generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876 CONFIG_FILES = $CONFIG_FILES
17877 CONFIG_HEADERS = $CONFIG_HEADERS
17878 CONFIG_LINKS = $CONFIG_LINKS
17879 CONFIG_COMMANDS = $CONFIG_COMMANDS
17880 $ $0 $@
17881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882on `(hostname || uname -n) 2>/dev/null | sed 1q`
17883"
17884
Martin v. Löwis11437992002-04-12 09:54:03 +000017885_ACEOF
17886
Matthias Kloseb9621712010-04-24 17:59:49 +000017887case $ac_config_files in *"
17888"*) set x $ac_config_files; shift; ac_config_files=$*;;
17889esac
17890
17891case $ac_config_headers in *"
17892"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17893esac
17894
17895
17896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017897# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017898config_files="$ac_config_files"
17899config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017902
Matthias Kloseb9621712010-04-24 17:59:49 +000017903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017904ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017905\`$as_me' instantiates files and other configuration actions
17906from templates according to the current configuration. Unless the files
17907and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017908
Matthias Kloseb9621712010-04-24 17:59:49 +000017909Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017910
17911 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017913 --config print configuration, then exit
17914 -q, --quiet, --silent
17915 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017916 -d, --debug don't remove temporary files
17917 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017918 --file=FILE[:TEMPLATE]
17919 instantiate the configuration file FILE
17920 --header=FILE[:TEMPLATE]
17921 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
17923Configuration files:
17924$config_files
17925
17926Configuration headers:
17927$config_headers
17928
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017929Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017932cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17933ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017934ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017935python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017936configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017937 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017938
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017939Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017940This config.status script is free software; the Free Software Foundation
17941gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942
17943ac_pwd='$ac_pwd'
17944srcdir='$srcdir'
17945INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017946MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017947test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017948_ACEOF
17949
Matthias Kloseb9621712010-04-24 17:59:49 +000017950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17951# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017952ac_need_defaults=:
17953while test $# != 0
17954do
17955 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017956 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17958 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017959 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017961 --*=)
17962 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17963 ac_optarg=
17964 ac_shift=:
17965 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017967 ac_option=$1
17968 ac_optarg=$2
17969 ac_shift=shift
17970 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 esac
17972
Skip Montanaro6dead952003-09-25 14:50:04 +000017973 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017975 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17976 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017978 $as_echo "$ac_cs_version"; exit ;;
17979 --config | --confi | --conf | --con | --co | --c )
17980 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017982 debug=: ;;
17983 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017984 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017985 case $ac_optarg in
17986 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017987 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017988 esac
17989 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 ac_need_defaults=false;;
17991 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017992 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017993 case $ac_optarg in
17994 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17995 esac
17996 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017997 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998 --he | --h)
17999 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018000 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018001Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018003 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018004 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18005 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18006 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018007
18008 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018009 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018010Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018011
Matthias Kloseb9621712010-04-24 17:59:49 +000018012 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018014
18015 esac
18016 shift
18017done
18018
Skip Montanaro6dead952003-09-25 14:50:04 +000018019ac_configure_extra_args=
18020
18021if $ac_cs_silent; then
18022 exec 6>/dev/null
18023 ac_configure_extra_args="$ac_configure_extra_args --silent"
18024fi
18025
18026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018027cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018028if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018029 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018030 shift
18031 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18032 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018034 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018035fi
18036
Martin v. Löwis11437992002-04-12 09:54:03 +000018037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039exec 5>>config.log
18040{
18041 echo
18042 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18043## Running $as_me. ##
18044_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018045 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018051
Matthias Kloseb9621712010-04-24 17:59:49 +000018052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053
18054# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018055for ac_config_target in $ac_config_targets
18056do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057 case $ac_config_target in
18058 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18059 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18060 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018061 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18062 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018064 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018065 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018066 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018067 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068
Victor Stinnere0be4232011-10-25 13:06:09 +020018069 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 esac
18071done
18072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073
Martin v. Löwis11437992002-04-12 09:54:03 +000018074# If the user did not use the arguments to specify the items to instantiate,
18075# then the envvar interface is used. Set only those that are not.
18076# We use the long form for the default assignment because of an extremely
18077# bizarre bug on SunOS 4.1.3.
18078if $ac_need_defaults; then
18079 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18080 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18081fi
18082
Skip Montanaro6dead952003-09-25 14:50:04 +000018083# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018085# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086# Hook for its removal unless debugging.
18087# Note that there is a small window in which the directory will not be cleaned:
18088# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018089$debug ||
18090{
Victor Stinnere0be4232011-10-25 13:06:09 +020018091 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018093 : "${ac_tmp:=$tmp}"
18094 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018096 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018097}
Martin v. Löwis11437992002-04-12 09:54:03 +000018098# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018099
Martin v. Löwis11437992002-04-12 09:54:03 +000018100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018102 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018103} ||
18104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105 tmp=./conf$$-$RANDOM
18106 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018107} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018108ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018109
Matthias Kloseb9621712010-04-24 17:59:49 +000018110# Set up the scripts for CONFIG_FILES section.
18111# No need to generate them if there are no CONFIG_FILES.
18112# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018114
Matthias Kloseb9621712010-04-24 17:59:49 +000018115
18116ac_cr=`echo X | tr X '\015'`
18117# On cygwin, bash can eat \r inside `` if the user requested igncr.
18118# But we know of no other shell where ac_cr would be empty at this
18119# point, so we can use a bashism as a fallback.
18120if test "x$ac_cr" = x; then
18121 eval ac_cr=\$\'\\r\'
18122fi
18123ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18124if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018125 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018126else
18127 ac_cs_awk_cr=$ac_cr
18128fi
18129
Victor Stinnere0be4232011-10-25 13:06:09 +020018130echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018131_ACEOF
18132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133
Matthias Kloseb9621712010-04-24 17:59:49 +000018134{
18135 echo "cat >conf$$subs.awk <<_ACEOF" &&
18136 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18137 echo "_ACEOF"
18138} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018139 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18140ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141ac_delim='%!_!# '
18142for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018143 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018144 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145
Matthias Kloseb9621712010-04-24 17:59:49 +000018146 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18147 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 break
18149 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018150 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151 else
18152 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018153 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154done
Matthias Kloseb9621712010-04-24 17:59:49 +000018155rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156
Matthias Kloseb9621712010-04-24 17:59:49 +000018157cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018158cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018160sed -n '
18161h
18162s/^/S["/; s/!.*/"]=/
18163p
18164g
18165s/^[^!]*!//
18166:repl
18167t repl
18168s/'"$ac_delim"'$//
18169t delim
18170:nl
18171h
18172s/\(.\{148\}\)..*/\1/
18173t more1
18174s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18175p
18176n
18177b repl
18178:more1
18179s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18180p
18181g
18182s/.\{148\}//
18183t nl
18184:delim
18185h
18186s/\(.\{148\}\)..*/\1/
18187t more2
18188s/["\\]/\\&/g; s/^/"/; s/$/"/
18189p
18190b
18191:more2
18192s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18193p
18194g
18195s/.\{148\}//
18196t delim
18197' <conf$$subs.awk | sed '
18198/^[^""]/{
18199 N
18200 s/\n//
18201}
18202' >>$CONFIG_STATUS || ac_write_fail=1
18203rm -f conf$$subs.awk
18204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18205_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018206cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018207 for (key in S) S_is_set[key] = 1
18208 FS = ""
18209
18210}
18211{
18212 line = $ 0
18213 nfields = split(line, field, "@")
18214 substed = 0
18215 len = length(field[1])
18216 for (i = 2; i < nfields; i++) {
18217 key = field[i]
18218 keylen = length(key)
18219 if (S_is_set[key]) {
18220 value = S[key]
18221 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18222 len += length(value) + length(field[++i])
18223 substed = 1
18224 } else
18225 len += 1 + keylen
18226 }
18227
18228 print line
18229}
18230
18231_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18234if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18235 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18236else
18237 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018238fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018239 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018240_ACEOF
18241
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018242# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18243# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244# trailing colons and then remove the whole line if VPATH becomes empty
18245# (actually we leave an empty line to preserve line numbers).
18246if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018247 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18248h
18249s///
18250s/^/:/
18251s/[ ]*$/:/
18252s/:\$(srcdir):/:/g
18253s/:\${srcdir}:/:/g
18254s/:@srcdir@:/:/g
18255s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018257x
18258s/\(=[ ]*\).*/\1/
18259G
18260s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261s/^[^=]*=[ ]*$//
18262}'
18263fi
18264
Matthias Kloseb9621712010-04-24 17:59:49 +000018265cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018266fi # test -n "$CONFIG_FILES"
18267
Matthias Kloseb9621712010-04-24 17:59:49 +000018268# Set up the scripts for CONFIG_HEADERS section.
18269# No need to generate them if there are no CONFIG_HEADERS.
18270# This happens for instance with `./config.status Makefile'.
18271if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018272cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018273BEGIN {
18274_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275
Matthias Kloseb9621712010-04-24 17:59:49 +000018276# Transform confdefs.h into an awk script `defines.awk', embedded as
18277# here-document in config.status, that substitutes the proper values into
18278# config.h.in to produce config.h.
18279
18280# Create a delimiter string that does not exist in confdefs.h, to ease
18281# handling of long lines.
18282ac_delim='%!_!# '
18283for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018284 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18285 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018286 break
18287 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018288 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018289 else
18290 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18291 fi
18292done
18293
18294# For the awk script, D is an array of macro values keyed by name,
18295# likewise P contains macro parameters if any. Preserve backslash
18296# newline sequences.
18297
18298ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18299sed -n '
18300s/.\{148\}/&'"$ac_delim"'/g
18301t rset
18302:rset
18303s/^[ ]*#[ ]*define[ ][ ]*/ /
18304t def
18305d
18306:def
18307s/\\$//
18308t bsnl
18309s/["\\]/\\&/g
18310s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18311D["\1"]=" \3"/p
18312s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18313d
18314:bsnl
18315s/["\\]/\\&/g
18316s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18317D["\1"]=" \3\\\\\\n"\\/p
18318t cont
18319s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18320t cont
18321d
18322:cont
18323n
18324s/.\{148\}/&'"$ac_delim"'/g
18325t clear
18326:clear
18327s/\\$//
18328t bsnlc
18329s/["\\]/\\&/g; s/^/"/; s/$/"/p
18330d
18331:bsnlc
18332s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18333b cont
18334' <confdefs.h | sed '
18335s/'"$ac_delim"'/"\\\
18336"/g' >>$CONFIG_STATUS || ac_write_fail=1
18337
18338cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18339 for (key in D) D_is_set[key] = 1
18340 FS = ""
18341}
18342/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18343 line = \$ 0
18344 split(line, arg, " ")
18345 if (arg[1] == "#") {
18346 defundef = arg[2]
18347 mac1 = arg[3]
18348 } else {
18349 defundef = substr(arg[1], 2)
18350 mac1 = arg[2]
18351 }
18352 split(mac1, mac2, "(") #)
18353 macro = mac2[1]
18354 prefix = substr(line, 1, index(line, defundef) - 1)
18355 if (D_is_set[macro]) {
18356 # Preserve the white space surrounding the "#".
18357 print prefix "define", macro P[macro] D[macro]
18358 next
18359 } else {
18360 # Replace #undef with comments. This is necessary, for example,
18361 # in the case of _POSIX_SOURCE, which is predefined and required
18362 # on some systems where configure will not decide to define it.
18363 if (defundef == "undef") {
18364 print "/*", prefix defundef, macro, "*/"
18365 next
18366 }
18367 }
18368}
18369{ print }
18370_ACAWK
18371_ACEOF
18372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018373 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018374fi # test -n "$CONFIG_HEADERS"
18375
18376
18377eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18378shift
18379for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380do
18381 case $ac_tag in
18382 :[FHLC]) ac_mode=$ac_tag; continue;;
18383 esac
18384 case $ac_mode$ac_tag in
18385 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018386 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387 :[FH]-) ac_tag=-:-;;
18388 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18389 esac
18390 ac_save_IFS=$IFS
18391 IFS=:
18392 set x $ac_tag
18393 IFS=$ac_save_IFS
18394 shift
18395 ac_file=$1
18396 shift
18397
18398 case $ac_mode in
18399 :L) ac_source=$1;;
18400 :[FH])
18401 ac_file_inputs=
18402 for ac_f
18403 do
18404 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018405 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 *) # Look for the file first in the build tree, then in the source tree
18407 # (if the path is not absolute). The absolute path cannot be DOS-style,
18408 # because $ac_f cannot contain `:'.
18409 test -f "$ac_f" ||
18410 case $ac_f in
18411 [\\/$]*) false;;
18412 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18413 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018414 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018416 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18417 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418 done
18419
18420 # Let's still pretend it is `configure' which instantiates (i.e., don't
18421 # use $as_me), people would be surprised to read:
18422 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018423 configure_input='Generated from '`
18424 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18425 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426 if test x"$ac_file" != x-; then
18427 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018428 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18429$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018431 # Neutralize special characters interpreted by sed in replacement strings.
18432 case $configure_input in #(
18433 *\&* | *\|* | *\\* )
18434 ac_sed_conf_input=`$as_echo "$configure_input" |
18435 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18436 *) ac_sed_conf_input=$configure_input;;
18437 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438
18439 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018440 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18441 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 esac
18443 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 esac
18445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018446 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018447$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018448 X"$ac_file" : 'X\(//\)[^/]' \| \
18449 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018451$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18453 s//\1/
18454 q
18455 }
18456 /^X\(\/\/\)[^/].*/{
18457 s//\1/
18458 q
18459 }
18460 /^X\(\/\/\)$/{
18461 s//\1/
18462 q
18463 }
18464 /^X\(\/\).*/{
18465 s//\1/
18466 q
18467 }
18468 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018469 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018470 ac_builddir=.
18471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472case "$ac_dir" in
18473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18474*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478 case $ac_top_builddir_sub in
18479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18481 esac ;;
18482esac
18483ac_abs_top_builddir=$ac_pwd
18484ac_abs_builddir=$ac_pwd$ac_dir_suffix
18485# for backward compatibility:
18486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018487
18488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491 ac_top_srcdir=$ac_top_builddir_sub
18492 ac_abs_top_srcdir=$ac_pwd ;;
18493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495 ac_top_srcdir=$srcdir
18496 ac_abs_top_srcdir=$srcdir ;;
18497 *) # Relative name.
18498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18499 ac_top_srcdir=$ac_top_build_prefix$srcdir
18500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018503
Martin v. Löwis11437992002-04-12 09:54:03 +000018504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505 case $ac_mode in
18506 :F)
18507 #
18508 # CONFIG_FILE
18509 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018510
18511 case $INSTALL in
18512 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018514 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018515 ac_MKDIR_P=$MKDIR_P
18516 case $MKDIR_P in
18517 [\\/$]* | ?:[\\/]* ) ;;
18518 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18519 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521
Matthias Kloseb9621712010-04-24 17:59:49 +000018522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523# If the template does not know about datarootdir, expand it.
18524# FIXME: This hack should be removed a few years after 2.60.
18525ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018526ac_sed_dataroot='
18527/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528 p
18529 q
18530}
18531/@datadir@/p
18532/@docdir@/p
18533/@infodir@/p
18534/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018535/@mandir@/p'
18536case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537*datarootdir*) ac_datarootdir_seen=yes;;
18538*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18540$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543 ac_datarootdir_hack='
18544 s&@datadir@&$datadir&g
18545 s&@docdir@&$docdir&g
18546 s&@infodir@&$infodir&g
18547 s&@localedir@&$localedir&g
18548 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018549 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550esac
18551_ACEOF
18552
18553# Neutralize VPATH when `$srcdir' = `.'.
18554# Shell code in configure.ac might set extrasub.
18555# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18557ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018558$extrasub
18559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018561:t
18562/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018563s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018565s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566s&@srcdir@&$ac_srcdir&;t t
18567s&@abs_srcdir@&$ac_abs_srcdir&;t t
18568s&@top_srcdir@&$ac_top_srcdir&;t t
18569s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18570s&@builddir@&$ac_builddir&;t t
18571s&@abs_builddir@&$ac_abs_builddir&;t t
18572s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18573s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018574s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018576"
Victor Stinnere0be4232011-10-25 13:06:09 +020018577eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18578 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018581 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18582 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18583 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018584 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018585which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018586$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018587which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018588
Victor Stinnere0be4232011-10-25 13:06:09 +020018589 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018590 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018591 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18592 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018593 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018594 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018595 ;;
18596 :H)
18597 #
18598 # CONFIG_HEADER
18599 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018600 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018601 {
18602 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018603 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18604 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018605 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018606 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018607 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18608$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018610 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018611 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018612 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018613 fi
18614 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018615 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018616 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018617 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621
18622 esac
18623
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018624
18625 case $ac_file$ac_mode in
18626 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18627
18628 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629done # for ac_tag
18630
Guido van Rossum627b2d71993-12-24 10:39:16 +000018631
Matthias Kloseb9621712010-04-24 17:59:49 +000018632as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018633_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018634ac_clean_files=$ac_clean_files_save
18635
Matthias Kloseb9621712010-04-24 17:59:49 +000018636test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018637 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018638
Martin v. Löwis11437992002-04-12 09:54:03 +000018639
18640# configure is writing to config.log, and then calls config.status.
18641# config.status does its own redirection, appending to config.log.
18642# Unfortunately, on DOS this fails, as config.log is still kept open
18643# by configure, so config.status won't be able to write to it; its
18644# output is simply discarded. So we exec the FD to /dev/null,
18645# effectively closing config.log, so it can be properly (re)opened and
18646# appended to by config.status. When coming back to configure, we
18647# need to make the FD available again.
18648if test "$no_create" != yes; then
18649 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018650 ac_config_status_args=
18651 test "$silent" = yes &&
18652 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018654 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018655 exec 5>>config.log
18656 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18657 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018658 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018659fi
18660if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18662$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018663fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018664
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018665
Christian Heimes75ed8902013-11-20 01:11:18 +010018666echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018667if test ! -f Modules/Setup.local
18668then
18669 echo "# Edit this file for local setup changes" >Modules/Setup.local
18670fi
18671
Christian Heimes75ed8902013-11-20 01:11:18 +010018672echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018673$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018674 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018675 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018676mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018677
18678if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18679 echo "" >&6
18680 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018681 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 +000018682 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018683 echo "" >&6
18684 echo "" >&6
18685fi
18686