blob: 2a933cdbeb6126a047bdf8ae38af0cc934a31e8a [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.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
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'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
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
Miss Islington (bot)24066722019-07-22 13:17:23 -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
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -0700785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
Miss Islington (bot)24066722019-07-22 13:17:23 -0700857PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -0700899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -07001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -07001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001411\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -07001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001477 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001491 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1492 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001505 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1506 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001515 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001516 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001517 --with-lto Enable Link Time Optimization in any build. Disabled
1518 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001519 --with-hash-algorithm=[fnv|siphash24]
1520 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001521 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001522 enable AddressSanitizer (asan)
1523 --with-memory-sanitizer enable MemorySanitizer (msan)
1524 --with-undefined-behavior-sanitizer
1525 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001527 --with-system-expat build pyexpat module using an installed expat
1528 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001529 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001530 --with-system-libmpdec build _decimal module using an installed libmpdec
1531 library
Ned Deilyd819b932013-09-06 01:07:05 -07001532 --with-tcltk-includes='-I...'
1533 override search for Tcl and Tk include files
1534 --with-tcltk-libs='-L...'
1535 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001536 --with-dbmliborder=db1:db2:...
1537 order to check db backends for dbm. Valid value is a
1538 colon separated string with the backend names
1539 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001542 --with(out)-c-locale-coercion
1543 disable/enable C locale coercion to a UTF-8 based
1544 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001545 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001546 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001547 --with-libm=STRING math library
1548 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001549 --with(out)-computed-gotos
1550 Use computed gotos in evaluation loop (enabled by
1551 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001552 --with(out)-ensurepip=[=upgrade]
1553 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001554 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001555 --with-ssl-default-suites=[python|openssl|STRING]
1556 Override default cipher suites string, python: use
1557 Python's preferred selection (default), openssl:
1558 leave OpenSSL's defaults untouched, STRING: use a
1559 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Miss Islington (bot)24066722019-07-22 13:17:23 -07001571 PROFILE_TASK
1572 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001573 PKG_CONFIG path to pkg-config utility
1574 PKG_CONFIG_PATH
1575 directories to add to pkg-config's search path
1576 PKG_CONFIG_LIBDIR
1577 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579Use these variables to override the choices made by `configure' or to help
1580it to find libraries and programs with nonstandard names/locations.
1581
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001582Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001585fi
1586
1587if test "$ac_init_help" = "recursive"; then
1588 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 test -d "$ac_dir" ||
1591 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1592 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_builddir=.
1594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595case "$ac_dir" in
1596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1597*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 case $ac_top_builddir_sub in
1602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1604 esac ;;
1605esac
1606ac_abs_top_builddir=$ac_pwd
1607ac_abs_builddir=$ac_pwd$ac_dir_suffix
1608# for backward compatibility:
1609ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
1611case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 ac_top_srcdir=$ac_top_builddir_sub
1615 ac_abs_top_srcdir=$ac_pwd ;;
1616 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 ac_top_srcdir=$srcdir
1619 ac_abs_top_srcdir=$srcdir ;;
1620 *) # Relative name.
1621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1622 ac_top_srcdir=$ac_top_build_prefix$srcdir
1623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001624esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 cd "$ac_dir" || { ac_status=$?; continue; }
1628 # Check for guested configure.
1629 if test -f "$ac_srcdir/configure.gnu"; then
1630 echo &&
1631 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1632 elif test -f "$ac_srcdir/configure"; then
1633 echo &&
1634 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 fi || ac_status=$?
1638 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 done
1640fi
1641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001643if $ac_init_version; then
1644 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001645python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001647
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001648Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649This configure script is free software; the Free Software Foundation
1650gives unlimited permission to copy, distribute and modify it.
1651_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001654
1655## ------------------------ ##
1656## Autoconf initialization. ##
1657## ------------------------ ##
1658
1659# ac_fn_c_try_compile LINENO
1660# --------------------------
1661# Try to compile conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_compile ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 rm -f conftest.$ac_objext
1666 if { { ac_try="$ac_compile"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_compile") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681 test $ac_status = 0; } && {
1682 test -z "$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 } && test -s conftest.$ac_objext; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_compile
1696
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001697# ac_fn_c_try_cpp LINENO
1698# ----------------------
1699# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_cpp ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { { ac_try="$ac_cpp conftest.$ac_ext"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } > conftest.i && {
1719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 }; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
1729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_cpp
1733
Matthias Kloseb9621712010-04-24 17:59:49 +00001734# ac_fn_c_try_link LINENO
1735# -----------------------
1736# Try to link conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_c_try_link ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext conftest$ac_exeext
1741 if { { ac_try="$ac_link"
1742case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745esac
1746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747$as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_link") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_c_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest$ac_exeext && {
1760 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001761 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 }; then :
1763 ac_retval=0
1764else
1765 $as_echo "$as_me: failed program was:" >&5
1766sed 's/^/| /' conftest.$ac_ext >&5
1767
1768 ac_retval=1
1769fi
1770 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1771 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1772 # interfere with the next link command; also delete a directory that is
1773 # left behind by Apple's compiler. We do this before executing the actions.
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_link
1779
Matthias Kloseb9621712010-04-24 17:59:49 +00001780# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1783# the include files in INCLUDES and setting the cache variable VAR
1784# accordingly.
1785ac_fn_c_check_header_mongrel ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001788 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001791if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793fi
1794eval ac_res=\$$3
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1796$as_echo "$ac_res" >&6; }
1797else
1798 # Is the header compilable?
1799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1800$as_echo_n "checking $2 usability... " >&6; }
1801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 ac_header_compiler=yes
1808else
1809 ac_header_compiler=no
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1813$as_echo "$ac_header_compiler" >&6; }
1814
1815# Is the header present?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1817$as_echo_n "checking $2 presence... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820#include <$2>
1821_ACEOF
1822if ac_fn_c_try_cpp "$LINENO"; then :
1823 ac_header_preproc=yes
1824else
1825 ac_header_preproc=no
1826fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001827rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1829$as_echo "$ac_header_preproc" >&6; }
1830
1831# So? What about this header?
1832case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1833 yes:no: )
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1835$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1838 ;;
1839 no:yes:* )
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1841$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1843$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1845$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1847$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1849$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001850( $as_echo "## --------------------------------------- ##
1851## Report this to https://bugs.python.org/ ##
1852## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 ) | sed "s/^/$as_me: WARNING: /" >&2
1854 ;;
1855esac
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1857$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001858if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001859 $as_echo_n "(cached) " >&6
1860else
1861 eval "$3=\$ac_header_compiler"
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
1866fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001867 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001868
1869} # ac_fn_c_check_header_mongrel
1870
1871# ac_fn_c_try_run LINENO
1872# ----------------------
1873# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1874# that executables *can* be run.
1875ac_fn_c_try_run ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 if { { ac_try="$ac_link"
1879case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_link") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1889 { { case "(($ac_try" in
1890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1891 *) ac_try_echo=$ac_try;;
1892esac
1893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1894$as_echo "$ac_try_echo"; } >&5
1895 (eval "$ac_try") 2>&5
1896 ac_status=$?
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898 test $ac_status = 0; }; }; then :
1899 ac_retval=0
1900else
1901 $as_echo "$as_me: program exited with status $ac_status" >&5
1902 $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905 ac_retval=$ac_status
1906fi
1907 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_run
1912
1913# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1914# -------------------------------------------------------
1915# Tests whether HEADER exists and can be compiled using the include files in
1916# INCLUDES, setting the cache variable VAR accordingly.
1917ac_fn_c_check_header_compile ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928#include <$2>
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 eval "$3=yes"
1932else
1933 eval "$3=no"
1934fi
1935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942} # ac_fn_c_check_header_compile
1943
Matthias Kloseb9621712010-04-24 17:59:49 +00001944# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1945# -------------------------------------------
1946# Tests whether TYPE exists after having included INCLUDES, setting cache
1947# variable VAR accordingly.
1948ac_fn_c_check_type ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 eval "$3=no"
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof ($2))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973int
1974main ()
1975{
1976if (sizeof (($2)))
1977 return 0;
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983
1984else
1985 eval "$3=yes"
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_check_type
1997
Matthias Kloseb9621712010-04-24 17:59:49 +00001998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_hi=$ac_mid; break
2041else
2042 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2043 if test $ac_lo -le $ac_mid; then
2044 ac_lo= ac_hi=
2045 break
2046 fi
2047 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 done
2051else
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002059test_array [0] = 0;
2060return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002076test_array [0] = 0;
2077return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002189if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245
2246} # ac_fn_c_check_func
2247
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002248# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2249# ---------------------------------------------
2250# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2251# accordingly.
2252ac_fn_c_check_decl ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 as_decl_name=`echo $2|sed 's/ *(.*//'`
2256 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2258$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2259if eval \${$3+:} false; then :
2260 $as_echo_n "(cached) " >&6
2261else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268#ifndef $as_decl_name
2269#ifdef __cplusplus
2270 (void) $as_decl_use;
2271#else
2272 (void) $as_decl_name;
2273#endif
2274#endif
2275
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291
2292} # ac_fn_c_check_decl
2293
Matthias Kloseb9621712010-04-24 17:59:49 +00002294# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2295# ----------------------------------------------------
2296# Tries to find if the field MEMBER exists in type AGGR, after including
2297# INCLUDES, setting cache variable VAR accordingly.
2298ac_fn_c_check_member ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2302$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002303if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$5
2325int
2326main ()
2327{
2328static $2 ac_aggr;
2329if (sizeof ac_aggr.$3)
2330return 0;
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$4=yes"
2337else
2338 eval "$4=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$4
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002348
2349} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Ned Deily5489bda2018-01-31 17:44:09 -05002354It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002355generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002391 $as_echo "PATH: $as_dir"
2392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Kloseb9621712010-04-24 17:59:49 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# 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 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Kloseb9621712010-04-24 17:59:49 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598else
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603do
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$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 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703
Christian Heimesff5be6e2018-01-20 13:19:21 +01002704
2705
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002706if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002707 # If we're building out-of-tree, we need to make sure the following
2708 # resources get picked up before their $srcdir counterparts.
2709 # Objects/ -> typeslots.inc
2710 # Include/ -> Python-ast.h, graminit.h
2711 # Python/ -> importlib.h
2712 # (A side effect of this is that these resources will automatically be
2713 # regenerated when building out-of-tree, regardless of whether or not
2714 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2715 # off.)
2716 BASECPPFLAGS="-IObjects -IInclude -IPython"
2717else
2718 BASECPPFLAGS=""
2719fi
2720
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721
2722
2723
2724
Victor Stinner9ed34a82017-05-02 22:35:58 +02002725if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727# Extract the first word of "git", so it can be a program name with args.
2728set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2730$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo_n "(cached) " >&6
2733else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 if test -n "$HAS_GIT"; then
2735 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736else
2737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738for as_dir in $PATH
2739do
2740 IFS=$as_save_IFS
2741 test -z "$as_dir" && as_dir=.
2742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2746 break 2
2747 fi
2748done
2749 done
2750IFS=$as_save_IFS
2751
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
2754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=$ac_cv_prog_HAS_GIT
2756if test -n "$HAS_GIT"; then
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2758$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2761$as_echo "no" >&6; }
2762fi
2763
2764
2765else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769then
Xiang Zhang4c855572018-08-20 22:36:19 +08002770 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2771 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2772 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 GITVERSION=""
2775 GITTAG=""
2776 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777fi
2778
2779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
2782
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002783ac_aux_dir=
2784for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2785 if test -f "$ac_dir/install-sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install-sh -c"
2788 break
2789 elif test -f "$ac_dir/install.sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install.sh -c"
2792 break
2793 elif test -f "$ac_dir/shtool"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/shtool install -c"
2796 break
2797 fi
2798done
2799if test -z "$ac_aux_dir"; then
2800 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2801fi
2802
2803# These three variables are undocumented and unsupported,
2804# and are intended to be withdrawn in a future Autoconf release.
2805# They can cause serious problems if a builder's source tree is in a directory
2806# whose full name contains unusual characters.
2807ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2808ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2809ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2810
2811
2812# Make sure we can run config.sub.
2813$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2814 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2817$as_echo_n "checking build system type... " >&6; }
2818if ${ac_cv_build+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 ac_build_alias=$build_alias
2822test "x$ac_build_alias" = x &&
2823 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2824test "x$ac_build_alias" = x &&
2825 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2826ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2827 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2828
2829fi
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2831$as_echo "$ac_cv_build" >&6; }
2832case $ac_cv_build in
2833*-*-*) ;;
2834*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2835esac
2836build=$ac_cv_build
2837ac_save_IFS=$IFS; IFS='-'
2838set x $ac_cv_build
2839shift
2840build_cpu=$1
2841build_vendor=$2
2842shift; shift
2843# Remember, the first character of IFS is used to create $*,
2844# except with old shells:
2845build_os=$*
2846IFS=$ac_save_IFS
2847case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2848
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2851$as_echo_n "checking host system type... " >&6; }
2852if ${ac_cv_host+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 if test "x$host_alias" = x; then
2856 ac_cv_host=$ac_cv_build
2857else
2858 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2860fi
2861
2862fi
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2864$as_echo "$ac_cv_host" >&6; }
2865case $ac_cv_host in
2866*-*-*) ;;
2867*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2868esac
2869host=$ac_cv_host
2870ac_save_IFS=$IFS; IFS='-'
2871set x $ac_cv_host
2872shift
2873host_cpu=$1
2874host_vendor=$2
2875shift; shift
2876# Remember, the first character of IFS is used to create $*,
2877# except with old shells:
2878host_os=$*
2879IFS=$ac_save_IFS
2880case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2881
2882
2883
doko@python.orga10e4a92013-01-25 18:45:12 +01002884
2885
Ned Deilyfcbc2462014-08-22 13:32:49 -07002886# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2887rm -f pybuilddir.txt
2888
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889for ac_prog in python$PACKAGE_VERSION python3 python
2890do
2891 # Extract the first word of "$ac_prog", so it can be a program name with args.
2892set dummy $ac_prog; ac_word=$2
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2894$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo_n "(cached) " >&6
2897else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 if test -n "$PYTHON_FOR_REGEN"; then
2899 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900else
2901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902for as_dir in $PATH
2903do
2904 IFS=$as_save_IFS
2905 test -z "$as_dir" && as_dir=.
2906 for ac_exec_ext in '' $ac_executable_extensions; do
2907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2910 break 2
2911 fi
2912done
2913 done
2914IFS=$as_save_IFS
2915
2916fi
2917fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2919if test -n "$PYTHON_FOR_REGEN"; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2921$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922else
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2924$as_echo "no" >&6; }
2925fi
2926
2927
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932
2933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934if test "$cross_compiling" = yes; then
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2936$as_echo_n "checking for python interpreter for cross build... " >&6; }
2937 if test -z "$PYTHON_FOR_BUILD"; then
2938 for interp in python$PACKAGE_VERSION python3 python; do
2939 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002940 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 +02002941 break
2942 fi
2943 interp=
2944 done
2945 if test x$interp = x; then
2946 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2947 fi
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2949$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002950 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 +02002951 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002952elif test "$cross_compiling" = maybe; then
2953 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002954else
2955 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
Benjamin Petersond23f8222009-04-05 19:13:16 +00002960if test "$prefix" != "/"; then
2961 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2962fi
2963
2964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965
2966
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002967# We don't use PACKAGE_ variables, and they cause conflicts
2968# with other autoconf-based packages that include Python.h
2969grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2970rm confdefs.h
2971mv confdefs.h.new confdefs.h
2972
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002973
Ned Deily5489bda2018-01-31 17:44:09 -05002974VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002975
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002976# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002977
2978SOVERSION=1.0
2979
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980# The later defininition of _XOPEN_SOURCE disables certain features
2981# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
2985
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991
2992
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998
2999
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
3006
3007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003010# Arguments passed to configure.
3011
3012CONFIG_ARGS="$ac_configure_args"
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3015$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 case $enableval in
3020 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003021 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 # information
3023 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003024 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3027 if test ! -d "${enableval}"
3028 then
3029 enableval=/
3030 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
3034 case $enableval in
3035 no)
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038 ;;
3039 *)
3040 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 if test ! -d "${UNIVERSALSDK}"
3042 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003043 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 ;;
3046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049else
3050
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056if test -n "${UNIVERSALSDK}"
3057then
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3059$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060else
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
Ned Deily87adb6e2013-10-18 21:09:56 -07003067ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069# For backward compatibility reasons we prefer to select '32-bit' if available,
3070# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072if test "`uname -s`" = "Darwin"
3073then
3074 if test -n "${UNIVERSALSDK}"
3075 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003076 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077 then
3078 UNIVERSAL_ARCHS="intel"
3079 fi
3080 fi
3081fi
3082
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3085$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
3087# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090 UNIVERSAL_ARCHS="$withval"
3091
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092fi
3093
Ned Deily87adb6e2013-10-18 21:09:56 -07003094if test -n "${UNIVERSALSDK}"
3095then
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3097$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3098else
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100$as_echo "no" >&6; }
3101fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103
3104# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106 withval=$with_framework_name;
3107 PYTHONFRAMEWORK=${withval}
3108 PYTHONFRAMEWORKDIR=${withval}.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3110
3111else
3112
3113 PYTHONFRAMEWORK=Python
3114 PYTHONFRAMEWORKDIR=Python.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3116
3117fi
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003122 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003124 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 esac
3126 case $enableval in
3127 no)
3128 PYTHONFRAMEWORK=
3129 PYTHONFRAMEWORKDIR=no-framework
3130 PYTHONFRAMEWORKPREFIX=
3131 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST=
3133 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 FRAMEWORKALTINSTALLFIRST=
3135 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 if test "x${prefix}" = "xNONE"; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003143 ;;
3144 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003147 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003148 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003149 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3150 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003151 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 if test "x${prefix}" = "xNONE" ; then
3155 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
3161 case "${enableval}" in
3162 /System*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 if test "${prefix}" = "NONE" ; then
3165 # See below
3166 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3167 fi
3168 ;;
3169
3170 /Library*)
3171 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3172 ;;
3173
3174 */Library/Frameworks)
3175 MDIR="`dirname "${enableval}"`"
3176 MDIR="`dirname "${MDIR}"`"
3177 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3178
3179 if test "${prefix}" = "NONE"; then
3180 # User hasn't specified the
3181 # --prefix option, but wants to install
3182 # the framework in a non-default location,
3183 # ensure that the compatibility links get
3184 # installed relative to that prefix as well
3185 # instead of in /usr/local.
3186 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3187 fi
3188 ;;
3189
3190 *)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 ;;
3193 esac
3194
Jack Jansen127e56e2001-09-11 14:41:54 +00003195 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003197 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003203 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3204
3205 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3206
Jack Jansene578a632001-08-15 01:27:14 +00003207 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Guido van Rossum563e7081996-09-10 18:20:48 +00003209else
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003212 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORKPREFIX=
3214 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215 FRAMEWORKINSTALLFIRST=
3216 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 FRAMEWORKALTINSTALLFIRST=
3218 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003219 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 if test "x${prefix}" = "xNONE" ; then
3221 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3222 else
3223 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3224 fi
Jack Jansene578a632001-08-15 01:27:14 +00003225 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228fi
3229
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
3231
Michael W. Hudson54241132001-12-07 15:38:26 +00003232
3233
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003237
3238
3239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003241
Ned Deilyb8f944f2013-11-21 22:42:25 -08003242
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003243
3244cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003245#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003246_ACEOF
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003250## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003251## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003252##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253# Set name for machine-dependent library files
3254
Matthias Kloseb9621712010-04-24 17:59:49 +00003255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3256$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257if test -z "$MACHDEP"
3258then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 # avoid using uname for cross builds
3260 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003261 # ac_sys_system and ac_sys_release are used for setting
3262 # a lot of different things including 'define_xopen_source'
3263 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003265 *-*-linux-android*)
3266 ac_sys_system=Linux-android
3267 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 *-*-linux*)
3269 ac_sys_system=Linux
3270 ;;
3271 *-*-cygwin*)
3272 ac_sys_system=Cygwin
3273 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003274 *-*-vxworks*)
3275 ac_sys_system=VxWorks
3276 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003299 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003300 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003301 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003302 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3307$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003308
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003309
3310if test "$cross_compiling" = yes; then
3311 case "$host" in
3312 *-*-linux*)
3313 case "$host_cpu" in
3314 arm*)
3315 _host_cpu=arm
3316 ;;
3317 *)
3318 _host_cpu=$host_cpu
3319 esac
3320 ;;
3321 *-*-cygwin*)
3322 _host_cpu=
3323 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003324 *-*-vxworks*)
3325 _host_cpu=$host_cpu
3326 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327 *)
3328 # for now, limit cross builds to known configurations
3329 MACHDEP="unknown"
3330 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3331 esac
3332 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3333fi
3334
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003335# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3336# disable features if it is defined, without any means to access these
3337# features as extensions. For these systems, we skip the definition of
3338# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3339# some feature, make sure there is no alternative way to access this
3340# feature. Also, when using wildcards, make sure you have verified the
3341# need for not defining _XOPEN_SOURCE on all systems matching the
3342# wildcard, and that the wildcard does not include future systems
3343# (which may remove their limitations).
3344case $ac_sys_system/$ac_sys_release in
3345 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3346 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003347 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003348 # In addition, Stefan Krah confirms that issue #1244610 exists through
3349 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003350 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003351 define_xopen_source=no
3352 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3353 # also defined. This can be overridden by defining _BSD_SOURCE
3354 # As this has a different meaning on Linux, only define it on OpenBSD
3355
Matthias Kloseb9621712010-04-24 17:59:49 +00003356$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003357
3358 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003359 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003365
3366 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003367 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3368 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3369 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003370 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 +00003371 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003372 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3373 # request to enable features supported by the standard as a request
3374 # to disable features not supported by the standard. The best way
3375 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3376 # entirely and define __EXTENSIONS__ instead.
3377 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003378 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3380 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003381 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003382 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003383 define_xopen_source=no;;
3384 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003385 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003387 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003388 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3389 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3390 # identifies itself as Darwin/7.*
3391 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3392 # disables platform specific features beyond repair.
3393 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3394 # has no effect, don't bother defining them
3395 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003396 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003397 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003398 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003399 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3400 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3401 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003402 AIX/4)
3403 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003404 AIX/5)
3405 if test `uname -r` -eq 1; then
3406 define_xopen_source=no
3407 fi
3408 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003409 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3410 # defining NI_NUMERICHOST.
3411 QNX/6.3.2)
3412 define_xopen_source=no
3413 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003414 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3415 # in network headers still using system V types.
3416 VxWorks/*)
3417 define_xopen_source=no
3418 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003419
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420esac
3421
3422if test $define_xopen_source = yes
3423then
Victor Stinner14d098d2011-09-07 22:29:43 +02003424 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Victor Stinner14d098d2011-09-07 22:29:43 +02003426$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3430 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3431 # several APIs are not declared. Since this is also needed in some
3432 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Matthias Kloseb9621712010-04-24 17:59:49 +00003434$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003437
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003438$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440fi
3441
Christian Heimes647cd872013-12-07 23:39:33 +01003442# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3443case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003444 hp*|HP*)
3445 define_stdc_a1=yes;;
3446 *)
3447 define_stdc_a1=no;;
3448esac
3449
3450if test $define_stdc_a1 = yes
3451then
Christian Heimes647cd872013-12-07 23:39:33 +01003452
3453$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3454
Christian Heimesb02bcae2013-12-08 15:21:08 +01003455fi
Christian Heimes647cd872013-12-07 23:39:33 +01003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3458# it may influence the way we can build extensions, so distutils
3459# needs to check it
3460
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461
Jack Jansen6b08a402004-06-03 12:41:45 +00003462CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003463EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003464
Guido van Rossum627b2d71993-12-24 10:39:16 +00003465# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003466
3467# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3468# for debug/optimization stuff. BASECFLAGS is for flags that are required
3469# just to get things to compile and link. Users are free to override OPT
3470# when running configure or make. The build should not break if they do.
3471# BASECFLAGS should generally not be messed with, however.
3472
Guido van Rossum8b131c51995-03-09 14:10:13 +00003473# If the user switches compilers, we can't believe the cache
3474if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3475then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003476 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003477(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003478fi
3479
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003480# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3481# when the compiler supports them, but we don't always want -O2, and
3482# we set -g later.
3483if test -z "$CFLAGS"; then
3484 CFLAGS=
3485fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486
3487if test "$ac_sys_system" = "Darwin"
3488then
3489 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003490 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 # information
3492 if test -z "${CC}"
3493 then
3494 found_gcc=
3495 found_clang=
3496 as_save_IFS=$IFS; IFS=:
3497 for as_dir in $PATH
3498 do
3499 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003500 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003502 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003503 fi
3504 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003505 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003507 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508 fi
3509 fi
3510 done
3511 IFS=$as_save_IFS
3512
3513 if test -n "$found_gcc" -a -n "$found_clang"
3514 then
3515 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3516 then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3518$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3519 CC="$found_clang"
3520 CXX="$found_clang++"
3521 fi
3522
3523
3524 elif test -z "$found_gcc" -a -n "$found_clang"
3525 then
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3527$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3528 CC="$found_clang"
3529 CXX="$found_clang++"
3530
3531 elif test -z "$found_gcc" -a -z "$found_clang"
3532 then
3533 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3534 if test -n "${found_clang}"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3537$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3538 CC="${found_clang}"
3539 CXX="`/usr/bin/xcrun -find clang++`"
3540
3541 # else: use default behaviour
3542 fi
3543 fi
3544 fi
3545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546ac_ext=c
3547ac_cpp='$CPP $CPPFLAGS'
3548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550ac_compiler_gnu=$ac_cv_c_compiler_gnu
3551if test -n "$ac_tool_prefix"; then
3552 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3553set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3555$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003556if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003558else
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
3561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 $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 +00003571 break 2
3572 fi
3573done
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003576
Jack Jansendd19cf82001-12-06 22:36:17 +00003577fi
3578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003580if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003583else
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003586fi
3587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589fi
3590if test -z "$ac_cv_prog_CC"; then
3591 ac_ct_CC=$CC
3592 # Extract the first word of "gcc", so it can be a program name with args.
3593set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003596if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003598else
3599 if test -n "$ac_ct_CC"; then
3600 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3601else
3602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603for as_dir in $PATH
3604do
3605 IFS=$as_save_IFS
3606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 break 2
3612 fi
3613done
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003616
3617fi
3618fi
3619ac_ct_CC=$ac_cv_prog_ac_ct_CC
3620if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3622$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 if test "x$ac_ct_CC" = x; then
3629 CC=""
3630 else
3631 case $cross_compiling:$ac_tool_warned in
3632yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635ac_tool_warned=yes ;;
3636esac
3637 CC=$ac_ct_CC
3638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642
Jack Jansendd19cf82001-12-06 22:36:17 +00003643if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test -n "$ac_tool_prefix"; then
3645 # 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 +00003646set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3648$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003649if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003651else
3652 if test -n "$CC"; then
3653 ac_cv_prog_CC="$CC" # Let the user override the test.
3654else
Martin v. Löwis11437992002-04-12 09:54:03 +00003655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656for as_dir in $PATH
3657do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 $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 +00003664 break 2
3665 fi
3666done
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003669
3670fi
3671fi
3672CC=$ac_cv_prog_CC
3673if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3675$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3678$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684if test -z "$CC"; then
3685 # Extract the first word of "cc", so it can be a program name with args.
3686set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003689if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
3692 if test -n "$CC"; then
3693 ac_cv_prog_CC="$CC" # Let the user override the test.
3694else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699 IFS=$as_save_IFS
3700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3704 ac_prog_rejected=yes
3705 continue
3706 fi
3707 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $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 +00003709 break 2
3710 fi
3711done
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003714
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715if test $ac_prog_rejected = yes; then
3716 # We found a bogon in the path, so make sure we never use it.
3717 set dummy $ac_cv_prog_CC
3718 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 # We chose a different compiler from the bogus one.
3721 # However, it has the same basename, so the bogon will be chosen
3722 # first if we set CC to just the basename; use the full file name.
3723 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003724 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 fi
3726fi
3727fi
3728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
3740if test -z "$CC"; then
3741 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 do
3744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3747$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003748if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003750else
3751 if test -n "$CC"; then
3752 ac_cv_prog_CC="$CC" # Let the user override the test.
3753else
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $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 +00003763 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
3769fi
3770fi
3771CC=$ac_cv_prog_CC
3772if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3774$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3777$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003778fi
3779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 test -n "$CC" && break
3782 done
3783fi
3784if test -z "$CC"; then
3785 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787do
3788 # Extract the first word of "$ac_prog", so it can be a program name with args.
3789set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
3795 if test -n "$ac_ct_CC"; then
3796 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3797else
3798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
3808 fi
3809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
3814fi
3815ac_ct_CC=$ac_cv_prog_ac_ct_CC
3816if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3818$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$ac_ct_CC" && break
3826done
Michael W. Hudson54241132001-12-07 15:38:26 +00003827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828 if test "x$ac_ct_CC" = x; then
3829 CC=""
3830 else
3831 case $cross_compiling:$ac_tool_warned in
3832yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835ac_tool_warned=yes ;;
3836esac
3837 CC=$ac_ct_CC
3838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840
3841fi
3842
3843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003846as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003847See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848
3849# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003850$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3851set X $ac_compile
3852ac_compiler=$2
3853for ac_option in --version -v -V -qversion; do
3854 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855case "(($ac_try" in
3856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857 *) ac_try_echo=$ac_try;;
3858esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3860$as_echo "$ac_try_echo"; } >&5
3861 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 if test -s conftest.err; then
3864 sed '10a\
3865... rest of stderr output deleted ...
3866 10q' conftest.err >conftest.er1
3867 cat conftest.er1 >&5
3868 fi
3869 rm -f conftest.er1 conftest.err
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }
3872done
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
3885ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003886ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003887# Try to create an executable without -o first, disregard a.out.
3888# It will help us diagnose broken compilers, and finding out an intuition
3889# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3891$as_echo_n "checking whether the C compiler works... " >&6; }
3892ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3893
3894# The possible output files:
3895ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897ac_rmfiles=
3898for ac_file in $ac_files
3899do
3900 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3903 esac
3904done
3905rm -f $ac_rmfiles
3906
Matthias Kloseb9621712010-04-24 17:59:49 +00003907if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3919# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3920# in a Makefile. We should not override ac_cv_exeext if it was cached,
3921# so that the user can short-circuit this test for compilers unknown to
3922# Autoconf.
3923for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003924do
3925 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928 ;;
3929 [ab].out )
3930 # We found the default executable, but exeext='' is most
3931 # certainly right.
3932 break;;
3933 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 then :; else
3936 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3937 fi
3938 # We set ac_cv_exeext here because the later test for it is not
3939 # safe: cross compilers may not add the suffix if given an `-o'
3940 # argument, so we may need to know it at that point already.
3941 # Even if this section looks crufty: it has the advantage of
3942 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 break;;
3944 * )
3945 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 esac
3947done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948test "$ac_cv_exeext" = no && ac_cv_exeext=
3949
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003950else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 ac_file=''
3952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if test -z "$ac_file"; then :
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3955$as_echo "no" >&6; }
3956$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003957sed 's/^/| /' conftest.$ac_ext >&5
3958
Matthias Kloseb9621712010-04-24 17:59:49 +00003959{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003961as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003962See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003963else
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3965$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3968$as_echo_n "checking for C compiler default output file name... " >&6; }
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3970$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3976$as_echo_n "checking for suffix of executables... " >&6; }
3977if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3987 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3989# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3990# work properly (i.e., refer to `conftest.exe'), while it won't with
3991# `rm'.
3992for ac_file in conftest.exe conftest conftest.*; do
3993 test -f "$ac_file" || continue
3994 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3997 break;;
3998 * ) break;;
3999 esac
4000done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001else
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007rm -f conftest conftest$ac_cv_exeext
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4009$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
4011rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004012EXEEXT=$ac_cv_exeext
4013ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015/* end confdefs.h. */
4016#include <stdio.h>
4017int
4018main ()
4019{
4020FILE *f = fopen ("conftest.out", "w");
4021 return ferror (f) || fclose (f) != 0;
4022
4023 ;
4024 return 0;
4025}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004027ac_clean_files="$ac_clean_files conftest.out"
4028# Check that the compiler produces executables we can run. If not, either
4029# the compiler is broken, or we cross compile.
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4031$as_echo_n "checking whether we are cross compiling... " >&6; }
4032if test "$cross_compiling" != yes; then
4033 { { ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
4038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4039$as_echo "$ac_try_echo"; } >&5
4040 (eval "$ac_link") 2>&5
4041 ac_status=$?
4042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4043 test $ac_status = 0; }
4044 if { ac_try='./conftest$ac_cv_exeext'
4045 { { case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_try") 2>&5
4052 ac_status=$?
4053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }; }; then
4055 cross_compiling=no
4056 else
4057 if test "$cross_compiling" = maybe; then
4058 cross_compiling=yes
4059 else
4060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004063If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004064See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 fi
4066 fi
4067fi
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4069$as_echo "$cross_compiling" >&6; }
4070
4071rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4072ac_clean_files=$ac_clean_files_save
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4074$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004075if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo_n "(cached) " >&6
4077else
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004079/* end confdefs.h. */
4080
4081int
4082main ()
4083{
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004090if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 for ac_file in conftest.o conftest.obj conftest.*; do
4102 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4106 break;;
4107 esac
4108done
4109else
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004111sed 's/^/| /' conftest.$ac_ext >&5
4112
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004115as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004116See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004117fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4121$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004122OBJEXT=$ac_cv_objext
4123ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4125$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004126if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
Martin v. Löwis11437992002-04-12 09:54:03 +00004132int
4133main ()
4134{
4135#ifndef __GNUC__
4136 choke me
4137#endif
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_compiler_gnu=yes
4145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004149ac_cv_c_compiler_gnu=$ac_compiler_gnu
4150
4151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4153$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4154if test $ac_compiler_gnu = yes; then
4155 GCC=yes
4156else
4157 GCC=
4158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_test_CFLAGS=${CFLAGS+set}
4160ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4162$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166 ac_save_c_werror_flag=$ac_c_werror_flag
4167 ac_c_werror_flag=yes
4168 ac_cv_prog_cc_g=no
4169 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Martin v. Löwis11437992002-04-12 09:54:03 +00004173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004182 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 CFLAGS=""
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186/* end confdefs.h. */
4187
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197
Matthias Kloseb9621712010-04-24 17:59:49 +00004198else
4199 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4220 ac_c_werror_flag=$ac_save_c_werror_flag
4221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4223$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004224if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004226elif test $ac_cv_prog_cc_g = yes; then
4227 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 CFLAGS="-g -O2"
4229 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004230 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231 fi
4232else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004233 if test "$GCC" = yes; then
4234 CFLAGS="-O2"
4235 else
4236 CFLAGS=
4237 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4240$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004241if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004243else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004245ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#include <stdarg.h>
4249#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004250struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004251/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4252struct buf { int x; };
4253FILE * (*rcsopen) (struct buf *, struct stat *, int);
4254static char *e (p, i)
4255 char **p;
4256 int i;
4257{
4258 return p[i];
4259}
4260static char *f (char * (*g) (char **, int), char **p, ...)
4261{
4262 char *s;
4263 va_list v;
4264 va_start (v,p);
4265 s = g (p, va_arg (v,int));
4266 va_end (v);
4267 return s;
4268}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004269
4270/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4271 function prototypes and stuff, but not '\xHH' hex character constants.
4272 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004274 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4275 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004277int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4280 inside strings and character constants. */
4281#define FOO(x) 'x'
4282int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4283
Skip Montanaro6dead952003-09-25 14:50:04 +00004284int test (int i, double x);
4285struct s1 {int (*f) (int a);};
4286struct s2 {int (*f) (double a);};
4287int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4288int argc;
4289char **argv;
4290int
4291main ()
4292{
4293return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4294 ;
4295 return 0;
4296}
4297_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4299 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004300do
4301 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305rm -f core conftest.err conftest.$ac_objext
4306 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004307done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309CC=$ac_save_CC
4310
4311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312# AC_CACHE_VAL
4313case "x$ac_cv_prog_cc_c89" in
4314 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4316$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4319$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004320 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4323$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004326
Matthias Kloseb9621712010-04-24 17:59:49 +00004327fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004328
Martin v. Löwis11437992002-04-12 09:54:03 +00004329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4341$as_echo_n "checking how to run the C preprocessor... " >&6; }
4342# On Suns, sometimes $CPP names a directory.
4343if test -n "$CPP" && test -d "$CPP"; then
4344 CPP=
4345fi
4346if test -z "$CPP"; then
4347 if ${ac_cv_prog_CPP+:} false; then :
4348 $as_echo_n "(cached) " >&6
4349else
4350 # Double quotes because CPP needs to be expanded
4351 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4352 do
4353 ac_preproc_ok=false
4354for ac_c_preproc_warn_flag in '' yes
4355do
4356 # Use a header file that comes with gcc, so configuring glibc
4357 # with a fresh cross-compiler works.
4358 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4359 # <limits.h> exists even on freestanding compilers.
4360 # On the NeXT, cc -E runs the code through the compiler's parser,
4361 # not just through cpp. "Syntax error" is here to catch this case.
4362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4363/* end confdefs.h. */
4364#ifdef __STDC__
4365# include <limits.h>
4366#else
4367# include <assert.h>
4368#endif
4369 Syntax error
4370_ACEOF
4371if ac_fn_c_try_cpp "$LINENO"; then :
4372
4373else
4374 # Broken: fails on valid input.
4375continue
4376fi
4377rm -f conftest.err conftest.i conftest.$ac_ext
4378
4379 # OK, works on sane cases. Now check whether nonexistent headers
4380 # can be detected and how.
4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382/* end confdefs.h. */
4383#include <ac_nonexistent.h>
4384_ACEOF
4385if ac_fn_c_try_cpp "$LINENO"; then :
4386 # Broken: success on invalid input.
4387continue
4388else
4389 # Passes both tests.
4390ac_preproc_ok=:
4391break
4392fi
4393rm -f conftest.err conftest.i conftest.$ac_ext
4394
4395done
4396# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4397rm -f conftest.i conftest.err conftest.$ac_ext
4398if $ac_preproc_ok; then :
4399 break
4400fi
4401
4402 done
4403 ac_cv_prog_CPP=$CPP
4404
4405fi
4406 CPP=$ac_cv_prog_CPP
4407else
4408 ac_cv_prog_CPP=$CPP
4409fi
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4411$as_echo "$CPP" >&6; }
4412ac_preproc_ok=false
4413for ac_c_preproc_warn_flag in '' yes
4414do
4415 # Use a header file that comes with gcc, so configuring glibc
4416 # with a fresh cross-compiler works.
4417 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4418 # <limits.h> exists even on freestanding compilers.
4419 # On the NeXT, cc -E runs the code through the compiler's parser,
4420 # not just through cpp. "Syntax error" is here to catch this case.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#ifdef __STDC__
4424# include <limits.h>
4425#else
4426# include <assert.h>
4427#endif
4428 Syntax error
4429_ACEOF
4430if ac_fn_c_try_cpp "$LINENO"; then :
4431
4432else
4433 # Broken: fails on valid input.
4434continue
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438 # OK, works on sane cases. Now check whether nonexistent headers
4439 # can be detected and how.
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h. */
4442#include <ac_nonexistent.h>
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445 # Broken: success on invalid input.
4446continue
4447else
4448 # Passes both tests.
4449ac_preproc_ok=:
4450break
4451fi
4452rm -f conftest.err conftest.i conftest.$ac_ext
4453
4454done
4455# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4456rm -f conftest.i conftest.err conftest.$ac_ext
4457if $ac_preproc_ok; then :
4458
4459else
4460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4462as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4463See \`config.log' for more details" "$LINENO" 5; }
4464fi
4465
4466ac_ext=c
4467ac_cpp='$CPP $CPPFLAGS'
4468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4470ac_compiler_gnu=$ac_cv_c_compiler_gnu
4471
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4473$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4474if ${ac_cv_path_GREP+:} false; then :
4475 $as_echo_n "(cached) " >&6
4476else
4477 if test -z "$GREP"; then
4478 ac_path_GREP_found=false
4479 # Loop through the user's path and test for each of PROGNAME-LIST
4480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4482do
4483 IFS=$as_save_IFS
4484 test -z "$as_dir" && as_dir=.
4485 for ac_prog in grep ggrep; do
4486 for ac_exec_ext in '' $ac_executable_extensions; do
4487 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4488 as_fn_executable_p "$ac_path_GREP" || continue
4489# Check for GNU ac_path_GREP and select it if it is found.
4490 # Check for GNU $ac_path_GREP
4491case `"$ac_path_GREP" --version 2>&1` in
4492*GNU*)
4493 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4494*)
4495 ac_count=0
4496 $as_echo_n 0123456789 >"conftest.in"
4497 while :
4498 do
4499 cat "conftest.in" "conftest.in" >"conftest.tmp"
4500 mv "conftest.tmp" "conftest.in"
4501 cp "conftest.in" "conftest.nl"
4502 $as_echo 'GREP' >> "conftest.nl"
4503 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4504 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4505 as_fn_arith $ac_count + 1 && ac_count=$as_val
4506 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4507 # Best one so far, save it but keep looking for a better one
4508 ac_cv_path_GREP="$ac_path_GREP"
4509 ac_path_GREP_max=$ac_count
4510 fi
4511 # 10*(2^10) chars as input seems more than enough
4512 test $ac_count -gt 10 && break
4513 done
4514 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4515esac
4516
4517 $ac_path_GREP_found && break 3
4518 done
4519 done
4520 done
4521IFS=$as_save_IFS
4522 if test -z "$ac_cv_path_GREP"; then
4523 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4524 fi
4525else
4526 ac_cv_path_GREP=$GREP
4527fi
4528
4529fi
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4531$as_echo "$ac_cv_path_GREP" >&6; }
4532 GREP="$ac_cv_path_GREP"
4533
4534
Łukasz Langaa785c872016-09-09 17:37:37 -07004535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4536$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4537if ${ac_cv_path_SED+:} false; then :
4538 $as_echo_n "(cached) " >&6
4539else
4540 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4541 for ac_i in 1 2 3 4 5 6 7; do
4542 ac_script="$ac_script$as_nl$ac_script"
4543 done
4544 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4545 { ac_script=; unset ac_script;}
4546 if test -z "$SED"; then
4547 ac_path_SED_found=false
4548 # Loop through the user's path and test for each of PROGNAME-LIST
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
4554 for ac_prog in sed gsed; do
4555 for ac_exec_ext in '' $ac_executable_extensions; do
4556 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4557 as_fn_executable_p "$ac_path_SED" || continue
4558# Check for GNU ac_path_SED and select it if it is found.
4559 # Check for GNU $ac_path_SED
4560case `"$ac_path_SED" --version 2>&1` in
4561*GNU*)
4562 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4563*)
4564 ac_count=0
4565 $as_echo_n 0123456789 >"conftest.in"
4566 while :
4567 do
4568 cat "conftest.in" "conftest.in" >"conftest.tmp"
4569 mv "conftest.tmp" "conftest.in"
4570 cp "conftest.in" "conftest.nl"
4571 $as_echo '' >> "conftest.nl"
4572 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4573 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4574 as_fn_arith $ac_count + 1 && ac_count=$as_val
4575 if test $ac_count -gt ${ac_path_SED_max-0}; then
4576 # Best one so far, save it but keep looking for a better one
4577 ac_cv_path_SED="$ac_path_SED"
4578 ac_path_SED_max=$ac_count
4579 fi
4580 # 10*(2^10) chars as input seems more than enough
4581 test $ac_count -gt 10 && break
4582 done
4583 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4584esac
4585
4586 $ac_path_SED_found && break 3
4587 done
4588 done
4589 done
4590IFS=$as_save_IFS
4591 if test -z "$ac_cv_path_SED"; then
4592 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4593 fi
4594else
4595 ac_cv_path_SED=$SED
4596fi
4597
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4600$as_echo "$ac_cv_path_SED" >&6; }
4601 SED="$ac_cv_path_SED"
4602 rm -f conftest.sed
4603
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004604
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605
4606
Matthias Kloseb9621712010-04-24 17:59:49 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4608$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004610# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004611if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
4614 case $withval in
4615 no) with_cxx_main=no
4616 MAINCC='$(CC)';;
4617 yes) with_cxx_main=yes
4618 MAINCC='$(CXX)';;
4619 *) with_cxx_main=yes
4620 MAINCC=$withval
4621 if test -z "$CXX"
4622 then
4623 CXX=$withval
4624 fi;;
4625 esac
4626else
4627
4628 with_cxx_main=no
4629 MAINCC='$(CC)'
4630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4634$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636preset_cxx="$CXX"
4637if test -z "$CXX"
4638then
4639 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 gcc) if test -n "$ac_tool_prefix"; then
4641 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4642set dummy ${ac_tool_prefix}g++; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_CXX+:} false; then :
4646 $as_echo_n "(cached) " >&6
4647else
4648 case $CXX in
4649 [\\/]* | ?:[\\/]*)
4650 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4651 ;;
4652 *)
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in notfound
4655do
4656 IFS=$as_save_IFS
4657 test -z "$as_dir" && as_dir=.
4658 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662 break 2
4663 fi
4664done
4665 done
4666IFS=$as_save_IFS
4667
4668 ;;
4669esac
4670fi
4671CXX=$ac_cv_path_CXX
4672if test -n "$CXX"; then
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4674$as_echo "$CXX" >&6; }
4675else
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681fi
4682if test -z "$ac_cv_path_CXX"; then
4683 ac_pt_CXX=$CXX
4684 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004685set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688if ${ac_cv_path_ac_pt_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690else
4691 case $ac_pt_CXX in
4692 [\\/]* | ?:[\\/]*)
4693 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4694 ;;
4695 *)
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in notfound
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
4707done
4708 done
4709IFS=$as_save_IFS
4710
4711 ;;
4712esac
4713fi
4714ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4715if test -n "$ac_pt_CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4717$as_echo "$ac_pt_CXX" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723 if test "x$ac_pt_CXX" = x; then
4724 CXX="g++"
4725 else
4726 case $cross_compiling:$ac_tool_warned in
4727yes:)
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4730ac_tool_warned=yes ;;
4731esac
4732 CXX=$ac_pt_CXX
4733 fi
4734else
4735 CXX="$ac_cv_path_CXX"
4736fi
4737 ;;
4738 cc) if test -n "$ac_tool_prefix"; then
4739 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4740set dummy ${ac_tool_prefix}c++; ac_word=$2
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004743if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745else
4746 case $CXX in
4747 [\\/]* | ?:[\\/]*)
4748 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4749 ;;
4750 *)
4751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in notfound
4753do
4754 IFS=$as_save_IFS
4755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760 break 2
4761 fi
4762done
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 ;;
4767esac
4768fi
4769CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004770if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4772$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004773else
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004777
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778
4779fi
4780if test -z "$ac_cv_path_CXX"; then
4781 ac_pt_CXX=$CXX
4782 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004786if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 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 +00004792 ;;
4793 *)
4794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in notfound
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 break 2
4804 fi
4805done
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 ;;
4810esac
4811fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4813if test -n "$ac_pt_CXX"; then
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4815$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816else
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004820
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 if test "x$ac_pt_CXX" = x; then
4822 CXX="c++"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_pt_CXX
4831 fi
4832else
4833 CXX="$ac_cv_path_CXX"
4834fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 clang|*/clang) if test -n "$ac_tool_prefix"; then
4837 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4838set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if ${ac_cv_path_CXX+:} false; then :
4842 $as_echo_n "(cached) " >&6
4843else
4844 case $CXX in
4845 [\\/]* | ?:[\\/]*)
4846 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in notfound
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004856 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860done
4861 done
4862IFS=$as_save_IFS
4863
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864 ;;
4865esac
4866fi
4867CXX=$ac_cv_path_CXX
4868if test -n "$CXX"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4870$as_echo "$CXX" >&6; }
4871else
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876
4877fi
4878if test -z "$ac_cv_path_CXX"; then
4879 ac_pt_CXX=$CXX
4880 # Extract the first word of "clang++", so it can be a program name with args.
4881set dummy clang++; ac_word=$2
4882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883$as_echo_n "checking for $ac_word... " >&6; }
4884if ${ac_cv_path_ac_pt_CXX+:} false; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 case $ac_pt_CXX in
4888 [\\/]* | ?:[\\/]*)
4889 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4890 ;;
4891 *)
4892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893for as_dir in notfound
4894do
4895 IFS=$as_save_IFS
4896 test -z "$as_dir" && as_dir=.
4897 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004899 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901 break 2
4902 fi
4903done
4904 done
4905IFS=$as_save_IFS
4906
4907 ;;
4908esac
4909fi
4910ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4911if test -n "$ac_pt_CXX"; then
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4913$as_echo "$ac_pt_CXX" >&6; }
4914else
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916$as_echo "no" >&6; }
4917fi
4918
4919 if test "x$ac_pt_CXX" = x; then
4920 CXX="clang++"
4921 else
4922 case $cross_compiling:$ac_tool_warned in
4923yes:)
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4926ac_tool_warned=yes ;;
4927esac
4928 CXX=$ac_pt_CXX
4929 fi
4930else
4931 CXX="$ac_cv_path_CXX"
4932fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004933 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004934 icc|*/icc) if test -n "$ac_tool_prefix"; then
4935 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4936set dummy ${ac_tool_prefix}icpc; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_CXX+:} false; then :
4940 $as_echo_n "(cached) " >&6
4941else
4942 case $CXX in
4943 [\\/]* | ?:[\\/]*)
4944 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4945 ;;
4946 *)
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in notfound
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
4953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962 ;;
4963esac
4964fi
4965CXX=$ac_cv_path_CXX
4966if test -n "$CXX"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4968$as_echo "$CXX" >&6; }
4969else
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974
4975fi
4976if test -z "$ac_cv_path_CXX"; then
4977 ac_pt_CXX=$CXX
4978 # Extract the first word of "icpc", so it can be a program name with args.
4979set dummy icpc; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_ac_pt_CXX+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 case $ac_pt_CXX in
4986 [\\/]* | ?:[\\/]*)
4987 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4988 ;;
4989 *)
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in notfound
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999 break 2
5000 fi
5001done
5002 done
5003IFS=$as_save_IFS
5004
5005 ;;
5006esac
5007fi
5008ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5009if test -n "$ac_pt_CXX"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5011$as_echo "$ac_pt_CXX" >&6; }
5012else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017 if test "x$ac_pt_CXX" = x; then
5018 CXX="icpc"
5019 else
5020 case $cross_compiling:$ac_tool_warned in
5021yes:)
5022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5024ac_tool_warned=yes ;;
5025esac
5026 CXX=$ac_pt_CXX
5027 fi
5028else
5029 CXX="$ac_cv_path_CXX"
5030fi
5031 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032 esac
5033 if test "$CXX" = "notfound"
5034 then
5035 CXX=""
5036 fi
5037fi
5038if test -z "$CXX"
5039then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 if test -n "$ac_tool_prefix"; then
5041 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5042 do
5043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005047if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
5050 if test -n "$CXX"; then
5051 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067
5068fi
5069fi
5070CXX=$ac_cv_prog_CXX
5071if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077fi
5078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 test -n "$CXX" && break
5081 done
5082fi
5083if test -z "$CXX"; then
5084 ac_ct_CXX=$CXX
5085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5086do
5087 # Extract the first word of "$ac_prog", so it can be a program name with args.
5088set dummy $ac_prog; ac_word=$2
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
5091if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5092 $as_echo_n "(cached) " >&6
5093else
5094 if test -n "$ac_ct_CXX"; then
5095 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5096else
5097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
5102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 ac_cv_prog_ac_ct_CXX="$ac_prog"
5105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106 break 2
5107 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005109 done
5110IFS=$as_save_IFS
5111
5112fi
5113fi
5114ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5115if test -n "$ac_ct_CXX"; then
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5117$as_echo "$ac_ct_CXX" >&6; }
5118else
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
5121fi
5122
5123
5124 test -n "$ac_ct_CXX" && break
5125done
5126
5127 if test "x$ac_ct_CXX" = x; then
5128 CXX="notfound"
5129 else
5130 case $cross_compiling:$ac_tool_warned in
5131yes:)
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5134ac_tool_warned=yes ;;
5135esac
5136 CXX=$ac_ct_CXX
5137 fi
5138fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139
5140 if test "$CXX" = "notfound"
5141 then
5142 CXX=""
5143 fi
5144fi
5145if test "$preset_cxx" != "$CXX"
5146then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005147 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148
5149 By default, distutils will build C++ extension modules with \"$CXX\".
5150 If this is not intended, then set CXX on the configure command line.
5151 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005152$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005153
5154 By default, distutils will build C++ extension modules with \"$CXX\".
5155 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005156 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005157fi
5158
5159
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005160MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5161
5162
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5164$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5165cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005166#undef bfin
5167#undef cris
5168#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005170#undef hppa
5171#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005172#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005173#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005174#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005175#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005176#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005177#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005178 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005179#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005180# if defined(__x86_64__) && defined(__LP64__)
5181 x86_64-linux-gnu
5182# elif defined(__x86_64__) && defined(__ILP32__)
5183 x86_64-linux-gnux32
5184# elif defined(__i386__)
5185 i386-linux-gnu
5186# elif defined(__aarch64__) && defined(__AARCH64EL__)
5187# if defined(__ILP32__)
5188 aarch64_ilp32-linux-gnu
5189# else
5190 aarch64-linux-gnu
5191# endif
5192# elif defined(__aarch64__) && defined(__AARCH64EB__)
5193# if defined(__ILP32__)
5194 aarch64_be_ilp32-linux-gnu
5195# else
5196 aarch64_be-linux-gnu
5197# endif
5198# elif defined(__alpha__)
5199 alpha-linux-gnu
5200# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5201# if defined(__ARMEL__)
5202 arm-linux-gnueabihf
5203# else
5204 armeb-linux-gnueabihf
5205# endif
5206# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5207# if defined(__ARMEL__)
5208 arm-linux-gnueabi
5209# else
5210 armeb-linux-gnueabi
5211# endif
5212# elif defined(__hppa__)
5213 hppa-linux-gnu
5214# elif defined(__ia64__)
5215 ia64-linux-gnu
5216# elif defined(__m68k__) && !defined(__mcoldfire__)
5217 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005218# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5219# if _MIPS_SIM == _ABIO32
5220 mipsisa32r6el-linux-gnu
5221# elif _MIPS_SIM == _ABIN32
5222 mipsisa64r6el-linux-gnuabin32
5223# elif _MIPS_SIM == _ABI64
5224 mipsisa64r6el-linux-gnuabi64
5225# else
5226# error unknown platform triplet
5227# endif
5228# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5229# if _MIPS_SIM == _ABIO32
5230 mipsisa32r6-linux-gnu
5231# elif _MIPS_SIM == _ABIN32
5232 mipsisa64r6-linux-gnuabin32
5233# elif _MIPS_SIM == _ABI64
5234 mipsisa64r6-linux-gnuabi64
5235# else
5236# error unknown platform triplet
5237# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# elif defined(__mips_hard_float) && defined(_MIPSEL)
5239# if _MIPS_SIM == _ABIO32
5240 mipsel-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mips64el-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mips64el-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
5248# elif defined(__mips_hard_float)
5249# if _MIPS_SIM == _ABIO32
5250 mips-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__or1k__)
5259 or1k-linux-gnu
5260# elif defined(__powerpc__) && defined(__SPE__)
5261 powerpc-linux-gnuspe
5262# elif defined(__powerpc64__)
5263# if defined(__LITTLE_ENDIAN__)
5264 powerpc64le-linux-gnu
5265# else
5266 powerpc64-linux-gnu
5267# endif
5268# elif defined(__powerpc__)
5269 powerpc-linux-gnu
5270# elif defined(__s390x__)
5271 s390x-linux-gnu
5272# elif defined(__s390__)
5273 s390-linux-gnu
5274# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5275 sh4-linux-gnu
5276# elif defined(__sparc__) && defined(__arch64__)
5277 sparc64-linux-gnu
5278# elif defined(__sparc__)
5279 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005280# elif defined(__riscv)
5281# if __riscv_xlen == 32
5282 riscv32-linux-gnu
5283# elif __riscv_xlen == 64
5284 riscv64-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__FreeBSD_kernel__)
5292# if defined(__LP64__)
5293 x86_64-kfreebsd-gnu
5294# elif defined(__i386__)
5295 i386-kfreebsd-gnu
5296# else
5297# error unknown platform triplet
5298# endif
5299#elif defined(__gnu_hurd__)
5300 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005301#elif defined(__APPLE__)
5302 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005303#elif defined(__VXWORKS__)
5304 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305#else
5306# error unknown platform triplet
5307#endif
5308
5309EOF
5310
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005311if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5314$as_echo "$PLATFORM_TRIPLET" >&6; }
5315else
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5317$as_echo "none" >&6; }
5318fi
5319rm -f conftest.c conftest.out
5320
5321if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5322 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5323 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5324 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005325elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5326 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328
doko@ubuntu.com55532312016-06-14 08:55:19 +02005329if test x$MULTIARCH != x; then
5330 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5331fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332
5333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5335$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5336save_LDFLAGS="$LDFLAGS"
5337LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5340/* end confdefs.h. */
5341
5342int
5343main ()
5344{
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350if ac_fn_c_try_link "$LINENO"; then :
5351 NO_AS_NEEDED="-Wl,--no-as-needed"
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5353$as_echo "yes" >&6; }
5354else
5355 NO_AS_NEEDED=""
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359rm -f core conftest.err conftest.$ac_objext \
5360 conftest$ac_exeext conftest.$ac_ext
5361LDFLAGS="$save_LDFLAGS"
5362
5363
5364
5365# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5368$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005369if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371else
5372 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5373 then ac_cv_path_EGREP="$GREP -E"
5374 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 # Loop through the user's path and test for each of PROGNAME-LIST
5378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5380do
5381 IFS=$as_save_IFS
5382 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 for ac_prog in egrep; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005386 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005387# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 # Check for GNU $ac_path_EGREP
5389case `"$ac_path_EGREP" --version 2>&1` in
5390*GNU*)
5391 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5392*)
5393 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 while :
5396 do
5397 cat "conftest.in" "conftest.in" >"conftest.tmp"
5398 mv "conftest.tmp" "conftest.in"
5399 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5405 # Best one so far, save it but keep looking for a better one
5406 ac_cv_path_EGREP="$ac_path_EGREP"
5407 ac_path_EGREP_max=$ac_count
5408 fi
5409 # 10*(2^10) chars as input seems more than enough
5410 test $ac_count -gt 10 && break
5411 done
5412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5413esac
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $ac_path_EGREP_found && break 3
5416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005421 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 +00005422 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423else
5424 ac_cv_path_EGREP=$EGREP
5425fi
5426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 fi
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5430$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005432
5433
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5435$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005436if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo_n "(cached) " >&6
5438else
5439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005441#include <stdlib.h>
5442#include <stdarg.h>
5443#include <string.h>
5444#include <float.h>
5445
5446int
5447main ()
5448{
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_header_stdc=yes
5456else
5457 ac_cv_header_stdc=no
5458fi
5459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471else
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005474rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Matthias Kloseb9621712010-04-24 17:59:49 +00005476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <stdlib.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "free" >/dev/null 2>&1; then :
5487
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f conftest*
5492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5497 if test "$cross_compiling" = yes; then :
5498 :
5499else
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <ctype.h>
5503#include <stdlib.h>
5504#if ((' ' & 0x0FF) == 0x020)
5505# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5506# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5507#else
5508# define ISLOWER(c) \
5509 (('a' <= (c) && (c) <= 'i') \
5510 || ('j' <= (c) && (c) <= 'r') \
5511 || ('s' <= (c) && (c) <= 'z'))
5512# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5513#endif
5514
5515#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5516int
5517main ()
5518{
5519 int i;
5520 for (i = 0; i < 256; i++)
5521 if (XOR (islower (i), ISLOWER (i))
5522 || toupper (i) != TOUPPER (i))
5523 return 2;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_run "$LINENO"; then :
5528
5529else
5530 ac_cv_header_stdc=no
5531fi
5532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5533 conftest.$ac_objext conftest.beam conftest.$ac_ext
5534fi
5535
5536fi
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5539$as_echo "$ac_cv_header_stdc" >&6; }
5540if test $ac_cv_header_stdc = yes; then
5541
5542$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5543
5544fi
5545
5546# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5547for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5548 inttypes.h stdint.h unistd.h
5549do :
5550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5551ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5552"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat >>confdefs.h <<_ACEOF
5555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
5560done
5561
5562
5563
5564 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 +02005565if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 MINIX=yes
5567else
5568 MINIX=
5569fi
5570
5571
5572 if test "$MINIX" = yes; then
5573
5574$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5575
5576
5577$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5578
5579
5580$as_echo "#define _MINIX 1" >>confdefs.h
5581
5582 fi
5583
5584
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5586$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005587if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 $as_echo_n "(cached) " >&6
5589else
5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5591/* end confdefs.h. */
5592
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005593# define __EXTENSIONS__ 1
5594 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_safe_to_define___extensions__=yes
5605else
5606 ac_cv_safe_to_define___extensions__=no
5607fi
5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5609fi
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5611$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5612 test $ac_cv_safe_to_define___extensions__ = yes &&
5613 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5614
5615 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5618
5619 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5620
5621 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5622
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5626$as_echo_n "checking for the Android API level... " >&6; }
5627cat >> conftest.c <<EOF
5628#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005629android_api = __ANDROID_API__
5630arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631#else
5632#error not Android
5633#endif
5634EOF
5635
5636if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5638 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5640$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005641 if test -z "$ANDROID_API_LEVEL"; then
5642 echo 'Fatal: you must define __ANDROID_API__'
5643 exit 1
5644 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645
5646cat >>confdefs.h <<_ACEOF
5647#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5648_ACEOF
5649
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005650
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5652$as_echo_n "checking for the Android arm ABI... " >&6; }
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5654$as_echo "$_arm_arch" >&6; }
5655 if test "$_arm_arch" = 7; then
5656 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5657 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5658 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659else
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5661$as_echo "not Android" >&6; }
5662fi
5663rm -f conftest.c conftest.out
5664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665# Check for unsupported systems
5666case $ac_sys_system/$ac_sys_release in
5667atheos*|Linux*/1*)
5668 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5669 echo See README for details.
5670 exit 1;;
5671esac
5672
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5675$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005678if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 withval=$with_suffix;
5680 case $withval in
5681 no) EXEEXT=;;
5682 yes) EXEEXT=.exe;;
5683 *) EXEEXT=$withval;;
5684 esac
5685fi
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5688$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Test whether we're running on a non-case-sensitive system, in which
5691# case we give a warning if no ext is given
5692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5694$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test ! -d CaseSensitiveTestDir; then
5696mkdir CaseSensitiveTestDir
5697fi
5698
5699if test -d casesensitivetestdir
5700then
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5702$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 BUILDEXEEXT=.exe
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 BUILDEXEEXT=$EXEEXT
5708fi
5709rmdir CaseSensitiveTestDir
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711case $ac_sys_system in
5712hp*|HP*)
5713 case $CC in
5714 cc|*/cc) CC="$CC -Ae";;
5715 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716esac
5717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5720$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721if test -z "$LIBRARY"
5722then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005723 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5726$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# LDLIBRARY is the name of the library to link against (as opposed to the
5729# name of the library into which to insert object files). BLDLIBRARY is also
5730# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5731# is blank as the main program is not linked directly against LDLIBRARY.
5732# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5733# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5734# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5735# DLLLIBRARY is the shared (i.e., DLL) library.
5736#
5737# RUNSHARED is used to run shared python without installed libraries
5738#
5739# INSTSONAME is the name of the shared library that will be use to install
5740# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005741#
5742# LDVERSION is the shared library version number, normally the Python version
5743# with the ABI build flags appended.
5744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746
5747
5748
5749
5750
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752LDLIBRARY="$LIBRARY"
5753BLDLIBRARY='$(LDLIBRARY)'
5754INSTSONAME='$(LDLIBRARY)'
5755DLLLIBRARY=''
5756LDLIBRARYDIR=''
5757RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005758LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LINKCC is the command that links the python executable -- default is $(CC).
5761# If CXX is set, and if it is needed to link a main function that was
5762# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5763# python might then depend on the C++ runtime
5764# This is altered for AIX in order to build the export list before
5765# linking.
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5768$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769if test -z "$LINKCC"
5770then
5771 LINKCC='$(PURIFY) $(MAINCC)'
5772 case $ac_sys_system in
5773 AIX*)
5774 exp_extra="\"\""
5775 if test $ac_sys_release -ge 5 -o \
5776 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5777 exp_extra="."
5778 fi
5779 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 QNX*)
5781 # qcc must be used because the other compilers do not
5782 # support -N.
5783 LINKCC=qcc;;
5784 esac
5785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5787$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
5789# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5790# make sure we default having it set to "no": this is used by
5791# distutils.unixccompiler to know if it should add --enable-new-dtags
5792# to linker command lines, and failing to detect GNU ld simply results
5793# in the same bahaviour as before.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5796$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797ac_prog=ld
5798if test "$GCC" = yes; then
5799 ac_prog=`$CC -print-prog-name=ld`
5800fi
5801case `"$ac_prog" -V 2>&1 < /dev/null` in
5802 *GNU*)
5803 GNULD=yes;;
5804 *)
5805 GNULD=no;;
5806esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5808$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5811$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 enableval=$enable_shared;
5815fi
5816
5817
5818if test -z "$enable_shared"
5819then
5820 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005821 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 enable_shared="yes";;
5823 *)
5824 enable_shared="no";;
5825 esac
5826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5828$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5831$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enableval=$enable_profiling;
5835fi
5836
5837if test "x$enable_profiling" = xyes; then
5838 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005839 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841/* end confdefs.h. */
5842int main() { return 0; }
5843_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844if ac_fn_c_try_link "$LINENO"; then :
5845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005847 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849rm -f core conftest.err conftest.$ac_objext \
5850 conftest$ac_exeext conftest.$ac_ext
5851 CC="$ac_save_cc"
5852else
5853 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5856$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858if test "x$enable_profiling" = xyes; then
5859 BASECFLAGS="-pg $BASECFLAGS"
5860 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
5862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865
5866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5867# library that we build, but we do not want to link against it (we
5868# will find it with a -framework option). For this reason there is an
5869# extra variable BLDLIBRARY against which Python and the extension
5870# modules are linked, BLDLIBRARY. This is normally the same as
5871# LDLIBRARY, but empty for MacOSX framework builds.
5872if test "$enable_framework"
5873then
5874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005875 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 BLDLIBRARY=''
5877else
5878 BLDLIBRARY='$(LDLIBRARY)'
5879fi
5880
5881# Other platforms follow
5882if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005883 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887 case $ac_sys_system in
5888 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).dll.a'
5890 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
5892 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).so'
5894 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005897 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005898 then
5899 PY3LIBRARY=libpython3.so
5900 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005902 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
5904 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005907 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005908 then
5909 PY3LIBRARY=libpython3.so
5910 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 hp*|HP*)
5913 case `uname -m` in
5914 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
5920 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).dylib'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005929 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005932 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934 esac
5935else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005936 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 case $ac_sys_system in
5938 CYGWIN*)
5939 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
5943fi
5944
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005945if test "$cross_compiling" = yes; then
5946 RUNSHARED=
5947fi
5948
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5950$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005953if test -n "$ac_tool_prefix"; then
5954 for ac_prog in ar aal
5955 do
5956 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005960if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962else
5963 if test -n "$AR"; then
5964 ac_cv_prog_AR="$AR" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 break 2
5976 fi
5977done
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979IFS=$as_save_IFS
5980
5981fi
5982fi
5983AR=$ac_cv_prog_AR
5984if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5986$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
5991
5992
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005993 test -n "$AR" && break
5994 done
5995fi
5996if test -z "$AR"; then
5997 ac_ct_AR=$AR
5998 for ac_prog in ar aal
5999do
6000 # Extract the first word of "$ac_prog", so it can be a program name with args.
6001set dummy $ac_prog; ac_word=$2
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003$as_echo_n "checking for $ac_word... " >&6; }
6004if ${ac_cv_prog_ac_ct_AR+:} false; then :
6005 $as_echo_n "(cached) " >&6
6006else
6007 if test -n "$ac_ct_AR"; then
6008 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6009else
6010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011for as_dir in $PATH
6012do
6013 IFS=$as_save_IFS
6014 test -z "$as_dir" && as_dir=.
6015 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 ac_cv_prog_ac_ct_AR="$ac_prog"
6018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6019 break 2
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 done
6023IFS=$as_save_IFS
6024
6025fi
6026fi
6027ac_ct_AR=$ac_cv_prog_ac_ct_AR
6028if test -n "$ac_ct_AR"; then
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6030$as_echo "$ac_ct_AR" >&6; }
6031else
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033$as_echo "no" >&6; }
6034fi
6035
6036
6037 test -n "$ac_ct_AR" && break
6038done
6039
6040 if test "x$ac_ct_AR" = x; then
6041 AR="ar"
6042 else
6043 case $cross_compiling:$ac_tool_warned in
6044yes:)
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6047ac_tool_warned=yes ;;
6048esac
6049 AR=$ac_ct_AR
6050 fi
6051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052
6053
6054# tweak ARFLAGS only if the user didn't set it on the command line
6055
6056if test -z "$ARFLAGS"
6057then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006058 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
doko@ubuntu.com58844492012-06-30 18:25:32 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in readelf
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
6068if ${ac_cv_prog_READELF+:} false; then :
6069 $as_echo_n "(cached) " >&6
6070else
6071 if test -n "$READELF"; then
6072 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
6079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006081 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083 break 2
6084 fi
6085done
6086 done
6087IFS=$as_save_IFS
6088
6089fi
6090fi
6091READELF=$ac_cv_prog_READELF
6092if test -n "$READELF"; then
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6094$as_echo "$READELF" >&6; }
6095else
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
6098fi
6099
6100
6101 test -n "$READELF" && break
6102 done
6103fi
6104if test -z "$READELF"; then
6105 ac_ct_READELF=$READELF
6106 for ac_prog in readelf
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_READELF"; then
6116 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006125 ac_cv_prog_ac_ct_READELF="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
6129done
6130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6136if test -n "$ac_ct_READELF"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6138$as_echo "$ac_ct_READELF" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_READELF" && break
6146done
6147
6148 if test "x$ac_ct_READELF" = x; then
6149 READELF=":"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 READELF=$ac_ct_READELF
6158 fi
6159fi
6160
6161if test "$cross_compiling" = yes; then
6162 case "$READELF" in
6163 readelf|:)
6164 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6165 ;;
6166 esac
6167fi
6168
6169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006172hp*|HP*)
6173 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 if test -z "$INSTALL"
6175 then
6176 INSTALL="${srcdir}/install-sh -c"
6177 fi
6178esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179# Find a good install program. We prefer a C program (faster),
6180# so one script is as good as another. But avoid the broken or
6181# incompatible versions:
6182# SysV /etc/install, /usr/sbin/install
6183# SunOS /usr/etc/install
6184# IRIX /sbin/install
6185# AIX /bin/install
6186# AmigaOS /C/install, which installs bootblocks on floppy discs
6187# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6188# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6189# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6190# OS/2's system install, which has a completely different semantic
6191# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006192# Reject install programs that cannot install multiple files.
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6194$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006196if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198else
6199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH
6201do
6202 IFS=$as_save_IFS
6203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 # Account for people who put trailing slashes in PATH elements.
6205case $as_dir/ in #((
6206 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209 /usr/ucb/* ) ;;
6210 *)
6211 # OSF1 and SCO ODT 3.0 have their own names for install.
6212 # Don't use installbsd from OSF since it installs stuff as root
6213 # by default.
6214 for ac_prog in ginstall scoinst install; do
6215 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006216 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 if test $ac_prog = install &&
6218 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6219 # AIX install. It has an incompatible calling convention.
6220 :
6221 elif test $ac_prog = install &&
6222 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6223 # program-specific install script used by HP pwplus--don't use.
6224 :
6225 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 rm -rf conftest.one conftest.two conftest.dir
6227 echo one > conftest.one
6228 echo two > conftest.two
6229 mkdir conftest.dir
6230 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6231 test -s conftest.one && test -s conftest.two &&
6232 test -s conftest.dir/conftest.one &&
6233 test -s conftest.dir/conftest.two
6234 then
6235 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6236 break 3
6237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 fi
6239 fi
6240 done
6241 done
6242 ;;
6243esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006244
6245 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246IFS=$as_save_IFS
6247
Matthias Kloseb9621712010-04-24 17:59:49 +00006248rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250fi
6251 if test "${ac_cv_path_install+set}" = set; then
6252 INSTALL=$ac_cv_path_install
6253 else
6254 # As a last resort, use the slow shell script. Don't cache a
6255 # value for INSTALL within a source directory, because that will
6256 # break other packages using the cache if that directory is
6257 # removed, or if the value is a relative name.
6258 INSTALL=$ac_install_sh
6259 fi
6260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6262$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6265# It thinks the first close brace ends the variable substitution.
6266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6267
6268test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6269
6270test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6271
Matthias Klose93a0ef12012-03-15 18:08:34 +01006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6273$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6274if test -z "$MKDIR_P"; then
6275 if ${ac_cv_path_mkdir+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277else
6278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6280do
6281 IFS=$as_save_IFS
6282 test -z "$as_dir" && as_dir=.
6283 for ac_prog in mkdir gmkdir; do
6284 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006285 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006286 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6287 'mkdir (GNU coreutils) '* | \
6288 'mkdir (coreutils) '* | \
6289 'mkdir (fileutils) '4.1*)
6290 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6291 break 3;;
6292 esac
6293 done
6294 done
6295 done
6296IFS=$as_save_IFS
6297
6298fi
6299
6300 test -d ./--version && rmdir ./--version
6301 if test "${ac_cv_path_mkdir+set}" = set; then
6302 MKDIR_P="$ac_cv_path_mkdir -p"
6303 else
6304 # As a last resort, use the slow shell script. Don't cache a
6305 # value for MKDIR_P within a source directory, because that will
6306 # break other packages using the cache if that directory is
6307 # removed, or if the value is a relative name.
6308 MKDIR_P="$ac_install_sh -d"
6309 fi
6310fi
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6312$as_echo "$MKDIR_P" >&6; }
6313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Not every filesystem supports hard links
6316
6317if test -z "$LN" ; then
6318 case $ac_sys_system in
6319 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 *) LN=ln;;
6321 esac
6322fi
6323
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006324# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006325
6326ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6330$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
6332# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006333if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334 withval=$with_pydebug;
6335if test "$withval" != no
6336then
6337
Matthias Kloseb9621712010-04-24 17:59:49 +00006338$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6341$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006343 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006344else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347else
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
Victor Stinnerf4e47032019-04-25 00:56:28 +02006353# Check for --with-trace-refs
6354# --with-trace-refs
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6356$as_echo_n "checking for --with-trace-refs... " >&6; }
6357
6358# Check whether --with-trace-refs was given.
6359if test "${with_trace_refs+set}" = set; then :
6360 withval=$with_trace_refs;
6361else
6362 with_trace_refs=no
6363fi
6364
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6366$as_echo "$with_trace_refs" >&6; }
6367
6368if test "$with_trace_refs" = "yes"
6369then
6370
6371$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6372
6373fi
6374
6375# Check for --with-assertions.
6376# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006377assertions='false'
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6379$as_echo_n "checking for --with-assertions... " >&6; }
6380
6381# Check whether --with-assertions was given.
6382if test "${with_assertions+set}" = set; then :
6383 withval=$with_assertions;
6384if test "$withval" != no
6385then
6386 assertions='true'
6387fi
6388fi
6389
6390if test "$assertions" = 'true'; then
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392$as_echo "yes" >&6; }
6393elif test "$Py_DEBUG" = 'true'; then
6394 assertions='true'
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6396$as_echo "implied by --with-pydebug" >&6; }
6397else
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
Brett Cannon63d98bc2016-09-06 17:12:40 -07006402# Enable optimization flags
6403
6404
6405Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6407$as_echo_n "checking for --enable-optimizations... " >&6; }
6408# Check whether --enable-optimizations was given.
6409if test "${enable_optimizations+set}" = set; then :
6410 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006411if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412then
6413 Py_OPT='true'
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; };
6416else
6417 Py_OPT='false'
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; };
6420fi
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006427 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6428 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006429 # 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 +00006430 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006431 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006432 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006433 DEF_MAKE_RULE="build_all"
6434else
6435 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006436 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006437 DEF_MAKE_RULE="all"
6438fi
6439
Miss Islington (bot)24066722019-07-22 13:17:23 -07006440
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6442$as_echo_n "checking PROFILE_TASK... " >&6; }
6443if test -z "$PROFILE_TASK"
6444then
6445 PROFILE_TASK='-m test --pgo'
6446fi
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6448$as_echo "$PROFILE_TASK" >&6; }
6449
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006450# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6451# normal names in the default $PATH (ie: Ubuntu). They exist under the
6452# non-suffixed name in their versioned llvm directory.
6453
6454llvm_bin_dir=''
6455llvm_path="${PATH}"
6456if test "${CC}" = "clang"
6457then
6458 clang_bin=`which clang`
6459 # Some systems install clang elsewhere as a symlink to the real path
6460 # which is where the related llvm tools are located.
6461 if test -L "${clang_bin}"
6462 then
6463 clang_dir=`dirname "${clang_bin}"`
6464 clang_bin=`readlink "${clang_bin}"`
6465 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6466 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6467 fi
6468fi
6469
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006470# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6472$as_echo_n "checking for --with-lto... " >&6; }
6473
6474# Check whether --with-lto was given.
6475if test "${with_lto+set}" = set; then :
6476 withval=$with_lto;
6477if test "$withval" != no
6478then
6479 Py_LTO='true'
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6481$as_echo "yes" >&6; };
6482else
6483 Py_LTO='false'
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; };
6486fi
6487else
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492if test "$Py_LTO" = 'true' ; then
6493 case $CC in
6494 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006495
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006496 if test -n "$ac_tool_prefix"; then
6497 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6498set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_LLVM_AR+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 case $LLVM_AR in
6505 [\\/]* | ?:[\\/]*)
6506 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6507 ;;
6508 *)
6509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in ${llvm_path}
6511do
6512 IFS=$as_save_IFS
6513 test -z "$as_dir" && as_dir=.
6514 for ac_exec_ext in '' $ac_executable_extensions; do
6515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518 break 2
6519 fi
6520done
6521 done
6522IFS=$as_save_IFS
6523
6524 ;;
6525esac
6526fi
6527LLVM_AR=$ac_cv_path_LLVM_AR
6528if test -n "$LLVM_AR"; then
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6530$as_echo "$LLVM_AR" >&6; }
6531else
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006537fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006538if test -z "$ac_cv_path_LLVM_AR"; then
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006539 ac_pt_LLVM_AR=$LLVM_AR
6540 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006541set dummy llvm-ar; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $ac_pt_LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6550 ;;
6551 *)
6552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in ${llvm_path}
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561 break 2
6562 fi
6563done
6564 done
6565IFS=$as_save_IFS
6566
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006567 ;;
6568esac
6569fi
6570ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6571if test -n "$ac_pt_LLVM_AR"; then
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6573$as_echo "$ac_pt_LLVM_AR" >&6; }
6574else
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006579 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006580 LLVM_AR="''"
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006581 else
6582 case $cross_compiling:$ac_tool_warned in
6583yes:)
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6586ac_tool_warned=yes ;;
6587esac
6588 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589 fi
6590else
6591 LLVM_AR="$ac_cv_path_LLVM_AR"
6592fi
6593
6594
6595 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6596 then
6597 LLVM_AR_FOUND="found"
6598 else
6599 LLVM_AR_FOUND="not-found"
6600 fi
6601 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6602 then
6603 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6604 if test -n "${found_llvm_ar}"
6605 then
6606 LLVM_AR='/usr/bin/xcrun llvm-ar'
6607 LLVM_AR_FOUND=found
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6609$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6610 fi
6611 fi
6612 if test $LLVM_AR_FOUND = not-found
6613 then
6614 LLVM_PROFR_ERR=yes
6615 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6616 else
6617 LLVM_AR_ERR=no
6618 fi
6619 AR="${LLVM_AR}"
6620 case $ac_sys_system in
6621 Darwin*)
6622 # Any changes made here should be reflected in the GCC+Darwin case below
6623 LTOFLAGS="-flto -Wl,-export_dynamic"
6624 ;;
6625 *)
6626 LTOFLAGS="-flto"
6627 ;;
6628 esac
6629 ;;
6630 *gcc*)
6631 case $ac_sys_system in
6632 Darwin*)
6633 LTOFLAGS="-flto -Wl,-export_dynamic"
6634 ;;
6635 *)
6636 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6637 ;;
6638 esac
6639 ;;
6640 esac
6641
6642 if test "$ac_cv_prog_cc_g" = "yes"
6643 then
6644 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6645 # to get debug symbols.
6646 LTOFLAGS="$LTOFLAGS -g"
6647 fi
6648
stratakisf92c7aa2018-12-04 15:54:01 +01006649 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006650 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006651fi
6652
6653# Enable PGO flags.
6654
6655
6656
6657
6658
6659
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006660if test -n "$ac_tool_prefix"; then
6661 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6662set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ;;
6689esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6692if test -n "$LLVM_PROFDATA"; then
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6694$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695else
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
6698fi
6699
6700
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006701fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006703 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6704 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705set dummy llvm-profdata; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710else
6711 case $ac_pt_LLVM_PROFDATA in
6712 [\\/]* | ?:[\\/]*)
6713 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6714 ;;
6715 *)
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in ${llvm_path}
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725 break 2
6726 fi
6727done
6728 done
6729IFS=$as_save_IFS
6730
Gregory P. Smith799520c2016-09-07 16:10:00 -07006731 ;;
6732esac
6733fi
6734ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6735if test -n "$ac_pt_LLVM_PROFDATA"; then
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6737$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6738else
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006743 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROFDATA="''"
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006745 else
6746 case $cross_compiling:$ac_tool_warned in
6747yes:)
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6750ac_tool_warned=yes ;;
6751esac
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 fi
6754else
6755 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6756fi
6757
6758
6759if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6760then
6761 LLVM_PROF_FOUND="found"
6762else
6763 LLVM_PROF_FOUND="not-found"
6764fi
6765if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6766then
6767 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6768 if test -n "${found_llvm_profdata}"
6769 then
6770 # llvm-profdata isn't directly in $PATH in some cases.
6771 # https://apple.stackexchange.com/questions/197053/
6772 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6773 LLVM_PROF_FOUND=found
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6775$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6776 fi
6777fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778LLVM_PROF_ERR=no
6779case $CC in
6780 *clang*)
6781 # Any changes made here should be reflected in the GCC+Darwin case below
6782 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6783 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6786 if test $LLVM_PROF_FOUND = not-found
6787 then
6788 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006789 if test "${REQUIRE_PGO}" = "yes"
6790 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006791 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 -07006792 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793 fi
6794 ;;
6795 *gcc*)
6796 case $ac_sys_system in
6797 Darwin*)
6798 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6799 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 then
6804 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805 if test "${REQUIRE_PGO}" = "yes"
6806 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006807 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 -07006808 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 fi
6810 ;;
6811 *)
6812 PGO_PROF_GEN_FLAG="-fprofile-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6814 LLVM_PROF_MERGER="true"
6815 LLVM_PROF_FILE=""
6816 ;;
6817 esac
6818 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006819 *icc*)
6820 PGO_PROF_GEN_FLAG="-prof-gen"
6821 PGO_PROF_USE_FLAG="-prof-use"
6822 LLVM_PROF_MERGER="true"
6823 LLVM_PROF_FILE=""
6824 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825esac
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6828# merged with this chunk of code?
6829
6830# Optimizer/debugger flags
6831# ------------------------
6832# (The following bit of code is complicated enough - please keep things
6833# indented properly. Just pretend you're editing Python code. ;-)
6834
6835# There are two parallel sets of case statements below, one that checks to
6836# see if OPT was set and one that does BASECFLAGS setting based upon
6837# compiler and platform. BASECFLAGS tweaks need to be made even if the
6838# user set OPT.
6839
Victor Stinner23a683a2019-04-12 21:27:37 +02006840case $CC in
6841 *clang*)
6842 cc_is_clang=1
6843 ;;
6844 *)
6845 if $CC --version 2>&1 | grep -q clang
6846 then
6847 cc_is_clang=1
6848 else
6849 cc_is_clang=
6850 fi
6851esac
6852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853# tweak OPT based on compiler and platform, only if the user didn't set
6854# it on the command line
6855
Victor Stinner9ed34a82017-05-02 22:35:58 +02006856
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006857if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858then
6859 case $GCC in
6860 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6862 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6863 WRAP="-fwrapv"
6864 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006865
Victor Stinner35f3d242017-04-21 12:35:24 +02006866 if test -n "${cc_is_clang}"
6867 then
6868 # Clang also needs -fwrapv
6869 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006870 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6871 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006872 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006873 fi
6874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 case $ac_cv_prog_cc_g in
6876 yes)
6877 if test "$Py_DEBUG" = 'true' ; then
6878 # Optimization messes up debuggers, so turn it off for
6879 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006880 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006881 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 else
Victor Stinner28205b22017-04-21 11:24:34 +02006886 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 fi
6888 ;;
6889 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006890 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 ;;
6892 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894 case $ac_sys_system in
6895 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6896 ;;
6897 esac
6898 ;;
6899
6900 *)
6901 OPT="-O"
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
6906
6907
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006908
stratakiscf10a752018-12-19 18:19:01 +01006909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910# The -arch flags for universal builds on OSX
6911UNIVERSAL_ARCH_FLAGS=
6912
6913
6914# tweak BASECFLAGS based on compiler and platform
6915case $GCC in
6916yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006917 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006918
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6920$as_echo_n "checking for -Wextra... " >&6; }
6921 ac_save_cc="$CC"
6922 CC="$CC -Wextra -Werror"
6923 if ${ac_cv_extra_warnings+:} false; then :
6924 $as_echo_n "(cached) " >&6
6925else
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927/* end confdefs.h. */
6928
6929
6930int
6931main ()
6932{
6933
6934 ;
6935 return 0;
6936}
6937
6938_ACEOF
6939if ac_fn_c_try_compile "$LINENO"; then :
6940
6941 ac_cv_extra_warnings=yes
6942
6943else
6944
6945 ac_cv_extra_warnings=no
6946
6947fi
6948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6949fi
6950
6951 CC="$ac_save_cc"
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6953$as_echo "$ac_cv_extra_warnings" >&6; }
6954
6955 if test $ac_cv_extra_warnings = yes
6956 then
6957 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6958 fi
6959
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960 # Python doesn't violate C99 aliasing rules, but older versions of
6961 # GCC produce warnings for legal Python code. Enable
6962 # -fno-strict-aliasing on versions of GCC that support but produce
6963 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6965$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966 ac_save_cc="$CC"
6967 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006969 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006971else
Matthias Kloseb9621712010-04-24 17:59:49 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 CC="$ac_save_cc -fstrict-aliasing"
6988 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990/* end confdefs.h. */
6991
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006992 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993int
6994main ()
6995{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006996double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 ;
6998 return 0;
6999}
Matthias Kloseb159a552010-04-25 21:00:44 +00007000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
7004 ac_cv_no_strict_aliasing=no
7005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006else
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 ac_cv_no_strict_aliasing=yes
7009
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007010fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013else
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 ac_cv_no_strict_aliasing=no
7016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007019fi
7020
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7024$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026 then
7027 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7028 fi
7029
Zachary Ware5af85642015-12-21 12:09:17 -06007030 # ICC doesn't recognize the option, but only emits a warning
7031 ## XXX does it emit an unused result warning and can it be disabled?
7032 case "$CC" in
7033 *icc*)
7034 ac_cv_disable_unused_result_warning=no
7035 ;;
7036 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7038$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7039 ac_save_cc="$CC"
7040 CC="$CC -Wunused-result -Werror"
7041 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007042 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007043 $as_echo_n "(cached) " >&6
7044else
7045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7046/* end confdefs.h. */
7047
7048
7049int
7050main ()
7051{
7052
7053 ;
7054 return 0;
7055}
7056
7057_ACEOF
7058if ac_fn_c_try_compile "$LINENO"; then :
7059
7060 ac_cv_disable_unused_result_warning=yes
7061
7062else
7063
7064 ac_cv_disable_unused_result_warning=no
7065
7066fi
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068fi
7069
7070 CFLAGS="$save_CFLAGS"
7071 CC="$ac_save_cc"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7073$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007074 ;;
7075 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007076
7077 if test $ac_cv_disable_unused_result_warning = yes
7078 then
7079 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007080 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7084$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wunused-parameter -Werror"
7087 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092
7093
7094int
7095main ()
7096{
7097
7098 ;
7099 return 0;
7100}
7101
7102_ACEOF
7103if ac_fn_c_try_compile "$LINENO"; then :
7104
7105 ac_cv_disable_unused_parameter_warning=yes
7106
7107else
7108
7109 ac_cv_disable_unused_parameter_warning=no
7110
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7113fi
7114
7115 CC="$ac_save_cc"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7117$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7118
7119 if test $ac_cv_disable_unused_parameter_warning = yes
7120 then
7121 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7122 fi
7123
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7125$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Wmissing-field-initializers -Werror"
7128 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7129 $as_echo_n "(cached) " >&6
7130else
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132/* end confdefs.h. */
7133
7134
7135int
7136main ()
7137{
7138
7139 ;
7140 return 0;
7141}
7142
7143_ACEOF
7144if ac_fn_c_try_compile "$LINENO"; then :
7145
7146 ac_cv_disable_missing_field_initializers=yes
7147
7148else
7149
7150 ac_cv_disable_missing_field_initializers=no
7151
7152fi
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7154fi
7155
7156 CC="$ac_save_cc"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7158$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7159
7160 if test $ac_cv_disable_missing_field_initializers = yes
7161 then
7162 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007163 fi
7164
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7166$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7167 ac_save_cc="$CC"
7168 CC="$CC -Wsign-compare"
7169 save_CFLAGS="$CFLAGS"
7170 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7171 $as_echo_n "(cached) " >&6
7172else
7173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174/* end confdefs.h. */
7175
7176
7177int
7178main ()
7179{
7180
7181 ;
7182 return 0;
7183}
7184
7185_ACEOF
7186if ac_fn_c_try_compile "$LINENO"; then :
7187
7188 ac_cv_enable_sign_compare_warning=yes
7189
7190else
7191
7192 ac_cv_enable_sign_compare_warning=no
7193
7194fi
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7196fi
7197
7198 CFLAGS="$save_CFLAGS"
7199 CC="$ac_save_cc"
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7201$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7202
7203 if test $ac_cv_enable_sign_compare_warning = yes
7204 then
7205 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7206 fi
7207
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7209$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7210 ac_save_cc="$CC"
7211 CC="$CC -Wunreachable-code"
7212 save_CFLAGS="$CFLAGS"
7213 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7214 $as_echo_n "(cached) " >&6
7215else
7216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7217/* end confdefs.h. */
7218
7219
7220int
7221main ()
7222{
7223
7224 ;
7225 return 0;
7226}
7227
7228_ACEOF
7229if ac_fn_c_try_compile "$LINENO"; then :
7230
7231 ac_cv_enable_unreachable_code_warning=yes
7232
7233else
7234
7235 ac_cv_enable_unreachable_code_warning=no
7236
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7239fi
7240
7241 CFLAGS="$save_CFLAGS"
7242 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007243
7244 # Don't enable unreachable code warning in debug mode, since it usually
7245 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007246 # Issue #24324: Unfortunately, the unreachable code warning does not work
7247 # correctly on gcc and has been silently removed from the compiler.
7248 # It is supported on clang but on OS X systems gcc may be an alias
7249 # for clang. Try to determine if the compiler is not really gcc and,
7250 # if so, only then enable the warning.
7251 if test $ac_cv_enable_unreachable_code_warning = yes && \
7252 test "$Py_DEBUG" != "true" && \
7253 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007254 then
7255 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007256 else
7257 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7260$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007261
INADA Naokie3364842018-06-05 20:40:53 +09007262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7263$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7264 ac_save_cc="$CC"
7265 CC="$CC -Werror -Wstrict-prototypes"
7266 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268else
7269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7270/* end confdefs.h. */
7271
7272
7273int
7274main ()
7275{
7276
7277 ;
7278 return 0;
7279}
7280
7281_ACEOF
7282if ac_fn_c_try_compile "$LINENO"; then :
7283
7284 ac_cv_enable_strict_prototypes_warning=yes
7285
7286else
7287
7288 ac_cv_enable_strict_prototypes_warning=no
7289
7290fi
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292fi
7293
7294 CC="$ac_save_cc"
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7296$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7297
7298 if test $ac_cv_enable_strict_prototypes_warning = yes
7299 then
7300 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7301 fi
7302
Victor Stinner193ee0a2017-02-06 14:24:00 +01007303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7304$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7305 ac_save_cc="$CC"
7306 CC="$CC -Werror=implicit-function-declaration"
7307 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7308 $as_echo_n "(cached) " >&6
7309else
7310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311/* end confdefs.h. */
7312
7313
7314int
7315main ()
7316{
7317
7318 ;
7319 return 0;
7320}
7321
7322_ACEOF
7323if ac_fn_c_try_compile "$LINENO"; then :
7324
7325 ac_cv_enable_implicit_function_declaration_error=yes
7326
7327else
7328
7329 ac_cv_enable_implicit_function_declaration_error=no
7330
7331fi
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333fi
7334
7335 CC="$ac_save_cc"
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7337$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7338
7339 if test $ac_cv_enable_implicit_function_declaration_error = yes
7340 then
7341 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7342 fi
7343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7345 # support. Without this, treatment of subnormals doesn't follow
7346 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007347 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348 alpha*)
7349 BASECFLAGS="$BASECFLAGS -mieee"
7350 ;;
7351 esac
7352
7353 case $ac_sys_system in
7354 SCO_SV*)
7355 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7356 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007357
Ned Deily87adb6e2013-10-18 21:09:56 -07007358 Darwin*)
7359 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7360 # used to be here, but non-Apple gcc doesn't accept them.
7361 if test "${CC}" = gcc
7362 then
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007364$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007365 case "${UNIVERSALSDK}" in
7366 */MacOSX10.4u.sdk)
7367 # Build using 10.4 SDK, force usage of gcc when the
7368 # compiler is gcc, otherwise the user will get very
7369 # confusing error messages when building on OSX 10.6
7370 CC=gcc-4.0
7371 CPP=cpp-4.0
7372 ;;
7373 esac
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007375$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007376 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377
Ned Deily87adb6e2013-10-18 21:09:56 -07007378 if test "${enable_universalsdk}"
7379 then
7380 case "$UNIVERSAL_ARCHS" in
7381 32-bit)
7382 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7383 LIPO_32BIT_FLAGS=""
7384 ARCH_RUN_32BIT=""
7385 ;;
7386 64-bit)
7387 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7388 LIPO_32BIT_FLAGS=""
7389 ARCH_RUN_32BIT="true"
7390 ;;
7391 all)
7392 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7393 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7394 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7395 ;;
7396 intel)
7397 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7398 LIPO_32BIT_FLAGS="-extract i386"
7399 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7400 ;;
7401 intel-32)
7402 UNIVERSAL_ARCH_FLAGS="-arch i386"
7403 LIPO_32BIT_FLAGS=""
7404 ARCH_RUN_32BIT=""
7405 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007406 intel-64)
7407 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7408 LIPO_32BIT_FLAGS=""
7409 ARCH_RUN_32BIT="true"
7410 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007411 3-way)
7412 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7413 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7414 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7415 ;;
7416 *)
7417 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7418 ;;
7419 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 if test "${UNIVERSALSDK}" != "/"
7422 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007423 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7424 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007425 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007426 else
7427 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7428 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 fi
7430 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431
Ned Deily87adb6e2013-10-18 21:09:56 -07007432 # Calculate an appropriate deployment target for this build:
7433 # The deployment target value is used explicitly to enable certain
7434 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007435 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 # component of the string returned by distutils.get_platform().
7437 #
7438 # Use the value from:
7439 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7440 # 2. the operating system version of the build machine if >= 10.6
7441 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7442 # below to pick either 10.3, 10.4, or 10.5 as the target.
7443 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7446$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007447 cur_target_major=`sw_vers -productVersion | \
7448 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7449 cur_target_minor=`sw_vers -productVersion | \
7450 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7451 cur_target="${cur_target_major}.${cur_target_minor}"
7452 if test ${cur_target_major} -eq 10 && \
7453 test ${cur_target_minor} -ge 3 && \
7454 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007455 then
Ned Deily36820b62014-06-25 13:44:22 -07007456 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007457 cur_target=10.3
7458 if test ${enable_universalsdk}
7459 then
7460 case "$UNIVERSAL_ARCHS" in
7461 all|3-way|intel|64-bit)
7462 # These configurations were first supported in 10.5
7463 cur_target='10.5'
7464 ;;
7465 esac
7466 else
7467 if test `/usr/bin/arch` = "i386"
7468 then
7469 # 10.4 was the first release to support Intel archs
7470 cur_target="10.4"
7471 fi
7472 fi
7473 fi
7474 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007475
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7477 # environment with a value that is the same as what we'll use
7478 # in the Makefile to ensure that we'll get the same compiler
7479 # environment during configure and build time.
7480 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7481 export MACOSX_DEPLOYMENT_TARGET
7482 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7484$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 # end of Darwin* tests
7487 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488 esac
7489 ;;
7490
7491*)
7492 case $ac_sys_system in
7493 OpenUNIX*|UnixWare*)
7494 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7495 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496 SCO_SV*)
7497 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7498 ;;
7499 esac
7500 ;;
7501esac
7502
Zachary Ware5af85642015-12-21 12:09:17 -06007503# ICC needs -fp-model strict or floats behave badly
7504case "$CC" in
7505*icc*)
7506 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7507 ;;
7508esac
7509
T. Woutersddbfa2c2017-05-23 01:30:49 +02007510if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511 :
7512else
7513 OPT="-DNDEBUG $OPT"
7514fi
7515
7516if test "$ac_arch_flags"
7517then
7518 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7519fi
7520
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521# On some compilers, pthreads are available without further options
7522# (e.g. MacOS X). On some of these systems, the compiler will not
7523# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7524# So we have to see first whether pthreads are available without
7525# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7527$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007528if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530else
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 ac_cv_pthread_is_default=no
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536
Stefan Krah7dba5942012-11-22 22:49:11 +01007537#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538#include <pthread.h>
7539
7540void* routine(void* p){return NULL;}
7541
7542int main(){
7543 pthread_t p;
7544 if(pthread_create(&p,NULL,routine,NULL)!=0)
7545 return 1;
7546 (void)pthread_detach(p);
7547 return 0;
7548}
7549
7550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552
7553 ac_cv_pthread_is_default=yes
7554 ac_cv_kthread=no
7555 ac_cv_pthread=no
7556
7557else
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562fi
7563
7564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565fi
7566
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7568$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569
7570
7571if test $ac_cv_pthread_is_default = yes
7572then
7573 ac_cv_kpthread=no
7574else
7575# -Kpthread, if available, provides the right #defines
7576# and linker options to make pthread_create available
7577# Some compilers won't report that they do not support -Kpthread,
7578# so we need to run a program to see whether it really made the
7579# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7581$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007582if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584else
7585 ac_save_cc="$CC"
7586CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 ac_cv_kpthread=no
7589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591/* end confdefs.h. */
7592
Stefan Krah7dba5942012-11-22 22:49:11 +01007593#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594#include <pthread.h>
7595
7596void* routine(void* p){return NULL;}
7597
7598int main(){
7599 pthread_t p;
7600 if(pthread_create(&p,NULL,routine,NULL)!=0)
7601 return 1;
7602 (void)pthread_detach(p);
7603 return 0;
7604}
7605
7606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007607if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608 ac_cv_kpthread=yes
7609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614fi
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616CC="$ac_save_cc"
7617fi
7618
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7620$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
7622
7623if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7624then
7625# -Kthread, if available, provides the right #defines
7626# and linker options to make pthread_create available
7627# Some compilers won't report that they do not support -Kthread,
7628# so we need to run a program to see whether it really made the
7629# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7631$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007632if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634else
7635 ac_save_cc="$CC"
7636CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007637if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638 ac_cv_kthread=no
7639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641/* end confdefs.h. */
7642
Stefan Krah7dba5942012-11-22 22:49:11 +01007643#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644#include <pthread.h>
7645
7646void* routine(void* p){return NULL;}
7647
7648int main(){
7649 pthread_t p;
7650 if(pthread_create(&p,NULL,routine,NULL)!=0)
7651 return 1;
7652 (void)pthread_detach(p);
7653 return 0;
7654}
7655
7656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658 ac_cv_kthread=yes
7659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666CC="$ac_save_cc"
7667fi
7668
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7670$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
7672
7673if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7674then
7675# -pthread, if available, provides the right #defines
7676# and linker options to make pthread_create available
7677# Some compilers won't report that they do not support -pthread,
7678# so we need to run a program to see whether it really made the
7679# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7681$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007682if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684else
7685 ac_save_cc="$CC"
7686CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007687if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688 ac_cv_pthread=no
7689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691/* end confdefs.h. */
7692
Stefan Krah7dba5942012-11-22 22:49:11 +01007693#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694#include <pthread.h>
7695
7696void* routine(void* p){return NULL;}
7697
7698int main(){
7699 pthread_t p;
7700 if(pthread_create(&p,NULL,routine,NULL)!=0)
7701 return 1;
7702 (void)pthread_detach(p);
7703 return 0;
7704}
7705
7706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007707if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708 ac_cv_pthread=yes
7709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
7715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716CC="$ac_save_cc"
7717fi
7718
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7720$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721fi
7722
7723# If we have set a CC compiler flag for thread support then
7724# check if it works for CXX, too.
7725ac_cv_cxx_thread=no
7726if test ! -z "$CXX"
7727then
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7729$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730ac_save_cxx="$CXX"
7731
7732if test "$ac_cv_kpthread" = "yes"
7733then
7734 CXX="$CXX -Kpthread"
7735 ac_cv_cxx_thread=yes
7736elif test "$ac_cv_kthread" = "yes"
7737then
7738 CXX="$CXX -Kthread"
7739 ac_cv_cxx_thread=yes
7740elif test "$ac_cv_pthread" = "yes"
7741then
7742 CXX="$CXX -pthread"
7743 ac_cv_cxx_thread=yes
7744fi
7745
7746if test $ac_cv_cxx_thread = yes
7747then
7748 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7749 $CXX -c conftest.$ac_ext 2>&5
7750 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7751 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7752 then
7753 ac_cv_cxx_thread=yes
7754 else
7755 ac_cv_cxx_thread=no
7756 fi
7757 rm -fr conftest*
7758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7760$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761fi
7762CXX="$ac_save_cxx"
7763
7764
7765# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7767$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007768if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770else
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772/* end confdefs.h. */
7773#include <stdlib.h>
7774#include <stdarg.h>
7775#include <string.h>
7776#include <float.h>
7777
7778int
7779main ()
7780{
7781
7782 ;
7783 return 0;
7784}
7785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007786if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787 ac_cv_header_stdc=yes
7788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7792
7793if test $ac_cv_header_stdc = yes; then
7794 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796/* end confdefs.h. */
7797#include <string.h>
7798
7799_ACEOF
7800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 $EGREP "memchr" >/dev/null 2>&1; then :
7802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803else
7804 ac_cv_header_stdc=no
7805fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007806rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807
7808fi
7809
7810if test $ac_cv_header_stdc = yes; then
7811 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813/* end confdefs.h. */
7814#include <stdlib.h>
7815
7816_ACEOF
7817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $EGREP "free" >/dev/null 2>&1; then :
7819
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820else
7821 ac_cv_header_stdc=no
7822fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007823rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824
7825fi
7826
7827if test $ac_cv_header_stdc = yes; then
7828 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830 :
7831else
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833/* end confdefs.h. */
7834#include <ctype.h>
7835#include <stdlib.h>
7836#if ((' ' & 0x0FF) == 0x020)
7837# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7838# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7839#else
7840# define ISLOWER(c) \
7841 (('a' <= (c) && (c) <= 'i') \
7842 || ('j' <= (c) && (c) <= 'r') \
7843 || ('s' <= (c) && (c) <= 'z'))
7844# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7845#endif
7846
7847#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7848int
7849main ()
7850{
7851 int i;
7852 for (i = 0; i < 256; i++)
7853 if (XOR (islower (i), ISLOWER (i))
7854 || toupper (i) != TOUPPER (i))
7855 return 2;
7856 return 0;
7857}
7858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007859if ac_fn_c_try_run "$LINENO"; then :
7860
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866fi
7867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868fi
7869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7871$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872if test $ac_cv_header_stdc = yes; then
7873
Matthias Kloseb9621712010-04-24 17:59:49 +00007874$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875
7876fi
7877
stratakise768c862018-01-23 16:11:24 +01007878for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007879fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007880ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007881sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007882utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007883poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007884sys/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 +01007885sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007886sys/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 +01007887sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007888sys/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 -07007889libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007890linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007891sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007892do :
7893 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7894ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007895if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007897#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007898_ACEOF
7899
7900fi
7901
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902done
7903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007905for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7908$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007909if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007914#include <sys/types.h>
7915#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
7920if ((DIR *) 0)
7921return 0;
7922 ;
7923 return 0;
7924}
7925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007926if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007928else
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933eval ac_res=\$$as_ac_Header
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7935$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007939_ACEOF
7940
7941ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944done
7945# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7946if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7948$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007951else
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956/* Override any GCC internal prototype to avoid an error.
7957 Use char because int might match the return type of a GCC
7958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959#ifdef __cplusplus
7960extern "C"
7961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007962char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ;
7968 return 0;
7969}
7970_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971for ac_lib in '' dir; do
7972 if test -z "$ac_lib"; then
7973 ac_res="none required"
7974 else
7975 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007976 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981rm -f core conftest.err conftest.$ac_objext \
7982 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007983 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986done
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989else
7990 ac_cv_search_opendir=no
7991fi
7992rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007993LIBS=$ac_func_search_save_LIBS
7994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7996$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008002
Michael W. Hudson54241132001-12-07 15:38:26 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8005$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008006if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008008else
8009 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013/* Override any GCC internal prototype to avoid an error.
8014 Use char because int might match the return type of a GCC
8015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016#ifdef __cplusplus
8017extern "C"
8018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008019char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ;
8025 return 0;
8026}
8027_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028for ac_lib in '' x; do
8029 if test -z "$ac_lib"; then
8030 ac_res="none required"
8031 else
8032 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008033 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038rm -f core conftest.err conftest.$ac_objext \
8039 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008040 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043done
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046else
8047 ac_cv_search_opendir=no
8048fi
8049rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008050LIBS=$ac_func_search_save_LIBS
8051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8053$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008055if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008058fi
8059
8060fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8063$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008069#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008070int
8071main ()
8072{
8073return makedev(0, 0);
8074 ;
8075 return 0;
8076}
8077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008079 ac_cv_header_sys_types_h_makedev=yes
8080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083rm -f core conftest.err conftest.$ac_objext \
8084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008085
8086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8088$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008089
8090if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008091ac_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 +02008092if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008095
8096fi
8097
8098
8099
8100 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 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 +02008102if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008105
8106fi
8107
8108
8109 fi
8110fi
8111
Michael W. Hudson54241132001-12-07 15:38:26 +00008112
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008113# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8114# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8115SAVE_CFLAGS=$CFLAGS
8116CFLAGS="-std=c99 $CFLAGS"
8117for ac_header in bluetooth/bluetooth.h
8118do :
8119 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8120if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8121 cat >>confdefs.h <<_ACEOF
8122#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8123_ACEOF
8124
8125fi
8126
8127done
8128
8129CFLAGS=$SAVE_CFLAGS
8130
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008131# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8132for ac_header in net/if.h
8133do :
8134 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8135#ifdef STDC_HEADERS
8136# include <stdlib.h>
8137# include <stddef.h>
8138#else
8139# ifdef HAVE_STDLIB_H
8140# include <stdlib.h>
8141# endif
8142#endif
8143#ifdef HAVE_SYS_SOCKET_H
8144# include <sys/socket.h>
8145#endif
8146
8147"
Victor Stinnere0be4232011-10-25 13:06:09 +02008148if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008149 cat >>confdefs.h <<_ACEOF
8150#define HAVE_NET_IF_H 1
8151_ACEOF
8152
8153fi
8154
8155done
8156
8157
Martin v. Löwis11017b12006-01-14 18:12:57 +00008158# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008159for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008160do :
8161 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 +00008162#ifdef HAVE_ASM_TYPES_H
8163#include <asm/types.h>
8164#endif
8165#ifdef HAVE_SYS_SOCKET_H
8166#include <sys/socket.h>
8167#endif
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169"
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008171 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008172#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008173_ACEOF
8174
8175fi
8176
8177done
8178
8179
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008180# On Linux, qrtr.h requires asm/types.h
8181for ac_header in linux/qrtr.h
8182do :
8183 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8184#ifdef HAVE_ASM_TYPES_H
8185#include <asm/types.h>
8186#endif
8187#ifdef HAVE_SYS_SOCKET_H
8188#include <sys/socket.h>
8189#endif
8190
8191"
8192if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8193 cat >>confdefs.h <<_ACEOF
8194#define HAVE_LINUX_QRTR_H 1
8195_ACEOF
8196
8197fi
8198
8199done
8200
8201
caaveryeffc12f2017-09-06 18:18:10 -04008202for ac_header in linux/vm_sockets.h
8203do :
8204 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8205#ifdef HAVE_SYS_SOCKET_H
8206#include <sys/socket.h>
8207#endif
8208
8209"
8210if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8211 cat >>confdefs.h <<_ACEOF
8212#define HAVE_LINUX_VM_SOCKETS_H 1
8213_ACEOF
8214
8215fi
8216
8217done
8218
8219
Charles-François Natali47413c12011-10-06 19:47:44 +02008220# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008221for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008222do :
8223 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8224ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8225#ifdef HAVE_SYS_SOCKET_H
8226#include <sys/socket.h>
8227#endif
8228
8229"
8230if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8231 cat >>confdefs.h <<_ACEOF
8232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8233_ACEOF
8234
8235fi
8236
8237done
8238
8239
Guido van Rossum627b2d71993-12-24 10:39:16 +00008240# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008241was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8243$as_echo_n "checking for clock_t in time.h... " >&6; }
8244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008246#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008251 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008252else
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008256
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008257
Guido van Rossum627b2d71993-12-24 10:39:16 +00008258fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008259rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8262$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8265$as_echo_n "checking for makedev... " >&6; }
8266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008268
Jesus Cea740f53a2010-04-28 11:35:30 +00008269#if defined(MAJOR_IN_MKDEV)
8270#include <sys/mkdev.h>
8271#elif defined(MAJOR_IN_SYSMACROS)
8272#include <sys/sysmacros.h>
8273#else
8274#include <sys/types.h>
8275#endif
8276
Neal Norwitz11690112002-07-30 01:08:28 +00008277int
8278main ()
8279{
Jesus Cea740f53a2010-04-28 11:35:30 +00008280
8281 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008282 ;
8283 return 0;
8284}
Matthias Kloseb159a552010-04-25 21:00:44 +00008285
Neal Norwitz11690112002-07-30 01:08:28 +00008286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008287if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008288 ac_cv_has_makedev=yes
8289else
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008292rm -f core conftest.err conftest.$ac_objext \
8293 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8295$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008296if test "$ac_cv_has_makedev" = "yes"; then
8297
Matthias Kloseb9621712010-04-24 17:59:49 +00008298$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008299
8300fi
8301
Christian Heimes985ecdc2013-11-20 11:46:18 +01008302# byte swapping
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8304$as_echo_n "checking for le64toh... " >&6; }
8305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8306/* end confdefs.h. */
8307
8308#ifdef HAVE_ENDIAN_H
8309#include <endian.h>
8310#elif defined(HAVE_SYS_ENDIAN_H)
8311#include <sys/endian.h>
8312#endif
8313
8314int
8315main ()
8316{
8317
8318 le64toh(1)
8319 ;
8320 return 0;
8321}
8322
8323_ACEOF
8324if ac_fn_c_try_link "$LINENO"; then :
8325 ac_cv_has_le64toh=yes
8326else
8327 ac_cv_has_le64toh=no
8328fi
8329rm -f core conftest.err conftest.$ac_objext \
8330 conftest$ac_exeext conftest.$ac_ext
8331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8332$as_echo "$ac_cv_has_le64toh" >&6; }
8333if test "$ac_cv_has_le64toh" = "yes"; then
8334
8335$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8336
8337fi
8338
Martin v. Löwis399a6892002-10-04 10:22:02 +00008339use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008340# Don't use largefile support for GNU/Hurd
8341case $ac_sys_system in GNU*)
8342 use_lfs=no
8343esac
8344
Martin v. Löwis399a6892002-10-04 10:22:02 +00008345if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008346# Two defines needed to enable largefile support on various platforms
8347# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008348case $ac_sys_system/$ac_sys_release in
8349AIX*)
8350
8351$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8352
8353 ;;
8354esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008360
Martin v. Löwis399a6892002-10-04 10:22:02 +00008361fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008362
Guido van Rossum84e7b241996-08-19 21:59:00 +00008363# Add some code to confdefs.h so that the test for off_t works on SCO
8364cat >> confdefs.h <<\EOF
8365#if defined(SCO_DS)
8366#undef _OFF_T
8367#endif
8368EOF
8369
Guido van Rossumef2255b2000-03-10 22:30:29 +00008370# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008371ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008372if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008373
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008374else
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
8376cat >>confdefs.h <<_ACEOF
8377#define mode_t int
8378_ACEOF
8379
8380fi
8381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008384
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008385else
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
8387cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008389_ACEOF
8390
8391fi
8392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008394if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398cat >>confdefs.h <<_ACEOF
8399#define pid_t int
8400_ACEOF
8401
8402fi
8403
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008406#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413
8414cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008416_ACEOF
8417
8418fi
8419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8421$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008422if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008424else
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008427#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
8429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008432 ac_cv_type_uid_t=yes
8433else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434 ac_cv_type_uid_t=no
8435fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008436rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8440$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008441if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445
Matthias Kloseb9621712010-04-24 17:59:49 +00008446$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008447
8448fi
8449
Mark Dickinson983bc162012-12-02 12:11:38 +00008450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453
Matthias Kloseb9621712010-04-24 17:59:49 +00008454$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008455
8456fi
8457
Stefan Krah1919b7e2012-03-21 18:25:23 +01008458ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8459if test "x$ac_cv_type___uint128_t" = xyes; then :
8460
8461$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8462
8463fi
8464
Jack Jansendd19cf82001-12-06 22:36:17 +00008465
Michael W. Hudson54241132001-12-07 15:38:26 +00008466# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008467# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468# The cast to long int works around a bug in the HP C Compiler
8469# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8470# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8471# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8473$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 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 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 if test "$ac_cv_type_int" = yes; then
8481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008483as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008484See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 else
8486 ac_cv_sizeof_int=0
8487 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8492$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493
8494
8495
Martin v. Löwis11437992002-04-12 09:54:03 +00008496cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008497#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008498_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008499
8500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501# The cast to long int works around a bug in the HP C Compiler
8502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8504# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8506$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008507if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 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 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 if test "$ac_cv_type_long" = yes; then
8514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008516as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008517See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518 else
8519 ac_cv_sizeof_long=0
8520 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8525$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
8527
8528
Martin v. Löwis11437992002-04-12 09:54:03 +00008529cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008530#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008531_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008532
8533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534# The cast to long int works around a bug in the HP C Compiler
8535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8537# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8539$as_echo_n "checking size of long long... " >&6; }
8540if ${ac_cv_sizeof_long_long+:} false; then :
8541 $as_echo_n "(cached) " >&6
8542else
8543 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8544
8545else
8546 if test "$ac_cv_type_long_long" = yes; then
8547 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8549as_fn_error 77 "cannot compute sizeof (long long)
8550See \`config.log' for more details" "$LINENO" 5; }
8551 else
8552 ac_cv_sizeof_long_long=0
8553 fi
8554fi
8555
8556fi
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8558$as_echo "$ac_cv_sizeof_long_long" >&6; }
8559
8560
8561
8562cat >>confdefs.h <<_ACEOF
8563#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8564_ACEOF
8565
8566
8567# The cast to long int works around a bug in the HP C Compiler
8568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8570# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8572$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008573if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 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 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 if test "$ac_cv_type_void_p" = yes; then
8580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008582as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008583See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 else
8585 ac_cv_sizeof_void_p=0
8586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8591$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592
8593
8594
Martin v. Löwis11437992002-04-12 09:54:03 +00008595cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008596#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008597_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008598
8599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8605$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008606if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 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 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611else
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 if test "$ac_cv_type_short" = yes; then
8613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008615as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008616See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 else
8618 ac_cv_sizeof_short=0
8619 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8624$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625
8626
8627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008629#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008630_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008631
8632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633# The cast to long int works around a bug in the HP C Compiler
8634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8636# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8638$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008639if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 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 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 if test "$ac_cv_type_float" = yes; then
8646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008648as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008649See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_float=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8657$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008662#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008664
8665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666# The cast to long int works around a bug in the HP C Compiler
8667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8671$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008672if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 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 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 if test "$ac_cv_type_double" = yes; then
8679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008681as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008682See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683 else
8684 ac_cv_sizeof_double=0
8685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8690$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691
8692
8693
Martin v. Löwis11437992002-04-12 09:54:03 +00008694cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008695#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008697
8698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699# The cast to long int works around a bug in the HP C Compiler
8700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8702# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8704$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 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 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if test "$ac_cv_type_fpos_t" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008714as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008715See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716 else
8717 ac_cv_sizeof_fpos_t=0
8718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8723$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724
8725
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008728#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008729_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008730
Michael W. Hudson54241132001-12-07 15:38:26 +00008731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8737$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Martin v. Löwis18e16552006-02-15 17:27:45 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_size_t" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof_size_t=0
8751 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Martin v. Löwis18e16552006-02-15 17:27:45 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8756$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Martin v. Löwis18e16552006-02-15 17:27:45 +00008760cat >>confdefs.h <<_ACEOF
8761#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8762_ACEOF
8763
8764
Christian Heimes400adb02008-02-01 08:12:03 +00008765# The cast to long int works around a bug in the HP C Compiler
8766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8770$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008771if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 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 +00008775
Christian Heimes400adb02008-02-01 08:12:03 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if test "$ac_cv_type_pid_t" = yes; then
8778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008780as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008781See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008782 else
8783 ac_cv_sizeof_pid_t=0
8784 fi
8785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786
Christian Heimes400adb02008-02-01 08:12:03 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8789$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008790
8791
8792
8793cat >>confdefs.h <<_ACEOF
8794#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8795_ACEOF
8796
8797
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008798# The cast to long int works around a bug in the HP C Compiler
8799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8801# This bug is HP SR number 8606223364.
8802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8803$as_echo_n "checking size of uintptr_t... " >&6; }
8804if ${ac_cv_sizeof_uintptr_t+:} false; then :
8805 $as_echo_n "(cached) " >&6
8806else
8807 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8808
8809else
8810 if test "$ac_cv_type_uintptr_t" = yes; then
8811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8813as_fn_error 77 "cannot compute sizeof (uintptr_t)
8814See \`config.log' for more details" "$LINENO" 5; }
8815 else
8816 ac_cv_sizeof_uintptr_t=0
8817 fi
8818fi
8819
8820fi
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8822$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8823
8824
8825
8826cat >>confdefs.h <<_ACEOF
8827#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8828_ACEOF
8829
8830
Michael W. Hudson54241132001-12-07 15:38:26 +00008831
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008832
Eitan Adler3055c942018-05-15 22:58:09 -07008833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8834$as_echo_n "checking for long double... " >&6; }
8835if ${ac_cv_type_long_double+:} false; then :
8836 $as_echo_n "(cached) " >&6
8837else
8838 if test "$GCC" = yes; then
8839 ac_cv_type_long_double=yes
8840 else
8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8842/* end confdefs.h. */
8843/* The Stardent Vistra knows sizeof (long double), but does
8844 not support it. */
8845 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008846int
8847main ()
8848{
Eitan Adler3055c942018-05-15 22:58:09 -07008849static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8850 sizeof (double) <= sizeof (long double))];
8851test_array [0] = 0;
8852return test_array [0];
8853
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008854 ;
8855 return 0;
8856}
8857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008858if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008859 ac_cv_type_long_double=yes
8860else
8861 ac_cv_type_long_double=no
8862fi
8863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8864 fi
8865fi
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8867$as_echo "$ac_cv_type_long_double" >&6; }
8868 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008871
Eitan Adler3055c942018-05-15 22:58:09 -07008872 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008874# The cast to long int works around a bug in the HP C Compiler
8875# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8876# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8877# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8879$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008880if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008882else
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 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 +00008884
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 if test "$ac_cv_type_long_double" = yes; then
8887 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008889as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008890See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891 else
8892 ac_cv_sizeof_long_double=0
8893 fi
8894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008895
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8898$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008899
8900
8901
8902cat >>confdefs.h <<_ACEOF
8903#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8904_ACEOF
8905
8906
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908# The cast to long int works around a bug in the HP C Compiler
8909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8911# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8913$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008914if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008916else
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 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 +00008918
Thomas Woutersb2137042007-02-01 18:02:27 +00008919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 if test "$ac_cv_type__Bool" = yes; then
8921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008923as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008924See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925 else
8926 ac_cv_sizeof__Bool=0
8927 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929
Thomas Woutersb2137042007-02-01 18:02:27 +00008930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8932$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933
8934
8935
Thomas Woutersb2137042007-02-01 18:02:27 +00008936cat >>confdefs.h <<_ACEOF
8937#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8938_ACEOF
8939
8940
Thomas Woutersb2137042007-02-01 18:02:27 +00008941
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008942# The cast to long int works around a bug in the HP C Compiler
8943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8945# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8947$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008948if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952#ifdef HAVE_SYS_TYPES_H
8953#include <sys/types.h>
8954#endif
8955
Matthias Kloseb9621712010-04-24 17:59:49 +00008956"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008958else
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 if test "$ac_cv_type_off_t" = yes; then
8960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008962as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008963See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964 else
8965 ac_cv_sizeof_off_t=0
8966 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8971$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973
8974
Martin v. Löwis11437992002-04-12 09:54:03 +00008975cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008976#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008977_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008978
Michael W. Hudson54241132001-12-07 15:38:26 +00008979
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8982$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008983if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008984 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008987
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8989$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008993fi
8994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995# The cast to long int works around a bug in the HP C Compiler
8996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8998# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9000$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009001if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003else
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005#ifdef HAVE_SYS_TYPES_H
9006#include <sys/types.h>
9007#endif
9008#ifdef HAVE_TIME_H
9009#include <time.h>
9010#endif
9011
Matthias Kloseb9621712010-04-24 17:59:49 +00009012"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 if test "$ac_cv_type_time_t" = yes; then
9016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009018as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009019See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020 else
9021 ac_cv_sizeof_time_t=0
9022 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009024
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9027$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029
9030
Martin v. Löwis11437992002-04-12 09:54:03 +00009031cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009032#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009034
Michael W. Hudson54241132001-12-07 15:38:26 +00009035
9036
Trent Mick635f6fb2000-08-23 21:33:05 +00009037# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009038ac_save_cc="$CC"
9039if test "$ac_cv_kpthread" = "yes"
9040then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009041elif test "$ac_cv_kthread" = "yes"
9042then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043elif test "$ac_cv_pthread" = "yes"
9044then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009045fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9048$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009049have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009052
9053 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009054int
9055main ()
9056{
Guido van Rossum12580492000-09-24 16:47:19 +00009057pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 ;
9059 return 0;
9060}
Matthias Kloseb159a552010-04-25 21:00:44 +00009061
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009063if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009064 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9068$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009069if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9075$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009076if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078else
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009080#ifdef HAVE_PTHREAD_H
9081#include <pthread.h>
9082#endif
9083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009085
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009086else
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 if test "$ac_cv_type_pthread_t" = yes; then
9088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009090as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009091See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092 else
9093 ac_cv_sizeof_pthread_t=0
9094 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009096
Trent Mick635f6fb2000-08-23 21:33:05 +00009097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9099$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101
9102
Martin v. Löwis11437992002-04-12 09:54:03 +00009103cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009104#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009105_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107
Trent Mick635f6fb2000-08-23 21:33:05 +00009108fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009109
9110# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9111# This checking will be unnecessary after removing deprecated TLS API.
9112# The cast to long int works around a bug in the HP C Compiler
9113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9115# This bug is HP SR number 8606223364.
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9117$as_echo_n "checking size of pthread_key_t... " >&6; }
9118if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9119 $as_echo_n "(cached) " >&6
9120else
9121 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9122"; then :
9123
9124else
9125 if test "$ac_cv_type_pthread_key_t" = yes; then
9126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9128as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9129See \`config.log' for more details" "$LINENO" 5; }
9130 else
9131 ac_cv_sizeof_pthread_key_t=0
9132 fi
9133fi
9134
9135fi
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9137$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9138
9139
9140
9141cat >>confdefs.h <<_ACEOF
9142#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9143_ACEOF
9144
9145
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9147$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9148if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150/* end confdefs.h. */
9151#include <pthread.h>
9152int
9153main ()
9154{
9155pthread_key_t k; k * 1;
9156 ;
9157 return 0;
9158}
9159_ACEOF
9160if ac_fn_c_try_compile "$LINENO"; then :
9161 ac_pthread_key_t_is_arithmetic_type=yes
9162else
9163 ac_pthread_key_t_is_arithmetic_type=no
9164
9165fi
9166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9168$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9169 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9170
9171$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9172
9173 fi
9174else
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176$as_echo "no" >&6; }
9177fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009178CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009179
Michael W. Hudson54241132001-12-07 15:38:26 +00009180
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009182 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009183 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9184 ;;
9185 Darwin/*)
9186 OTHER_LIBTOOL_OPT=""
9187 ;;
9188esac
9189
9190
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009191
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009192case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009193 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009194 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9195 if test "${enable_universalsdk}"; then
9196 :
9197 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009198 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009199 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009200 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009201 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009202 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009203 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009204 if test ${gcc_version} '<' 4.0
9205 then
9206 LIBTOOL_CRUFT="-lcc_dynamic"
9207 else
9208 LIBTOOL_CRUFT=""
9209 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009210 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009211 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009212else
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009215
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009216 #include <unistd.h>
9217 int main(int argc, char*argv[])
9218 {
9219 if (sizeof(long) == 4) {
9220 return 0;
9221 } else {
9222 return 1;
9223 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009224 }
9225
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009227if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009228 ac_osx_32bit=yes
9229else
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234fi
9235
9236
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009237 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009238 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009239 i386)
9240 MACOSX_DEFAULT_ARCH="i386"
9241 ;;
9242 ppc)
9243 MACOSX_DEFAULT_ARCH="ppc"
9244 ;;
9245 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009246 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247 ;;
9248 esac
9249 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009250 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009251 i386)
9252 MACOSX_DEFAULT_ARCH="x86_64"
9253 ;;
9254 ppc)
9255 MACOSX_DEFAULT_ARCH="ppc64"
9256 ;;
9257 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009258 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009259 ;;
9260 esac
9261
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009262 fi
9263
9264 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009265 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9269$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009270if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009272 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009274 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9279$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009280 if test $enable_shared = "yes"
9281 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009282 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 +00009283 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284else
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287fi
9288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9290$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009291case $ac_sys_system/$ac_sys_release in
9292 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9297$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009298 ;;
9299 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009302 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009303esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009304
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306
Michael W. Hudson54241132001-12-07 15:38:26 +00009307
9308
9309
9310
Benjamin Peterson99f03762010-04-11 22:15:28 +00009311
Thomas Wouters477c8d52006-05-27 19:21:47 +00009312
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009313# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9314# -- usually .so, .sl on HP-UX, .dll on Cygwin
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9316$as_echo_n "checking the extension of shared libraries... " >&6; }
9317if test -z "$SHLIB_SUFFIX"; then
9318 case $ac_sys_system in
9319 hp*|HP*)
9320 case `uname -m` in
9321 ia64) SHLIB_SUFFIX=.so;;
9322 *) SHLIB_SUFFIX=.sl;;
9323 esac
9324 ;;
9325 CYGWIN*) SHLIB_SUFFIX=.dll;;
9326 *) SHLIB_SUFFIX=.so;;
9327 esac
9328fi
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9330$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009331
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009333# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334# (Shared libraries in this instance are shared modules to be loaded into
9335# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9337$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338if test -z "$LDSHARED"
9339then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009341 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009342 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009343 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009344 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009346 if test "$GCC" = "yes" ; then
9347 LDSHARED='$(CC) -shared'
9348 LDCXXSHARED='$(CXX) -shared'
9349 else
9350 LDSHARED='$(CC) -G'
9351 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009352 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009353 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009354 if test "$GCC" = "yes" ; then
9355 LDSHARED='$(CC) -shared'
9356 LDCXXSHARED='$(CXX) -shared'
9357 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009358 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009359 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009360 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009361 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009362 LDSHARED='$(CC) -bundle'
9363 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009364 if test "$enable_framework" ; then
9365 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009366 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9367 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009368 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009369 else
9370 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009371 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009372 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009373 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009374 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009375 LDSHARED='$(CC) -bundle'
9376 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009377 if test "$enable_framework" ; then
9378 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009379 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9380 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009381 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009382 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009383 # No framework, use the Python app as bundle-loader
9384 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009385 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009386 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009387 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009388 Darwin/*)
9389 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9390 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009391
Ned Deily36820b62014-06-25 13:44:22 -07009392 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9393 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9394 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9395 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9396 if test ${dep_target_major} -eq 10 && \
9397 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009398 then
Ned Deily36820b62014-06-25 13:44:22 -07009399 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009400 LDSHARED='$(CC) -bundle'
9401 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009402 if test "$enable_framework" ; then
9403 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009404 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9405 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009406 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009407 else
9408 # No framework, use the Python app as bundle-loader
9409 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9410 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009411 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009412 fi
Ned Deily36820b62014-06-25 13:44:22 -07009413 else
9414 # building for OS X 10.3 and later
9415 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9416 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9417 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009418 fi
9419 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009420 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 LDSHARED='$(CC) -shared'
9422 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009423 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009424 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009425 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009426 LDSHARED='$(CC) -shared'
9427 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009428 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009429 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009430 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009431 OpenBSD*)
9432 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9433 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009434 LDSHARED='$(CC) -shared $(CCSHARED)'
9435 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009436 else
9437 case `uname -r` in
9438 [01].* | 2.[0-7] | 2.[0-7].*)
9439 LDSHARED="ld -Bshareable ${LDFLAGS}"
9440 ;;
9441 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009442 LDSHARED='$(CC) -shared $(CCSHARED)'
9443 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009444 ;;
9445 esac
9446 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009448 LDSHARED='$(CC) -shared'
9449 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009450 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 if test "$GCC" = "yes" ; then
9452 LDSHARED='$(CC) -shared'
9453 LDCXXSHARED='$(CXX) -shared'
9454 else
9455 LDSHARED='$(CC) -G'
9456 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009457 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009458 SCO_SV*)
9459 LDSHARED='$(CC) -Wl,-G,-Bexport'
9460 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9461 CYGWIN*)
9462 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9463 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464 *) LDSHARED="ld";;
9465 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9468$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009470BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009471# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009472# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9474$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009475if test -z "$CCSHARED"
9476then
Guido van Rossum07397971997-04-29 21:49:50 +00009477 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009478 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009479 then CCSHARED="-fPIC";
9480 elif test `uname -p` = sparc;
9481 then CCSHARED="-xcode=pic32";
9482 else CCSHARED="-Kpic";
9483 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009484 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009485 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009486 else CCSHARED="+z";
9487 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009488 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009489 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009490 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009491 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009492 if test "$GCC" = "yes"
9493 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009494 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009495 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009496 SCO_SV*)
9497 if test "$GCC" = "yes"
9498 then CCSHARED="-fPIC"
9499 else CCSHARED="-Kpic -belf"
9500 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009501 VxWorks*)
9502 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009503 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9506$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009508# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9510$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009511if test -z "$LINKFORSHARED"
9512then
Guido van Rossum07397971997-04-29 21:49:50 +00009513 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009514 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009515 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009516 LINKFORSHARED="-Wl,-E -Wl,+s";;
9517# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009518 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009519 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009520 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009522 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009523
9524 # Issue #18075: the default maximum stack size (8MBytes) is too
9525 # small for the default recursion limit. Increase the stack size
9526 # to ensure that tests don't crash
Miss Islington (bot)83996412019-08-01 07:38:57 -07009527 # Note: This matches the value of THREAD_STACK_SIZE in
9528 # thread_pthread.h
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009529 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9530
Jack Jansene578a632001-08-15 01:27:14 +00009531 if test "$enable_framework"
9532 then
Jack Jansenda49e192005-01-07 13:08:22 +00009533 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009534 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009535 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009536 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009537 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009538 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009539 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009540 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9541 then
9542 LINKFORSHARED="-Wl,--export-dynamic"
9543 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009544 SunOS/5*) case $CC in
9545 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009546 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009547 then
9548 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009549 fi;;
9550 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009551 CYGWIN*)
9552 if test $enable_shared = "no"
9553 then
9554 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9555 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009556 QNX*)
9557 # -Wl,-E causes the symbols to be added to the dynamic
9558 # symbol table so that they can be found when a module
9559 # is loaded. -N 2048K causes the stack size to be set
9560 # to 2048 kilobytes so that the stack doesn't overflow
9561 # when running test_compile.py.
9562 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009563 VxWorks*)
9564 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009565 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9568$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569
Michael W. Hudson54241132001-12-07 15:38:26 +00009570
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009571
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9573$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009574if test ! "$LIBRARY" = "$LDLIBRARY"
9575then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009576 case $ac_sys_system in
9577 CYGWIN*)
9578 # Cygwin needs CCSHARED when building extension DLLs
9579 # but not when building the interpreter DLL.
9580 CFLAGSFORSHARED='';;
9581 *)
9582 CFLAGSFORSHARED='$(CCSHARED)'
9583 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9586$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009587
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009588# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9589# library (with --enable-shared).
9590# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009591# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9592# if it is not required, since it creates a dependency of the shared library
9593# to LIBS. This, in turn, means that applications linking the shared libpython
9594# don't need to link LIBS explicitly. The default should be only changed
9595# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9598$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009600 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009601 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009602esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9604$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009605
9606
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9609$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009610if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009611 $as_echo_n "(cached) " >&6
9612else
9613 ac_check_lib_save_LIBS=$LIBS
9614LIBS="-lsendfile $LIBS"
9615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9616/* end confdefs.h. */
9617
9618/* Override any GCC internal prototype to avoid an error.
9619 Use char because int might match the return type of a GCC
9620 builtin and then its argument prototype would still apply. */
9621#ifdef __cplusplus
9622extern "C"
9623#endif
9624char sendfile ();
9625int
9626main ()
9627{
9628return sendfile ();
9629 ;
9630 return 0;
9631}
9632_ACEOF
9633if ac_fn_c_try_link "$LINENO"; then :
9634 ac_cv_lib_sendfile_sendfile=yes
9635else
9636 ac_cv_lib_sendfile_sendfile=no
9637fi
9638rm -f core conftest.err conftest.$ac_objext \
9639 conftest$ac_exeext conftest.$ac_ext
9640LIBS=$ac_check_lib_save_LIBS
9641fi
9642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9643$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009644if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009645 cat >>confdefs.h <<_ACEOF
9646#define HAVE_LIBSENDFILE 1
9647_ACEOF
9648
9649 LIBS="-lsendfile $LIBS"
9650
9651fi
9652
Matthias Kloseb9621712010-04-24 17:59:49 +00009653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9654$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009655if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009659LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663/* Override any GCC internal prototype to avoid an error.
9664 Use char because int might match the return type of a GCC
9665 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009666#ifdef __cplusplus
9667extern "C"
9668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009669char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009670int
9671main ()
9672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009680else
Matthias Kloseb9621712010-04-24 17:59:49 +00009681 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009683rm -f core conftest.err conftest.$ac_objext \
9684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009685LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9688$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009689if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 cat >>confdefs.h <<_ACEOF
9691#define HAVE_LIBDL 1
9692_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009693
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009694 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009695
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009696fi
9697 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9699$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009700if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009702else
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009704LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708/* Override any GCC internal prototype to avoid an error.
9709 Use char because int might match the return type of a GCC
9710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711#ifdef __cplusplus
9712extern "C"
9713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009714char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715int
9716main ()
9717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009725else
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728rm -f core conftest.err conftest.$ac_objext \
9729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9733$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 cat >>confdefs.h <<_ACEOF
9736#define HAVE_LIBDLD 1
9737_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009739 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009740
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009741fi
9742 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009743
Michael Felt0d3ccb42017-12-30 22:39:20 +01009744# checks for uuid.h location
9745for ac_header in uuid/uuid.h uuid.h
9746do :
9747 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9748ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9750 cat >>confdefs.h <<_ACEOF
9751#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9752_ACEOF
9753
9754fi
9755
9756done
9757
9758
Berker Peksag9a10ff42017-11-08 23:09:16 +03009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9760$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9762/* end confdefs.h. */
9763#include <uuid/uuid.h>
9764int
9765main ()
9766{
9767
9768#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009769void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009770#endif
9771
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776if ac_fn_c_try_compile "$LINENO"; then :
9777
9778$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9779
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9781$as_echo "yes" >&6; }
9782else
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
9785
9786fi
9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9788
Michael Felt0d3ccb42017-12-30 22:39:20 +01009789# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009790# FreeBSD and OpenBSD provides support as well
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9792$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9794/* end confdefs.h. */
9795#include <uuid.h>
9796int
9797main ()
9798{
9799
9800#ifndef uuid_create
9801void *x = uuid_create
9802#endif
9803
9804 ;
9805 return 0;
9806}
9807_ACEOF
9808if ac_fn_c_try_compile "$LINENO"; then :
9809
9810$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9811
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813$as_echo "yes" >&6; }
9814else
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817
9818fi
9819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9820
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009821# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9822# stream in big-endian byte-order
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9824$as_echo_n "checking for uuid_enc_be... " >&6; }
9825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9826/* end confdefs.h. */
9827#include <uuid.h>
9828int
9829main ()
9830{
9831
9832#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009833void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009834#endif
9835
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840if ac_fn_c_try_compile "$LINENO"; then :
9841
9842$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9843
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9845$as_echo "yes" >&6; }
9846else
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9848$as_echo "no" >&6; }
9849
9850fi
9851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9852
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009853# 'Real Time' functions on Solaris
9854# posix4 on Solaris 2.6
9855# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009857$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009858if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009860else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009861 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865/* Override any GCC internal prototype to avoid an error.
9866 Use char because int might match the return type of a GCC
9867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868#ifdef __cplusplus
9869extern "C"
9870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009871char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009872int
9873main ()
9874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 ;
9877 return 0;
9878}
9879_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880for ac_lib in '' pthread rt posix4; do
9881 if test -z "$ac_lib"; then
9882 ac_res="none required"
9883 else
9884 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009885 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009890rm -f core conftest.err conftest.$ac_objext \
9891 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009892 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895done
Victor Stinnere0be4232011-10-25 13:06:09 +02009896if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898else
9899 ac_cv_search_sem_init=no
9900fi
9901rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009902LIBS=$ac_func_search_save_LIBS
9903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9905$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009907if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009909
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009910fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009911
Martin v. Löwis519adae2003-09-20 10:47:47 +00009912
Martin v. Löwis19d17342003-06-14 21:03:05 +00009913# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9915$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009916if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009918else
9919 ac_check_lib_save_LIBS=$LIBS
9920LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009922/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924/* Override any GCC internal prototype to avoid an error.
9925 Use char because int might match the return type of a GCC
9926 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009927#ifdef __cplusplus
9928extern "C"
9929#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009930char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931int
9932main ()
9933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009935 ;
9936 return 0;
9937}
9938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940 ac_cv_lib_intl_textdomain=yes
9941else
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944rm -f core conftest.err conftest.$ac_objext \
9945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009946LIBS=$ac_check_lib_save_LIBS
9947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9949$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009950if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953
Brett Cannonc6d936e2009-06-07 20:09:53 +00009954 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009955fi
9956
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009957
9958# checks for system dependent C++ extensions support
9959case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9961$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009964
Georg Brandl59e87bd2011-02-15 19:48:59 +00009965 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009966int
9967main ()
9968{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009969loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 ;
9971 return 0;
9972}
Matthias Kloseb159a552010-04-25 21:00:44 +00009973
Martin v. Löwis11437992002-04-12 09:54:03 +00009974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009975if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009979
Matthias Kloseb159a552010-04-25 21:00:44 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009982
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009983else
Matthias Kloseb159a552010-04-25 21:00:44 +00009984
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009987
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009989rm -f core conftest.err conftest.$ac_objext \
9990 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009991 *) ;;
9992esac
9993
Christian Heimes985ecdc2013-11-20 11:46:18 +01009994# check for systems that require aligned memory access
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9996$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009997if ${ac_cv_aligned_required+:} false; then :
9998 $as_echo_n "(cached) " >&6
9999else
10000 if test "$cross_compiling" = yes; then :
10001 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010002else
10003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10004/* end confdefs.h. */
10005
10006int main()
10007{
10008 char s[16];
10009 int i, *p1, *p2;
10010 for (i=0; i < 16; i++)
10011 s[i] = i;
10012 p1 = (int*)(s+1);
10013 p2 = (int*)(s+2);
10014 if (*p1 == *p2)
10015 return 1;
10016 return 0;
10017}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010018_ACEOF
10019if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010020 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010021else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010022 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023fi
10024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10025 conftest.$ac_objext conftest.beam conftest.$ac_ext
10026fi
10027
10028
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010029fi
10030
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10032$as_echo "$ac_cv_aligned_required" >&6; }
10033if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010034
10035$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10036
10037fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010038
10039# str, bytes and memoryview hash algorithm
10040
10041
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10043$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10044
10045# Check whether --with-hash_algorithm was given.
10046if test "${with_hash_algorithm+set}" = set; then :
10047 withval=$with_hash_algorithm;
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10049$as_echo "$withval" >&6; }
10050case "$withval" in
10051 siphash24)
10052 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10053
10054 ;;
10055 fnv)
10056 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10057
10058 ;;
10059 *)
10060 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10061 ;;
10062esac
10063
10064else
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10066$as_echo "default" >&6; }
10067fi
10068
10069
Charles-François Natalid30b0222014-05-08 23:08:51 +010010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10071$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10072
10073# Check whether --with-address_sanitizer was given.
10074if test "${with_address_sanitizer+set}" = set; then :
10075 withval=$with_address_sanitizer;
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10077$as_echo "$withval" >&6; }
10078BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10079LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010080# ASan works by controlling memory allocation, our own malloc interferes.
10081with_pymalloc="no"
10082
10083else
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10090$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10091
10092# Check whether --with-memory_sanitizer was given.
10093if test "${with_memory_sanitizer+set}" = set; then :
10094 withval=$with_memory_sanitizer;
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10096$as_echo "$withval" >&6; }
10097BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10098LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10099# MSan works by controlling memory allocation, our own malloc interferes.
10100with_pymalloc="no"
10101
10102else
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105fi
10106
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10109$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10110
10111# Check whether --with-undefined_behavior_sanitizer was given.
10112if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10113 withval=$with_undefined_behavior_sanitizer;
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10115$as_echo "$withval" >&6; }
10116BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10117LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010118
10119else
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
Guido van Rossum70c7f481998-03-26 18:44:10 +000010125# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10127$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010128if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010130else
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010132LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136/* Override any GCC internal prototype to avoid an error.
10137 Use char because int might match the return type of a GCC
10138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139#ifdef __cplusplus
10140extern "C"
10141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010142char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010143int
10144main ()
10145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010153else
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156rm -f core conftest.err conftest.$ac_objext \
10157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10161$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010162if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010163 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010164fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010165 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10167$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010168if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010170else
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010172LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176/* Override any GCC internal prototype to avoid an error.
10177 Use char because int might match the return type of a GCC
10178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010179#ifdef __cplusplus
10180extern "C"
10181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010182char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010183int
10184main ()
10185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ;
10188 return 0;
10189}
10190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010193else
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196rm -f core conftest.err conftest.$ac_objext \
10197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010198LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10201$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010202if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010203 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010204fi
10205 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10208$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10214$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010215LIBS="$withval $LIBS"
10216
10217else
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10219$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220fi
10221
Guido van Rossum7f43da71994-08-01 12:15:30 +000010222
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010223
10224
10225
10226
10227
10228
Victor Stinner23a683a2019-04-12 21:27:37 +020010229
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010230if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10231 if test -n "$ac_tool_prefix"; then
10232 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10233set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10235$as_echo_n "checking for $ac_word... " >&6; }
10236if ${ac_cv_path_PKG_CONFIG+:} false; then :
10237 $as_echo_n "(cached) " >&6
10238else
10239 case $PKG_CONFIG in
10240 [\\/]* | ?:[\\/]*)
10241 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10242 ;;
10243 *)
10244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245for as_dir in $PATH
10246do
10247 IFS=$as_save_IFS
10248 test -z "$as_dir" && as_dir=.
10249 for ac_exec_ext in '' $ac_executable_extensions; do
10250 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10251 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10253 break 2
10254 fi
10255done
10256 done
10257IFS=$as_save_IFS
10258
10259 ;;
10260esac
10261fi
10262PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10263if test -n "$PKG_CONFIG"; then
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10265$as_echo "$PKG_CONFIG" >&6; }
10266else
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268$as_echo "no" >&6; }
10269fi
10270
10271
10272fi
10273if test -z "$ac_cv_path_PKG_CONFIG"; then
10274 ac_pt_PKG_CONFIG=$PKG_CONFIG
10275 # Extract the first word of "pkg-config", so it can be a program name with args.
10276set dummy pkg-config; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10280 $as_echo_n "(cached) " >&6
10281else
10282 case $ac_pt_PKG_CONFIG in
10283 [\\/]* | ?:[\\/]*)
10284 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10285 ;;
10286 *)
10287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290 IFS=$as_save_IFS
10291 test -z "$as_dir" && as_dir=.
10292 for ac_exec_ext in '' $ac_executable_extensions; do
10293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296 break 2
10297 fi
10298done
10299 done
10300IFS=$as_save_IFS
10301
10302 ;;
10303esac
10304fi
10305ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10306if test -n "$ac_pt_PKG_CONFIG"; then
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10308$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10309else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314 if test "x$ac_pt_PKG_CONFIG" = x; then
10315 PKG_CONFIG=""
10316 else
10317 case $cross_compiling:$ac_tool_warned in
10318yes:)
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10321ac_tool_warned=yes ;;
10322esac
10323 PKG_CONFIG=$ac_pt_PKG_CONFIG
10324 fi
10325else
10326 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10327fi
10328
10329fi
10330if test -n "$PKG_CONFIG"; then
10331 _pkg_min_version=0.9.0
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10333$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10334 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10336$as_echo "yes" >&6; }
10337 else
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
10340 PKG_CONFIG=""
10341 fi
10342fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010343
10344# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10346$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010347
10348# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010350 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010351else
10352 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010353fi
10354
10355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10357$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010358
10359# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10361$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010362
10363# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010365 withval=$with_system_ffi;
10366fi
10367
10368
Zachary Waref40d4dd2016-09-17 01:25:24 -050010369if test "$ac_sys_system" = "Darwin"
10370then
10371 case "$with_system_ffi" in
10372 "")
10373 with_system_ffi="no"
10374 ;;
10375 yes|no)
10376 ;;
10377 *)
10378 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10379 ;;
10380 esac
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10382$as_echo "$with_system_ffi" >&6; }
10383else
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10385$as_echo "yes" >&6; }
10386 if test "$with_system_ffi" != ""
10387 then
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10389$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10390 fi
10391 with_system_ffi="yes"
10392fi
Zachary Ware935043d2016-09-09 17:01:21 -070010393
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010394if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010395 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10396else
10397 LIBFFI_INCLUDEDIR=""
10398fi
10399
10400
Stefan Krah60187b52012-03-23 19:06:27 +010010401# Check for use of the system libmpdec library
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10403$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10404
10405# Check whether --with-system_libmpdec was given.
10406if test "${with_system_libmpdec+set}" = set; then :
10407 withval=$with_system_libmpdec;
10408else
10409 with_system_libmpdec="no"
10410fi
10411
10412
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10414$as_echo "$with_system_libmpdec" >&6; }
10415
Benjamin Peterson076ed002010-10-31 17:11:02 +000010416# Check for support for loadable sqlite extensions
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10418$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10419# Check whether --enable-loadable-sqlite-extensions was given.
10420if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10421 enableval=$enable_loadable_sqlite_extensions;
10422else
10423 enable_loadable_sqlite_extensions="no"
10424fi
10425
10426
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10428$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10429
Ned Deilyd819b932013-09-06 01:07:05 -070010430# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10431
10432
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10434$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10435
10436# Check whether --with-tcltk-includes was given.
10437if test "${with_tcltk_includes+set}" = set; then :
10438 withval=$with_tcltk_includes;
10439else
10440 with_tcltk_includes="default"
10441fi
10442
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10444$as_echo "$with_tcltk_includes" >&6; }
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10446$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10447
10448# Check whether --with-tcltk-libs was given.
10449if test "${with_tcltk_libs+set}" = set; then :
10450 withval=$with_tcltk_libs;
10451else
10452 with_tcltk_libs="default"
10453fi
10454
10455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10456$as_echo "$with_tcltk_libs" >&6; }
10457if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10458then
10459 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10460 then
10461 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10462 fi
10463 TCLTK_INCLUDES=""
10464 TCLTK_LIBS=""
10465else
10466 TCLTK_INCLUDES="$with_tcltk_includes"
10467 TCLTK_LIBS="$with_tcltk_libs"
10468fi
10469
Matthias Klose55708cc2009-04-30 08:06:49 +000010470# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10472$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010473
10474# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010475if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010476 withval=$with_dbmliborder;
10477if test x$with_dbmliborder = xyes
10478then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010479as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010480else
10481 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10482 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10483 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010484 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010485 fi
10486 done
10487fi
10488fi
10489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10491$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010492
Martin v. Löwis11437992002-04-12 09:54:03 +000010493# Templates for things AC_DEFINEd more than once.
10494# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010495
10496
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010497if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010498then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010499 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010501
10502 posix_threads=yes
Miss Islington (bot)8750bce2019-09-27 19:20:31 -070010503 if test "$ac_sys_system" = "SunOS"; then
10504 CFLAGS="$CFLAGS -D_REENTRANT"
10505 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010506elif test "$ac_cv_kpthread" = "yes"
10507then
10508 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010509 if test "$ac_cv_cxx_thread" = "yes"; then
10510 CXX="$CXX -Kpthread"
10511 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010512 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010513elif test "$ac_cv_kthread" = "yes"
10514then
10515 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010516 if test "$ac_cv_cxx_thread" = "yes"; then
10517 CXX="$CXX -Kthread"
10518 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010519 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010520elif test "$ac_cv_pthread" = "yes"
10521then
10522 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010523 if test "$ac_cv_cxx_thread" = "yes"; then
10524 CXX="$CXX -pthread"
10525 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010526 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010527else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010528 if test ! -z "$withval" -a -d "$withval"
10529 then LDFLAGS="$LDFLAGS -L$withval"
10530 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010531
10532 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010533 # define _POSIX_THREADS in unistd.h. Some apparently don't
10534 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10536$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010539
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010540#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010541#ifdef _POSIX_THREADS
10542yes
10543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010544
10545_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010548 unistd_defines_pthreads=yes
10549else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010550 unistd_defines_pthreads=no
10551fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010552rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10555$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010558
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010559 # Just looking for pthread_create in libpthread is not enough:
10560 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10561 # So we really have to include pthread.h, and then link.
10562 _libs=$LIBS
10563 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10565$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010568
10569#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010570#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010571
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010572void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010573int
10574main ()
10575{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010576
10577pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ;
10579 return 0;
10580}
10581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010582if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10585$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010586 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010587
Guido van Rossum02a1c402000-02-25 19:26:31 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010590 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010592if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010593
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010594 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010595
Guido van Rossumad678af1998-10-02 14:42:15 +000010596else
Guido van Rossumad678af1998-10-02 14:42:15 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10599$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010600if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602else
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010604LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608/* Override any GCC internal prototype to avoid an error.
10609 Use char because int might match the return type of a GCC
10610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010611#ifdef __cplusplus
10612extern "C"
10613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010614char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010615int
10616main ()
10617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010618return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ;
10620 return 0;
10621}
10622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010628rm -f core conftest.err conftest.$ac_objext \
10629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010630LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10633$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010634if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010635
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010636 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010637 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010638
Greg Steinadf63d62000-07-05 10:38:09 +000010639else
Greg Steinadf63d62000-07-05 10:38:09 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10642$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010643if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010645else
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010647LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651/* Override any GCC internal prototype to avoid an error.
10652 Use char because int might match the return type of a GCC
10653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010654#ifdef __cplusplus
10655extern "C"
10656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010657char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010658int
10659main ()
10660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ;
10663 return 0;
10664}
10665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010668else
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010671rm -f core conftest.err conftest.$ac_objext \
10672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010673LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10676$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010677if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010679 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010680 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010681
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010682else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10685$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010686if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010690LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694/* Override any GCC internal prototype to avoid an error.
10695 Use char because int might match the return type of a GCC
10696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010697#ifdef __cplusplus
10698extern "C"
10699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010700char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010701int
10702main ()
10703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010709if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010711else
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010714rm -f core conftest.err conftest.$ac_objext \
10715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010716LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10719$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010720if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010722 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010723 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010724
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010725else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10728$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010729if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010731else
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010733LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737/* Override any GCC internal prototype to avoid an error.
10738 Use char because int might match the return type of a GCC
10739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010740#ifdef __cplusplus
10741extern "C"
10742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010743char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010744int
10745main ()
10746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010754else
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010757rm -f core conftest.err conftest.$ac_objext \
10758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010759LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10762$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010763if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010764
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010765 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010766 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010767
Guido van Rossumb93a8621998-05-07 13:27:32 +000010768else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010769
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010770 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10771
Guido van Rossum2d38f911996-06-26 19:47:01 +000010772fi
10773
Guido van Rossum627b2d71993-12-24 10:39:16 +000010774
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010775fi
10776
Guido van Rossum0be3e491997-05-22 20:33:33 +000010777fi
10778
Guido van Rossum49545951997-12-02 19:28:29 +000010779fi
10780
Guido van Rossumb93a8621998-05-07 13:27:32 +000010781fi
10782
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10788$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010789if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791else
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010793LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797/* Override any GCC internal prototype to avoid an error.
10798 Use char because int might match the return type of a GCC
10799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010800#ifdef __cplusplus
10801extern "C"
10802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010803char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010804int
10805main ()
10806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010817rm -f core conftest.err conftest.$ac_objext \
10818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010819LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10822$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010823if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010824
Martin v. Löwis130fb172001-07-19 11:00:41 +000010825 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010826
Guido van Rossum627b2d71993-12-24 10:39:16 +000010827fi
10828
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010829
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010830fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010831
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010832if test "$posix_threads" = "yes"; then
10833 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010836
10837 fi
10838
10839 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10840 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010841 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010842$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010843
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844 ;;
10845 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010846$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847
10848 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010849 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010851
10852 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010853 esac
10854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10856$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010857 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859else
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861 ac_cv_pthread_system_supported=no
10862else
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010864/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010865
10866 #include <stdio.h>
10867 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868 void *foo(void *parm) {
10869 return NULL;
10870 }
10871 main() {
10872 pthread_attr_t attr;
10873 pthread_t id;
10874 if (pthread_attr_init(&attr)) exit(-1);
10875 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10876 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10877 exit(0);
10878 }
10879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010881 ac_cv_pthread_system_supported=yes
10882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010887fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889
Guido van Rossum627b2d71993-12-24 10:39:16 +000010890fi
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10893$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894 if test "$ac_cv_pthread_system_supported" = "yes"; then
10895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897
10898 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 for ac_func in pthread_sigmask
10900do :
10901 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010902if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010903 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010905_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010906 case $ac_sys_system in
10907 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010910
10911 ;;
10912 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913fi
10914done
10915
pdoxe14679c2017-10-05 00:01:56 -070010916 for ac_func in pthread_getcpuclockid
10917do :
10918 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10919if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10920 cat >>confdefs.h <<_ACEOF
10921#define HAVE_PTHREAD_GETCPUCLOCKID 1
10922_ACEOF
10923
10924fi
10925done
10926
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010927fi
10928
10929
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10933$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010935if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10939$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940 ipv6=no
10941 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10943$as_echo "yes" >&6; }
10944 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945
10946 ipv6=yes
10947 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949else
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953 /* AF_INET6 available check */
10954#include <sys/types.h>
10955#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010956int
10957main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010959int domain = AF_INET6;
10960 ;
10961 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962}
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010964if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10967$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970else
Matthias Kloseb159a552010-04-25 21:00:44 +000010971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010979if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10981$as_echo_n "checking if RFC2553 API is available... " >&6; }
10982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010983/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010984
10985 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010986#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010987int
10988main ()
10989{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010990struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010991 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ;
10993 return 0;
10994}
Matthias Kloseb159a552010-04-25 21:00:44 +000010995
Martin v. Löwis11437992002-04-12 09:54:03 +000010996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010998
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011000$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011001 ipv6=yes
11002
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011003else
Matthias Kloseb159a552010-04-25 21:00:44 +000011004
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011007 ipv6=no
11008
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011011fi
11012
11013if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011015
11016fi
11017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018fi
11019
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011020
11021ipv6type=unknown
11022ipv6lib=none
11023ipv6trylibc=no
11024
11025if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11027$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011028 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11029 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030 case $i in
11031 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035#include <netinet/in.h>
11036#ifdef IPV6_INRIA_VERSION
11037yes
11038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011042 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011044rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045
11046 ;;
11047 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051#include <netinet/in.h>
11052#ifdef __KAME__
11053yes
11054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058 ipv6type=$i;
11059 ipv6lib=inet6
11060 ipv6libdir=/usr/local/v6/lib
11061 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011063rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011064
11065 ;;
11066 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070#include <features.h>
11071#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11072yes
11073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011074_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077 ipv6type=$i;
11078 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081
11082 ;;
11083 linux-inet6)
11084 if test -d /usr/inet6; then
11085 ipv6type=$i
11086 ipv6lib=inet6
11087 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011088 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089 fi
11090 ;;
11091 solaris)
11092 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011093 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094 ipv6type=$i
11095 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096 fi
11097 fi
11098 ;;
11099 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103#include <sys/param.h>
11104#ifdef _TOSHIBA_INET6
11105yes
11106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011107_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110 ipv6type=$i;
11111 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011112 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011114rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115
11116 ;;
11117 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011119/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121#include </usr/local/v6/include/sys/v6config.h>
11122#ifdef __V6D__
11123yes
11124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011125_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128 ipv6type=$i;
11129 ipv6lib=v6;
11130 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011131 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011133rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134
11135 ;;
11136 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140#include <sys/param.h>
11141#ifdef _ZETA_MINAMI_INET6
11142yes
11143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011144_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147 ipv6type=$i;
11148 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011149 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011151rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152
11153 ;;
11154 esac
11155 if test "$ipv6type" != "unknown"; then
11156 break
11157 fi
11158 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11160$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161fi
11162
11163if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11164 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11165 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11166 echo "using lib$ipv6lib"
11167 else
11168 if test $ipv6trylibc = "yes"; then
11169 echo "using libc"
11170 else
11171 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11172 echo "You need to fetch lib$ipv6lib.a from appropriate"
11173 echo 'ipv6 kit and compile beforehand.'
11174 exit 1
11175 fi
11176 fi
11177fi
11178
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11180$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11182/* end confdefs.h. */
11183 /* CAN_RAW_FD_FRAMES available check */
11184#include <linux/can/raw.h>
11185int
11186main ()
11187{
11188int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11189 ;
11190 return 0;
11191}
11192_ACEOF
11193if ac_fn_c_try_compile "$LINENO"; then :
11194
11195
11196$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11197
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11199$as_echo "yes" >&6; }
11200
11201else
11202
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
11205
11206fi
11207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11208
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011209# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11211$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011214if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215 withval=$with_doc_strings;
11216fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011217
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011218
11219if test -z "$with_doc_strings"
11220then with_doc_strings="yes"
11221fi
11222if test "$with_doc_strings" != "no"
11223then
11224
Matthias Kloseb9621712010-04-24 17:59:49 +000011225$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011226
11227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11229$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011230
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011231# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11233$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237 withval=$with_pymalloc;
11238fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011239
Neil Schemenauera35c6882001-02-27 04:45:05 +000011240
Neil Schemenauer16c22972002-03-22 15:34:49 +000011241if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011242then
11243 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011244fi
11245if test "$with_pymalloc" != "no"
11246then
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011249
11250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11252$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011253
Nick Coghlan6ea41862017-06-11 13:16:15 +100011254# Check for --with-c-locale-coercion
11255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11256$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11257
11258# Check whether --with-c-locale-coercion was given.
11259if test "${with_c_locale_coercion+set}" = set; then :
11260 withval=$with_c_locale_coercion;
11261fi
11262
11263
11264if test -z "$with_c_locale_coercion"
11265then
11266 with_c_locale_coercion="yes"
11267fi
11268if test "$with_c_locale_coercion" != "no"
11269then
11270
11271$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11272
11273fi
11274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11275$as_echo "$with_c_locale_coercion" >&6; }
11276
Benjamin Peterson05159c42009-12-03 03:01:27 +000011277# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11279$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011280
11281# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011282if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011283 withval=$with_valgrind;
11284else
11285 with_valgrind=no
11286fi
11287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11289$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011290if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 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 +020011292if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295
11296else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011297 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011298
11299fi
11300
11301
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011302 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011303fi
11304
Łukasz Langaa785c872016-09-09 17:37:37 -070011305# Check for DTrace support
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11307$as_echo_n "checking for --with-dtrace... " >&6; }
11308
11309# Check whether --with-dtrace was given.
11310if test "${with_dtrace+set}" = set; then :
11311 withval=$with_dtrace;
11312else
11313 with_dtrace=no
11314fi
11315
11316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11317$as_echo "$with_dtrace" >&6; }
11318
11319
11320
11321
11322
11323DTRACE=
11324DFLAGS=
11325DTRACE_HEADERS=
11326DTRACE_OBJS=
11327
11328if test "$with_dtrace" = "yes"
11329then
11330 # Extract the first word of "dtrace", so it can be a program name with args.
11331set dummy dtrace; ac_word=$2
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11333$as_echo_n "checking for $ac_word... " >&6; }
11334if ${ac_cv_path_DTRACE+:} false; then :
11335 $as_echo_n "(cached) " >&6
11336else
11337 case $DTRACE in
11338 [\\/]* | ?:[\\/]*)
11339 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11340 ;;
11341 *)
11342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11343for as_dir in $PATH
11344do
11345 IFS=$as_save_IFS
11346 test -z "$as_dir" && as_dir=.
11347 for ac_exec_ext in '' $ac_executable_extensions; do
11348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11349 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11351 break 2
11352 fi
11353done
11354 done
11355IFS=$as_save_IFS
11356
11357 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11358 ;;
11359esac
11360fi
11361DTRACE=$ac_cv_path_DTRACE
11362if test -n "$DTRACE"; then
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11364$as_echo "$DTRACE" >&6; }
11365else
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368fi
11369
11370
11371 if test "$DTRACE" = "not found"; then
11372 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11373 fi
11374
11375$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11376
11377 DTRACE_HEADERS="Include/pydtrace_probes.h"
11378
11379 # On OS X, DTrace providers do not need to be explicitly compiled and
11380 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11381 # generation flag '-G'. We check for presence of this flag, rather than
11382 # hardcoding support by OS, in the interest of robustness.
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11384$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11385if ${ac_cv_dtrace_link+:} false; then :
11386 $as_echo_n "(cached) " >&6
11387else
11388 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011389 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011390 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11391 ac_cv_dtrace_link=yes
11392
11393fi
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11395$as_echo "$ac_cv_dtrace_link" >&6; }
11396 if test "$ac_cv_dtrace_link" = "yes"; then
11397 DTRACE_OBJS="Python/pydtrace.o"
11398 fi
11399fi
11400
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011401# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011402
Guido van Rossum98935bf2001-09-05 19:13:16 +000011403DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011404
Guido van Rossume97ee181999-12-20 21:27:22 +000011405# the dlopen() function means we might want to use dynload_shlib.o. some
11406# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011407for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011408do :
11409 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011410if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011413_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011414
Guido van Rossume97ee181999-12-20 21:27:22 +000011415fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011416done
Guido van Rossume97ee181999-12-20 21:27:22 +000011417
Michael W. Hudson54241132001-12-07 15:38:26 +000011418
Guido van Rossume97ee181999-12-20 21:27:22 +000011419# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11420# loading of modules.
11421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11423$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011424if test -z "$DYNLOADFILE"
11425then
11426 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011427 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11428 if test "$ac_cv_func_dlopen" = yes
11429 then DYNLOADFILE="dynload_shlib.o"
11430 else DYNLOADFILE="dynload_aix.o"
11431 fi
11432 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011433 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011434 *)
11435 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11436 # out any dynamic loading
11437 if test "$ac_cv_func_dlopen" = yes
11438 then DYNLOADFILE="dynload_shlib.o"
11439 else DYNLOADFILE="dynload_stub.o"
11440 fi
11441 ;;
11442 esac
11443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11445$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011446if test "$DYNLOADFILE" != "dynload_stub.o"
11447then
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011450
11451fi
11452
Neil Schemenauer4e425612001-06-19 15:44:15 +000011453# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11454
Michael W. Hudson54241132001-12-07 15:38:26 +000011455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11457$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011458if test -z "$MACHDEP_OBJS"
11459then
Jack Jansene578a632001-08-15 01:27:14 +000011460 MACHDEP_OBJS=$extra_machdep_objs
11461else
11462 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011463fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011464if test -z "$MACHDEP_OBJS"; then
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11466$as_echo "none" >&6; }
11467else
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11469$as_echo "$MACHDEP_OBJS" >&6; }
11470fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011471
Guido van Rossum627b2d71993-12-24 10:39:16 +000011472# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011473for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011474 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11475 faccessat fchmod fchmodat fchown fchownat \
Miss Islington (bot)84eb42e2019-09-12 04:19:21 -070011476 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011477 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011478 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011479 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011480 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011481 if_nameindex \
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -070011482 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011483 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011484 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011485 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011486 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11487 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011488 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011489 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011490 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011491 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11492 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011493 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011494 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011495 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011496 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011497 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011498do :
11499 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11500ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011501if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011504_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011506fi
11507done
11508
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Benjamin Peterson40caa052018-09-12 15:52:40 -070011510# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11511# links. Some libc implementations have a stub lchmod implementation that always
11512# returns an error.
11513if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011514 for ac_func in lchmod
11515do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011516 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11517if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011518 cat >>confdefs.h <<_ACEOF
11519#define HAVE_LCHMOD 1
11520_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011521
11522fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011523done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011524
11525fi
11526
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011527ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11528 #include <dirent.h>
11529"
11530if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11531
11532$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11533
11534fi
11535
11536
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011537# For some functions, having a definition is not sufficient, since
11538# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11540$as_echo_n "checking for chroot... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011544int
11545main ()
11546{
11547void *x=chroot
11548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011555
Matthias Kloseb159a552010-04-25 21:00:44 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011561
11562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11565$as_echo_n "checking for link... " >&6; }
11566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011567/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569int
11570main ()
11571{
11572void *x=link
11573 ;
11574 return 0;
11575}
11576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011580
Matthias Kloseb159a552010-04-25 21:00:44 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011582$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583else
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11585$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011586
11587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11590$as_echo_n "checking for symlink... " >&6; }
11591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011592/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594int
11595main ()
11596{
11597void *x=symlink
11598 ;
11599 return 0;
11600}
11601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011605
Matthias Kloseb159a552010-04-25 21:00:44 +000011606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011607$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011611
11612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11615$as_echo_n "checking for fchdir... " >&6; }
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011617/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011618#include <unistd.h>
11619int
11620main ()
11621{
11622void *x=fchdir
11623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011630
Matthias Kloseb159a552010-04-25 21:00:44 +000011631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011632$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11635$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011636
11637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11640$as_echo_n "checking for fsync... " >&6; }
11641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643#include <unistd.h>
11644int
11645main ()
11646{
11647void *x=fsync
11648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011655
Matthias Kloseb159a552010-04-25 21:00:44 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011657$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011661
11662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11665$as_echo_n "checking for fdatasync... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668#include <unistd.h>
11669int
11670main ()
11671{
11672void *x=fdatasync
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011680
Matthias Kloseb159a552010-04-25 21:00:44 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011682$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011686
11687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11690$as_echo_n "checking for epoll... " >&6; }
11691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011692/* end confdefs.h. */
11693#include <sys/epoll.h>
11694int
11695main ()
11696{
11697void *x=epoll_create
11698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011705
Matthias Kloseb159a552010-04-25 21:00:44 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011711
11712fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11715$as_echo_n "checking for epoll_create1... " >&6; }
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717/* end confdefs.h. */
11718#include <sys/epoll.h>
11719int
11720main ()
11721{
11722void *x=epoll_create1
11723 ;
11724 return 0;
11725}
11726_ACEOF
11727if ac_fn_c_try_compile "$LINENO"; then :
11728
11729$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11730
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11732$as_echo "yes" >&6; }
11733else
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
11736
11737fi
11738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11740$as_echo_n "checking for kqueue... " >&6; }
11741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011742/* end confdefs.h. */
11743
11744#include <sys/types.h>
11745#include <sys/event.h>
11746
11747int
11748main ()
11749{
11750int x=kqueue()
11751 ;
11752 return 0;
11753}
11754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011755if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011758
Matthias Kloseb159a552010-04-25 21:00:44 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011761else
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011764
11765fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11768$as_echo_n "checking for prlimit... " >&6; }
11769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11770/* end confdefs.h. */
11771
11772#include <sys/time.h>
11773#include <sys/resource.h>
11774
11775int
11776main ()
11777{
11778void *x=prlimit
11779 ;
11780 return 0;
11781}
11782_ACEOF
11783if ac_fn_c_try_compile "$LINENO"; then :
11784
11785$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11786
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11788$as_echo "yes" >&6; }
11789else
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
11792
11793fi
11794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11795
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11797$as_echo_n "checking for memfd_create... " >&6; }
11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799/* end confdefs.h. */
11800
11801#ifdef HAVE_SYS_MMAN_H
11802#include <sys/mman.h>
11803#endif
11804#ifdef HAVE_SYS_MEMFD_H
11805#include <sys/memfd.h>
11806#endif
11807
11808int
11809main ()
11810{
11811void *x=memfd_create
11812 ;
11813 return 0;
11814}
11815_ACEOF
11816if ac_fn_c_try_compile "$LINENO"; then :
11817
11818$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11819
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11821$as_echo "yes" >&6; }
11822else
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825
11826fi
11827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11828
Martin v. Löwisd5843682002-11-21 20:41:28 +000011829# On some systems (eg. FreeBSD 5), we would find a definition of the
11830# functions ctermid_r, setgroups in the library, but no prototype
11831# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11832# address to avoid compiler warnings and potential miscompilations
11833# because of the missing prototypes.
11834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11836$as_echo_n "checking for ctermid_r... " >&6; }
11837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011838/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839
Martin v. Löwisd5843682002-11-21 20:41:28 +000011840#include <stdio.h>
11841
Martin v. Löwisd5843682002-11-21 20:41:28 +000011842int
11843main ()
11844{
11845void* p = ctermid_r
11846 ;
11847 return 0;
11848}
11849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011853
Matthias Kloseb159a552010-04-25 21:00:44 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011856else
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11858$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011859
11860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11862
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11864$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011865if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011866 $as_echo_n "(cached) " >&6
11867else
11868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011870#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011871int
11872main ()
11873{
11874void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011875
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011881 ac_cv_flock_decl=yes
11882else
11883 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011884
11885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011887
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011888fi
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11890$as_echo "$ac_cv_flock_decl" >&6; }
11891if test "x${ac_cv_flock_decl}" = xyes; then
11892 for ac_func in flock
11893do :
11894 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011896 cat >>confdefs.h <<_ACEOF
11897#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011898_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011899
Antoine Pitroua3000072010-09-07 14:52:42 +000011900else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011902$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011903if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011904 $as_echo_n "(cached) " >&6
11905else
11906 ac_check_lib_save_LIBS=$LIBS
11907LIBS="-lbsd $LIBS"
11908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909/* end confdefs.h. */
11910
11911/* Override any GCC internal prototype to avoid an error.
11912 Use char because int might match the return type of a GCC
11913 builtin and then its argument prototype would still apply. */
11914#ifdef __cplusplus
11915extern "C"
11916#endif
11917char flock ();
11918int
11919main ()
11920{
11921return flock ();
11922 ;
11923 return 0;
11924}
11925_ACEOF
11926if ac_fn_c_try_link "$LINENO"; then :
11927 ac_cv_lib_bsd_flock=yes
11928else
11929 ac_cv_lib_bsd_flock=no
11930fi
11931rm -f core conftest.err conftest.$ac_objext \
11932 conftest$ac_exeext conftest.$ac_ext
11933LIBS=$ac_check_lib_save_LIBS
11934fi
11935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11936$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011938 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011939
11940
11941$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11942
11943
11944fi
11945
11946
11947fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011948done
11949
Antoine Pitroua3000072010-09-07 14:52:42 +000011950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11953$as_echo_n "checking for getpagesize... " >&6; }
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011955/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011957#include <unistd.h>
11958
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011959int
11960main ()
11961{
11962void* p = getpagesize
11963 ;
11964 return 0;
11965}
11966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011970
Matthias Kloseb159a552010-04-25 21:00:44 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011976
11977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011979
Victor Stinner984890f2011-11-24 13:53:38 +010011980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11981$as_echo_n "checking for broken unsetenv... " >&6; }
11982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983/* end confdefs.h. */
11984
11985#include <stdlib.h>
11986
11987int
11988main ()
11989{
11990int res = unsetenv("DUMMY")
11991 ;
11992 return 0;
11993}
11994_ACEOF
11995if ac_fn_c_try_compile "$LINENO"; then :
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11997$as_echo "no" >&6; }
11998else
11999
12000$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12001
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12003$as_echo "yes" >&6; }
12004
12005fi
12006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12007
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012008for ac_prog in true
12009do
12010 # Extract the first word of "$ac_prog", so it can be a program name with args.
12011set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012016else
12017 if test -n "$TRUE"; then
12018 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12019else
12020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12021for as_dir in $PATH
12022do
12023 IFS=$as_save_IFS
12024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012027 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 $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 +000012029 break 2
12030 fi
12031done
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012034
12035fi
12036fi
12037TRUE=$ac_cv_prog_TRUE
12038if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12040$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012044fi
12045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012047 test -n "$TRUE" && break
12048done
12049test -n "$TRUE" || TRUE="/bin/true"
12050
12051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12053$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056else
12057 ac_check_lib_save_LIBS=$LIBS
12058LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062/* Override any GCC internal prototype to avoid an error.
12063 Use char because int might match the return type of a GCC
12064 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065#ifdef __cplusplus
12066extern "C"
12067#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012068char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069int
12070main ()
12071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078 ac_cv_lib_c_inet_aton=yes
12079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012082rm -f core conftest.err conftest.$ac_objext \
12083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012084LIBS=$ac_check_lib_save_LIBS
12085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12087$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012088if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012089 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12092$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012095else
12096 ac_check_lib_save_LIBS=$LIBS
12097LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101/* Override any GCC internal prototype to avoid an error.
12102 Use char because int might match the return type of a GCC
12103 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012104#ifdef __cplusplus
12105extern "C"
12106#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012107char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108int
12109main ()
12110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012112 ;
12113 return 0;
12114}
12115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012117 ac_cv_lib_resolv_inet_aton=yes
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core conftest.err conftest.$ac_objext \
12122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012123LIBS=$ac_check_lib_save_LIBS
12124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12126$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012128 cat >>confdefs.h <<_ACEOF
12129#define HAVE_LIBRESOLV 1
12130_ACEOF
12131
12132 LIBS="-lresolv $LIBS"
12133
12134fi
12135
12136
12137fi
12138
12139
Christian Heimesd0764e22007-12-04 15:00:33 +000012140# On Tru64, chflags seems to be present, but calling it will
12141# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12143$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012148 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012151/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012152
Christian Heimesd0764e22007-12-04 15:00:33 +000012153#include <sys/stat.h>
12154#include <unistd.h>
12155int main(int argc, char*argv[])
12156{
12157 if(chflags(argv[0], 0) != 0)
12158 return 1;
12159 return 0;
12160}
Ned Deily3eb67d52011-06-28 00:00:28 -070012161
Christian Heimesd0764e22007-12-04 15:00:33 +000012162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012164 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12169 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012170fi
12171
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12175$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012176if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012179 ac_cv_have_chflags="yes"
12180else
12181 ac_cv_have_chflags="no"
12182fi
12183
12184fi
12185if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188
12189fi
12190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12192$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012197 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012200/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012201
Christian Heimesd0764e22007-12-04 15:00:33 +000012202#include <sys/stat.h>
12203#include <unistd.h>
12204int main(int argc, char*argv[])
12205{
12206 if(lchflags(argv[0], 0) != 0)
12207 return 1;
12208 return 0;
12209}
Ned Deily3eb67d52011-06-28 00:00:28 -070012210
Christian Heimesd0764e22007-12-04 15:00:33 +000012211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012213 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012214else
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012219fi
12220
12221
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12224$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012225if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012228 ac_cv_have_lchflags="yes"
12229else
12230 ac_cv_have_lchflags="no"
12231fi
12232
12233fi
12234if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012237
12238fi
12239
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012240case $ac_sys_system/$ac_sys_release in
12241Darwin/*)
12242 _CUR_CFLAGS="${CFLAGS}"
12243 _CUR_LDFLAGS="${LDFLAGS}"
12244 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12245 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12246 ;;
12247esac
12248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12250$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012253else
12254 ac_check_lib_save_LIBS=$LIBS
12255LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012257/* end confdefs.h. */
12258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259/* Override any GCC internal prototype to avoid an error.
12260 Use char because int might match the return type of a GCC
12261 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012262#ifdef __cplusplus
12263extern "C"
12264#endif
12265char inflateCopy ();
12266int
12267main ()
12268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012270 ;
12271 return 0;
12272}
12273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012275 ac_cv_lib_z_inflateCopy=yes
12276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012279rm -f core conftest.err conftest.$ac_objext \
12280 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012281LIBS=$ac_check_lib_save_LIBS
12282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12284$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012288
12289fi
12290
12291
12292case $ac_sys_system/$ac_sys_release in
12293Darwin/*)
12294 CFLAGS="${_CUR_CFLAGS}"
12295 LDFLAGS="${_CUR_LDFLAGS}"
12296 ;;
12297esac
12298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12300$as_echo_n "checking for hstrerror... " >&6; }
12301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012303
Martin v. Löwise9416172003-05-03 10:12:45 +000012304#include <netdb.h>
12305
Martin v. Löwise9416172003-05-03 10:12:45 +000012306int
12307main ()
12308{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012309void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012310 ;
12311 return 0;
12312}
12313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012317
Matthias Kloseb159a552010-04-25 21:00:44 +000012318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012320else
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12322$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012323
12324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325rm -f core conftest.err conftest.$ac_objext \
12326 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12329$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40:11 +000012333#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012334#include <sys/socket.h>
12335#include <netinet/in.h>
12336#include <arpa/inet.h>
12337
Martin v. Löwise9416172003-05-03 10:12:45 +000012338int
12339main ()
12340{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012341void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012342 ;
12343 return 0;
12344}
12345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012349
Matthias Kloseb159a552010-04-25 21:00:44 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012355
12356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012357rm -f core conftest.err conftest.$ac_objext \
12358 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12361$as_echo_n "checking for inet_pton... " >&6; }
12362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012363/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012365#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012366#include <sys/socket.h>
12367#include <netinet/in.h>
12368#include <arpa/inet.h>
12369
Martin v. Löwise9416172003-05-03 10:12:45 +000012370int
12371main ()
12372{
12373void* p = inet_pton
12374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012379
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012381
Matthias Kloseb159a552010-04-25 21:00:44 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012384else
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12386$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012387
12388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012390
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012391# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12393$as_echo_n "checking for setgroups... " >&6; }
12394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012396
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012397#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012398#ifdef HAVE_GRP_H
12399#include <grp.h>
12400#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012401
Martin v. Löwisd5843682002-11-21 20:41:28 +000012402int
12403main ()
12404{
12405void* p = setgroups
12406 ;
12407 return 0;
12408}
12409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012413
Matthias Kloseb159a552010-04-25 21:00:44 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012419
12420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012422
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012423# check for openpty and forkpty
12424
12425for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012426do :
12427 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012428if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012431_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012432
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012433else
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12435$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012436if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012438else
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444/* Override any GCC internal prototype to avoid an error.
12445 Use char because int might match the return type of a GCC
12446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012447#ifdef __cplusplus
12448extern "C"
12449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012450char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012451int
12452main ()
12453{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 ;
12456 return 0;
12457}
12458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012466LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12469$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012472 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012473else
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12475$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012476if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012478else
12479 ac_check_lib_save_LIBS=$LIBS
12480LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012482/* end confdefs.h. */
12483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484/* Override any GCC internal prototype to avoid an error.
12485 Use char because int might match the return type of a GCC
12486 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012487#ifdef __cplusplus
12488extern "C"
12489#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012490char openpty ();
12491int
12492main ()
12493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012500 ac_cv_lib_bsd_openpty=yes
12501else
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012504rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012506LIBS=$ac_check_lib_save_LIBS
12507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12509$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012512 LIBS="$LIBS -lbsd"
12513fi
12514
12515
12516fi
12517
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518
12519fi
12520done
12521
12522for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012523do :
12524 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012525if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012528_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012529
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12532$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012533if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012535else
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012537LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541/* Override any GCC internal prototype to avoid an error.
12542 Use char because int might match the return type of a GCC
12543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012544#ifdef __cplusplus
12545extern "C"
12546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012547char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012548int
12549main ()
12550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012561rm -f core conftest.err conftest.$ac_objext \
12562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012563LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12566$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012567if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012569 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012570else
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12572$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012573if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012575else
12576 ac_check_lib_save_LIBS=$LIBS
12577LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012579/* end confdefs.h. */
12580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581/* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012584#ifdef __cplusplus
12585extern "C"
12586#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012587char forkpty ();
12588int
12589main ()
12590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012592 ;
12593 return 0;
12594}
12595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012597 ac_cv_lib_bsd_forkpty=yes
12598else
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012601rm -f core conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012603LIBS=$ac_check_lib_save_LIBS
12604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12606$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012609 LIBS="$LIBS -lbsd"
12610fi
12611
12612
12613fi
12614
Fred Drake8cef4cf2000-06-28 16:40:38 +000012615
12616fi
12617done
12618
Jack Jansendd19cf82001-12-06 22:36:17 +000012619
Michael W. Hudson54241132001-12-07 15:38:26 +000012620# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012621for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012622do :
12623 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12624ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012625if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012628_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012629
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631done
12632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012634ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012635if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012636 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012637
Martin v. Löwis1142de32002-03-29 16:28:31 +000012638else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012640 *" dup2.$ac_objext "* ) ;;
12641 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012643esac
12644
Martin v. Löwis1142de32002-03-29 16:28:31 +000012645fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012646
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012647ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012649 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12650
12651else
12652 case " $LIBOBJS " in
12653 *" strdup.$ac_objext "* ) ;;
12654 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12655 ;;
12656esac
12657
12658fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012659
12660
12661for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012662do :
12663 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012671int
12672main ()
12673{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012682
Guido van Rossum627b2d71993-12-24 10:39:16 +000012683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012685
Guido van Rossum627b2d71993-12-24 10:39:16 +000012686fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012687done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012688
Jack Jansen150753c2003-03-29 22:07:47 +000012689for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012690do :
12691 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012692if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012693 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012697/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012698#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012699int
12700main ()
12701{
12702setpgrp(0,0);
12703 ;
12704 return 0;
12705}
12706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Matthias Kloseb9621712010-04-24 17:59:49 +000012709$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012710
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012713
12714fi
12715done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012716
Thomas Wouters3a584202000-08-05 23:28:51 +000012717for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012718do :
12719 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012720if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012721 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012725/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012726#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012727int
12728main ()
12729{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ;
12732 return 0;
12733}
12734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735if ac_fn_c_try_compile "$LINENO"; then :
12736
Guido van Rossum627b2d71993-12-24 10:39:16 +000012737else
Skip Montanaro6dead952003-09-25 14:50:04 +000012738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012740
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Guido van Rossum627b2d71993-12-24 10:39:16 +000012742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012746done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012747
Michael W. Hudson54241132001-12-07 15:38:26 +000012748
Gregory P. Smith387512c2018-12-30 15:42:32 -080012749# We search for both crypt and crypt_r as one or the other may be defined
12750# This gets us our -lcrypt in LIBS when required on the target platform.
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12752$as_echo_n "checking for library containing crypt... " >&6; }
12753if ${ac_cv_search_crypt+:} false; then :
12754 $as_echo_n "(cached) " >&6
12755else
12756 ac_func_search_save_LIBS=$LIBS
12757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12758/* end confdefs.h. */
12759
12760/* Override any GCC internal prototype to avoid an error.
12761 Use char because int might match the return type of a GCC
12762 builtin and then its argument prototype would still apply. */
12763#ifdef __cplusplus
12764extern "C"
12765#endif
12766char crypt ();
12767int
12768main ()
12769{
12770return crypt ();
12771 ;
12772 return 0;
12773}
12774_ACEOF
12775for ac_lib in '' crypt; do
12776 if test -z "$ac_lib"; then
12777 ac_res="none required"
12778 else
12779 ac_res=-l$ac_lib
12780 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12781 fi
12782 if ac_fn_c_try_link "$LINENO"; then :
12783 ac_cv_search_crypt=$ac_res
12784fi
12785rm -f core conftest.err conftest.$ac_objext \
12786 conftest$ac_exeext
12787 if ${ac_cv_search_crypt+:} false; then :
12788 break
12789fi
12790done
12791if ${ac_cv_search_crypt+:} false; then :
12792
12793else
12794 ac_cv_search_crypt=no
12795fi
12796rm conftest.$ac_ext
12797LIBS=$ac_func_search_save_LIBS
12798fi
12799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12800$as_echo "$ac_cv_search_crypt" >&6; }
12801ac_res=$ac_cv_search_crypt
12802if test "$ac_res" != no; then :
12803 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12804
12805fi
12806
12807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12808$as_echo_n "checking for library containing crypt_r... " >&6; }
12809if ${ac_cv_search_crypt_r+:} false; then :
12810 $as_echo_n "(cached) " >&6
12811else
12812 ac_func_search_save_LIBS=$LIBS
12813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12814/* end confdefs.h. */
12815
12816/* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
12819#ifdef __cplusplus
12820extern "C"
12821#endif
12822char crypt_r ();
12823int
12824main ()
12825{
12826return crypt_r ();
12827 ;
12828 return 0;
12829}
12830_ACEOF
12831for ac_lib in '' crypt; do
12832 if test -z "$ac_lib"; then
12833 ac_res="none required"
12834 else
12835 ac_res=-l$ac_lib
12836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12837 fi
12838 if ac_fn_c_try_link "$LINENO"; then :
12839 ac_cv_search_crypt_r=$ac_res
12840fi
12841rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext
12843 if ${ac_cv_search_crypt_r+:} false; then :
12844 break
12845fi
12846done
12847if ${ac_cv_search_crypt_r+:} false; then :
12848
12849else
12850 ac_cv_search_crypt_r=no
12851fi
12852rm conftest.$ac_ext
12853LIBS=$ac_func_search_save_LIBS
12854fi
12855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12856$as_echo "$ac_cv_search_crypt_r" >&6; }
12857ac_res=$ac_cv_search_crypt_r
12858if test "$ac_res" != no; then :
12859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12860
12861fi
12862
12863
12864ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12865if test "x$ac_cv_func_crypt_r" = xyes; then :
12866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867/* end confdefs.h. */
12868
12869#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12870#include <crypt.h>
12871
12872int
12873main ()
12874{
12875
12876struct crypt_data d;
12877char *r = crypt_r("", "", &d);
12878
12879 ;
12880 return 0;
12881}
12882_ACEOF
12883if ac_fn_c_try_compile "$LINENO"; then :
12884
12885$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12886
12887fi
12888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12889
12890fi
12891
12892
Victor Stinnere0be4232011-10-25 13:06:09 +020012893for ac_func in clock_gettime
12894do :
12895 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12896if test "x$ac_cv_func_clock_gettime" = xyes; then :
12897 cat >>confdefs.h <<_ACEOF
12898#define HAVE_CLOCK_GETTIME 1
12899_ACEOF
12900
12901else
12902
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12904$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12905if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12906 $as_echo_n "(cached) " >&6
12907else
12908 ac_check_lib_save_LIBS=$LIBS
12909LIBS="-lrt $LIBS"
12910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12911/* end confdefs.h. */
12912
12913/* Override any GCC internal prototype to avoid an error.
12914 Use char because int might match the return type of a GCC
12915 builtin and then its argument prototype would still apply. */
12916#ifdef __cplusplus
12917extern "C"
12918#endif
12919char clock_gettime ();
12920int
12921main ()
12922{
12923return clock_gettime ();
12924 ;
12925 return 0;
12926}
12927_ACEOF
12928if ac_fn_c_try_link "$LINENO"; then :
12929 ac_cv_lib_rt_clock_gettime=yes
12930else
12931 ac_cv_lib_rt_clock_gettime=no
12932fi
12933rm -f core conftest.err conftest.$ac_objext \
12934 conftest$ac_exeext conftest.$ac_ext
12935LIBS=$ac_check_lib_save_LIBS
12936fi
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12938$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12939if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12940
Victor Stinner7efb8332014-08-29 15:41:08 +020012941 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012942 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12943
12944
12945$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12946
12947
12948fi
12949
12950
12951fi
12952done
12953
12954
12955for ac_func in clock_getres
12956do :
12957 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12958if test "x$ac_cv_func_clock_getres" = xyes; then :
12959 cat >>confdefs.h <<_ACEOF
12960#define HAVE_CLOCK_GETRES 1
12961_ACEOF
12962
12963else
12964
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12966$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12967if ${ac_cv_lib_rt_clock_getres+:} false; then :
12968 $as_echo_n "(cached) " >&6
12969else
12970 ac_check_lib_save_LIBS=$LIBS
12971LIBS="-lrt $LIBS"
12972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12973/* end confdefs.h. */
12974
12975/* Override any GCC internal prototype to avoid an error.
12976 Use char because int might match the return type of a GCC
12977 builtin and then its argument prototype would still apply. */
12978#ifdef __cplusplus
12979extern "C"
12980#endif
12981char clock_getres ();
12982int
12983main ()
12984{
12985return clock_getres ();
12986 ;
12987 return 0;
12988}
12989_ACEOF
12990if ac_fn_c_try_link "$LINENO"; then :
12991 ac_cv_lib_rt_clock_getres=yes
12992else
12993 ac_cv_lib_rt_clock_getres=no
12994fi
12995rm -f core conftest.err conftest.$ac_objext \
12996 conftest$ac_exeext conftest.$ac_ext
12997LIBS=$ac_check_lib_save_LIBS
12998fi
12999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13000$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13001if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13002
13003 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13004
13005
13006fi
13007
13008
13009fi
13010done
13011
13012
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013013for ac_func in clock_settime
13014do :
13015 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13016if test "x$ac_cv_func_clock_settime" = xyes; then :
13017 cat >>confdefs.h <<_ACEOF
13018#define HAVE_CLOCK_SETTIME 1
13019_ACEOF
13020
13021else
13022
13023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13024$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13025if ${ac_cv_lib_rt_clock_settime+:} false; then :
13026 $as_echo_n "(cached) " >&6
13027else
13028 ac_check_lib_save_LIBS=$LIBS
13029LIBS="-lrt $LIBS"
13030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13031/* end confdefs.h. */
13032
13033/* Override any GCC internal prototype to avoid an error.
13034 Use char because int might match the return type of a GCC
13035 builtin and then its argument prototype would still apply. */
13036#ifdef __cplusplus
13037extern "C"
13038#endif
13039char clock_settime ();
13040int
13041main ()
13042{
13043return clock_settime ();
13044 ;
13045 return 0;
13046}
13047_ACEOF
13048if ac_fn_c_try_link "$LINENO"; then :
13049 ac_cv_lib_rt_clock_settime=yes
13050else
13051 ac_cv_lib_rt_clock_settime=no
13052fi
13053rm -f core conftest.err conftest.$ac_objext \
13054 conftest$ac_exeext conftest.$ac_ext
13055LIBS=$ac_check_lib_save_LIBS
13056fi
13057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13058$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13059if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13060
13061 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13062
13063
13064fi
13065
13066
13067fi
13068done
13069
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13072$as_echo_n "checking for major... " >&6; }
13073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013075
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013076#if defined(MAJOR_IN_MKDEV)
13077#include <sys/mkdev.h>
13078#elif defined(MAJOR_IN_SYSMACROS)
13079#include <sys/sysmacros.h>
13080#else
13081#include <sys/types.h>
13082#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013083
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013084int
13085main ()
13086{
13087
13088 makedev(major(0),minor(0));
13089
13090 ;
13091 return 0;
13092}
13093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013094if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013095
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13100$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013101
13102else
Skip Montanaro6dead952003-09-25 14:50:04 +000013103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013106
13107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013108rm -f core conftest.err conftest.$ac_objext \
13109 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013110
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013111# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013112# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13114$as_echo_n "checking for getaddrinfo... " >&6; }
13115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013116/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013117
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013118#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013119#include <sys/socket.h>
13120#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013121#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013122
Martin v. Löwis11437992002-04-12 09:54:03 +000013123int
13124main ()
13125{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013126getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 ;
13128 return 0;
13129}
13130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013131if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013132 have_getaddrinfo=yes
13133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013136rm -f core conftest.err conftest.$ac_objext \
13137 conftest$ac_exeext conftest.$ac_ext
13138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13139$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140if test $have_getaddrinfo = yes
13141then
Matthias Kloseb9621712010-04-24 17:59:49 +000013142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13143$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013144 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013148
13149if test "${enable_ipv6+set}" = set; then
13150 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13151else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013152 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013153fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154else
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013156/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157
Stefan Krah19c21392012-11-22 23:47:32 +010013158#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159#include <sys/types.h>
13160#include <netdb.h>
13161#include <string.h>
13162#include <sys/socket.h>
13163#include <netinet/in.h>
13164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013165int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166{
13167 int passive, gaierr, inet4 = 0, inet6 = 0;
13168 struct addrinfo hints, *ai, *aitop;
13169 char straddr[INET6_ADDRSTRLEN], strport[16];
13170
13171 for (passive = 0; passive <= 1; passive++) {
13172 memset(&hints, 0, sizeof(hints));
13173 hints.ai_family = AF_UNSPEC;
13174 hints.ai_flags = passive ? AI_PASSIVE : 0;
13175 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013176 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13178 (void)gai_strerror(gaierr);
13179 goto bad;
13180 }
13181 for (ai = aitop; ai; ai = ai->ai_next) {
13182 if (ai->ai_addr == NULL ||
13183 ai->ai_addrlen == 0 ||
13184 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13185 straddr, sizeof(straddr), strport, sizeof(strport),
13186 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13187 goto bad;
13188 }
13189 switch (ai->ai_family) {
13190 case AF_INET:
13191 if (strcmp(strport, "54321") != 0) {
13192 goto bad;
13193 }
13194 if (passive) {
13195 if (strcmp(straddr, "0.0.0.0") != 0) {
13196 goto bad;
13197 }
13198 } else {
13199 if (strcmp(straddr, "127.0.0.1") != 0) {
13200 goto bad;
13201 }
13202 }
13203 inet4++;
13204 break;
13205 case AF_INET6:
13206 if (strcmp(strport, "54321") != 0) {
13207 goto bad;
13208 }
13209 if (passive) {
13210 if (strcmp(straddr, "::") != 0) {
13211 goto bad;
13212 }
13213 } else {
13214 if (strcmp(straddr, "::1") != 0) {
13215 goto bad;
13216 }
13217 }
13218 inet6++;
13219 break;
13220 case AF_UNSPEC:
13221 goto bad;
13222 break;
13223 default:
13224 /* another family support? */
13225 break;
13226 }
13227 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013228 freeaddrinfo(aitop);
13229 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230 }
13231
13232 if (!(inet4 == 0 || inet4 == 2))
13233 goto bad;
13234 if (!(inet6 == 0 || inet6 == 2))
13235 goto bad;
13236
13237 if (aitop)
13238 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240
13241 bad:
13242 if (aitop)
13243 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013244 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245}
13246
Martin v. Löwis11437992002-04-12 09:54:03 +000013247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013248if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013249 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13254 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013257fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13262$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13263
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013264if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265then
13266 if test $ipv6 = yes
13267 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268 echo 'Fatal: You must get working getaddrinfo() function.'
13269 echo ' or you can specify "--disable-ipv6"'.
13270 exit 1
13271 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013272else
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013275
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013277
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013278for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013279do :
13280 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013284_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286fi
13287done
13288
Michael W. Hudson54241132001-12-07 15:38:26 +000013289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13292$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013293if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298#include <sys/types.h>
13299#include <sys/time.h>
13300#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Martin v. Löwis11437992002-04-12 09:54:03 +000013302int
13303main ()
13304{
13305if ((struct tm *) 0)
13306return 0;
13307 ;
13308 return 0;
13309}
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013312 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13319$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013320if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323
13324fi
13325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13327$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013328if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013332/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333#include <sys/types.h>
13334#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336int
13337main ()
13338{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339struct tm tm;
13340 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 ;
13343 return 0;
13344}
13345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013346if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347 ac_cv_struct_tm=time.h
13348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13354$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013355if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
13359fi
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361ac_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 +000013362#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364"
Victor Stinnere0be4232011-10-25 13:06:09 +020013365if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
13367cat >>confdefs.h <<_ACEOF
13368#define HAVE_STRUCT_TM_TM_ZONE 1
13369_ACEOF
13370
13371
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013373
Martin v. Löwis11437992002-04-12 09:54:03 +000013374if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377
13378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13380"
Victor Stinnere0be4232011-10-25 13:06:09 +020013381if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385fi
13386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013388#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389_ACEOF
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13392$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013393if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013397/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013398#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399#if !HAVE_DECL_TZNAME
13400extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403int
13404main ()
13405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 ;
13408 return 0;
13409}
13410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013411if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412 ac_cv_var_tzname=yes
13413else
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013416rm -f core conftest.err conftest.$ac_objext \
13417 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13420$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013421 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013425 fi
13426fi
13427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428ac_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 +020013429if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
13431cat >>confdefs.h <<_ACEOF
13432#define HAVE_STRUCT_STAT_ST_RDEV 1
13433_ACEOF
13434
13435
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013436fi
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438ac_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 +020013439if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441cat >>confdefs.h <<_ACEOF
13442#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13443_ACEOF
13444
13445
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013446fi
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448ac_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 +020013449if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013450
13451cat >>confdefs.h <<_ACEOF
13452#define HAVE_STRUCT_STAT_ST_FLAGS 1
13453_ACEOF
13454
13455
13456fi
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458ac_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 +020013459if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013460
13461cat >>confdefs.h <<_ACEOF
13462#define HAVE_STRUCT_STAT_ST_GEN 1
13463_ACEOF
13464
13465
13466fi
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468ac_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 +020013469if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013470
13471cat >>confdefs.h <<_ACEOF
13472#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13473_ACEOF
13474
13475
13476fi
13477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478ac_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 +020013479if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481cat >>confdefs.h <<_ACEOF
13482#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13483_ACEOF
13484
13485
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013486fi
13487
Stefan Krah267b6392016-04-26 01:09:18 +020013488ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13489 #include <sys/types.h>
13490 #include <pwd.h>
13491
13492"
13493if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13494
13495cat >>confdefs.h <<_ACEOF
13496#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13497_ACEOF
13498
13499
13500fi
13501ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13502 #include <sys/types.h>
13503 #include <pwd.h>
13504
13505"
13506if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13507
13508cat >>confdefs.h <<_ACEOF
13509#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13510_ACEOF
13511
13512
13513fi
13514
Zachary Ware6a6967e2016-10-01 00:47:27 -050013515# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13516ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13517"
13518if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13519
13520cat >>confdefs.h <<_ACEOF
13521#define HAVE_SIGINFO_T_SI_BAND 1
13522_ACEOF
13523
13524
13525fi
13526
Michael W. Hudson54241132001-12-07 15:38:26 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13529$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013530if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532else
Matthias Kloseb159a552010-04-25 21:00:44 +000013533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013536#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013537int
13538main ()
13539{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 ;
13542 return 0;
13543}
13544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013545if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013546 ac_cv_header_time_altzone=yes
13547else
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552fi
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13555$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559
13560fi
13561
Guido van Rossumda88dad1995-01-26 00:46:29 +000013562was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13564$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013566/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567
13568#include <sys/types.h>
13569#include <sys/select.h>
13570#include <sys/time.h>
13571
Martin v. Löwis11437992002-04-12 09:54:03 +000013572int
13573main ()
13574{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575;
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 ;
13577 return 0;
13578}
13579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013585 was_it_defined=yes
13586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13590$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13593$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013594if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596else
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013598/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013599#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013600int
13601main ()
13602{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013604 ;
13605 return 0;
13606}
13607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609 ac_cv_struct_addrinfo=yes
13610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13614fi
13615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13617$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621
13622fi
13623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13625$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013626if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013631
13632# include <sys/types.h>
13633# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ;
13639 return 0;
13640}
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013643 ac_cv_struct_sockaddr_storage=yes
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13648fi
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13651$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013652if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013655
13656fi
13657
Christian Heimesdffa3942016-09-05 23:54:41 +020013658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13659$as_echo_n "checking for sockaddr_alg... " >&6; }
13660if ${ac_cv_struct_sockaddr_alg+:} false; then :
13661 $as_echo_n "(cached) " >&6
13662else
13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13664/* end confdefs.h. */
13665
13666# include <sys/types.h>
13667# include <sys/socket.h>
13668# include <linux/if_alg.h>
13669int
13670main ()
13671{
13672struct sockaddr_alg s
13673 ;
13674 return 0;
13675}
13676_ACEOF
13677if ac_fn_c_try_compile "$LINENO"; then :
13678 ac_cv_struct_sockaddr_alg=yes
13679else
13680 ac_cv_struct_sockaddr_alg=no
13681fi
13682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13683fi
13684
13685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13686$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13687if test $ac_cv_struct_sockaddr_alg = yes; then
13688
13689$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13690
13691fi
13692
Guido van Rossum627b2d71993-12-24 10:39:16 +000013693# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13696$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013697if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013702$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
13704main ()
13705{
13706static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013707test_array [0] = 0;
13708return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
13710 ;
13711 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013712}
Martin v. Löwis11437992002-04-12 09:54:03 +000013713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013715 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13722$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013725
13726fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13729$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013730if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013734/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735
Martin v. Löwis11437992002-04-12 09:54:03 +000013736int
13737main ()
13738{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013739
Martin v. Löwis11437992002-04-12 09:54:03 +000013740#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013741 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013743 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 char const *const *pcpcc;
13746 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 /* NEC SVR4.0.2 mips cc rejects this. */
13748 struct point {int x, y;};
13749 static struct point const zero = {0,0};
13750 /* AIX XL C 1.02.0.0 rejects this.
13751 It does not let you subtract one const X* pointer from another in
13752 an arm of an if-expression whose if-part is not a constant
13753 expression */
13754 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013757 ++pcpcc;
13758 ppc = (char**) pcpcc;
13759 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013760 { /* SCO 3.2v4 cc rejects this sort of thing. */
13761 char tx;
13762 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 }
13768 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13769 int x[] = {25, 17};
13770 const int *foo = &x[0];
13771 ++foo;
13772 }
13773 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13774 typedef const int *iptr;
13775 iptr p = 0;
13776 ++p;
13777 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013778 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013780 struct s { int j; const int *ap[3]; } bx;
13781 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 }
13783 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13784 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013788#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ;
13791 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013792}
Martin v. Löwis11437992002-04-12 09:54:03 +000013793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795 ac_cv_c_const=yes
13796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13802$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806
13807fi
13808
Michael W. Hudson54241132001-12-07 15:38:26 +000013809
Guido van Rossumda88dad1995-01-26 00:46:29 +000013810works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13812$as_echo_n "checking for working signed char... " >&6; }
13813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816int
13817main ()
13818{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 ;
13821 return 0;
13822}
13823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013825 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013826else
Skip Montanaro6dead952003-09-25 14:50:04 +000013827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013830
Guido van Rossum7f43da71994-08-01 12:15:30 +000013831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13834$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013835
Guido van Rossumda88dad1995-01-26 00:46:29 +000013836have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13838$as_echo_n "checking for prototypes... " >&6; }
13839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013840/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013841int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013842int
13843main ()
13844{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013845return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ;
13847 return 0;
13848}
13849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013853
Matthias Kloseb159a552010-04-25 21:00:44 +000013854 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13858$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859
Guido van Rossumda88dad1995-01-26 00:46:29 +000013860works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13862$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013864/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013865
13866#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013867int foo(int x, ...) {
13868 va_list va;
13869 va_start(va, x);
13870 va_arg(va, int);
13871 va_arg(va, char *);
13872 va_arg(va, double);
13873 return 0;
13874}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013875
Martin v. Löwis11437992002-04-12 09:54:03 +000013876int
13877main ()
13878{
Guido van Rossum90eea071996-08-30 20:58:57 +000013879return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ;
13881 return 0;
13882}
13883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013885
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013889 works=yes
13890
Guido van Rossum627b2d71993-12-24 10:39:16 +000013891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13894$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013895
Martin v. Löwisd6320502004-08-12 13:45:08 +000013896# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13898$as_echo_n "checking for socketpair... " >&6; }
13899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013900/* end confdefs.h. */
13901
13902#include <sys/types.h>
13903#include <sys/socket.h>
13904
13905int
13906main ()
13907{
13908void *x=socketpair
13909 ;
13910 return 0;
13911}
13912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013916
Matthias Kloseb159a552010-04-25 21:00:44 +000013917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13921$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013922
13923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013925
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013926# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13928$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013930/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931#include <sys/types.h>
13932#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013933int
13934main ()
13935{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013936struct sockaddr x;
13937x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 ;
13939 return 0;
13940}
13941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013942if ac_fn_c_try_compile "$LINENO"; then :
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13944$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013947
13948else
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13950$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013951
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013954
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013955# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
13957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013959if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13964$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013965 OLD_CFLAGS=$CFLAGS
13966 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013968/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013969
13970# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
Martin v. Löwis11437992002-04-12 09:54:03 +000013972int
13973main ()
13974{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975
13976 char *name;
13977 struct hostent *he, *res;
13978 char buffer[2048];
13979 int buflen = 2048;
13980 int h_errnop;
13981
13982 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
13984 ;
13985 return 0;
13986}
13987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13996$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013998else
Skip Montanaro6dead952003-09-25 14:50:04 +000013999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14001$as_echo "no" >&6; }
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14003$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
Martin v. Löwis11437992002-04-12 09:54:03 +000014009int
14010main ()
14011{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012
14013 char *name;
14014 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014015 char buffer[2048];
14016 int buflen = 2048;
14017 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018
Matthias Kloseb159a552010-04-25 21:00:44 +000014019 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014020
14021 ;
14022 return 0;
14023}
14024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014028
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Matthias Kloseb159a552010-04-25 21:00:44 +000014030$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14033$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035else
Skip Montanaro6dead952003-09-25 14:50:04 +000014036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14038$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14040$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042/* end confdefs.h. */
14043
14044# include <netdb.h>
14045
14046int
14047main ()
14048{
14049
14050 char *name;
14051 struct hostent *he;
14052 struct hostent_data data;
14053
14054 (void) gethostbyname_r(name, he, &data);
14055
14056 ;
14057 return 0;
14058}
14059_ACEOF
14060if ac_fn_c_try_compile "$LINENO"; then :
14061
14062 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14063
14064
14065$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14066
14067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14068$as_echo "yes" >&6; }
14069
14070else
14071
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14073$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014083 CFLAGS=$OLD_CFLAGS
14084
14085else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087 for ac_func in gethostbyname
14088do :
14089 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014090if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014092#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014093_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014096done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014097
Michael W. Hudson54241132001-12-07 15:38:26 +000014098
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014099fi
14100
Michael W. Hudson54241132001-12-07 15:38:26 +000014101
14102
14103
14104
14105
14106
Guido van Rossum627b2d71993-12-24 10:39:16 +000014107# checks for system services
14108# (none yet)
14109
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014111ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014113
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014114else
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14116$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014117if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119else
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014121LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125/* Override any GCC internal prototype to avoid an error.
14126 Use char because int might match the return type of a GCC
14127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014128#ifdef __cplusplus
14129extern "C"
14130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014131char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014132int
14133main ()
14134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ;
14137 return 0;
14138}
14139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014142else
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014145rm -f core conftest.err conftest.$ac_objext \
14146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014147LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14150$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014151if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014152 cat >>confdefs.h <<_ACEOF
14153#define HAVE_LIBIEEE 1
14154_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014155
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014156 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014157
Guido van Rossum627b2d71993-12-24 10:39:16 +000014158fi
14159
Michael W. Hudson54241132001-12-07 15:38:26 +000014160
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014161fi
14162
Michael W. Hudson54241132001-12-07 15:38:26 +000014163
Guido van Rossum7f43da71994-08-01 12:15:30 +000014164# check for --with-libm=...
14165
Guido van Rossum563e7081996-09-10 18:20:48 +000014166case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014167Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014168*) LIBM=-lm
14169esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14171$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014174if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014176if test "$withval" = no
14177then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14179$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014180elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014181then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14183$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014184else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014185fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14188$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189fi
14190
Guido van Rossum7f43da71994-08-01 12:15:30 +000014191
14192# check for --with-libc=...
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14195$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014198if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014200if test "$withval" = no
14201then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14203$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014204elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014205then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14207$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014208else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014209fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014210else
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14212$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014213fi
14214
Guido van Rossum7f43da71994-08-01 12:15:30 +000014215
Stefan Krah1919b7e2012-03-21 18:25:23 +010014216# **************************************
14217# * Check for gcc x64 inline assembler *
14218# **************************************
14219
14220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14221$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14223/* end confdefs.h. */
14224
14225int
14226main ()
14227{
14228
14229 __asm__ __volatile__ ("movq %rcx, %rax");
14230
14231 ;
14232 return 0;
14233}
14234_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014235if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014236 have_gcc_asm_for_x64=yes
14237else
14238 have_gcc_asm_for_x64=no
14239fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014240rm -f core conftest.err conftest.$ac_objext \
14241 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14243$as_echo "$have_gcc_asm_for_x64" >&6; }
14244if test "$have_gcc_asm_for_x64" = yes
14245then
14246
14247$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14248
14249fi
14250
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014251# **************************************************
14252# * Check for various properties of floating point *
14253# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014254
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14256$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14257if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014259else
14260
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014261
14262ax_cv_c_float_words_bigendian=unknown
14263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014264/* end confdefs.h. */
14265
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014266
14267double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14268
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014269
14270_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014271if ac_fn_c_try_compile "$LINENO"; then :
14272
14273
14274if grep noonsees conftest.$ac_objext >/dev/null ; then
14275 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014276fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014277if grep seesnoon conftest.$ac_objext >/dev/null ; then
14278 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14279 ax_cv_c_float_words_bigendian=no
14280 else
14281 ax_cv_c_float_words_bigendian=unknown
14282 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014283fi
14284
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014285
14286fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014288fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14290$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014291
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014292case $ax_cv_c_float_words_bigendian in
14293 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014294
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014295$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14296 ;;
14297 no)
14298 ;;
14299 *)
14300 as_fn_error $? "
14301
14302Unknown float word ordering. You need to manually preset
14303ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14304
14305 " "$LINENO" 5 ;;
14306esac
14307
14308
14309if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014310then
14311
Matthias Kloseb9621712010-04-24 17:59:49 +000014312$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014313
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014314elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014315then
14316
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014317$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14318
14319else
14320 # Some ARM platforms use a mixed-endian representation for doubles.
14321 # While Python doesn't currently have full support for these platforms
14322 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14323 # conversions work.
14324 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14325 # or little, then it must be this?
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328
14329fi
14330
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014331# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014332# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014333# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014334# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014335# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014336# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014337
14338# This inline assembler syntax may also work for suncc and icc,
14339# so we try it on all platforms.
14340
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14342$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014344/* end confdefs.h. */
14345
14346int
14347main ()
14348{
14349
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014350 unsigned short cw;
14351 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14352 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014353
14354 ;
14355 return 0;
14356}
14357_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014358if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014359 have_gcc_asm_for_x87=yes
14360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014362fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014363rm -f core conftest.err conftest.$ac_objext \
14364 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14366$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014367if test "$have_gcc_asm_for_x87" = yes
14368then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014369
Matthias Kloseb9621712010-04-24 17:59:49 +000014370$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014371
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14375$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377/* end confdefs.h. */
14378
14379int
14380main ()
14381{
14382
14383 unsigned int fpcr;
14384 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14385 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14386
14387 ;
14388 return 0;
14389}
14390_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014391if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014392 have_gcc_asm_for_mc68881=yes
14393else
14394 have_gcc_asm_for_mc68881=no
14395fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014396rm -f core conftest.err conftest.$ac_objext \
14397 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14399$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14400if test "$have_gcc_asm_for_mc68881" = yes
14401then
14402
14403$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14404
14405fi
14406
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014407# Detect whether system arithmetic is subject to x87-style double
14408# rounding issues. The result of this test has little meaning on non
14409# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14410# mode is round-to-nearest and double rounding issues are present, and
14411# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14413$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014414# $BASECFLAGS may affect the result
14415ac_save_cc="$CC"
14416CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014417if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014418 ac_cv_x87_double_rounding=no
14419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014421/* end confdefs.h. */
14422
14423#include <stdlib.h>
14424#include <math.h>
14425int main() {
14426 volatile double x, y, z;
14427 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14428 x = 0.99999999999999989; /* 1-2**-53 */
14429 y = 1./x;
14430 if (y != 1.)
14431 exit(0);
14432 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14433 x = 1e16;
14434 y = 2.99999;
14435 z = x + y;
14436 if (z != 1e16+4.)
14437 exit(0);
14438 /* both tests show evidence of double rounding */
14439 exit(1);
14440}
14441
14442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014443if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014444 ac_cv_x87_double_rounding=no
14445else
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014450fi
14451
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014452CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14454$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014455if test "$ac_cv_x87_double_rounding" = yes
14456then
14457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014459
14460fi
14461
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014462# ************************************
14463# * Check for mathematical functions *
14464# ************************************
14465
14466LIBS_SAVE=$LIBS
14467LIBS="$LIBS $LIBM"
14468
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014469for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14470do :
14471 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14472ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014473if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014474 cat >>confdefs.h <<_ACEOF
14475#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14476_ACEOF
14477
14478fi
14479done
14480
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014481for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014482do :
14483 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14484ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014485if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014486 cat >>confdefs.h <<_ACEOF
14487#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14488_ACEOF
14489
14490fi
14491done
14492
14493ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14494"
Victor Stinnere0be4232011-10-25 13:06:09 +020014495if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014496 ac_have_decl=1
14497else
14498 ac_have_decl=0
14499fi
14500
14501cat >>confdefs.h <<_ACEOF
14502#define HAVE_DECL_ISINF $ac_have_decl
14503_ACEOF
14504ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14505"
Victor Stinnere0be4232011-10-25 13:06:09 +020014506if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014507 ac_have_decl=1
14508else
14509 ac_have_decl=0
14510fi
14511
14512cat >>confdefs.h <<_ACEOF
14513#define HAVE_DECL_ISNAN $ac_have_decl
14514_ACEOF
14515ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14516"
Victor Stinnere0be4232011-10-25 13:06:09 +020014517if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014518 ac_have_decl=1
14519else
14520 ac_have_decl=0
14521fi
14522
14523cat >>confdefs.h <<_ACEOF
14524#define HAVE_DECL_ISFINITE $ac_have_decl
14525_ACEOF
14526
14527
Mark Dickinsona614f042009-11-28 12:48:43 +000014528# For multiprocessing module, check that sem_open
14529# actually works. For FreeBSD versions <= 7.2,
14530# the kernel module that provides POSIX semaphores
14531# isn't loaded by default, so an attempt to call
14532# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14534$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014535if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014539 ac_cv_posix_semaphores_enabled=yes
14540else
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014542/* end confdefs.h. */
14543
14544#include <unistd.h>
14545#include <fcntl.h>
14546#include <stdio.h>
14547#include <semaphore.h>
14548#include <sys/stat.h>
14549
14550int main(void) {
14551 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14552 if (a == SEM_FAILED) {
14553 perror("sem_open");
14554 return 1;
14555 }
14556 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014557 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014558 return 0;
14559}
14560
14561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014563 ac_cv_posix_semaphores_enabled=yes
14564else
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014569fi
14570
14571
Mark Dickinsona614f042009-11-28 12:48:43 +000014572fi
14573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14575$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014576if test $ac_cv_posix_semaphores_enabled = no
14577then
14578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014580
14581fi
14582
Mark Dickinson10683072009-04-18 21:18:19 +000014583# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14585$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014586if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588else
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014590 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014591else
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014593/* end confdefs.h. */
14594
14595#include <unistd.h>
14596#include <fcntl.h>
14597#include <stdio.h>
14598#include <semaphore.h>
14599#include <sys/stat.h>
14600
14601int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014602 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014603 int count;
14604 int res;
14605 if(a==SEM_FAILED){
14606 perror("sem_open");
14607 return 1;
14608
14609 }
14610 res = sem_getvalue(a, &count);
14611 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014612 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014613 return res==-1 ? 1 : 0;
14614}
14615
Mark Dickinson10683072009-04-18 21:18:19 +000014616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014617if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014618 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014619else
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14623 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014624fi
14625
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014626
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014627fi
14628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14630$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014631if test $ac_cv_broken_sem_getvalue = yes
14632then
14633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014635
14636fi
14637
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014638ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14639"
14640if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14641 ac_have_decl=1
14642else
14643 ac_have_decl=0
14644fi
14645
14646cat >>confdefs.h <<_ACEOF
14647#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14648_ACEOF
14649ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14650"
14651if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14652 ac_have_decl=1
14653else
14654 ac_have_decl=0
14655fi
14656
14657cat >>confdefs.h <<_ACEOF
14658#define HAVE_DECL_RTLD_NOW $ac_have_decl
14659_ACEOF
14660ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14661"
14662if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14663 ac_have_decl=1
14664else
14665 ac_have_decl=0
14666fi
14667
14668cat >>confdefs.h <<_ACEOF
14669#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14670_ACEOF
14671ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14672"
14673if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14674 ac_have_decl=1
14675else
14676 ac_have_decl=0
14677fi
14678
14679cat >>confdefs.h <<_ACEOF
14680#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14681_ACEOF
14682ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14683"
14684if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14685 ac_have_decl=1
14686else
14687 ac_have_decl=0
14688fi
14689
14690cat >>confdefs.h <<_ACEOF
14691#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14692_ACEOF
14693ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14694"
14695if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14696 ac_have_decl=1
14697else
14698 ac_have_decl=0
14699fi
14700
14701cat >>confdefs.h <<_ACEOF
14702#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14703_ACEOF
14704ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14705"
14706if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14707 ac_have_decl=1
14708else
14709 ac_have_decl=0
14710fi
14711
14712cat >>confdefs.h <<_ACEOF
14713#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14714_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014715ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14716"
14717if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14718 ac_have_decl=1
14719else
14720 ac_have_decl=0
14721fi
14722
14723cat >>confdefs.h <<_ACEOF
14724#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14725_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014726
14727
Mark Dickinsonbd792642009-03-18 20:06:12 +000014728# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14730$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014731# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014732if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014733 enableval=$enable_big_digits; case $enable_big_digits in
14734yes)
14735 enable_big_digits=30 ;;
14736no)
14737 enable_big_digits=15 ;;
1473815|30)
14739 ;;
14740*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014741 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 +000014742esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14744$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014745
14746cat >>confdefs.h <<_ACEOF
14747#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14748_ACEOF
14749
14750
14751else
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14753$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014754fi
14755
14756
Guido van Rossumef2255b2000-03-10 22:30:29 +000014757# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014758ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014759if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014760
14761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014763
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014764 wchar_h="yes"
14765
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766else
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014768
14769fi
14770
Michael W. Hudson54241132001-12-07 15:38:26 +000014771
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014773# determine wchar_t size
14774if test "$wchar_h" = yes
14775then
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14781$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014784else
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14786"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
Martin v. Löwis11437992002-04-12 09:54:03 +000014788else
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 if test "$ac_cv_type_wchar_t" = yes; then
14790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014792as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794 else
14795 ac_cv_sizeof_wchar_t=0
14796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14801$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802
14803
14804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014806#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014807_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014808
Michael W. Hudson54241132001-12-07 15:38:26 +000014809
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014810fi
14811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14813$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014814have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014816/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014817
14818#include <tcl.h>
14819#if TCL_UTF_MAX != 6
14820# error "NOT UCS4_TCL"
14821#endif
14822int
14823main ()
14824{
14825
14826 ;
14827 return 0;
14828}
14829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014831
14832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014834
14835 have_ucs4_tcl=yes
14836
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14840$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014841
Skip Montanaro6dead952003-09-25 14:50:04 +000014842# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014843if test "$wchar_h" = yes
14844then
14845 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14847$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014848 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014850else
14851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014853 ac_cv_wchar_t_signed=yes
14854else
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014856/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014857
14858 #include <wchar.h>
14859 int main()
14860 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014861 /* Success: exit code 0 */
14862 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014863 }
14864
14865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014866if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014867 ac_cv_wchar_t_signed=yes
14868else
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014873fi
14874
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014875fi
14876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14878$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879fi
14880
Michael Osipov3738fad2018-08-24 18:17:19 +020014881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14882$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014883# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014884if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014885 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014886then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014887
Matthias Kloseb9621712010-04-24 17:59:49 +000014888$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014889
Michael Osipov3738fad2018-08-24 18:17:19 +020014890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14891$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014892else
Michael Osipov3738fad2018-08-24 18:17:19 +020014893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14894$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014895fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014896
14897# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14899$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014900if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014902else
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 ac_cv_c_bigendian=unknown
14904 # See if we're dealing with a universal compiler.
14905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14906/* end confdefs.h. */
14907#ifndef __APPLE_CC__
14908 not a universal capable compiler
14909 #endif
14910 typedef int dummy;
14911
Skip Montanaro6dead952003-09-25 14:50:04 +000014912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014913if ac_fn_c_try_compile "$LINENO"; then :
14914
14915 # Check for potential -arch flags. It is not universal unless
14916 # there are at least two -arch flags with different values.
14917 ac_arch=
14918 ac_prev=
14919 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14920 if test -n "$ac_prev"; then
14921 case $ac_word in
14922 i?86 | x86_64 | ppc | ppc64)
14923 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14924 ac_arch=$ac_word
14925 else
14926 ac_cv_c_bigendian=universal
14927 break
14928 fi
14929 ;;
14930 esac
14931 ac_prev=
14932 elif test "x$ac_word" = "x-arch"; then
14933 ac_prev=arch
14934 fi
14935 done
14936fi
14937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938 if test $ac_cv_c_bigendian = unknown; then
14939 # See if sys/param.h defines the BYTE_ORDER macro.
14940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014941/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014942#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014944
Martin v. Löwis11437992002-04-12 09:54:03 +000014945int
14946main ()
14947{
Matthias Kloseb9621712010-04-24 17:59:49 +000014948#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14949 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14950 && LITTLE_ENDIAN)
14951 bogus endian macros
14952 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
14954 ;
14955 return 0;
14956}
14957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014958if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014959 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014961/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014962#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014964
Martin v. Löwis11437992002-04-12 09:54:03 +000014965int
14966main ()
14967{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014968#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 not big endian
14970 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
14972 ;
14973 return 0;
14974}
14975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014977 ac_cv_c_bigendian=yes
14978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014982fi
14983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14984 fi
14985 if test $ac_cv_c_bigendian = unknown; then
14986 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014989#include <limits.h>
14990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991int
14992main ()
14993{
Matthias Kloseb9621712010-04-24 17:59:49 +000014994#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14995 bogus endian macros
14996 #endif
14997
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 ;
14999 return 0;
15000}
15001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015002if ac_fn_c_try_compile "$LINENO"; then :
15003 # It does; now see whether it defined to _BIG_ENDIAN or not.
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
15006#include <limits.h>
15007
15008int
15009main ()
15010{
15011#ifndef _BIG_ENDIAN
15012 not big endian
15013 #endif
15014
15015 ;
15016 return 0;
15017}
15018_ACEOF
15019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15025fi
15026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15027 fi
15028 if test $ac_cv_c_bigendian = unknown; then
15029 # Compile a test program.
15030 if test "$cross_compiling" = yes; then :
15031 # Try to guess by grepping values from an object file.
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033/* end confdefs.h. */
15034short int ascii_mm[] =
15035 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15036 short int ascii_ii[] =
15037 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15038 int use_ascii (int i) {
15039 return ascii_mm[i] + ascii_ii[i];
15040 }
15041 short int ebcdic_ii[] =
15042 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15043 short int ebcdic_mm[] =
15044 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15045 int use_ebcdic (int i) {
15046 return ebcdic_mm[i] + ebcdic_ii[i];
15047 }
15048 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050int
15051main ()
15052{
15053return use_ascii (foo) == use_ebcdic (foo);
15054 ;
15055 return 0;
15056}
15057_ACEOF
15058if ac_fn_c_try_compile "$LINENO"; then :
15059 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15060 ac_cv_c_bigendian=yes
15061 fi
15062 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15063 if test "$ac_cv_c_bigendian" = unknown; then
15064 ac_cv_c_bigendian=no
15065 else
15066 # finding both strings is unlikely to happen, but who knows?
15067 ac_cv_c_bigendian=unknown
15068 fi
15069 fi
15070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015074/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015076int
15077main ()
15078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 /* Are we little or big endian? From Harbison&Steele. */
15081 union
15082 {
15083 long int l;
15084 char c[sizeof (long int)];
15085 } u;
15086 u.l = 1;
15087 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088
15089 ;
15090 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015091}
Martin v. Löwis11437992002-04-12 09:54:03 +000015092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015093if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094 ac_cv_c_bigendian=no
15095else
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15105$as_echo "$ac_cv_c_bigendian" >&6; }
15106 case $ac_cv_c_bigendian in #(
15107 yes)
15108 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15109;; #(
15110 no)
15111 ;; #(
15112 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015115
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 ;; #(
15117 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015118 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015119 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015121
Michael W. Hudson54241132001-12-07 15:38:26 +000015122
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015123# ABI version string for Python extension modules. This appears between the
15124# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15125# from the following attributes which affect the ABI of this Python build (in
15126# this order):
15127#
15128# * The Python implementation (always 'cpython-' for us)
15129# * The major and minor version numbers
15130# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015131#
15132# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015133# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15134# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015135#
15136# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15137# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015138
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15140$as_echo_n "checking ABIFLAGS... " >&6; }
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15142$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15144$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015145SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15147$as_echo "$SOABI" >&6; }
15148
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015149# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15150if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015151 # Similar to SOABI but remove "d" flag from ABIFLAGS
15152
15153 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15154
15155cat >>confdefs.h <<_ACEOF
15156#define ALT_SOABI "${ALT_SOABI}"
15157_ACEOF
15158
15159fi
15160
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015161
15162case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015163 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015164 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15165 *)
15166 EXT_SUFFIX=${SHLIB_SUFFIX};;
15167esac
15168
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15170$as_echo_n "checking LDVERSION... " >&6; }
15171LDVERSION='$(VERSION)$(ABIFLAGS)'
15172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15173$as_echo "$LDVERSION" >&6; }
15174
E. M. Brayc994c8f2019-05-24 17:33:47 +020015175# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015176
E. M. Brayb1fc4172019-05-24 18:39:39 +020015177if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015178 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015179else
15180 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015181fi
15182
doko@python.org87421192013-01-26 11:39:31 +010015183
doko@ubuntu.com55532312016-06-14 08:55:19 +020015184if test x$PLATFORM_TRIPLET = x; then
15185 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15186else
15187 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15188fi
doko@python.org87421192013-01-26 11:39:31 +010015189
15190
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015191# Check whether right shifting a negative integer extends the sign bit
15192# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15194$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015195if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015197else
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015200 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015201else
Matthias Kloseb9621712010-04-24 17:59:49 +000015202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015203/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015204
15205int main()
15206{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015207 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015208}
15209
Martin v. Löwis11437992002-04-12 09:54:03 +000015210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015211if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015212 ac_cv_rshift_extends_sign=yes
15213else
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015218fi
15219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220fi
15221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15223$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015224if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015225then
Martin v. Löwis11437992002-04-12 09:54:03 +000015226
Matthias Kloseb9621712010-04-24 17:59:49 +000015227$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015228
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015229fi
15230
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015231# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15233$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015234if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015236else
Martin v. Löwis11437992002-04-12 09:54:03 +000015237
Matthias Kloseb9621712010-04-24 17:59:49 +000015238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015239/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015240#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015241int
15242main ()
15243{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015244
15245 FILE *f = fopen("/dev/null", "r");
15246 flockfile(f);
15247 getc_unlocked(f);
15248 funlockfile(f);
15249
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 ;
15251 return 0;
15252}
15253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015254if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015255 ac_cv_have_getc_unlocked=yes
15256else
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 ac_cv_have_getc_unlocked=no
15258fi
15259rm -f core conftest.err conftest.$ac_objext \
15260 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15264$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015265if test "$ac_cv_have_getc_unlocked" = yes
15266then
Martin v. Löwis11437992002-04-12 09:54:03 +000015267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015269
15270fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015271
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015272# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015273# save the value of LIBS so we don't actually link Python with readline
15274LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015275
Gregory P. Smith18820942008-09-07 06:24:49 +000015276# On some systems we need to link readline to a termcap compatible
15277# library. NOTE: Keep the precedence of listed libraries synchronised
15278# with setup.py.
15279py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15281$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015282for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015283 if test -z "$py_libtermcap"; then
15284 READLINE_LIBS="-lreadline"
15285 else
15286 READLINE_LIBS="-lreadline -l$py_libtermcap"
15287 fi
15288 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015290/* end confdefs.h. */
15291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292/* Override any GCC internal prototype to avoid an error.
15293 Use char because int might match the return type of a GCC
15294 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015295#ifdef __cplusplus
15296extern "C"
15297#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015298char readline ();
15299int
15300main ()
15301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015303 ;
15304 return 0;
15305}
15306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015307if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015308 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015310rm -f core conftest.err conftest.$ac_objext \
15311 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015312 if test $py_cv_lib_readline = yes; then
15313 break
15314 fi
15315done
15316# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15317#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015318if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15320$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15323$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015324
Matthias Kloseb9621712010-04-24 17:59:49 +000015325$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015326
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015327fi
15328
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015329# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015331/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015332#include <readline/readline.h>
15333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015334if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015335 have_readline=yes
15336else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015337 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015338
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015339fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015340rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015341if test $have_readline = yes
15342then
Matthias Kloseb9621712010-04-24 17:59:49 +000015343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015344/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015345#include <readline/readline.h>
15346
15347_ACEOF
15348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015352
15353fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015354rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015355
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015357/* end confdefs.h. */
15358#include <readline/readline.h>
15359
15360_ACEOF
15361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015365
15366fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015367rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015368
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015369fi
15370
Martin v. Löwis0daad592001-09-30 21:09:59 +000015371# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15373$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015374if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015376else
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015378LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382/* Override any GCC internal prototype to avoid an error.
15383 Use char because int might match the return type of a GCC
15384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015385#ifdef __cplusplus
15386extern "C"
15387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015388char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015389int
15390main ()
15391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 ;
15394 return 0;
15395}
15396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015397if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015399else
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015402rm -f core conftest.err conftest.$ac_objext \
15403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015404LIBS=$ac_check_lib_save_LIBS
15405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15407$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015408if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015409
Matthias Kloseb9621712010-04-24 17:59:49 +000015410$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015411
Martin v. Löwis0daad592001-09-30 21:09:59 +000015412fi
15413
Michael W. Hudson54241132001-12-07 15:38:26 +000015414
Thomas Wouters89d996e2007-09-08 17:39:28 +000015415# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15417$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015418if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015420else
15421 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015422LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015424/* end confdefs.h. */
15425
15426/* Override any GCC internal prototype to avoid an error.
15427 Use char because int might match the return type of a GCC
15428 builtin and then its argument prototype would still apply. */
15429#ifdef __cplusplus
15430extern "C"
15431#endif
15432char rl_completion_display_matches_hook ();
15433int
15434main ()
15435{
15436return rl_completion_display_matches_hook ();
15437 ;
15438 return 0;
15439}
15440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015441if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015442 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15443else
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015446rm -f core conftest.err conftest.$ac_objext \
15447 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015448LIBS=$ac_check_lib_save_LIBS
15449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15451$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015452if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015453
Matthias Kloseb9621712010-04-24 17:59:49 +000015454$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015455
15456fi
15457
15458
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015459# also in 4.0, but not in editline
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15461$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15462if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15463 $as_echo_n "(cached) " >&6
15464else
15465 ac_check_lib_save_LIBS=$LIBS
15466LIBS="-lreadline $READLINE_LIBS $LIBS"
15467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15468/* end confdefs.h. */
15469
15470/* Override any GCC internal prototype to avoid an error.
15471 Use char because int might match the return type of a GCC
15472 builtin and then its argument prototype would still apply. */
15473#ifdef __cplusplus
15474extern "C"
15475#endif
15476char rl_resize_terminal ();
15477int
15478main ()
15479{
15480return rl_resize_terminal ();
15481 ;
15482 return 0;
15483}
15484_ACEOF
15485if ac_fn_c_try_link "$LINENO"; then :
15486 ac_cv_lib_readline_rl_resize_terminal=yes
15487else
15488 ac_cv_lib_readline_rl_resize_terminal=no
15489fi
15490rm -f core conftest.err conftest.$ac_objext \
15491 conftest$ac_exeext conftest.$ac_ext
15492LIBS=$ac_check_lib_save_LIBS
15493fi
15494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15495$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15496if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15497
15498$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15499
15500fi
15501
15502
Martin v. Löwis0daad592001-09-30 21:09:59 +000015503# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15505$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015506if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015508else
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015510LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015514/* Override any GCC internal prototype to avoid an error.
15515 Use char because int might match the return type of a GCC
15516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015517#ifdef __cplusplus
15518extern "C"
15519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015520char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015521int
15522main ()
15523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 ;
15526 return 0;
15527}
15528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015531else
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015534rm -f core conftest.err conftest.$ac_objext \
15535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015536LIBS=$ac_check_lib_save_LIBS
15537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15539$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015540if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015541
Matthias Kloseb9621712010-04-24 17:59:49 +000015542$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015543
Guido van Rossum353ae582001-07-10 16:45:32 +000015544fi
15545
Jack Jansendd19cf82001-12-06 22:36:17 +000015546
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015547# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015549/* end confdefs.h. */
15550#include <readline/readline.h>
15551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015553 have_readline=yes
15554else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015555 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015556
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015557fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015558rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015559if test $have_readline = yes
15560then
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015562/* end confdefs.h. */
15563#include <readline/readline.h>
15564
15565_ACEOF
15566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015570
15571fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015572rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015573
15574fi
15575
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15577$as_echo_n "checking for append_history in -lreadline... " >&6; }
15578if ${ac_cv_lib_readline_append_history+:} false; then :
15579 $as_echo_n "(cached) " >&6
15580else
15581 ac_check_lib_save_LIBS=$LIBS
15582LIBS="-lreadline $READLINE_LIBS $LIBS"
15583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15584/* end confdefs.h. */
15585
15586/* Override any GCC internal prototype to avoid an error.
15587 Use char because int might match the return type of a GCC
15588 builtin and then its argument prototype would still apply. */
15589#ifdef __cplusplus
15590extern "C"
15591#endif
15592char append_history ();
15593int
15594main ()
15595{
15596return append_history ();
15597 ;
15598 return 0;
15599}
15600_ACEOF
15601if ac_fn_c_try_link "$LINENO"; then :
15602 ac_cv_lib_readline_append_history=yes
15603else
15604 ac_cv_lib_readline_append_history=no
15605fi
15606rm -f core conftest.err conftest.$ac_objext \
15607 conftest$ac_exeext conftest.$ac_ext
15608LIBS=$ac_check_lib_save_LIBS
15609fi
15610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15611$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15612if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15613
15614$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15615
15616fi
15617
15618
Martin v. Löwis82bca632006-02-10 20:49:30 +000015619# End of readline checks: restore LIBS
15620LIBS=$LIBS_no_readline
15621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15623$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015624if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015626else
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015629 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015632/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015633
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015634#include <stdlib.h>
15635#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015636int main()
15637{
15638 int val1 = nice(1);
15639 if (val1 != -1 && val1 == nice(2))
15640 exit(0);
15641 exit(1);
15642}
15643
Martin v. Löwis11437992002-04-12 09:54:03 +000015644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015645if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015646 ac_cv_broken_nice=yes
15647else
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015652fi
15653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654fi
15655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15657$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015658if test "$ac_cv_broken_nice" = yes
15659then
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015662
15663fi
15664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15666$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015667if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015668 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015669else
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015671 ac_cv_broken_poll=no
15672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015674/* end confdefs.h. */
15675
15676#include <poll.h>
15677
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015678int main()
15679{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015680 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015681 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015682
15683 close (42);
15684
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015685 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015686 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015687 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015688 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015689 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015690 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015691 return 1;
15692}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015693
15694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015695if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015696 ac_cv_broken_poll=yes
15697else
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015704fi
15705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15707$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015708if test "$ac_cv_broken_poll" = yes
15709then
15710
Matthias Kloseb9621712010-04-24 17:59:49 +000015711$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015712
15713fi
15714
Martin v. Löwis1d459062005-03-14 21:23:33 +000015715# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15717$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015718if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015720else
15721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015723 ac_cv_working_tzset=no
15724else
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015726/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015727
15728#include <stdlib.h>
15729#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015730#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015731
15732#if HAVE_TZNAME
15733extern char *tzname[];
15734#endif
15735
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015736int main()
15737{
Brett Cannon18367812003-09-19 00:59:16 +000015738 /* Note that we need to ensure that not only does tzset(3)
15739 do 'something' with localtime, but it works as documented
15740 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015741 This includes making sure that tzname is set properly if
15742 tm->tm_zone does not exist since it is the alternative way
15743 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015744
15745 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015746 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015747 */
15748
Martin v. Löwis1d459062005-03-14 21:23:33 +000015749 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015750 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15751
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015752 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015753 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015754 if (localtime(&groundhogday)->tm_hour != 0)
15755 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015756#if HAVE_TZNAME
15757 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15758 if (strcmp(tzname[0], "UTC") ||
15759 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15760 exit(1);
15761#endif
Brett Cannon18367812003-09-19 00:59:16 +000015762
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015763 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015764 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015765 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015766 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015767#if HAVE_TZNAME
15768 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15769 exit(1);
15770#endif
Brett Cannon18367812003-09-19 00:59:16 +000015771
15772 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15773 tzset();
15774 if (localtime(&groundhogday)->tm_hour != 11)
15775 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015776#if HAVE_TZNAME
15777 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15778 exit(1);
15779#endif
15780
15781#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015782 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15783 exit(1);
15784 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15785 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015786#endif
Brett Cannon18367812003-09-19 00:59:16 +000015787
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015788 exit(0);
15789}
15790
15791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015792if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015793 ac_cv_working_tzset=yes
15794else
Matthias Kloseb9621712010-04-24 17:59:49 +000015795 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015799fi
15800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801fi
15802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15804$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015805if test "$ac_cv_working_tzset" = yes
15806then
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015809
15810fi
15811
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015812# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15814$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015815if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015817else
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015819/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015820#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015821int
15822main ()
15823{
15824
15825struct stat st;
15826st.st_mtim.tv_nsec = 1;
15827
15828 ;
15829 return 0;
15830}
15831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015833 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015834else
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15838fi
15839
Matthias Kloseb9621712010-04-24 17:59:49 +000015840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15841$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015842if test "$ac_cv_stat_tv_nsec" = yes
15843then
15844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015846
15847fi
15848
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015849# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15851$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015852if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015854else
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015856/* end confdefs.h. */
15857#include <sys/stat.h>
15858int
15859main ()
15860{
15861
15862struct stat st;
15863st.st_mtimespec.tv_nsec = 1;
15864
15865 ;
15866 return 0;
15867}
15868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015869if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015870 ac_cv_stat_tv_nsec2=yes
15871else
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15875fi
15876
Matthias Kloseb9621712010-04-24 17:59:49 +000015877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15878$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015879if test "$ac_cv_stat_tv_nsec2" = yes
15880then
15881
Matthias Kloseb9621712010-04-24 17:59:49 +000015882$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015883
15884fi
15885
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015886# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015887ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015888if test "$cross_compiling" = no; then
15889 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15890fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015891
15892for ac_header in curses.h ncurses.h
15893do :
15894 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15895ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15896if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15897 cat >>confdefs.h <<_ACEOF
15898#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15899_ACEOF
15900
15901fi
15902
15903done
15904
15905
15906# On Solaris, term.h requires curses.h
15907for ac_header in term.h
15908do :
15909 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15910#ifdef HAVE_CURSES_H
15911#include <curses.h>
15912#endif
15913
15914"
15915if test "x$ac_cv_header_term_h" = xyes; then :
15916 cat >>confdefs.h <<_ACEOF
15917#define HAVE_TERM_H 1
15918_ACEOF
15919
15920fi
15921
15922done
15923
15924
Jack Jansen666b1e72001-10-31 12:11:48 +000015925# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15927$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015928if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015930else
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015932/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015933#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015934int
15935main ()
15936{
Jack Jansen666b1e72001-10-31 12:11:48 +000015937
15938 int rtn;
15939 rtn = mvwdelch(0,0,0);
15940
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 ;
15942 return 0;
15943}
15944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015945if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015946 ac_cv_mvwdelch_is_expression=yes
15947else
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15951fi
15952
Matthias Kloseb9621712010-04-24 17:59:49 +000015953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15954$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015955
15956if test "$ac_cv_mvwdelch_is_expression" = yes
15957then
Martin v. Löwis11437992002-04-12 09:54:03 +000015958
Matthias Kloseb9621712010-04-24 17:59:49 +000015959$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015960
15961fi
15962
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015963# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15964# structs since version 5.7. If the macro is defined as zero before including
15965# [n]curses.h, ncurses will expose fields of the structs regardless of the
15966# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15968$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015969if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015970 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015971else
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015973/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015974
15975 #define NCURSES_OPAQUE 0
15976 #include <curses.h>
15977
Martin v. Löwis11437992002-04-12 09:54:03 +000015978int
15979main ()
15980{
Jack Jansen666b1e72001-10-31 12:11:48 +000015981
15982 WINDOW *w;
15983 w->_flags = 0;
15984
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ;
15986 return 0;
15987}
15988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015989if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015990 ac_cv_window_has_flags=yes
15991else
Matthias Kloseb9621712010-04-24 17:59:49 +000015992 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15995fi
15996
Matthias Kloseb9621712010-04-24 17:59:49 +000015997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15998$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015999
Jack Jansen666b1e72001-10-31 12:11:48 +000016000
16001if test "$ac_cv_window_has_flags" = yes
16002then
Martin v. Löwis11437992002-04-12 09:54:03 +000016003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016005
16006fi
16007
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16009$as_echo_n "checking for is_pad... " >&6; }
16010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h. */
16012#include <curses.h>
16013int
16014main ()
16015{
16016
16017#ifndef is_pad
16018void *x=is_pad
16019#endif
16020
16021 ;
16022 return 0;
16023}
16024_ACEOF
16025if ac_fn_c_try_compile "$LINENO"; then :
16026
16027$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16028
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16030$as_echo "yes" >&6; }
16031else
16032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16033$as_echo "no" >&6; }
16034
16035fi
16036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16037
Matthias Kloseb9621712010-04-24 17:59:49 +000016038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16039$as_echo_n "checking for is_term_resized... " >&6; }
16040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016041/* end confdefs.h. */
16042#include <curses.h>
16043int
16044main ()
16045{
16046void *x=is_term_resized
16047 ;
16048 return 0;
16049}
16050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016054
Matthias Kloseb159a552010-04-25 21:00:44 +000016055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016056$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016057else
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16059$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016060
16061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16063
Matthias Kloseb9621712010-04-24 17:59:49 +000016064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16065$as_echo_n "checking for resize_term... " >&6; }
16066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016067/* end confdefs.h. */
16068#include <curses.h>
16069int
16070main ()
16071{
16072void *x=resize_term
16073 ;
16074 return 0;
16075}
16076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016077if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016080
Matthias Kloseb159a552010-04-25 21:00:44 +000016081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016082$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016083else
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16085$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016086
16087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16089
Matthias Kloseb9621712010-04-24 17:59:49 +000016090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16091$as_echo_n "checking for resizeterm... " >&6; }
16092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016093/* end confdefs.h. */
16094#include <curses.h>
16095int
16096main ()
16097{
16098void *x=resizeterm
16099 ;
16100 return 0;
16101}
16102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016103if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016106
Matthias Kloseb159a552010-04-25 21:00:44 +000016107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016108$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016109else
Matthias Kloseb9621712010-04-24 17:59:49 +000016110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16111$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016112
16113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016115
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16117$as_echo_n "checking for immedok... " >&6; }
16118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16119/* end confdefs.h. */
16120#include <curses.h>
16121int
16122main ()
16123{
16124
16125#ifndef immedok
16126void *x=immedok
16127#endif
16128
16129 ;
16130 return 0;
16131}
16132_ACEOF
16133if ac_fn_c_try_compile "$LINENO"; then :
16134
16135$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16136
16137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16138$as_echo "yes" >&6; }
16139else
16140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16141$as_echo "no" >&6; }
16142
16143fi
16144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16145
16146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16147$as_echo_n "checking for syncok... " >&6; }
16148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16149/* end confdefs.h. */
16150#include <curses.h>
16151int
16152main ()
16153{
16154
16155#ifndef syncok
16156void *x=syncok
16157#endif
16158
16159 ;
16160 return 0;
16161}
16162_ACEOF
16163if ac_fn_c_try_compile "$LINENO"; then :
16164
16165$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16166
16167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16168$as_echo "yes" >&6; }
16169else
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16171$as_echo "no" >&6; }
16172
16173fi
16174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16175
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16177$as_echo_n "checking for wchgat... " >&6; }
16178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16179/* end confdefs.h. */
16180#include <curses.h>
16181int
16182main ()
16183{
16184
16185#ifndef wchgat
16186void *x=wchgat
16187#endif
16188
16189 ;
16190 return 0;
16191}
16192_ACEOF
16193if ac_fn_c_try_compile "$LINENO"; then :
16194
16195$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16196
16197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16198$as_echo "yes" >&6; }
16199else
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16201$as_echo "no" >&6; }
16202
16203fi
16204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16205
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16207$as_echo_n "checking for filter... " >&6; }
16208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209/* end confdefs.h. */
16210#include <curses.h>
16211int
16212main ()
16213{
16214
16215#ifndef filter
16216void *x=filter
16217#endif
16218
16219 ;
16220 return 0;
16221}
16222_ACEOF
16223if ac_fn_c_try_compile "$LINENO"; then :
16224
16225$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16226
16227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16228$as_echo "yes" >&6; }
16229else
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16231$as_echo "no" >&6; }
16232
16233fi
16234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16235
16236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16237$as_echo_n "checking for has_key... " >&6; }
16238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16239/* end confdefs.h. */
16240#include <curses.h>
16241int
16242main ()
16243{
16244
16245#ifndef has_key
16246void *x=has_key
16247#endif
16248
16249 ;
16250 return 0;
16251}
16252_ACEOF
16253if ac_fn_c_try_compile "$LINENO"; then :
16254
16255$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16256
16257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16258$as_echo "yes" >&6; }
16259else
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16261$as_echo "no" >&6; }
16262
16263fi
16264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16265
16266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16267$as_echo_n "checking for typeahead... " >&6; }
16268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269/* end confdefs.h. */
16270#include <curses.h>
16271int
16272main ()
16273{
16274
16275#ifndef typeahead
16276void *x=typeahead
16277#endif
16278
16279 ;
16280 return 0;
16281}
16282_ACEOF
16283if ac_fn_c_try_compile "$LINENO"; then :
16284
16285$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16286
16287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16288$as_echo "yes" >&6; }
16289else
16290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16291$as_echo "no" >&6; }
16292
16293fi
16294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16295
16296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16297$as_echo_n "checking for use_env... " >&6; }
16298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16299/* end confdefs.h. */
16300#include <curses.h>
16301int
16302main ()
16303{
16304
16305#ifndef use_env
16306void *x=use_env
16307#endif
16308
16309 ;
16310 return 0;
16311}
16312_ACEOF
16313if ac_fn_c_try_compile "$LINENO"; then :
16314
16315$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16316
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16318$as_echo "yes" >&6; }
16319else
16320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16321$as_echo "no" >&6; }
16322
16323fi
16324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016325# last curses configure check
16326CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16329$as_echo "$as_me: checking for device files" >&6;}
16330
16331if test "x$cross_compiling" = xyes; then
16332 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16334$as_echo_n "checking for /dev/ptmx... " >&6; }
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16336$as_echo "not set" >&6; }
16337 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16338 fi
16339 if test "${ac_cv_file__dev_ptc+set}" != set; then
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16341$as_echo_n "checking for /dev/ptc... " >&6; }
16342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16343$as_echo "not set" >&6; }
16344 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16345 fi
16346fi
16347
Matthias Kloseb9621712010-04-24 17:59:49 +000016348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16349$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016350if ${ac_cv_file__dev_ptmx+:} false; then :
16351 $as_echo_n "(cached) " >&6
16352else
16353 test "$cross_compiling" = yes &&
16354 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16355if test -r "/dev/ptmx"; then
16356 ac_cv_file__dev_ptmx=yes
16357else
16358 ac_cv_file__dev_ptmx=no
16359fi
16360fi
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16362$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16363if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016364
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016365fi
16366
16367if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016368
Matthias Kloseb9621712010-04-24 17:59:49 +000016369$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016370
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16373$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016374if ${ac_cv_file__dev_ptc+:} false; then :
16375 $as_echo_n "(cached) " >&6
16376else
16377 test "$cross_compiling" = yes &&
16378 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16379if test -r "/dev/ptc"; then
16380 ac_cv_file__dev_ptc=yes
16381else
16382 ac_cv_file__dev_ptc=no
16383fi
16384fi
16385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16386$as_echo "$ac_cv_file__dev_ptc" >&6; }
16387if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016388
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016389fi
16390
16391if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016392
Matthias Kloseb9621712010-04-24 17:59:49 +000016393$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016394
Neal Norwitz865400f2003-03-21 01:42:58 +000016395fi
16396
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016397if test $ac_sys_system = Darwin
16398then
16399 LIBS="$LIBS -framework CoreFoundation"
16400fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16403$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016404if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016405 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016406else
Matthias Kloseb9621712010-04-24 17:59:49 +000016407 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016408 ac_cv_have_size_t_format="cross -- assuming yes"
16409
Thomas Wouters477c8d52006-05-27 19:21:47 +000016410else
Matthias Kloseb9621712010-04-24 17:59:49 +000016411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016412/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016413
Thomas Wouters477c8d52006-05-27 19:21:47 +000016414#include <stdio.h>
16415#include <stddef.h>
16416#include <string.h>
16417
Christian Heimes2c181612007-12-17 20:04:13 +000016418#ifdef HAVE_SYS_TYPES_H
16419#include <sys/types.h>
16420#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016421
16422#ifdef HAVE_SSIZE_T
16423typedef ssize_t Py_ssize_t;
16424#elif SIZEOF_VOID_P == SIZEOF_LONG
16425typedef long Py_ssize_t;
16426#else
16427typedef int Py_ssize_t;
16428#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016429
Christian Heimes2c181612007-12-17 20:04:13 +000016430int main()
16431{
16432 char buffer[256];
16433
Thomas Wouters477c8d52006-05-27 19:21:47 +000016434 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16435 return 1;
16436
Thomas Wouters89f507f2006-12-13 04:49:30 +000016437 if (strcmp(buffer, "123"))
16438 return 1;
16439
16440 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16441 return 1;
16442
16443 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016444 return 1;
16445
16446 return 0;
16447}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016448
Thomas Wouters477c8d52006-05-27 19:21:47 +000016449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016450if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016451 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016452else
Matthias Kloseb9621712010-04-24 17:59:49 +000016453 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16456 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016457fi
16458
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16461$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016462if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016463
Matthias Kloseb9621712010-04-24 17:59:49 +000016464$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016465
16466fi
16467
Matthias Kloseb9621712010-04-24 17:59:49 +000016468ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016469#ifdef HAVE_SYS_TYPES_H
16470#include <sys/types.h>
16471#endif
16472#ifdef HAVE_SYS_SOCKET_H
16473#include <sys/socket.h>
16474#endif
16475
Matthias Kloseb9621712010-04-24 17:59:49 +000016476"
Victor Stinnere0be4232011-10-25 13:06:09 +020016477if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016478
Martin v. Löwis11437992002-04-12 09:54:03 +000016479else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016480
Matthias Kloseb9621712010-04-24 17:59:49 +000016481$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016482
16483fi
16484
Michael W. Hudson54241132001-12-07 15:38:26 +000016485
Matthias Kloseb9621712010-04-24 17:59:49 +000016486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16487$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016488if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016490else
Matthias Kloseb9621712010-04-24 17:59:49 +000016491 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016492 ac_cv_broken_mbstowcs=no
16493else
Matthias Kloseb9621712010-04-24 17:59:49 +000016494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016495/* end confdefs.h. */
16496
Stefan Krah19c21392012-11-22 23:47:32 +010016497#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016498#include<stdlib.h>
16499int main() {
16500 size_t len = -1;
16501 const char *str = "text";
16502 len = mbstowcs(NULL, str, 0);
16503 return (len != 4);
16504}
16505
16506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016507if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016508 ac_cv_broken_mbstowcs=no
16509else
Matthias Kloseb9621712010-04-24 17:59:49 +000016510 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016514fi
16515
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016516fi
16517
Matthias Kloseb9621712010-04-24 17:59:49 +000016518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16519$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016520if test "$ac_cv_broken_mbstowcs" = yes
16521then
16522
Matthias Kloseb9621712010-04-24 17:59:49 +000016523$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016524
16525fi
16526
Antoine Pitroub52ec782009-01-25 16:34:23 +000016527# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16529$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016530
16531# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016532if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016533 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016534if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016535then
16536
Matthias Kloseb9621712010-04-24 17:59:49 +000016537$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016538
Matthias Kloseb9621712010-04-24 17:59:49 +000016539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16540$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016541fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016542if test "$withval" = no
16543then
16544
16545$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16546
Matthias Kloseb9621712010-04-24 17:59:49 +000016547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16548$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016549fi
16550
Antoine Pitrou042b1282010-08-13 21:15:58 +000016551else
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16553$as_echo "no value specified" >&6; }
16554fi
16555
Antoine Pitroub52ec782009-01-25 16:34:23 +000016556
Matthias Kloseb17289e2012-03-15 19:51:34 +010016557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16558$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16559if ${ac_cv_computed_gotos+:} false; then :
16560 $as_echo_n "(cached) " >&6
16561else
16562 if test "$cross_compiling" = yes; then :
16563 if test "${with_computed_gotos+set}" = set; then
16564 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16565 else
16566 ac_cv_computed_gotos=no
16567 fi
16568else
16569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570/* end confdefs.h. */
16571
16572int main(int argc, char **argv)
16573{
16574 static void *targets[1] = { &&LABEL1 };
16575 goto LABEL2;
16576LABEL1:
16577 return 0;
16578LABEL2:
16579 goto *targets[0];
16580 return 1;
16581}
16582
16583_ACEOF
16584if ac_fn_c_try_run "$LINENO"; then :
16585 ac_cv_computed_gotos=yes
16586else
16587 ac_cv_computed_gotos=no
16588fi
16589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16590 conftest.$ac_objext conftest.beam conftest.$ac_ext
16591fi
16592
16593fi
16594
16595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16596$as_echo "$ac_cv_computed_gotos" >&6; }
16597case "$ac_cv_computed_gotos" in yes*)
16598
16599$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16600
16601esac
16602
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016603case $ac_sys_system in
16604AIX*)
16605
16606$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16607 ;;
16608esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016609
Michael W. Hudson54241132001-12-07 15:38:26 +000016610
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016611
16612
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016613for h in `(cd $srcdir;echo Python/thread_*.h)`
16614do
16615 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16616done
16617
Michael W. Hudson54241132001-12-07 15:38:26 +000016618
Victor Stinner21a74a92019-04-11 22:28:12 +020016619SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16621$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016622for dir in $SRCDIRS; do
16623 if test ! -d $dir; then
16624 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016625 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016626done
Matthias Kloseb9621712010-04-24 17:59:49 +000016627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16628$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016629
Stefan Krah1919b7e2012-03-21 18:25:23 +010016630# Availability of -O2:
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16632$as_echo_n "checking for -O2... " >&6; }
16633saved_cflags="$CFLAGS"
16634CFLAGS="-O2"
16635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16636/* end confdefs.h. */
16637
16638int
16639main ()
16640{
16641
16642
16643 ;
16644 return 0;
16645}
16646_ACEOF
16647if ac_fn_c_try_compile "$LINENO"; then :
16648 have_O2=yes
16649else
16650 have_O2=no
16651fi
16652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16654$as_echo "$have_O2" >&6; }
16655CFLAGS="$saved_cflags"
16656
16657# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16658# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16660$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16661saved_cflags="$CFLAGS"
16662CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16663if test "$have_O2" = no; then
16664 CFLAGS=""
16665fi
16666if test "$cross_compiling" = yes; then :
16667 have_glibc_memmove_bug=undefined
16668else
16669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16670/* end confdefs.h. */
16671
16672#include <stdio.h>
16673#include <stdlib.h>
16674#include <string.h>
16675void foo(void *p, void *q) { memmove(p, q, 19); }
16676int main() {
16677 char a[32] = "123456789000000000";
16678 foo(&a[9], a);
16679 if (strcmp(a, "123456789123456789000000000") != 0)
16680 return 1;
16681 foo(a, &a[9]);
16682 if (strcmp(a, "123456789000000000") != 0)
16683 return 1;
16684 return 0;
16685}
16686
16687_ACEOF
16688if ac_fn_c_try_run "$LINENO"; then :
16689 have_glibc_memmove_bug=no
16690else
16691 have_glibc_memmove_bug=yes
16692fi
16693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16694 conftest.$ac_objext conftest.beam conftest.$ac_ext
16695fi
16696
16697CFLAGS="$saved_cflags"
16698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16699$as_echo "$have_glibc_memmove_bug" >&6; }
16700if test "$have_glibc_memmove_bug" = yes; then
16701
16702$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16703
16704fi
16705
16706if test "$have_gcc_asm_for_x87" = yes; then
16707 # Some versions of gcc miscompile inline asm:
16708 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16709 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16710 case $CC in
16711 *gcc*)
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16713$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16714 saved_cflags="$CFLAGS"
16715 CFLAGS="-O2"
16716 if test "$cross_compiling" = yes; then :
16717 have_ipa_pure_const_bug=undefined
16718else
16719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16720/* end confdefs.h. */
16721
16722 __attribute__((noinline)) int
16723 foo(int *p) {
16724 int r;
16725 asm ( "movl \$6, (%1)\n\t"
16726 "xorl %0, %0\n\t"
16727 : "=r" (r) : "r" (p) : "memory"
16728 );
16729 return r;
16730 }
16731 int main() {
16732 int p = 8;
16733 if ((foo(&p) ? : p) != 6)
16734 return 1;
16735 return 0;
16736 }
16737
16738_ACEOF
16739if ac_fn_c_try_run "$LINENO"; then :
16740 have_ipa_pure_const_bug=no
16741else
16742 have_ipa_pure_const_bug=yes
16743fi
16744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16745 conftest.$ac_objext conftest.beam conftest.$ac_ext
16746fi
16747
16748 CFLAGS="$saved_cflags"
16749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16750$as_echo "$have_ipa_pure_const_bug" >&6; }
16751 if test "$have_ipa_pure_const_bug" = yes; then
16752
16753$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16754
16755 fi
16756 ;;
16757 esac
16758fi
16759
Victor Stinner4f5366e2015-01-09 02:13:19 +010016760# Check for stdatomic.h
16761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16762$as_echo_n "checking for stdatomic.h... " >&6; }
16763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764/* end confdefs.h. */
16765
16766
16767 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016768 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016769 int main() {
16770 int loaded_value = atomic_load(&value);
16771 return 0;
16772 }
16773
16774
16775_ACEOF
16776if ac_fn_c_try_link "$LINENO"; then :
16777 have_stdatomic_h=yes
16778else
16779 have_stdatomic_h=no
16780fi
16781rm -f core conftest.err conftest.$ac_objext \
16782 conftest$ac_exeext conftest.$ac_ext
16783
16784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16785$as_echo "$have_stdatomic_h" >&6; }
16786
16787if test "$have_stdatomic_h" = yes; then
16788
16789$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16790
16791fi
16792
16793# Check for GCC >= 4.7 __atomic builtins
16794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16795$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797/* end confdefs.h. */
16798
16799
16800 volatile int val = 1;
16801 int main() {
16802 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16803 return 0;
16804 }
16805
16806
16807_ACEOF
16808if ac_fn_c_try_link "$LINENO"; then :
16809 have_builtin_atomic=yes
16810else
16811 have_builtin_atomic=no
16812fi
16813rm -f core conftest.err conftest.$ac_objext \
16814 conftest$ac_exeext conftest.$ac_ext
16815
16816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16817$as_echo "$have_builtin_atomic" >&6; }
16818
16819if test "$have_builtin_atomic" = yes; then
16820
16821$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16822
16823fi
16824
Ned Deily322f5ba2013-11-21 23:01:59 -080016825# ensurepip option
16826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16827$as_echo_n "checking for ensurepip... " >&6; }
16828
16829# Check whether --with-ensurepip was given.
16830if test "${with_ensurepip+set}" = set; then :
16831 withval=$with_ensurepip;
16832else
16833 with_ensurepip=upgrade
16834fi
16835
16836case $with_ensurepip in #(
16837 yes|upgrade) :
16838 ENSUREPIP=upgrade ;; #(
16839 install) :
16840 ENSUREPIP=install ;; #(
16841 no) :
16842 ENSUREPIP=no ;; #(
16843 *) :
16844 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16845esac
16846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16847$as_echo "$ENSUREPIP" >&6; }
16848
16849
Victor Stinner35a97c02015-03-08 02:59:09 +010016850# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16852$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854/* end confdefs.h. */
16855
16856
16857 #include <dirent.h>
16858
16859 int main() {
16860 struct dirent entry;
16861 return entry.d_type == DT_UNKNOWN;
16862 }
16863
16864
16865_ACEOF
16866if ac_fn_c_try_link "$LINENO"; then :
16867 have_dirent_d_type=yes
16868else
16869 have_dirent_d_type=no
16870fi
16871rm -f core conftest.err conftest.$ac_objext \
16872 conftest$ac_exeext conftest.$ac_ext
16873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16874$as_echo "$have_dirent_d_type" >&6; }
16875
16876if test "$have_dirent_d_type" = yes; then
16877
16878$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16879
16880fi
16881
Victor Stinner9eb57c52015-03-19 22:21:49 +010016882# check if the Linux getrandom() syscall is available
16883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16884$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16886/* end confdefs.h. */
16887
16888
Victor Stinner1b80b242016-04-12 22:34:58 +020016889 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016890 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016891 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016892
16893 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016894 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016895 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016896 const int flags = GRND_NONBLOCK;
16897 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016898 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016899 return 0;
16900 }
16901
16902
16903_ACEOF
16904if ac_fn_c_try_link "$LINENO"; then :
16905 have_getrandom_syscall=yes
16906else
16907 have_getrandom_syscall=no
16908fi
16909rm -f core conftest.err conftest.$ac_objext \
16910 conftest$ac_exeext conftest.$ac_ext
16911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16912$as_echo "$have_getrandom_syscall" >&6; }
16913
16914if test "$have_getrandom_syscall" = yes; then
16915
16916$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16917
16918fi
16919
Victor Stinner3abf44e2015-09-18 15:38:37 +020016920# check if the getrandom() function is available
16921# the test was written for the Solaris function of <sys/random.h>
16922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16923$as_echo_n "checking for the getrandom() function... " >&6; }
16924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16925/* end confdefs.h. */
16926
16927
16928 #include <sys/random.h>
16929
16930 int main() {
16931 char buffer[1];
16932 const size_t buflen = sizeof(buffer);
16933 const int flags = 0;
16934 /* ignore the result, Python checks for ENOSYS at runtime */
16935 (void)getrandom(buffer, buflen, flags);
16936 return 0;
16937 }
16938
16939
16940_ACEOF
16941if ac_fn_c_try_link "$LINENO"; then :
16942 have_getrandom=yes
16943else
16944 have_getrandom=no
16945fi
16946rm -f core conftest.err conftest.$ac_objext \
16947 conftest$ac_exeext conftest.$ac_ext
16948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16949$as_echo "$have_getrandom" >&6; }
16950
16951if test "$have_getrandom" = yes; then
16952
16953$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16954
16955fi
16956
Neil Schemenauer5741c452019-02-08 10:48:46 -080016957# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16958# shm_* may only be available if linking against librt
16959save_LIBS="$LIBS"
16960save_includes_default="$ac_includes_default"
16961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16962$as_echo_n "checking for library containing shm_open... " >&6; }
16963if ${ac_cv_search_shm_open+:} false; then :
16964 $as_echo_n "(cached) " >&6
16965else
16966 ac_func_search_save_LIBS=$LIBS
16967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16968/* end confdefs.h. */
16969
16970/* Override any GCC internal prototype to avoid an error.
16971 Use char because int might match the return type of a GCC
16972 builtin and then its argument prototype would still apply. */
16973#ifdef __cplusplus
16974extern "C"
16975#endif
16976char shm_open ();
16977int
16978main ()
16979{
16980return shm_open ();
16981 ;
16982 return 0;
16983}
16984_ACEOF
16985for ac_lib in '' rt; do
16986 if test -z "$ac_lib"; then
16987 ac_res="none required"
16988 else
16989 ac_res=-l$ac_lib
16990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16991 fi
16992 if ac_fn_c_try_link "$LINENO"; then :
16993 ac_cv_search_shm_open=$ac_res
16994fi
16995rm -f core conftest.err conftest.$ac_objext \
16996 conftest$ac_exeext
16997 if ${ac_cv_search_shm_open+:} false; then :
16998 break
16999fi
17000done
17001if ${ac_cv_search_shm_open+:} false; then :
17002
17003else
17004 ac_cv_search_shm_open=no
17005fi
17006rm conftest.$ac_ext
17007LIBS=$ac_func_search_save_LIBS
17008fi
17009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17010$as_echo "$ac_cv_search_shm_open" >&6; }
17011ac_res=$ac_cv_search_shm_open
17012if test "$ac_res" != no; then :
17013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17014
17015fi
17016
17017if test "$ac_cv_search_shm_open" = "-lrt"; then
17018
17019$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17020
17021fi
17022for ac_header in sys/mman.h
17023do :
17024 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17025if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17026 cat >>confdefs.h <<_ACEOF
17027#define HAVE_SYS_MMAN_H 1
17028_ACEOF
17029
17030fi
17031
17032done
17033
17034# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17035ac_includes_default="\
17036${ac_includes_default}
17037#ifndef __cplusplus
17038# ifdef HAVE_SYS_MMAN_H
17039# include <sys/mman.h>
17040# endif
17041#endif
17042"
17043for ac_func in shm_open shm_unlink
17044do :
17045 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17046ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17047if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17048 cat >>confdefs.h <<_ACEOF
17049#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17050_ACEOF
17051
17052fi
17053done
17054
17055# we don't want to link with librt always, restore LIBS
17056LIBS="$save_LIBS"
17057ac_includes_default="$save_includes_default"
17058
Christian Heimesff5be6e2018-01-20 13:19:21 +010017059# Check for usable OpenSSL
17060
17061 found=false
17062
17063# Check whether --with-openssl was given.
17064if test "${with_openssl+set}" = set; then :
17065 withval=$with_openssl;
17066 case "$withval" in
17067 "" | y | ye | yes | n | no)
17068 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17069 ;;
17070 *) ssldirs="$withval"
17071 ;;
17072 esac
17073
17074else
17075
17076 # if pkg-config is installed and openssl has installed a .pc file,
17077 # then use that information and don't search ssldirs
17078 if test -n "$ac_tool_prefix"; then
17079 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17080set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17082$as_echo_n "checking for $ac_word... " >&6; }
17083if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17084 $as_echo_n "(cached) " >&6
17085else
17086 if test -n "$PKG_CONFIG"; then
17087 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17088else
17089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17090for as_dir in $PATH
17091do
17092 IFS=$as_save_IFS
17093 test -z "$as_dir" && as_dir=.
17094 for ac_exec_ext in '' $ac_executable_extensions; do
17095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17096 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17098 break 2
17099 fi
17100done
17101 done
17102IFS=$as_save_IFS
17103
17104fi
17105fi
17106PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17107if test -n "$PKG_CONFIG"; then
17108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17109$as_echo "$PKG_CONFIG" >&6; }
17110else
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17112$as_echo "no" >&6; }
17113fi
17114
17115
17116fi
17117if test -z "$ac_cv_prog_PKG_CONFIG"; then
17118 ac_ct_PKG_CONFIG=$PKG_CONFIG
17119 # Extract the first word of "pkg-config", so it can be a program name with args.
17120set dummy pkg-config; ac_word=$2
17121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17122$as_echo_n "checking for $ac_word... " >&6; }
17123if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17124 $as_echo_n "(cached) " >&6
17125else
17126 if test -n "$ac_ct_PKG_CONFIG"; then
17127 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17128else
17129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17130for as_dir in $PATH
17131do
17132 IFS=$as_save_IFS
17133 test -z "$as_dir" && as_dir=.
17134 for ac_exec_ext in '' $ac_executable_extensions; do
17135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17136 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17138 break 2
17139 fi
17140done
17141 done
17142IFS=$as_save_IFS
17143
17144fi
17145fi
17146ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17147if test -n "$ac_ct_PKG_CONFIG"; then
17148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17149$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17150else
17151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17152$as_echo "no" >&6; }
17153fi
17154
17155 if test "x$ac_ct_PKG_CONFIG" = x; then
17156 PKG_CONFIG=""
17157 else
17158 case $cross_compiling:$ac_tool_warned in
17159yes:)
17160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17162ac_tool_warned=yes ;;
17163esac
17164 PKG_CONFIG=$ac_ct_PKG_CONFIG
17165 fi
17166else
17167 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17168fi
17169
17170 if test x"$PKG_CONFIG" != x""; then
17171 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17172 if test $? = 0; then
17173 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17174 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17175 found=true
17176 fi
17177 fi
17178
17179 # no such luck; use some default ssldirs
17180 if ! $found; then
17181 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17182 fi
17183
17184
17185fi
17186
17187
17188
17189 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17190 # an 'openssl' subdirectory
17191
17192 if ! $found; then
17193 OPENSSL_INCLUDES=
17194 for ssldir in $ssldirs; do
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17196$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17197 if test -f "$ssldir/include/openssl/ssl.h"; then
17198 OPENSSL_INCLUDES="-I$ssldir/include"
17199 OPENSSL_LDFLAGS="-L$ssldir/lib"
17200 OPENSSL_LIBS="-lssl -lcrypto"
17201 found=true
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17203$as_echo "yes" >&6; }
17204 break
17205 else
17206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17207$as_echo "no" >&6; }
17208 fi
17209 done
17210
17211 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17212 # it will just work!
17213 fi
17214
17215 # try the preprocessor and linker with our new flags,
17216 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17217
17218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17219$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17220 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17221 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17222
17223 save_LIBS="$LIBS"
17224 save_LDFLAGS="$LDFLAGS"
17225 save_CPPFLAGS="$CPPFLAGS"
17226 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17227 LIBS="$OPENSSL_LIBS $LIBS"
17228 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17230/* end confdefs.h. */
17231#include <openssl/ssl.h>
17232int
17233main ()
17234{
17235SSL_new(NULL)
17236 ;
17237 return 0;
17238}
17239_ACEOF
17240if ac_fn_c_try_link "$LINENO"; then :
17241
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17243$as_echo "yes" >&6; }
17244 have_openssl=yes
17245
17246else
17247
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17249$as_echo "no" >&6; }
17250 have_openssl=no
17251
17252fi
17253rm -f core conftest.err conftest.$ac_objext \
17254 conftest$ac_exeext conftest.$ac_ext
17255 CPPFLAGS="$save_CPPFLAGS"
17256 LDFLAGS="$save_LDFLAGS"
17257 LIBS="$save_LIBS"
17258
17259
17260
17261
17262
17263
17264if test "$have_openssl" = yes; then
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17266$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17267
17268 save_LIBS="$LIBS"
17269 save_LDFLAGS="$LDFLAGS"
17270 save_CPPFLAGS="$CPPFLAGS"
17271 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17272 LIBS="$OPENSSL_LIBS $LIBS"
17273 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17274
17275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276/* end confdefs.h. */
17277
17278 #include <openssl/x509_vfy.h>
17279
17280int
17281main ()
17282{
17283
17284 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17285 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17286 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17287 X509_VERIFY_PARAM_set_hostflags(p, 0);
17288
17289 ;
17290 return 0;
17291}
17292
17293_ACEOF
17294if ac_fn_c_try_link "$LINENO"; then :
17295
17296 ac_cv_has_x509_verify_param_set1_host=yes
17297
17298else
17299
17300 ac_cv_has_x509_verify_param_set1_host=no
17301
17302fi
17303rm -f core conftest.err conftest.$ac_objext \
17304 conftest$ac_exeext conftest.$ac_ext
17305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17306$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17307 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17308
17309$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17310
17311 fi
17312
17313 CPPFLAGS="$save_CPPFLAGS"
17314 LDFLAGS="$save_LDFLAGS"
17315 LIBS="$save_LIBS"
17316fi
17317
Christian Heimes892d66e2018-01-29 14:10:18 +010017318# ssl module default cipher suite string
17319
17320
17321
17322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17323$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17324
17325# Check whether --with-ssl-default-suites was given.
17326if test "${with_ssl_default_suites+set}" = set; then :
17327 withval=$with_ssl_default_suites;
17328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17329$as_echo "$withval" >&6; }
17330case "$withval" in
17331 python)
17332 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17333
17334 ;;
17335 openssl)
17336 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17337
17338 ;;
17339 *)
17340 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17341
17342 cat >>confdefs.h <<_ACEOF
17343#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17344_ACEOF
17345
17346 ;;
17347esac
17348
17349else
17350
17351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17352$as_echo "python" >&6; }
17353$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17354
17355
17356fi
17357
17358
17359
Guido van Rossum627b2d71993-12-24 10:39:16 +000017360# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017361ac_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 +000017362
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017363ac_config_files="$ac_config_files Modules/ld_so_aix"
17364
Martin v. Löwis11437992002-04-12 09:54:03 +000017365cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017366# This file is a shell script that caches the results of configure
17367# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017368# scripts and configure runs, see configure's option --config-cache.
17369# It is not useful on other systems. If it contains results you don't
17370# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017371#
Martin v. Löwis11437992002-04-12 09:54:03 +000017372# config.status only pays attention to the cache file if you give it
17373# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017374#
Skip Montanaro6dead952003-09-25 14:50:04 +000017375# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017376# loading this file, other *unset* `ac_cv_foo' will be assigned the
17377# following values.
17378
17379_ACEOF
17380
Guido van Rossumf78abae1997-01-21 22:02:36 +000017381# The following way of writing the cache mishandles newlines in values,
17382# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017384# Ultrix sh set writes to stderr and can't be redirected directly,
17385# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386(
17387 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17388 eval ac_val=\$$ac_var
17389 case $ac_val in #(
17390 *${as_nl}*)
17391 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017392 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17393$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 esac
17395 case $ac_var in #(
17396 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017397 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17398 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 esac ;;
17400 esac
17401 done
17402
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17405 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017406 # `set' does not quote correctly, so add quotes: double-quote
17407 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017409 "s/'/'\\\\''/g;
17410 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 *)
17413 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416 esac |
17417 sort
17418) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017423 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17424 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17426 :end' >>confcache
17427if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17428 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017429 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017430 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17431$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017432 if test ! -f "$cache_file" || test -h "$cache_file"; then
17433 cat confcache >"$cache_file"
17434 else
17435 case $cache_file in #(
17436 */* | ?:*)
17437 mv -f confcache "$cache_file"$$ &&
17438 mv -f "$cache_file"$$ "$cache_file" ;; #(
17439 *)
17440 mv -f confcache "$cache_file" ;;
17441 esac
17442 fi
17443 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017444 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017445 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17446$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017447 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017448fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017449rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017451test "x$prefix" = xNONE && prefix=$ac_default_prefix
17452# Let make expand exec_prefix.
17453test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017455DEFS=-DHAVE_CONFIG_H
17456
Skip Montanaro6dead952003-09-25 14:50:04 +000017457ac_libobjs=
17458ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017459U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017460for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17461 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017463 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17465 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17467 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017468done
17469LIBOBJS=$ac_libobjs
17470
17471LTLIBOBJS=$ac_ltlibobjs
17472
17473
Martin v. Löwis11437992002-04-12 09:54:03 +000017474
Matthias Kloseb9621712010-04-24 17:59:49 +000017475
Victor Stinnere0be4232011-10-25 13:06:09 +020017476: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017477ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017478ac_clean_files_save=$ac_clean_files
17479ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017480{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17481$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17482as_write_fail=0
17483cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017484#! $SHELL
17485# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017486# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017487# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017488# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017489
Martin v. Löwis11437992002-04-12 09:54:03 +000017490debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017491ac_cs_recheck=false
17492ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017493
Matthias Kloseb9621712010-04-24 17:59:49 +000017494SHELL=\${CONFIG_SHELL-$SHELL}
17495export SHELL
17496_ASEOF
17497cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17498## -------------------- ##
17499## M4sh Initialization. ##
17500## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502# Be more Bourne compatible
17503DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017504if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 emulate sh
17506 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017507 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017508 # is contrary to our usage. Disable this feature.
17509 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017511else
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 case `(set -o) 2>/dev/null` in #(
17513 *posix*) :
17514 set -o posix ;; #(
17515 *) :
17516 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017518fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017519
17520
Matthias Kloseb9621712010-04-24 17:59:49 +000017521as_nl='
17522'
17523export as_nl
17524# Printing a long string crashes Solaris 7 /usr/bin/printf.
17525as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17526as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17527as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17528# Prefer a ksh shell builtin over an external printf program on Solaris,
17529# but without wasting forks for bash or zsh.
17530if test -z "$BASH_VERSION$ZSH_VERSION" \
17531 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17532 as_echo='print -r --'
17533 as_echo_n='print -rn --'
17534elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17535 as_echo='printf %s\n'
17536 as_echo_n='printf %s'
17537else
17538 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17539 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17540 as_echo_n='/usr/ucb/echo -n'
17541 else
17542 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17543 as_echo_n_body='eval
17544 arg=$1;
17545 case $arg in #(
17546 *"$as_nl"*)
17547 expr "X$arg" : "X\\(.*\\)$as_nl";
17548 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17549 esac;
17550 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17551 '
17552 export as_echo_n_body
17553 as_echo_n='sh -c $as_echo_n_body as_echo'
17554 fi
17555 export as_echo_body
17556 as_echo='sh -c $as_echo_body as_echo'
17557fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017558
17559# The user is always right.
17560if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 PATH_SEPARATOR=:
17562 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17563 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17564 PATH_SEPARATOR=';'
17565 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568
17569# IFS
17570# We need space, tab and new line, in precisely that order. Quoting is
17571# there to prevent editors from complaining about space-tab.
17572# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17573# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017574IFS=" "" $as_nl"
17575
17576# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017577as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017578case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 *[\\/]* ) as_myself=$0 ;;
17580 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017581for as_dir in $PATH
17582do
17583 IFS=$as_save_IFS
17584 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017585 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17586 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 ;;
17590esac
17591# We did not find ourselves, most probably we were run as `sh COMMAND'
17592# in which case we are not to be found in the path.
17593if test "x$as_myself" = x; then
17594 as_myself=$0
17595fi
17596if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017597 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17598 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599fi
17600
Matthias Kloseb9621712010-04-24 17:59:49 +000017601# Unset variables that we do not need and which cause bugs (e.g. in
17602# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17603# suppresses any "Segmentation fault" message there. '((' could
17604# trigger a bug in pdksh 5.2.14.
17605for as_var in BASH_ENV ENV MAIL MAILPATH
17606do eval test x\${$as_var+set} = xset \
17607 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608done
17609PS1='$ '
17610PS2='> '
17611PS4='+ '
17612
17613# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017614LC_ALL=C
17615export LC_ALL
17616LANGUAGE=C
17617export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618
Matthias Kloseb9621712010-04-24 17:59:49 +000017619# CDPATH.
17620(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17621
17622
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017623# as_fn_error STATUS ERROR [LINENO LOG_FD]
17624# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017625# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17626# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017627# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017628as_fn_error ()
17629{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017630 as_status=$1; test $as_status -eq 0 && as_status=1
17631 if test "$4"; then
17632 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17633 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017635 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017636 as_fn_exit $as_status
17637} # as_fn_error
17638
17639
17640# as_fn_set_status STATUS
17641# -----------------------
17642# Set $? to STATUS, without forking.
17643as_fn_set_status ()
17644{
17645 return $1
17646} # as_fn_set_status
17647
17648# as_fn_exit STATUS
17649# -----------------
17650# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17651as_fn_exit ()
17652{
17653 set +e
17654 as_fn_set_status $1
17655 exit $1
17656} # as_fn_exit
17657
17658# as_fn_unset VAR
17659# ---------------
17660# Portably unset VAR.
17661as_fn_unset ()
17662{
17663 { eval $1=; unset $1;}
17664}
17665as_unset=as_fn_unset
17666# as_fn_append VAR VALUE
17667# ----------------------
17668# Append the text in VALUE to the end of the definition contained in VAR. Take
17669# advantage of any shell optimizations that allow amortized linear growth over
17670# repeated appends, instead of the typical quadratic growth present in naive
17671# implementations.
17672if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17673 eval 'as_fn_append ()
17674 {
17675 eval $1+=\$2
17676 }'
17677else
17678 as_fn_append ()
17679 {
17680 eval $1=\$$1\$2
17681 }
17682fi # as_fn_append
17683
17684# as_fn_arith ARG...
17685# ------------------
17686# Perform arithmetic evaluation on the ARGs, and store the result in the
17687# global $as_val. Take advantage of shells that can avoid forks. The arguments
17688# must be portable across $(()) and expr.
17689if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17690 eval 'as_fn_arith ()
17691 {
17692 as_val=$(( $* ))
17693 }'
17694else
17695 as_fn_arith ()
17696 {
17697 as_val=`expr "$@" || test $? -eq 1`
17698 }
17699fi # as_fn_arith
17700
17701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702if expr a : '\(a\)' >/dev/null 2>&1 &&
17703 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17704 as_expr=expr
17705else
17706 as_expr=false
17707fi
17708
17709if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17710 as_basename=basename
17711else
17712 as_basename=false
17713fi
17714
Matthias Kloseb9621712010-04-24 17:59:49 +000017715if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17716 as_dirname=dirname
17717else
17718 as_dirname=false
17719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721as_me=`$as_basename -- "$0" ||
17722$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17723 X"$0" : 'X\(//\)$' \| \
17724 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017725$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726 sed '/^.*\/\([^/][^/]*\)\/*$/{
17727 s//\1/
17728 q
17729 }
17730 /^X\/\(\/\/\)$/{
17731 s//\1/
17732 q
17733 }
17734 /^X\/\(\/\).*/{
17735 s//\1/
17736 q
17737 }
17738 s/.*/./; q'`
17739
Matthias Kloseb9621712010-04-24 17:59:49 +000017740# Avoid depending upon Character Ranges.
17741as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17742as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17743as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17744as_cr_digits='0123456789'
17745as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746
17747ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017748case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017750 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 xy) ECHO_C='\c';;
17753 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17754 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755 esac;;
17756*)
17757 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017759
Martin v. Löwis11437992002-04-12 09:54:03 +000017760rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761if test -d conf$$.dir; then
17762 rm -f conf$$.dir/conf$$.file
17763else
17764 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017767if (echo >conf$$.file) 2>/dev/null; then
17768 if ln -s conf$$.file conf$$ 2>/dev/null; then
17769 as_ln_s='ln -s'
17770 # ... but there are two gotchas:
17771 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17772 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017773 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017774 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017775 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 elif ln conf$$.file conf$$ 2>/dev/null; then
17777 as_ln_s=ln
17778 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017779 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017781else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017782 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17785rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017786
Matthias Kloseb9621712010-04-24 17:59:49 +000017787
17788# as_fn_mkdir_p
17789# -------------
17790# Create "$as_dir" as a directory, including parents if necessary.
17791as_fn_mkdir_p ()
17792{
17793
17794 case $as_dir in #(
17795 -*) as_dir=./$as_dir;;
17796 esac
17797 test -d "$as_dir" || eval $as_mkdir_p || {
17798 as_dirs=
17799 while :; do
17800 case $as_dir in #(
17801 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17802 *) as_qdir=$as_dir;;
17803 esac
17804 as_dirs="'$as_qdir' $as_dirs"
17805 as_dir=`$as_dirname -- "$as_dir" ||
17806$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17807 X"$as_dir" : 'X\(//\)[^/]' \| \
17808 X"$as_dir" : 'X\(//\)$' \| \
17809 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17810$as_echo X"$as_dir" |
17811 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17812 s//\1/
17813 q
17814 }
17815 /^X\(\/\/\)[^/].*/{
17816 s//\1/
17817 q
17818 }
17819 /^X\(\/\/\)$/{
17820 s//\1/
17821 q
17822 }
17823 /^X\(\/\).*/{
17824 s//\1/
17825 q
17826 }
17827 s/.*/./; q'`
17828 test -d "$as_dir" && break
17829 done
17830 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017831 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017832
17833
17834} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017835if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017836 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017837else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017838 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017839 as_mkdir_p=false
17840fi
17841
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017842
17843# as_fn_executable_p FILE
17844# -----------------------
17845# Test if FILE is an executable regular file.
17846as_fn_executable_p ()
17847{
17848 test -f "$1" && test -x "$1"
17849} # as_fn_executable_p
17850as_test_x='test -x'
17851as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017852
17853# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017854as_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 +000017855
17856# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017857as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017858
17859
Martin v. Löwis11437992002-04-12 09:54:03 +000017860exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017861## ----------------------------------- ##
17862## Main body of $CONFIG_STATUS script. ##
17863## ----------------------------------- ##
17864_ASEOF
17865test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017866
Matthias Kloseb9621712010-04-24 17:59:49 +000017867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17868# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017869# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870# values after options handling.
17871ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017872This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017873generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017874
17875 CONFIG_FILES = $CONFIG_FILES
17876 CONFIG_HEADERS = $CONFIG_HEADERS
17877 CONFIG_LINKS = $CONFIG_LINKS
17878 CONFIG_COMMANDS = $CONFIG_COMMANDS
17879 $ $0 $@
17880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881on `(hostname || uname -n) 2>/dev/null | sed 1q`
17882"
17883
Martin v. Löwis11437992002-04-12 09:54:03 +000017884_ACEOF
17885
Matthias Kloseb9621712010-04-24 17:59:49 +000017886case $ac_config_files in *"
17887"*) set x $ac_config_files; shift; ac_config_files=$*;;
17888esac
17889
17890case $ac_config_headers in *"
17891"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17892esac
17893
17894
17895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017896# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017897config_files="$ac_config_files"
17898config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017901
Matthias Kloseb9621712010-04-24 17:59:49 +000017902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017903ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017904\`$as_me' instantiates files and other configuration actions
17905from templates according to the current configuration. Unless the files
17906and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017907
Matthias Kloseb9621712010-04-24 17:59:49 +000017908Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017909
17910 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017912 --config print configuration, then exit
17913 -q, --quiet, --silent
17914 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017915 -d, --debug don't remove temporary files
17916 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017917 --file=FILE[:TEMPLATE]
17918 instantiate the configuration file FILE
17919 --header=FILE[:TEMPLATE]
17920 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017921
17922Configuration files:
17923$config_files
17924
17925Configuration headers:
17926$config_headers
17927
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017928Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17932ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017933ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017934python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017935configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017936 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017937
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017938Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017939This config.status script is free software; the Free Software Foundation
17940gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941
17942ac_pwd='$ac_pwd'
17943srcdir='$srcdir'
17944INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017945MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017946test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017947_ACEOF
17948
Matthias Kloseb9621712010-04-24 17:59:49 +000017949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17950# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017951ac_need_defaults=:
17952while test $# != 0
17953do
17954 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017955 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17957 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017958 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017960 --*=)
17961 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17962 ac_optarg=
17963 ac_shift=:
17964 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017966 ac_option=$1
17967 ac_optarg=$2
17968 ac_shift=shift
17969 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017970 esac
17971
Skip Montanaro6dead952003-09-25 14:50:04 +000017972 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017974 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17975 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017977 $as_echo "$ac_cs_version"; exit ;;
17978 --config | --confi | --conf | --con | --co | --c )
17979 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017981 debug=: ;;
17982 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017983 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017984 case $ac_optarg in
17985 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017986 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017987 esac
17988 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017989 ac_need_defaults=false;;
17990 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017991 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017992 case $ac_optarg in
17993 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17994 esac
17995 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 --he | --h)
17998 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017999 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018000Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018003 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18004 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18005 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018006
18007 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018008 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018009Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018010
Matthias Kloseb9621712010-04-24 17:59:49 +000018011 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018013
18014 esac
18015 shift
18016done
18017
Skip Montanaro6dead952003-09-25 14:50:04 +000018018ac_configure_extra_args=
18019
18020if $ac_cs_silent; then
18021 exec 6>/dev/null
18022 ac_configure_extra_args="$ac_configure_extra_args --silent"
18023fi
18024
18025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018027if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018028 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018029 shift
18030 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18031 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018033 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018034fi
18035
Martin v. Löwis11437992002-04-12 09:54:03 +000018036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038exec 5>>config.log
18039{
18040 echo
18041 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18042## Running $as_me. ##
18043_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018044 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018048cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018050
Matthias Kloseb9621712010-04-24 17:59:49 +000018051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052
18053# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018054for ac_config_target in $ac_config_targets
18055do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056 case $ac_config_target in
18057 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18058 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18059 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018060 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18061 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018063 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018064 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018065 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018066 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067
Victor Stinnere0be4232011-10-25 13:06:09 +020018068 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 esac
18070done
18071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072
Martin v. Löwis11437992002-04-12 09:54:03 +000018073# If the user did not use the arguments to specify the items to instantiate,
18074# then the envvar interface is used. Set only those that are not.
18075# We use the long form for the default assignment because of an extremely
18076# bizarre bug on SunOS 4.1.3.
18077if $ac_need_defaults; then
18078 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18079 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18080fi
18081
Skip Montanaro6dead952003-09-25 14:50:04 +000018082# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018083# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018084# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018085# Hook for its removal unless debugging.
18086# Note that there is a small window in which the directory will not be cleaned:
18087# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018088$debug ||
18089{
Victor Stinnere0be4232011-10-25 13:06:09 +020018090 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018092 : "${ac_tmp:=$tmp}"
18093 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018095 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018096}
Martin v. Löwis11437992002-04-12 09:54:03 +000018097# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018098
Martin v. Löwis11437992002-04-12 09:54:03 +000018099{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018101 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018102} ||
18103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 tmp=./conf$$-$RANDOM
18105 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018106} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018107ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018108
Matthias Kloseb9621712010-04-24 17:59:49 +000018109# Set up the scripts for CONFIG_FILES section.
18110# No need to generate them if there are no CONFIG_FILES.
18111# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018113
Matthias Kloseb9621712010-04-24 17:59:49 +000018114
18115ac_cr=`echo X | tr X '\015'`
18116# On cygwin, bash can eat \r inside `` if the user requested igncr.
18117# But we know of no other shell where ac_cr would be empty at this
18118# point, so we can use a bashism as a fallback.
18119if test "x$ac_cr" = x; then
18120 eval ac_cr=\$\'\\r\'
18121fi
18122ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18123if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018124 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018125else
18126 ac_cs_awk_cr=$ac_cr
18127fi
18128
Victor Stinnere0be4232011-10-25 13:06:09 +020018129echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018130_ACEOF
18131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132
Matthias Kloseb9621712010-04-24 17:59:49 +000018133{
18134 echo "cat >conf$$subs.awk <<_ACEOF" &&
18135 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18136 echo "_ACEOF"
18137} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018138 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18139ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140ac_delim='%!_!# '
18141for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018142 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018143 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144
Matthias Kloseb9621712010-04-24 17:59:49 +000018145 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18146 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147 break
18148 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018149 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150 else
18151 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153done
Matthias Kloseb9621712010-04-24 17:59:49 +000018154rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018155
Matthias Kloseb9621712010-04-24 17:59:49 +000018156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018157cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018159sed -n '
18160h
18161s/^/S["/; s/!.*/"]=/
18162p
18163g
18164s/^[^!]*!//
18165:repl
18166t repl
18167s/'"$ac_delim"'$//
18168t delim
18169:nl
18170h
18171s/\(.\{148\}\)..*/\1/
18172t more1
18173s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18174p
18175n
18176b repl
18177:more1
18178s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18179p
18180g
18181s/.\{148\}//
18182t nl
18183:delim
18184h
18185s/\(.\{148\}\)..*/\1/
18186t more2
18187s/["\\]/\\&/g; s/^/"/; s/$/"/
18188p
18189b
18190:more2
18191s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18192p
18193g
18194s/.\{148\}//
18195t delim
18196' <conf$$subs.awk | sed '
18197/^[^""]/{
18198 N
18199 s/\n//
18200}
18201' >>$CONFIG_STATUS || ac_write_fail=1
18202rm -f conf$$subs.awk
18203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18204_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018205cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018206 for (key in S) S_is_set[key] = 1
18207 FS = ""
18208
18209}
18210{
18211 line = $ 0
18212 nfields = split(line, field, "@")
18213 substed = 0
18214 len = length(field[1])
18215 for (i = 2; i < nfields; i++) {
18216 key = field[i]
18217 keylen = length(key)
18218 if (S_is_set[key]) {
18219 value = S[key]
18220 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18221 len += length(value) + length(field[++i])
18222 substed = 1
18223 } else
18224 len += 1 + keylen
18225 }
18226
18227 print line
18228}
18229
18230_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018232cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18233if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18234 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18235else
18236 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018237fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018238 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239_ACEOF
18240
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018241# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18242# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243# trailing colons and then remove the whole line if VPATH becomes empty
18244# (actually we leave an empty line to preserve line numbers).
18245if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018246 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18247h
18248s///
18249s/^/:/
18250s/[ ]*$/:/
18251s/:\$(srcdir):/:/g
18252s/:\${srcdir}:/:/g
18253s/:@srcdir@:/:/g
18254s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018255s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018256x
18257s/\(=[ ]*\).*/\1/
18258G
18259s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018260s/^[^=]*=[ ]*$//
18261}'
18262fi
18263
Matthias Kloseb9621712010-04-24 17:59:49 +000018264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018265fi # test -n "$CONFIG_FILES"
18266
Matthias Kloseb9621712010-04-24 17:59:49 +000018267# Set up the scripts for CONFIG_HEADERS section.
18268# No need to generate them if there are no CONFIG_HEADERS.
18269# This happens for instance with `./config.status Makefile'.
18270if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018271cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018272BEGIN {
18273_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018274
Matthias Kloseb9621712010-04-24 17:59:49 +000018275# Transform confdefs.h into an awk script `defines.awk', embedded as
18276# here-document in config.status, that substitutes the proper values into
18277# config.h.in to produce config.h.
18278
18279# Create a delimiter string that does not exist in confdefs.h, to ease
18280# handling of long lines.
18281ac_delim='%!_!# '
18282for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018283 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18284 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018285 break
18286 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018287 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018288 else
18289 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18290 fi
18291done
18292
18293# For the awk script, D is an array of macro values keyed by name,
18294# likewise P contains macro parameters if any. Preserve backslash
18295# newline sequences.
18296
18297ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18298sed -n '
18299s/.\{148\}/&'"$ac_delim"'/g
18300t rset
18301:rset
18302s/^[ ]*#[ ]*define[ ][ ]*/ /
18303t def
18304d
18305:def
18306s/\\$//
18307t bsnl
18308s/["\\]/\\&/g
18309s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18310D["\1"]=" \3"/p
18311s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18312d
18313:bsnl
18314s/["\\]/\\&/g
18315s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18316D["\1"]=" \3\\\\\\n"\\/p
18317t cont
18318s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18319t cont
18320d
18321:cont
18322n
18323s/.\{148\}/&'"$ac_delim"'/g
18324t clear
18325:clear
18326s/\\$//
18327t bsnlc
18328s/["\\]/\\&/g; s/^/"/; s/$/"/p
18329d
18330:bsnlc
18331s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18332b cont
18333' <confdefs.h | sed '
18334s/'"$ac_delim"'/"\\\
18335"/g' >>$CONFIG_STATUS || ac_write_fail=1
18336
18337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18338 for (key in D) D_is_set[key] = 1
18339 FS = ""
18340}
18341/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18342 line = \$ 0
18343 split(line, arg, " ")
18344 if (arg[1] == "#") {
18345 defundef = arg[2]
18346 mac1 = arg[3]
18347 } else {
18348 defundef = substr(arg[1], 2)
18349 mac1 = arg[2]
18350 }
18351 split(mac1, mac2, "(") #)
18352 macro = mac2[1]
18353 prefix = substr(line, 1, index(line, defundef) - 1)
18354 if (D_is_set[macro]) {
18355 # Preserve the white space surrounding the "#".
18356 print prefix "define", macro P[macro] D[macro]
18357 next
18358 } else {
18359 # Replace #undef with comments. This is necessary, for example,
18360 # in the case of _POSIX_SOURCE, which is predefined and required
18361 # on some systems where configure will not decide to define it.
18362 if (defundef == "undef") {
18363 print "/*", prefix defundef, macro, "*/"
18364 next
18365 }
18366 }
18367}
18368{ print }
18369_ACAWK
18370_ACEOF
18371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018372 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018373fi # test -n "$CONFIG_HEADERS"
18374
18375
18376eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18377shift
18378for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379do
18380 case $ac_tag in
18381 :[FHLC]) ac_mode=$ac_tag; continue;;
18382 esac
18383 case $ac_mode$ac_tag in
18384 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018385 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386 :[FH]-) ac_tag=-:-;;
18387 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18388 esac
18389 ac_save_IFS=$IFS
18390 IFS=:
18391 set x $ac_tag
18392 IFS=$ac_save_IFS
18393 shift
18394 ac_file=$1
18395 shift
18396
18397 case $ac_mode in
18398 :L) ac_source=$1;;
18399 :[FH])
18400 ac_file_inputs=
18401 for ac_f
18402 do
18403 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018404 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 *) # Look for the file first in the build tree, then in the source tree
18406 # (if the path is not absolute). The absolute path cannot be DOS-style,
18407 # because $ac_f cannot contain `:'.
18408 test -f "$ac_f" ||
18409 case $ac_f in
18410 [\\/$]*) false;;
18411 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18412 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018413 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018415 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18416 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417 done
18418
18419 # Let's still pretend it is `configure' which instantiates (i.e., don't
18420 # use $as_me), people would be surprised to read:
18421 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018422 configure_input='Generated from '`
18423 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18424 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425 if test x"$ac_file" != x-; then
18426 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018427 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18428$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018430 # Neutralize special characters interpreted by sed in replacement strings.
18431 case $configure_input in #(
18432 *\&* | *\|* | *\\* )
18433 ac_sed_conf_input=`$as_echo "$configure_input" |
18434 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18435 *) ac_sed_conf_input=$configure_input;;
18436 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437
18438 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018439 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18440 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441 esac
18442 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018443 esac
18444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018446$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018447 X"$ac_file" : 'X\(//\)[^/]' \| \
18448 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018450$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18452 s//\1/
18453 q
18454 }
18455 /^X\(\/\/\)[^/].*/{
18456 s//\1/
18457 q
18458 }
18459 /^X\(\/\/\)$/{
18460 s//\1/
18461 q
18462 }
18463 /^X\(\/\).*/{
18464 s//\1/
18465 q
18466 }
18467 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018468 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 ac_builddir=.
18470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471case "$ac_dir" in
18472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18473*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018475 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477 case $ac_top_builddir_sub in
18478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18480 esac ;;
18481esac
18482ac_abs_top_builddir=$ac_pwd
18483ac_abs_builddir=$ac_pwd$ac_dir_suffix
18484# for backward compatibility:
18485ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018486
18487case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490 ac_top_srcdir=$ac_top_builddir_sub
18491 ac_abs_top_srcdir=$ac_pwd ;;
18492 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018493 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 ac_top_srcdir=$srcdir
18495 ac_abs_top_srcdir=$srcdir ;;
18496 *) # Relative name.
18497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18498 ac_top_srcdir=$ac_top_build_prefix$srcdir
18499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018500esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018502
Martin v. Löwis11437992002-04-12 09:54:03 +000018503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504 case $ac_mode in
18505 :F)
18506 #
18507 # CONFIG_FILE
18508 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018509
18510 case $INSTALL in
18511 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018514 ac_MKDIR_P=$MKDIR_P
18515 case $MKDIR_P in
18516 [\\/$]* | ?:[\\/]* ) ;;
18517 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18518 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018519_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520
Matthias Kloseb9621712010-04-24 17:59:49 +000018521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018522# If the template does not know about datarootdir, expand it.
18523# FIXME: This hack should be removed a few years after 2.60.
18524ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018525ac_sed_dataroot='
18526/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527 p
18528 q
18529}
18530/@datadir@/p
18531/@docdir@/p
18532/@infodir@/p
18533/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018534/@mandir@/p'
18535case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536*datarootdir*) ac_datarootdir_seen=yes;;
18537*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18539$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 ac_datarootdir_hack='
18543 s&@datadir@&$datadir&g
18544 s&@docdir@&$docdir&g
18545 s&@infodir@&$infodir&g
18546 s&@localedir@&$localedir&g
18547 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018548 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549esac
18550_ACEOF
18551
18552# Neutralize VPATH when `$srcdir' = `.'.
18553# Shell code in configure.ac might set extrasub.
18554# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18556ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018557$extrasub
18558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018560:t
18561/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018562s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018563s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018564s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565s&@srcdir@&$ac_srcdir&;t t
18566s&@abs_srcdir@&$ac_abs_srcdir&;t t
18567s&@top_srcdir@&$ac_top_srcdir&;t t
18568s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18569s&@builddir@&$ac_builddir&;t t
18570s&@abs_builddir@&$ac_abs_builddir&;t t
18571s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18572s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018573s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018575"
Victor Stinnere0be4232011-10-25 13:06:09 +020018576eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18577 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018579test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018580 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18581 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18582 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018583 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018584which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018585$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018586which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018587
Victor Stinnere0be4232011-10-25 13:06:09 +020018588 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018589 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018590 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18591 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018592 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018593 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594 ;;
18595 :H)
18596 #
18597 # CONFIG_HEADER
18598 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018599 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018600 {
18601 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018602 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18603 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018604 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018605 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018606 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18607$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018609 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018610 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018611 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 fi
18613 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018614 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018615 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018616 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018617 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018618 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620
18621 esac
18622
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018623
18624 case $ac_file$ac_mode in
18625 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18626
18627 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628done # for ac_tag
18629
Guido van Rossum627b2d71993-12-24 10:39:16 +000018630
Matthias Kloseb9621712010-04-24 17:59:49 +000018631as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018632_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018633ac_clean_files=$ac_clean_files_save
18634
Matthias Kloseb9621712010-04-24 17:59:49 +000018635test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018636 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018637
Martin v. Löwis11437992002-04-12 09:54:03 +000018638
18639# configure is writing to config.log, and then calls config.status.
18640# config.status does its own redirection, appending to config.log.
18641# Unfortunately, on DOS this fails, as config.log is still kept open
18642# by configure, so config.status won't be able to write to it; its
18643# output is simply discarded. So we exec the FD to /dev/null,
18644# effectively closing config.log, so it can be properly (re)opened and
18645# appended to by config.status. When coming back to configure, we
18646# need to make the FD available again.
18647if test "$no_create" != yes; then
18648 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018649 ac_config_status_args=
18650 test "$silent" = yes &&
18651 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018653 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018654 exec 5>>config.log
18655 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18656 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018657 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018658fi
18659if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18661$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018662fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018663
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018664
Christian Heimes75ed8902013-11-20 01:11:18 +010018665echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018666if test ! -f Modules/Setup.local
18667then
18668 echo "# Edit this file for local setup changes" >Modules/Setup.local
18669fi
18670
Christian Heimes75ed8902013-11-20 01:11:18 +010018671echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018672$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018673 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018674 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018675mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018676
18677if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18678 echo "" >&6
18679 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018680 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 +000018681 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018682 echo "" >&6
18683 echo "" >&6
18684fi
18685