blob: bffb849b797b47ca36a4912855df347f54da8c5a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
684target_os
685target_vendor
686target_cpu
687target
688LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700689PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700690DEF_MAKE_RULE
691DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000693LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100694MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000695INSTALL_DATA
696INSTALL_SCRIPT
697INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200698ac_ct_READELF
699READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000700ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000703GNULD
704LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000705LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000706RUNSHARED
707INSTSONAME
708LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000709PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000710BLDLIBRARY
711DLLLIBRARY
712LDLIBRARY
713LIBRARY
714BUILDEXEEXT
715EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200716NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200717MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200718PLATFORM_TRIPLET
719MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200720ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721MAINCC
722CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700723SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200724GREP
725CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000726OBJEXT
727EXEEXT
728ac_ct_CC
729CPPFLAGS
730LDFLAGS
731CFLAGS
732CC
733EXPORT_MACOSX_DEPLOYMENT_TARGET
734CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200735_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000736MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000737FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800739FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000740FRAMEWORKALTINSTALLLAST
741FRAMEWORKALTINSTALLFIRST
742FRAMEWORKINSTALLLAST
743FRAMEWORKINSTALLFIRST
744PYTHONFRAMEWORKINSTALLDIR
745PYTHONFRAMEWORKPREFIX
746PYTHONFRAMEWORKDIR
747PYTHONFRAMEWORKIDENTIFIER
748PYTHONFRAMEWORK
749LIPO_32BIT_FLAGS
750ARCH_RUN_32BIT
751UNIVERSALSDK
752CONFIG_ARGS
753SOVERSION
754VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200755PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200756PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100757host_os
758host_vendor
759host_cpu
760host
761build_os
762build_vendor
763build_cpu
764build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500765HAS_GIT
766GITBRANCH
767GITTAG
768GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400769BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000770target_alias
771host_alias
772build_alias
773LIBS
774ECHO_T
775ECHO_N
776ECHO_C
777DEFS
778mandir
779localedir
780libdir
781psdir
782pdfdir
783dvidir
784htmldir
785infodir
786docdir
787oldincludedir
788includedir
789localstatedir
790sharedstatedir
791sysconfdir
792datadir
793datarootdir
794libexecdir
795sbindir
796bindir
797program_transform_name
798prefix
799exec_prefix
800PACKAGE_URL
801PACKAGE_BUGREPORT
802PACKAGE_STRING
803PACKAGE_VERSION
804PACKAGE_TARNAME
805PACKAGE_NAME
806PATH_SEPARATOR
807SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000808ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000809ac_user_opts='
810enable_option_checking
811enable_universalsdk
812with_universal_archs
813with_framework_name
814enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200820with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200821with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000822enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700823with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100824with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100825with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800826with_memory_sanitizer
827with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_libs
829with_system_expat
830with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100831with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000832enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700833with_tcltk_includes
834with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000836enable_ipv6
837with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000839with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700841with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_libm
843with_libc
844enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800846with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100847with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100848with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000849'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 ac_precious_vars='build_alias
851host_alias
852target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100853MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854CC
855CFLAGS
856LDFLAGS
857LIBS
858CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800859CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700860PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800861PKG_CONFIG
862PKG_CONFIG_PATH
863PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867ac_init_help=
868ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000869ac_unrecognized_opts=
870ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871# The variables have the same names as the options, with
872# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000873cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876no_recursion=
877prefix=NONE
878program_prefix=NONE
879program_suffix=NONE
880program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885x_includes=NONE
886x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000887
888# Installation directory options.
889# These are left unexpanded so users can "make install exec_prefix=/foo"
890# and all the variables that are supposed to be based on exec_prefix
891# by default will actually change.
892# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894bindir='${exec_prefix}/bin'
895sbindir='${exec_prefix}/sbin'
896libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897datarootdir='${prefix}/share'
898datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899sysconfdir='${prefix}/etc'
900sharedstatedir='${prefix}/com'
901localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902includedir='${prefix}/include'
903oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
905infodir='${datarootdir}/info'
906htmldir='${docdir}'
907dvidir='${docdir}'
908pdfdir='${docdir}'
909psdir='${docdir}'
910libdir='${exec_prefix}/lib'
911localedir='${datarootdir}/locale'
912mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 # If the previous option needs an argument, assign it.
919 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 ac_prev=
922 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200926 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
927 *=) ac_optarg= ;;
928 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Accept the important Cygnus configure options, so we can diagnose typos.
932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 case $ac_dashdash$ac_option in
934 --)
935 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -bindir | --bindir | --bindi | --bind | --bin | --bi)
938 ac_prev=bindir ;;
939 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 -cache-file | --cache-file | --cache-fil | --cache-fi \
948 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
949 ac_prev=cache_file ;;
950 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
951 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 cache_file=$ac_optarg ;;
953
954 --config-cache | -C)
955 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
963 | --dataroo | --dataro | --datar)
964 ac_prev=datarootdir ;;
965 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
966 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
967 datarootdir=$ac_optarg ;;
968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200973 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 ac_useropt_orig=$ac_useropt
975 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
976 case $ac_user_opts in
977 *"
978"enable_$ac_useropt"
979"*) ;;
980 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
981 ac_unrecognized_sep=', ';;
982 esac
983 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984
985 -docdir | --docdir | --docdi | --doc | --do)
986 ac_prev=docdir ;;
987 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
988 docdir=$ac_optarg ;;
989
990 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
991 ac_prev=dvidir ;;
992 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
993 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200999 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001000 ac_useropt_orig=$ac_useropt
1001 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1002 case $ac_user_opts in
1003 *"
1004"enable_$ac_useropt"
1005"*) ;;
1006 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1007 ac_unrecognized_sep=', ';;
1008 esac
1009 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1012 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1013 | --exec | --exe | --ex)
1014 ac_prev=exec_prefix ;;
1015 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1016 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1017 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001021 # Obsolete; use --with-gas.
1022 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 -help | --help | --hel | --he | -h)
1025 ac_init_help=long ;;
1026 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1027 ac_init_help=recursive ;;
1028 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1029 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1037 ac_prev=htmldir ;;
1038 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1039 | --ht=*)
1040 htmldir=$ac_optarg ;;
1041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -includedir | --includedir | --includedi | --included | --include \
1043 | --includ | --inclu | --incl | --inc)
1044 ac_prev=includedir ;;
1045 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1046 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -infodir | --infodir | --infodi | --infod | --info | --inf)
1050 ac_prev=infodir ;;
1051 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libdir | --libdir | --libdi | --libd)
1055 ac_prev=libdir ;;
1056 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1060 | --libexe | --libex | --libe)
1061 ac_prev=libexecdir ;;
1062 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1063 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 -localedir | --localedir | --localedi | --localed | --locale)
1067 ac_prev=localedir ;;
1068 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1069 localedir=$ac_optarg ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 ac_prev=localstatedir ;;
1074 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1079 ac_prev=mandir ;;
1080 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 # Obsolete; use --without-fp.
1085 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 no_create=yes ;;
1090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1092 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1093 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1096 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1097 | --oldin | --oldi | --old | --ol | --o)
1098 ac_prev=oldincludedir ;;
1099 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1100 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1101 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1105 ac_prev=prefix ;;
1106 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1110 | --program-pre | --program-pr | --program-p)
1111 ac_prev=program_prefix ;;
1112 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1113 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1117 | --program-suf | --program-su | --program-s)
1118 ac_prev=program_suffix ;;
1119 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1120 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -program-transform-name | --program-transform-name \
1124 | --program-transform-nam | --program-transform-na \
1125 | --program-transform-n | --program-transform- \
1126 | --program-transform | --program-transfor \
1127 | --program-transfo | --program-transf \
1128 | --program-trans | --program-tran \
1129 | --progr-tra | --program-tr | --program-t)
1130 ac_prev=program_transform_name ;;
1131 -program-transform-name=* | --program-transform-name=* \
1132 | --program-transform-nam=* | --program-transform-na=* \
1133 | --program-transform-n=* | --program-transform-=* \
1134 | --program-transform=* | --program-transfor=* \
1135 | --program-transfo=* | --program-transf=* \
1136 | --program-trans=* | --program-tran=* \
1137 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1141 ac_prev=pdfdir ;;
1142 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1143 pdfdir=$ac_optarg ;;
1144
1145 -psdir | --psdir | --psdi | --psd | --ps)
1146 ac_prev=psdir ;;
1147 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1148 psdir=$ac_optarg ;;
1149
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1151 | -silent | --silent | --silen | --sile | --sil)
1152 silent=yes ;;
1153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155 ac_prev=sbindir ;;
1156 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
1160 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162 | --sharedst | --shareds | --shared | --share | --shar \
1163 | --sha | --sh)
1164 ac_prev=sharedstatedir ;;
1165 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 -site | --site | --sit)
1172 ac_prev=site ;;
1173 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177 ac_prev=srcdir ;;
1178 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182 | --syscon | --sysco | --sysc | --sys | --sy)
1183 ac_prev=sysconfdir ;;
1184 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194 verbose=yes ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 -version | --version | --versio | --versi | --vers | -V)
1197 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
1221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 --x)
1232 # Obsolete; use --with-x.
1233 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236 | --x-incl | --x-inc | --x-in | --x-i)
1237 ac_prev=x_includes ;;
1238 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244 ac_prev=x_libraries ;;
1245 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 *=*)
1254 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_envvar in #(
1257 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 export $ac_envvar ;;
1262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001268 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ;;
1270
1271 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272done
1273
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277fi
1278
Matthias Kloseb9621712010-04-24 17:59:49 +00001279if test -n "$ac_unrecognized_opts"; then
1280 case $enable_option_checking in
1281 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284 esac
1285fi
1286
1287# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289 datadir sysconfdir sharedstatedir localstatedir includedir \
1290 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindoaac4d032019-05-31 19:39:47 +01001291 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 # Remove trailing slashes.
1295 case $ac_val in
1296 */ )
1297 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298 eval $ac_var=\$ac_val;;
1299 esac
1300 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 [\\/$]* | ?:[\\/]* ) continue;;
1303 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317 if test "x$build_alias" = x; then
1318 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 elif test "x$build_alias" != "x$host_alias"; then
1320 cross_compiling=yes
1321 fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344 X"$as_myself" : 'X\(//\)[^/]' \| \
1345 X"$as_myself" : 'X\(//\)$' \| \
1346 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)[^/].*/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\).*/{
1361 s//\1/
1362 q
1363 }
1364 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367 srcdir=..
1368 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372if test ! -r "$srcdir/$ac_unique_file"; then
1373 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379 pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382 srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_env_${ac_var}_value=\$${ac_var}
1393 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401 # Omit some internal or obsolete options to make the list less imposing.
1402 # This message is too long to be a string in the A/UX 3.1 sh.
1403 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001404\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE. See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414 -h, --help display this help and exit
1415 --help=short display options specific to this package
1416 --help=recursive display the short help of all the included packages
1417 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001418 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --cache-file=FILE cache test results in FILE [disabled]
1420 -C, --config-cache alias for \`--cache-file=config.cache'
1421 -n, --no-create do not create output files
1422 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1423
Martin v. Löwis11437992002-04-12 09:54:03 +00001424Installation directories:
1425 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --bindir=DIR user executables [EPREFIX/bin]
1439 --sbindir=DIR system admin executables [EPREFIX/sbin]
1440 --libexecdir=DIR program executables [EPREFIX/libexec]
1441 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1442 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1443 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1444 --libdir=DIR object code libraries [EPREFIX/lib]
1445 --includedir=DIR C header files [PREFIX/include]
1446 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1447 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1448 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1449 --infodir=DIR info documentation [DATAROOTDIR/info]
1450 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1451 --mandir=DIR man documentation [DATAROOTDIR/man]
1452 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1453 --htmldir=DIR html documentation [DOCDIR]
1454 --dvidir=DIR dvi documentation [DOCDIR]
1455 --pdfdir=DIR pdf documentation [DOCDIR]
1456 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458
1459 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001464 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001470 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 cat <<\_ACEOF
1473
1474Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1477 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001478 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001479 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-framework[=INSTALLDIR]
1481 Build (MacOSX|Darwin) framework
1482 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001483 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001484 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1485 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001486 --enable-loadable-sqlite-extensions
1487 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-ipv6 Enable ipv6 (with ipv4) support
1489 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001490 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493Optional Packages:
1494 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1495 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001496 --with-universal-archs=ARCH
1497 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001498 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1499 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001500 --with-framework-name=FRAMEWORK
1501 specify an alternate name of the framework built
1502 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001503 --with-cxx-main=<compiler>
1504 compile main() and link python executable with C++
1505 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-suffix=.exe set executable suffix
1507 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001508 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001509 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001510 --with-lto Enable Link Time Optimization in any build. Disabled
1511 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001512 --with-hash-algorithm=[fnv|siphash24]
1513 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001514 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001515 enable AddressSanitizer (asan)
1516 --with-memory-sanitizer enable MemorySanitizer (msan)
1517 --with-undefined-behavior-sanitizer
1518 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001520 --with-system-expat build pyexpat module using an installed expat
1521 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001522 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001523 --with-system-libmpdec build _decimal module using an installed libmpdec
1524 library
Ned Deilyd819b932013-09-06 01:07:05 -07001525 --with-tcltk-includes='-I...'
1526 override search for Tcl and Tk include files
1527 --with-tcltk-libs='-L...'
1528 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001529 --with-dbmliborder=db1:db2:...
1530 order to check db backends for dbm. Valid value is a
1531 colon separated string with the backend names
1532 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-doc-strings disable/enable documentation strings
1534 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001535 --with(out)-c-locale-coercion
1536 disable/enable C locale coercion to a UTF-8 based
1537 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001538 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001539 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with-libm=STRING math library
1541 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001542 --with(out)-computed-gotos
1543 Use computed gotos in evaluation loop (enabled by
1544 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001545 --with(out)-ensurepip=[=upgrade]
1546 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001547 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001548 --with-ssl-default-suites=[python|openssl|STRING]
1549 Override default cipher suites string, python: use
1550 Python's preferred selection (default), openssl:
1551 leave OpenSSL's defaults untouched, STRING: use a
1552 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001555 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CC C compiler command
1557 CFLAGS C compiler flags
1558 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1559 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001564 PROFILE_TASK
1565 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001566 PKG_CONFIG path to pkg-config utility
1567 PKG_CONFIG_PATH
1568 directories to add to pkg-config's search path
1569 PKG_CONFIG_LIBDIR
1570 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001571
1572Use these variables to override the choices made by `configure' or to help
1573it to find libraries and programs with nonstandard names/locations.
1574
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001575Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001578fi
1579
1580if test "$ac_init_help" = "recursive"; then
1581 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 test -d "$ac_dir" ||
1584 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1585 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 ac_builddir=.
1587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588case "$ac_dir" in
1589.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001593 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $ac_top_builddir_sub in
1595 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1596 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1597 esac ;;
1598esac
1599ac_abs_top_builddir=$ac_pwd
1600ac_abs_builddir=$ac_pwd$ac_dir_suffix
1601# for backward compatibility:
1602ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001603
1604case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$ac_top_builddir_sub
1608 ac_abs_top_srcdir=$ac_pwd ;;
1609 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 ac_top_srcdir=$srcdir
1612 ac_abs_top_srcdir=$srcdir ;;
1613 *) # Relative name.
1614 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1615 ac_top_srcdir=$ac_top_build_prefix$srcdir
1616 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001617esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 cd "$ac_dir" || { ac_status=$?; continue; }
1621 # Check for guested configure.
1622 if test -f "$ac_srcdir/configure.gnu"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1625 elif test -f "$ac_srcdir/configure"; then
1626 echo &&
1627 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001629 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 fi || ac_status=$?
1631 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 done
1633fi
1634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001636if $ac_init_version; then
1637 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001638python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001639generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001641Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001642This configure script is free software; the Free Software Foundation
1643gives unlimited permission to copy, distribute and modify it.
1644_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001647
1648## ------------------------ ##
1649## Autoconf initialization. ##
1650## ------------------------ ##
1651
1652# ac_fn_c_try_compile LINENO
1653# --------------------------
1654# Try to compile conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_compile ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 rm -f conftest.$ac_objext
1659 if { { ac_try="$ac_compile"
1660case "(($ac_try" in
1661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662 *) ac_try_echo=$ac_try;;
1663esac
1664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665$as_echo "$ac_try_echo"; } >&5
1666 (eval "$ac_compile") 2>conftest.err
1667 ac_status=$?
1668 if test -s conftest.err; then
1669 grep -v '^ *+' conftest.err >conftest.er1
1670 cat conftest.er1 >&5
1671 mv -f conftest.er1 conftest.err
1672 fi
1673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674 test $ac_status = 0; } && {
1675 test -z "$ac_c_werror_flag" ||
1676 test ! -s conftest.err
1677 } && test -s conftest.$ac_objext; then :
1678 ac_retval=0
1679else
1680 $as_echo "$as_me: failed program was:" >&5
1681sed 's/^/| /' conftest.$ac_ext >&5
1682
1683 ac_retval=1
1684fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001685 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001686 as_fn_set_status $ac_retval
1687
1688} # ac_fn_c_try_compile
1689
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001690# ac_fn_c_try_cpp LINENO
1691# ----------------------
1692# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1693ac_fn_c_try_cpp ()
1694{
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696 if { { ac_try="$ac_cpp conftest.$ac_ext"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } > conftest.i && {
1712 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 }; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=1
1721fi
1722 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_cpp
1726
Matthias Kloseb9621712010-04-24 17:59:49 +00001727# ac_fn_c_try_link LINENO
1728# -----------------------
1729# Try to link conftest.$ac_ext, and return whether this succeeded.
1730ac_fn_c_try_link ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 rm -f conftest.$ac_objext conftest$ac_exeext
1734 if { { ac_try="$ac_link"
1735case "(($ac_try" in
1736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1737 *) ac_try_echo=$ac_try;;
1738esac
1739eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1740$as_echo "$ac_try_echo"; } >&5
1741 (eval "$ac_link") 2>conftest.err
1742 ac_status=$?
1743 if test -s conftest.err; then
1744 grep -v '^ *+' conftest.err >conftest.er1
1745 cat conftest.er1 >&5
1746 mv -f conftest.er1 conftest.err
1747 fi
1748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749 test $ac_status = 0; } && {
1750 test -z "$ac_c_werror_flag" ||
1751 test ! -s conftest.err
1752 } && test -s conftest$ac_exeext && {
1753 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001754 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 }; then :
1756 ac_retval=0
1757else
1758 $as_echo "$as_me: failed program was:" >&5
1759sed 's/^/| /' conftest.$ac_ext >&5
1760
1761 ac_retval=1
1762fi
1763 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1764 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1765 # interfere with the next link command; also delete a directory that is
1766 # left behind by Apple's compiler. We do this before executing the actions.
1767 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 as_fn_set_status $ac_retval
1770
1771} # ac_fn_c_try_link
1772
Matthias Kloseb9621712010-04-24 17:59:49 +00001773# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1774# -------------------------------------------------------
1775# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1776# the include files in INCLUDES and setting the cache variable VAR
1777# accordingly.
1778ac_fn_c_check_header_mongrel ()
1779{
1780 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001781 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1783$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001784if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001785 $as_echo_n "(cached) " >&6
1786fi
1787eval ac_res=\$$3
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1789$as_echo "$ac_res" >&6; }
1790else
1791 # Is the header compilable?
1792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1793$as_echo_n "checking $2 usability... " >&6; }
1794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796$4
1797#include <$2>
1798_ACEOF
1799if ac_fn_c_try_compile "$LINENO"; then :
1800 ac_header_compiler=yes
1801else
1802 ac_header_compiler=no
1803fi
1804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1806$as_echo "$ac_header_compiler" >&6; }
1807
1808# Is the header present?
1809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1810$as_echo_n "checking $2 presence... " >&6; }
1811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1812/* end confdefs.h. */
1813#include <$2>
1814_ACEOF
1815if ac_fn_c_try_cpp "$LINENO"; then :
1816 ac_header_preproc=yes
1817else
1818 ac_header_preproc=no
1819fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001820rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1822$as_echo "$ac_header_preproc" >&6; }
1823
1824# So? What about this header?
1825case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1826 yes:no: )
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1828$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1830$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1831 ;;
1832 no:yes:* )
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1834$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1836$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1838$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1840$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1842$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001843( $as_echo "## --------------------------------------- ##
1844## Report this to https://bugs.python.org/ ##
1845## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001846 ) | sed "s/^/$as_me: WARNING: /" >&2
1847 ;;
1848esac
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001851if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 $as_echo_n "(cached) " >&6
1853else
1854 eval "$3=\$ac_header_compiler"
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
1859fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001861
1862} # ac_fn_c_check_header_mongrel
1863
1864# ac_fn_c_try_run LINENO
1865# ----------------------
1866# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1867# that executables *can* be run.
1868ac_fn_c_try_run ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 if { { ac_try="$ac_link"
1872case "(($ac_try" in
1873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874 *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878 (eval "$ac_link") 2>&5
1879 ac_status=$?
1880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1881 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1882 { { case "(($ac_try" in
1883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888 (eval "$ac_try") 2>&5
1889 ac_status=$?
1890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1891 test $ac_status = 0; }; }; then :
1892 ac_retval=0
1893else
1894 $as_echo "$as_me: program exited with status $ac_status" >&5
1895 $as_echo "$as_me: failed program was:" >&5
1896sed 's/^/| /' conftest.$ac_ext >&5
1897
1898 ac_retval=$ac_status
1899fi
1900 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 as_fn_set_status $ac_retval
1903
1904} # ac_fn_c_try_run
1905
1906# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1907# -------------------------------------------------------
1908# Tests whether HEADER exists and can be compiled using the include files in
1909# INCLUDES, setting the cache variable VAR accordingly.
1910ac_fn_c_check_header_compile ()
1911{
1912 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1914$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001915if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001916 $as_echo_n "(cached) " >&6
1917else
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920$4
1921#include <$2>
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 eval "$3=yes"
1925else
1926 eval "$3=no"
1927fi
1928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929fi
1930eval ac_res=\$$3
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001934
1935} # ac_fn_c_check_header_compile
1936
Matthias Kloseb9621712010-04-24 17:59:49 +00001937# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1938# -------------------------------------------
1939# Tests whether TYPE exists after having included INCLUDES, setting cache
1940# variable VAR accordingly.
1941ac_fn_c_check_type ()
1942{
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1945$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001946if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001947 $as_echo_n "(cached) " >&6
1948else
1949 eval "$3=no"
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$4
1953int
1954main ()
1955{
1956if (sizeof ($2))
1957 return 0;
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1964/* end confdefs.h. */
1965$4
1966int
1967main ()
1968{
1969if (sizeof (($2)))
1970 return 0;
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 eval "$3=yes"
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989} # ac_fn_c_check_type
1990
Matthias Kloseb9621712010-04-24 17:59:49 +00001991# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1992# --------------------------------------------
1993# Tries to find the compile-time value of EXPR in a program that includes
1994# INCLUDES, setting VAR accordingly. Returns whether the value could be
1995# computed
1996ac_fn_c_compute_int ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if test "$cross_compiling" = yes; then
2000 # Depending upon the size, compute the lo and hi bounds.
2001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002008test_array [0] = 0;
2009return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011 ;
2012 return 0;
2013}
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016 ac_lo=0 ac_mid=0
2017 while :; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$4
2021int
2022main ()
2023{
2024static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002025test_array [0] = 0;
2026return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002052test_array [0] = 0;
2053return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002069test_array [0] = 0;
2070return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002071
2072 ;
2073 return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_compile "$LINENO"; then :
2077 ac_lo=$ac_mid; break
2078else
2079 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2080 if test $ac_mid -le $ac_hi; then
2081 ac_lo= ac_hi=
2082 break
2083 fi
2084 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 done
2088else
2089 ac_lo= ac_hi=
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094# Binary search between lo and hi bounds.
2095while test "x$ac_lo" != "x$ac_hi"; do
2096 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid
2113else
2114 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117done
2118case $ac_lo in #((
2119?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2120'') ac_retval=1 ;;
2121esac
2122 else
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126static long int longval () { return $2; }
2127static unsigned long int ulongval () { return $2; }
2128#include <stdio.h>
2129#include <stdlib.h>
2130int
2131main ()
2132{
2133
2134 FILE *f = fopen ("conftest.val", "w");
2135 if (! f)
2136 return 1;
2137 if (($2) < 0)
2138 {
2139 long int i = longval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%ld", i);
2143 }
2144 else
2145 {
2146 unsigned long int i = ulongval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%lu", i);
2150 }
2151 /* Do not output a trailing newline, as this causes \r\n confusion
2152 on some platforms. */
2153 return ferror (f) || fclose (f) != 0;
2154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_run "$LINENO"; then :
2160 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2161else
2162 ac_retval=1
2163fi
2164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2165 conftest.$ac_objext conftest.beam conftest.$ac_ext
2166rm -f conftest.val
2167
2168 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002169 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002170 as_fn_set_status $ac_retval
2171
2172} # ac_fn_c_compute_int
2173
2174# ac_fn_c_check_func LINENO FUNC VAR
2175# ----------------------------------
2176# Tests whether FUNC exists, setting the cache variable VAR accordingly
2177ac_fn_c_check_func ()
2178{
2179 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2181$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002182if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002183 $as_echo_n "(cached) " >&6
2184else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2188 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2189#define $2 innocuous_$2
2190
2191/* System header to define __stub macros and hopefully few prototypes,
2192 which can conflict with char $2 (); below.
2193 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2194 <limits.h> exists even on freestanding compilers. */
2195
2196#ifdef __STDC__
2197# include <limits.h>
2198#else
2199# include <assert.h>
2200#endif
2201
2202#undef $2
2203
2204/* Override any GCC internal prototype to avoid an error.
2205 Use char because int might match the return type of a GCC
2206 builtin and then its argument prototype would still apply. */
2207#ifdef __cplusplus
2208extern "C"
2209#endif
2210char $2 ();
2211/* The GNU C library defines this for functions which it implements
2212 to always fail with ENOSYS. Some functions are actually named
2213 something starting with __ and the normal name is an alias. */
2214#if defined __stub_$2 || defined __stub___$2
2215choke me
2216#endif
2217
2218int
2219main ()
2220{
2221return $2 ();
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_link "$LINENO"; then :
2227 eval "$3=yes"
2228else
2229 eval "$3=no"
2230fi
2231rm -f core conftest.err conftest.$ac_objext \
2232 conftest$ac_exeext conftest.$ac_ext
2233fi
2234eval ac_res=\$$3
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2236$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002237 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002238
2239} # ac_fn_c_check_func
2240
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002241# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2242# ---------------------------------------------
2243# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2244# accordingly.
2245ac_fn_c_check_decl ()
2246{
2247 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248 as_decl_name=`echo $2|sed 's/ *(.*//'`
2249 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2251$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2252if eval \${$3+:} false; then :
2253 $as_echo_n "(cached) " >&6
2254else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
2257$4
2258int
2259main ()
2260{
2261#ifndef $as_decl_name
2262#ifdef __cplusplus
2263 (void) $as_decl_use;
2264#else
2265 (void) $as_decl_name;
2266#endif
2267#endif
2268
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$3=yes"
2275else
2276 eval "$3=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280eval ac_res=\$$3
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282$as_echo "$ac_res" >&6; }
2283 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2284
2285} # ac_fn_c_check_decl
2286
Matthias Kloseb9621712010-04-24 17:59:49 +00002287# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2288# ----------------------------------------------------
2289# Tries to find if the field MEMBER exists in type AGGR, after including
2290# INCLUDES, setting cache variable VAR accordingly.
2291ac_fn_c_check_member ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2295$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002296if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$5
2302int
2303main ()
2304{
2305static $2 ac_aggr;
2306if (ac_aggr.$3)
2307return 0;
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
2313 eval "$4=yes"
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$5
2318int
2319main ()
2320{
2321static $2 ac_aggr;
2322if (sizeof ac_aggr.$3)
2323return 0;
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$4=yes"
2330else
2331 eval "$4=no"
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336fi
2337eval ac_res=\$$4
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002341
2342} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002344This file contains any messages produced by compilers while
2345running configure, to aid debugging if configure makes a mistake.
2346
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002347It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002348generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002349
2350 $ $0 $@
2351
2352_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002354{
2355cat <<_ASUNAME
2356## --------- ##
2357## Platform. ##
2358## --------- ##
2359
2360hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2361uname -m = `(uname -m) 2>/dev/null || echo unknown`
2362uname -r = `(uname -r) 2>/dev/null || echo unknown`
2363uname -s = `(uname -s) 2>/dev/null || echo unknown`
2364uname -v = `(uname -v) 2>/dev/null || echo unknown`
2365
2366/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2367/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2368
2369/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2370/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2371/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002373/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2374/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2375/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2376
2377_ASUNAME
2378
2379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380for as_dir in $PATH
2381do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002384 $as_echo "PATH: $as_dir"
2385 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388} >&5
2389
2390cat >&5 <<_ACEOF
2391
2392
2393## ----------- ##
2394## Core tests. ##
2395## ----------- ##
2396
2397_ACEOF
2398
2399
2400# Keep a trace of the command line.
2401# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002404# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002405ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_configure_args0=
2407ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002408ac_must_keep_next=false
2409for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002410do
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 for ac_arg
2412 do
2413 case $ac_arg in
2414 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2415 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2416 | -silent | --silent | --silen | --sile | --sil)
2417 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 esac
2421 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002428 case $ac_arg in
2429 *=* | --config-cache | -C | -disable-* | --disable-* \
2430 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2431 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2432 | -with-* | --with-* | -without-* | --without-* | --x)
2433 case "$ac_configure_args0 " in
2434 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2435 esac
2436 ;;
2437 -* ) ac_must_keep_next=true ;;
2438 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002440 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002441 ;;
2442 esac
2443 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002444done
Matthias Kloseb9621712010-04-24 17:59:49 +00002445{ ac_configure_args0=; unset ac_configure_args0;}
2446{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
2448# When interrupted or exit'd, cleanup temporary files, and complete
2449# config.log. We remove comments because anyway the quotes in there
2450# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451# WARNING: Use '\'' to represent an apostrophe within the trap.
2452# 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 +00002453trap 'exit_status=$?
2454 # Save into config.log some information that might help in debugging.
2455 {
2456 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002457
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002459## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002460## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 echo
2462 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463(
2464 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2465 eval ac_val=\$$ac_var
2466 case $ac_val in #(
2467 *${as_nl}*)
2468 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2470$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac
2472 case $ac_var in #(
2473 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2475 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac ;;
2477 esac
2478 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2481 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 "s/'\''/'\''\\\\'\'''\''/g;
2484 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2485 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002488 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac |
2490 sort
2491)
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002493
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002495## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_vars
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507
2508 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 echo
2513 for ac_var in $ac_subst_files
2514 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 eval ac_val=\$$ac_var
2516 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 done | sort
2521 echo
2522 fi
2523
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
2531 fi
2532 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 $as_echo "$as_me: caught signal $ac_signal"
2534 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 rm -f core *.core core.conftest.* &&
2537 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002540for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002542done
2543ac_signal=0
2544
2545# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
Matthias Kloseb9621712010-04-24 17:59:49 +00002548$as_echo "/* confdefs.h */" > confdefs.h
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550# Predefined preprocessor variables.
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_NAME "$PACKAGE_NAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_VERSION "$PACKAGE_VERSION"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_STRING "$PACKAGE_STRING"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2570_ACEOF
2571
Matthias Kloseb9621712010-04-24 17:59:49 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_URL "$PACKAGE_URL"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576
2577# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002578# Prefer an explicitly selected file to automatically selected ones.
2579ac_site_file1=NONE
2580ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582 # We do not want a PATH search for config.site.
2583 case $CONFIG_SITE in #((
2584 -*) ac_site_file1=./$CONFIG_SITE;;
2585 */*) ac_site_file1=$CONFIG_SITE;;
2586 *) ac_site_file1=./$CONFIG_SITE;;
2587 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$prefix/share/config.site
2590 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591else
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 ac_site_file1=$ac_default_prefix/share/config.site
2593 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002595for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596do
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 test "x$ac_site_file" = xNONE && continue
2598 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2600$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602 . "$ac_site_file" \
2603 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2605as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002606See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607 fi
2608done
2609
2610if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 # Some versions of bash will fail to source /dev/null (special files
2612 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2613 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2615$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2618 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 esac
2620 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621else
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2623$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 >$cache_file
2625fi
2626
2627# Check that the precious variables saved in the cache have kept the same
2628# value.
2629ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2632 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2634 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 case $ac_old_set,$ac_new_set in
2636 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2638$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 +00002639 ac_cache_corrupted=: ;;
2640 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2642$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 ac_cache_corrupted=: ;;
2644 ,);;
2645 *)
2646 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 # differences in whitespace do not lead to failure.
2648 ac_old_val_w=`echo x $ac_old_val`
2649 ac_new_val_w=`echo x $ac_new_val`
2650 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2652$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2653 ac_cache_corrupted=:
2654 else
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2656$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2657 eval $ac_var=\$ac_old_val
2658 fi
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2660$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2662$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 fi;;
2664 esac
2665 # Pass precious variables to config.status.
2666 if test "$ac_new_set" = set; then
2667 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 *) ac_arg=$ac_var=$ac_new_val ;;
2670 esac
2671 case " $ac_configure_args " in
2672 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 esac
2675 fi
2676done
2677if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2681$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002682 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002684## -------------------- ##
2685## Main body of script. ##
2686## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687
Guido van Rossum7f43da71994-08-01 12:15:30 +00002688ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2692ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693
Guido van Rossum627b2d71993-12-24 10:39:16 +00002694
Michael W. Hudson54241132001-12-07 15:38:26 +00002695
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696
Christian Heimesff5be6e2018-01-20 13:19:21 +01002697
2698
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002699if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002700 # If we're building out-of-tree, we need to make sure the following
2701 # resources get picked up before their $srcdir counterparts.
2702 # Objects/ -> typeslots.inc
2703 # Include/ -> Python-ast.h, graminit.h
2704 # Python/ -> importlib.h
2705 # (A side effect of this is that these resources will automatically be
2706 # regenerated when building out-of-tree, regardless of whether or not
2707 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2708 # off.)
2709 BASECPPFLAGS="-IObjects -IInclude -IPython"
2710else
2711 BASECPPFLAGS=""
2712fi
2713
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714
2715
2716
2717
Victor Stinner9ed34a82017-05-02 22:35:58 +02002718if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720# Extract the first word of "git", so it can be a program name with args.
2721set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2723$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725 $as_echo_n "(cached) " >&6
2726else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727 if test -n "$HAS_GIT"; then
2728 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729else
2730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2731for as_dir in $PATH
2732do
2733 IFS=$as_save_IFS
2734 test -z "$as_dir" && as_dir=.
2735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2739 break 2
2740 fi
2741done
2742 done
2743IFS=$as_save_IFS
2744
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746fi
2747fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748HAS_GIT=$ac_cv_prog_HAS_GIT
2749if test -n "$HAS_GIT"; then
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2751$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2754$as_echo "no" >&6; }
2755fi
2756
2757
2758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762then
Xiang Zhang4c855572018-08-20 22:36:19 +08002763 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2764 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2765 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002767 GITVERSION=""
2768 GITTAG=""
2769 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770fi
2771
2772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
2775
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002776ac_aux_dir=
2777for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2778 if test -f "$ac_dir/install-sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install-sh -c"
2781 break
2782 elif test -f "$ac_dir/install.sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install.sh -c"
2785 break
2786 elif test -f "$ac_dir/shtool"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/shtool install -c"
2789 break
2790 fi
2791done
2792if test -z "$ac_aux_dir"; then
2793 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2794fi
2795
2796# These three variables are undocumented and unsupported,
2797# and are intended to be withdrawn in a future Autoconf release.
2798# They can cause serious problems if a builder's source tree is in a directory
2799# whose full name contains unusual characters.
2800ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2801ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2802ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2803
2804
2805# Make sure we can run config.sub.
2806$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2807 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2808
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2810$as_echo_n "checking build system type... " >&6; }
2811if ${ac_cv_build+:} false; then :
2812 $as_echo_n "(cached) " >&6
2813else
2814 ac_build_alias=$build_alias
2815test "x$ac_build_alias" = x &&
2816 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2817test "x$ac_build_alias" = x &&
2818 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2819ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2820 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2821
2822fi
2823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2824$as_echo "$ac_cv_build" >&6; }
2825case $ac_cv_build in
2826*-*-*) ;;
2827*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2828esac
2829build=$ac_cv_build
2830ac_save_IFS=$IFS; IFS='-'
2831set x $ac_cv_build
2832shift
2833build_cpu=$1
2834build_vendor=$2
2835shift; shift
2836# Remember, the first character of IFS is used to create $*,
2837# except with old shells:
2838build_os=$*
2839IFS=$ac_save_IFS
2840case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2841
2842
2843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2844$as_echo_n "checking host system type... " >&6; }
2845if ${ac_cv_host+:} false; then :
2846 $as_echo_n "(cached) " >&6
2847else
2848 if test "x$host_alias" = x; then
2849 ac_cv_host=$ac_cv_build
2850else
2851 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2852 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2853fi
2854
2855fi
2856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2857$as_echo "$ac_cv_host" >&6; }
2858case $ac_cv_host in
2859*-*-*) ;;
2860*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2861esac
2862host=$ac_cv_host
2863ac_save_IFS=$IFS; IFS='-'
2864set x $ac_cv_host
2865shift
2866host_cpu=$1
2867host_vendor=$2
2868shift; shift
2869# Remember, the first character of IFS is used to create $*,
2870# except with old shells:
2871host_os=$*
2872IFS=$ac_save_IFS
2873case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2874
2875
2876
doko@python.orga10e4a92013-01-25 18:45:12 +01002877
2878
Ned Deilyfcbc2462014-08-22 13:32:49 -07002879# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2880rm -f pybuilddir.txt
2881
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882for ac_prog in python$PACKAGE_VERSION python3 python
2883do
2884 # Extract the first word of "$ac_prog", so it can be a program name with args.
2885set dummy $ac_prog; ac_word=$2
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2887$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002888if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889 $as_echo_n "(cached) " >&6
2890else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002891 if test -n "$PYTHON_FOR_REGEN"; then
2892 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893else
2894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2895for as_dir in $PATH
2896do
2897 IFS=$as_save_IFS
2898 test -z "$as_dir" && as_dir=.
2899 for ac_exec_ext in '' $ac_executable_extensions; do
2900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002901 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2903 break 2
2904 fi
2905done
2906 done
2907IFS=$as_save_IFS
2908
2909fi
2910fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002911PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2912if test -n "$PYTHON_FOR_REGEN"; then
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2914$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915else
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2917$as_echo "no" >&6; }
2918fi
2919
2920
Victor Stinnera5c62a82017-05-03 18:21:48 +02002921 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002923test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002924
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002925
2926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927if test "$cross_compiling" = yes; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2929$as_echo_n "checking for python interpreter for cross build... " >&6; }
2930 if test -z "$PYTHON_FOR_BUILD"; then
2931 for interp in python$PACKAGE_VERSION python3 python; do
2932 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002933 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 +02002934 break
2935 fi
2936 interp=
2937 done
2938 if test x$interp = x; then
2939 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2942$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002943 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 +02002944 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002945elif test "$cross_compiling" = maybe; then
2946 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002947else
2948 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2949fi
2950
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
Benjamin Petersond23f8222009-04-05 19:13:16 +00002953if test "$prefix" != "/"; then
2954 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2955fi
2956
2957
Martin v. Löwis11437992002-04-12 09:54:03 +00002958
2959
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002960# We don't use PACKAGE_ variables, and they cause conflicts
2961# with other autoconf-based packages that include Python.h
2962grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2963rm confdefs.h
2964mv confdefs.h.new confdefs.h
2965
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002966
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002967VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002968
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002969# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002970
2971SOVERSION=1.0
2972
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973# The later defininition of _XOPEN_SOURCE disables certain features
2974# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977
2978
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002984
2985
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002991
2992
Martin v. Löwisd6320502004-08-12 13:45:08 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002994# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998
2999
3000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003001define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003003# Arguments passed to configure.
3004
3005CONFIG_ARGS="$ac_configure_args"
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3008$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003010if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003011 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003012 case $enableval in
3013 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003014 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003015 # information
3016 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003017 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3020 if test ! -d "${enableval}"
3021 then
3022 enableval=/
3023 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003024 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003025 ;;
3026 esac
3027 case $enableval in
3028 no)
3029 UNIVERSALSDK=
3030 enable_universalsdk=
3031 ;;
3032 *)
3033 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 if test ! -d "${UNIVERSALSDK}"
3035 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003036 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038 ;;
3039 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042else
3043
3044 UNIVERSALSDK=
3045 enable_universalsdk=
3046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049if test -n "${UNIVERSALSDK}"
3050then
Matthias Kloseb9621712010-04-24 17:59:49 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3052$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053else
Matthias Kloseb9621712010-04-24 17:59:49 +00003054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3055$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deily87adb6e2013-10-18 21:09:56 -07003060ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003061
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062# For backward compatibility reasons we prefer to select '32-bit' if available,
3063# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003064UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065if test "`uname -s`" = "Darwin"
3066then
3067 if test -n "${UNIVERSALSDK}"
3068 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003069 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 then
3071 UNIVERSAL_ARCHS="intel"
3072 fi
3073 fi
3074fi
3075
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3078$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079
3080# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003081if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083 UNIVERSAL_ARCHS="$withval"
3084
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085fi
3086
Ned Deily87adb6e2013-10-18 21:09:56 -07003087if test -n "${UNIVERSALSDK}"
3088then
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3090$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3091else
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
3094fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003096
3097# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003098if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003099 withval=$with_framework_name;
3100 PYTHONFRAMEWORK=${withval}
3101 PYTHONFRAMEWORKDIR=${withval}.framework
3102 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3103
3104else
3105
3106 PYTHONFRAMEWORK=Python
3107 PYTHONFRAMEWORKDIR=Python.framework
3108 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3109
3110fi
3111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003115 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003116 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003117 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003118 esac
3119 case $enableval in
3120 no)
3121 PYTHONFRAMEWORK=
3122 PYTHONFRAMEWORKDIR=no-framework
3123 PYTHONFRAMEWORKPREFIX=
3124 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125 FRAMEWORKINSTALLFIRST=
3126 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 FRAMEWORKALTINSTALLFIRST=
3128 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003129 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003130 if test "x${prefix}" = "xNONE"; then
3131 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3132 else
3133 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3134 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003136 ;;
3137 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003141 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003142 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3143 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003144 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 if test "x${prefix}" = "xNONE" ; then
3148 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 else
3151 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3152 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
3154 case "${enableval}" in
3155 /System*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 if test "${prefix}" = "NONE" ; then
3158 # See below
3159 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3160 fi
3161 ;;
3162
3163 /Library*)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 ;;
3166
3167 */Library/Frameworks)
3168 MDIR="`dirname "${enableval}"`"
3169 MDIR="`dirname "${MDIR}"`"
3170 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3171
3172 if test "${prefix}" = "NONE"; then
3173 # User hasn't specified the
3174 # --prefix option, but wants to install
3175 # the framework in a non-default location,
3176 # ensure that the compatibility links get
3177 # installed relative to that prefix as well
3178 # instead of in /usr/local.
3179 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3180 fi
3181 ;;
3182
3183 *)
3184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3185 ;;
3186 esac
3187
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003190 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003196 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3197
3198 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3199
Jack Jansene578a632001-08-15 01:27:14 +00003200 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Guido van Rossum563e7081996-09-10 18:20:48 +00003202else
Martin v. Löwis11437992002-04-12 09:54:03 +00003203
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003205 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003206 PYTHONFRAMEWORKPREFIX=
3207 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208 FRAMEWORKINSTALLFIRST=
3209 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 FRAMEWORKALTINSTALLFIRST=
3211 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003212 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 if test "x${prefix}" = "xNONE" ; then
3214 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3215 else
3216 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3217 fi
Jack Jansene578a632001-08-15 01:27:14 +00003218 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221fi
3222
Thomas Wouters477c8d52006-05-27 19:21:47 +00003223
3224
Michael W. Hudson54241132001-12-07 15:38:26 +00003225
3226
3227
3228
Jack Jansene578a632001-08-15 01:27:14 +00003229
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003230
3231
3232
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003233
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003234
Ned Deilyb8f944f2013-11-21 22:42:25 -08003235
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003236
3237cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003238#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003239_ACEOF
3240
3241
Jack Jansene578a632001-08-15 01:27:14 +00003242##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003243## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003244## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003245##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246# Set name for machine-dependent library files
3247
Matthias Kloseb9621712010-04-24 17:59:49 +00003248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3249$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250if test -z "$MACHDEP"
3251then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 # avoid using uname for cross builds
3253 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003254 # ac_sys_system and ac_sys_release are used for setting
3255 # a lot of different things including 'define_xopen_source'
3256 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003258 *-*-linux-android*)
3259 ac_sys_system=Linux-android
3260 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 *-*-linux*)
3262 ac_sys_system=Linux
3263 ;;
3264 *-*-cygwin*)
3265 ac_sys_system=Cygwin
3266 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003267 *-*-vxworks*)
3268 ac_sys_system=VxWorks
3269 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003292 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3300$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003301
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003302
3303if test "$cross_compiling" = yes; then
3304 case "$host" in
3305 *-*-linux*)
3306 case "$host_cpu" in
3307 arm*)
3308 _host_cpu=arm
3309 ;;
3310 *)
3311 _host_cpu=$host_cpu
3312 esac
3313 ;;
3314 *-*-cygwin*)
3315 _host_cpu=
3316 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003317 *-*-vxworks*)
3318 _host_cpu=$host_cpu
3319 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003320 *)
3321 # for now, limit cross builds to known configurations
3322 MACHDEP="unknown"
3323 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3324 esac
3325 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3326fi
3327
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003328# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3329# disable features if it is defined, without any means to access these
3330# features as extensions. For these systems, we skip the definition of
3331# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3332# some feature, make sure there is no alternative way to access this
3333# feature. Also, when using wildcards, make sure you have verified the
3334# need for not defining _XOPEN_SOURCE on all systems matching the
3335# wildcard, and that the wildcard does not include future systems
3336# (which may remove their limitations).
3337case $ac_sys_system/$ac_sys_release in
3338 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3339 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003340 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003341 # In addition, Stefan Krah confirms that issue #1244610 exists through
3342 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003343 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344 define_xopen_source=no
3345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003350
3351 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003352 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3354 # also defined. This can be overridden by defining _BSD_SOURCE
3355 # As this has a different meaning on Linux, only define it on OpenBSD
3356
Matthias Kloseb9621712010-04-24 17:59:49 +00003357$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003358
3359 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003360 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3361 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3362 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003363 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 +00003364 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003365 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3366 # request to enable features supported by the standard as a request
3367 # to disable features not supported by the standard. The best way
3368 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3369 # entirely and define __EXTENSIONS__ instead.
3370 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003371 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3373 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003374 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003375 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003376 define_xopen_source=no;;
3377 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003378 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003381 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3382 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3383 # identifies itself as Darwin/7.*
3384 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # disables platform specific features beyond repair.
3386 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3387 # has no effect, don't bother defining them
3388 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003389 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003390 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3393 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3394 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003395 AIX/4)
3396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 AIX/5)
3398 if test `uname -r` -eq 1; then
3399 define_xopen_source=no
3400 fi
3401 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003402 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3403 # defining NI_NUMERICHOST.
3404 QNX/6.3.2)
3405 define_xopen_source=no
3406 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003407 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3408 # in network headers still using system V types.
3409 VxWorks/*)
3410 define_xopen_source=no
3411 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003412
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413esac
3414
3415if test $define_xopen_source = yes
3416then
Victor Stinner14d098d2011-09-07 22:29:43 +02003417 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Victor Stinner14d098d2011-09-07 22:29:43 +02003419$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3423 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3424 # several APIs are not declared. Since this is also needed in some
3425 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Matthias Kloseb9621712010-04-24 17:59:49 +00003427$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003430
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003431$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003433fi
3434
Christian Heimes647cd872013-12-07 23:39:33 +01003435# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3436case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003437 hp*|HP*)
3438 define_stdc_a1=yes;;
3439 *)
3440 define_stdc_a1=no;;
3441esac
3442
3443if test $define_stdc_a1 = yes
3444then
Christian Heimes647cd872013-12-07 23:39:33 +01003445
3446$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3447
Christian Heimesb02bcae2013-12-08 15:21:08 +01003448fi
Christian Heimes647cd872013-12-07 23:39:33 +01003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
Guido van Rossum8b131c51995-03-09 14:10:13 +00003466# If the user switches compilers, we can't believe the cache
3467if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3468then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003469 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003470(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003471fi
3472
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003473# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3474# when the compiler supports them, but we don't always want -O2, and
3475# we set -g later.
3476if test -z "$CFLAGS"; then
3477 CFLAGS=
3478fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479
3480if test "$ac_sys_system" = "Darwin"
3481then
3482 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003483 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 # information
3485 if test -z "${CC}"
3486 then
3487 found_gcc=
3488 found_clang=
3489 as_save_IFS=$IFS; IFS=:
3490 for as_dir in $PATH
3491 do
3492 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003493 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003495 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496 fi
3497 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003498 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003499 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003500 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 fi
3502 fi
3503 done
3504 IFS=$as_save_IFS
3505
3506 if test -n "$found_gcc" -a -n "$found_clang"
3507 then
3508 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3509 then
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3511$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3512 CC="$found_clang"
3513 CXX="$found_clang++"
3514 fi
3515
3516
3517 elif test -z "$found_gcc" -a -n "$found_clang"
3518 then
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3520$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3521 CC="$found_clang"
3522 CXX="$found_clang++"
3523
3524 elif test -z "$found_gcc" -a -z "$found_clang"
3525 then
3526 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3527 if test -n "${found_clang}"
3528 then
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3530$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3531 CC="${found_clang}"
3532 CXX="`/usr/bin/xcrun -find clang++`"
3533
3534 # else: use default behaviour
3535 fi
3536 fi
3537 fi
3538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003539ac_ext=c
3540ac_cpp='$CPP $CPPFLAGS'
3541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3543ac_compiler_gnu=$ac_cv_c_compiler_gnu
3544if test -n "$ac_tool_prefix"; then
3545 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3546set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3548$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003549if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003551else
3552 if test -n "$CC"; then
3553 ac_cv_prog_CC="$CC" # Let the user override the test.
3554else
Martin v. Löwis11437992002-04-12 09:54:03 +00003555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3556for as_dir in $PATH
3557do
3558 IFS=$as_save_IFS
3559 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 $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 +00003564 break 2
3565 fi
3566done
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003569
Jack Jansendd19cf82001-12-06 22:36:17 +00003570fi
3571fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003572CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003573if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3575$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003576else
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003579fi
3580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582fi
3583if test -z "$ac_cv_prog_CC"; then
3584 ac_ct_CC=$CC
3585 # Extract the first word of "gcc", so it can be a program name with args.
3586set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3588$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003589if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003591else
3592 if test -n "$ac_ct_CC"; then
3593 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3594else
3595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596for as_dir in $PATH
3597do
3598 IFS=$as_save_IFS
3599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 break 2
3605 fi
3606done
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003609
3610fi
3611fi
3612ac_ct_CC=$ac_cv_prog_ac_ct_CC
3613if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3615$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003616else
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3618$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003619fi
3620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 if test "x$ac_ct_CC" = x; then
3622 CC=""
3623 else
3624 case $cross_compiling:$ac_tool_warned in
3625yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628ac_tool_warned=yes ;;
3629esac
3630 CC=$ac_ct_CC
3631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003632else
3633 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635
Jack Jansendd19cf82001-12-06 22:36:17 +00003636if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637 if test -n "$ac_tool_prefix"; then
3638 # 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 +00003639set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3641$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003642if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003644else
3645 if test -n "$CC"; then
3646 ac_cv_prog_CC="$CC" # Let the user override the test.
3647else
Martin v. Löwis11437992002-04-12 09:54:03 +00003648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3649for as_dir in $PATH
3650do
3651 IFS=$as_save_IFS
3652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 $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 +00003657 break 2
3658 fi
3659done
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
3663fi
3664fi
3665CC=$ac_cv_prog_CC
3666if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3668$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676fi
3677if test -z "$CC"; then
3678 # Extract the first word of "cc", so it can be a program name with args.
3679set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3681$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003682if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003684else
3685 if test -n "$CC"; then
3686 ac_cv_prog_CC="$CC" # Let the user override the test.
3687else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003688 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690for as_dir in $PATH
3691do
3692 IFS=$as_save_IFS
3693 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3697 ac_prog_rejected=yes
3698 continue
3699 fi
3700 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $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 +00003702 break 2
3703 fi
3704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708if test $ac_prog_rejected = yes; then
3709 # We found a bogon in the path, so make sure we never use it.
3710 set dummy $ac_cv_prog_CC
3711 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003712 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713 # We chose a different compiler from the bogus one.
3714 # However, it has the same basename, so the bogon will be chosen
3715 # first if we set CC to just the basename; use the full file name.
3716 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003717 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718 fi
3719fi
3720fi
3721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003722CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3725$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726else
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003729fi
3730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733if test -z "$CC"; then
3734 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 do
3737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003741if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003743else
3744 if test -n "$CC"; then
3745 ac_cv_prog_CC="$CC" # Let the user override the test.
3746else
Martin v. Löwis11437992002-04-12 09:54:03 +00003747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3748for as_dir in $PATH
3749do
3750 IFS=$as_save_IFS
3751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $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 +00003756 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003758done
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
3762fi
3763fi
3764CC=$ac_cv_prog_CC
3765if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3767$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003768else
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003771fi
3772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 test -n "$CC" && break
3775 done
3776fi
3777if test -z "$CC"; then
3778 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780do
3781 # Extract the first word of "$ac_prog", so it can be a program name with args.
3782set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003785if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003787else
3788 if test -n "$ac_ct_CC"; then
3789 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3790else
3791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $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 +00003800 break 2
3801 fi
3802done
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807fi
3808ac_ct_CC=$ac_cv_prog_ac_ct_CC
3809if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3811$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$ac_ct_CC" && break
3819done
Michael W. Hudson54241132001-12-07 15:38:26 +00003820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821 if test "x$ac_ct_CC" = x; then
3822 CC=""
3823 else
3824 case $cross_compiling:$ac_tool_warned in
3825yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828ac_tool_warned=yes ;;
3829esac
3830 CC=$ac_ct_CC
3831 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
3833
3834fi
3835
3836
Matthias Kloseb9621712010-04-24 17:59:49 +00003837test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003839as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003840See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003843$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3844set X $ac_compile
3845ac_compiler=$2
3846for ac_option in --version -v -V -qversion; do
3847 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3853$as_echo "$ac_try_echo"; } >&5
3854 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 if test -s conftest.err; then
3857 sed '10a\
3858... rest of stderr output deleted ...
3859 10q' conftest.err >conftest.er1
3860 cat conftest.er1 >&5
3861 fi
3862 rm -f conftest.er1 conftest.err
3863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3864 test $ac_status = 0; }
3865done
Martin v. Löwis11437992002-04-12 09:54:03 +00003866
Matthias Kloseb9621712010-04-24 17:59:49 +00003867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003868/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870int
3871main ()
3872{
3873
3874 ;
3875 return 0;
3876}
3877_ACEOF
3878ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003879ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003880# Try to create an executable without -o first, disregard a.out.
3881# It will help us diagnose broken compilers, and finding out an intuition
3882# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3884$as_echo_n "checking whether the C compiler works... " >&6; }
3885ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3886
3887# The possible output files:
3888ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890ac_rmfiles=
3891for ac_file in $ac_files
3892do
3893 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003894 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3896 esac
3897done
3898rm -f $ac_rmfiles
3899
Matthias Kloseb9621712010-04-24 17:59:49 +00003900if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3910 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3912# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3913# in a Makefile. We should not override ac_cv_exeext if it was cached,
3914# so that the user can short-circuit this test for compilers unknown to
3915# Autoconf.
3916for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003917do
3918 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003921 ;;
3922 [ab].out )
3923 # We found the default executable, but exeext='' is most
3924 # certainly right.
3925 break;;
3926 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 then :; else
3929 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3930 fi
3931 # We set ac_cv_exeext here because the later test for it is not
3932 # safe: cross compilers may not add the suffix if given an `-o'
3933 # argument, so we may need to know it at that point already.
3934 # Even if this section looks crufty: it has the advantage of
3935 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936 break;;
3937 * )
3938 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 esac
3940done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941test "$ac_cv_exeext" = no && ac_cv_exeext=
3942
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003943else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 ac_file=''
3945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003946if test -z "$ac_file"; then :
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3948$as_echo "no" >&6; }
3949$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003950sed 's/^/| /' conftest.$ac_ext >&5
3951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003954as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003955See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003956else
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3958$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3961$as_echo_n "checking for C compiler default output file name... " >&6; }
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3963$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965
Matthias Kloseb9621712010-04-24 17:59:49 +00003966rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003967ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3969$as_echo_n "checking for suffix of executables... " >&6; }
3970if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971case "(($ac_try" in
3972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3973 *) ac_try_echo=$ac_try;;
3974esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3976$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3980 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3982# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3983# work properly (i.e., refer to `conftest.exe'), while it won't with
3984# `rm'.
3985for ac_file in conftest.exe conftest conftest.*; do
3986 test -f "$ac_file" || continue
3987 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3990 break;;
3991 * ) break;;
3992 esac
3993done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994else
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003997as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003998See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004000rm -f conftest conftest$ac_cv_exeext
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4002$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003
4004rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004005EXEEXT=$ac_cv_exeext
4006ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4008/* end confdefs.h. */
4009#include <stdio.h>
4010int
4011main ()
4012{
4013FILE *f = fopen ("conftest.out", "w");
4014 return ferror (f) || fclose (f) != 0;
4015
4016 ;
4017 return 0;
4018}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004020ac_clean_files="$ac_clean_files conftest.out"
4021# Check that the compiler produces executables we can run. If not, either
4022# the compiler is broken, or we cross compile.
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4024$as_echo_n "checking whether we are cross compiling... " >&6; }
4025if test "$cross_compiling" != yes; then
4026 { { ac_try="$ac_link"
4027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_link") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }
4037 if { ac_try='./conftest$ac_cv_exeext'
4038 { { case "(($ac_try" in
4039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4040 *) ac_try_echo=$ac_try;;
4041esac
4042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4043$as_echo "$ac_try_echo"; } >&5
4044 (eval "$ac_try") 2>&5
4045 ac_status=$?
4046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4047 test $ac_status = 0; }; }; then
4048 cross_compiling=no
4049 else
4050 if test "$cross_compiling" = maybe; then
4051 cross_compiling=yes
4052 else
4053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004055as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004056If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004057See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 fi
4059 fi
4060fi
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4062$as_echo "$cross_compiling" >&6; }
4063
4064rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4065ac_clean_files=$ac_clean_files_save
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4067$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004068if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo_n "(cached) " >&6
4070else
4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004072/* end confdefs.h. */
4073
4074int
4075main ()
4076{
4077
4078 ;
4079 return 0;
4080}
4081_ACEOF
4082rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004083if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084case "(($ac_try" in
4085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086 *) ac_try_echo=$ac_try;;
4087esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4089$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004090 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004091 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4093 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 for ac_file in conftest.o conftest.obj conftest.*; do
4095 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4099 break;;
4100 esac
4101done
4102else
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004104sed 's/^/| /' conftest.$ac_ext >&5
4105
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004109See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004110fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4114$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004115OBJEXT=$ac_cv_objext
4116ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4118$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004124
Martin v. Löwis11437992002-04-12 09:54:03 +00004125int
4126main ()
4127{
4128#ifndef __GNUC__
4129 choke me
4130#endif
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 ac_compiler_gnu=yes
4138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004142ac_cv_c_compiler_gnu=$ac_compiler_gnu
4143
4144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4146$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4147if test $ac_compiler_gnu = yes; then
4148 GCC=yes
4149else
4150 GCC=
4151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004152ac_test_CFLAGS=${CFLAGS+set}
4153ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4155$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004156if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004158else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 ac_save_c_werror_flag=$ac_c_werror_flag
4160 ac_c_werror_flag=yes
4161 ac_cv_prog_cc_g=no
4162 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Martin v. Löwis11437992002-04-12 09:54:03 +00004166int
4167main ()
4168{
4169
4170 ;
4171 return 0;
4172}
4173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004175 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004176else
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 CFLAGS=""
4178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179/* end confdefs.h. */
4180
4181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190
Matthias Kloseb9621712010-04-24 17:59:49 +00004191else
4192 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195/* end confdefs.h. */
4196
4197int
4198main ()
4199{
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4213 ac_c_werror_flag=$ac_save_c_werror_flag
4214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4216$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004217if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004218 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004219elif test $ac_cv_prog_cc_g = yes; then
4220 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004221 CFLAGS="-g -O2"
4222 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004223 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224 fi
4225else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004226 if test "$GCC" = yes; then
4227 CFLAGS="-O2"
4228 else
4229 CFLAGS=
4230 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4233$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004236else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004238ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
4241#include <stdarg.h>
4242#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004243struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4245struct buf { int x; };
4246FILE * (*rcsopen) (struct buf *, struct stat *, int);
4247static char *e (p, i)
4248 char **p;
4249 int i;
4250{
4251 return p[i];
4252}
4253static char *f (char * (*g) (char **, int), char **p, ...)
4254{
4255 char *s;
4256 va_list v;
4257 va_start (v,p);
4258 s = g (p, va_arg (v,int));
4259 va_end (v);
4260 return s;
4261}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262
4263/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4264 function prototypes and stuff, but not '\xHH' hex character constants.
4265 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004267 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4268 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004270int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4273 inside strings and character constants. */
4274#define FOO(x) 'x'
4275int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4276
Skip Montanaro6dead952003-09-25 14:50:04 +00004277int test (int i, double x);
4278struct s1 {int (*f) (int a);};
4279struct s2 {int (*f) (double a);};
4280int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4281int argc;
4282char **argv;
4283int
4284main ()
4285{
4286return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4287 ;
4288 return 0;
4289}
4290_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4292 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004293do
4294 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298rm -f core conftest.err conftest.$ac_objext
4299 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004300done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004302CC=$ac_save_CC
4303
4304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305# AC_CACHE_VAL
4306case "x$ac_cv_prog_cc_c89" in
4307 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4309$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4312$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004313 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4316$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004317esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004318if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004319
Matthias Kloseb9621712010-04-24 17:59:49 +00004320fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322ac_ext=c
4323ac_cpp='$CPP $CPPFLAGS'
4324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4326ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004328ac_ext=c
4329ac_cpp='$CPP $CPPFLAGS'
4330ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4331ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4332ac_compiler_gnu=$ac_cv_c_compiler_gnu
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4334$as_echo_n "checking how to run the C preprocessor... " >&6; }
4335# On Suns, sometimes $CPP names a directory.
4336if test -n "$CPP" && test -d "$CPP"; then
4337 CPP=
4338fi
4339if test -z "$CPP"; then
4340 if ${ac_cv_prog_CPP+:} false; then :
4341 $as_echo_n "(cached) " >&6
4342else
4343 # Double quotes because CPP needs to be expanded
4344 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4345 do
4346 ac_preproc_ok=false
4347for ac_c_preproc_warn_flag in '' yes
4348do
4349 # Use a header file that comes with gcc, so configuring glibc
4350 # with a fresh cross-compiler works.
4351 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4352 # <limits.h> exists even on freestanding compilers.
4353 # On the NeXT, cc -E runs the code through the compiler's parser,
4354 # not just through cpp. "Syntax error" is here to catch this case.
4355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4356/* end confdefs.h. */
4357#ifdef __STDC__
4358# include <limits.h>
4359#else
4360# include <assert.h>
4361#endif
4362 Syntax error
4363_ACEOF
4364if ac_fn_c_try_cpp "$LINENO"; then :
4365
4366else
4367 # Broken: fails on valid input.
4368continue
4369fi
4370rm -f conftest.err conftest.i conftest.$ac_ext
4371
4372 # OK, works on sane cases. Now check whether nonexistent headers
4373 # can be detected and how.
4374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4375/* end confdefs.h. */
4376#include <ac_nonexistent.h>
4377_ACEOF
4378if ac_fn_c_try_cpp "$LINENO"; then :
4379 # Broken: success on invalid input.
4380continue
4381else
4382 # Passes both tests.
4383ac_preproc_ok=:
4384break
4385fi
4386rm -f conftest.err conftest.i conftest.$ac_ext
4387
4388done
4389# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4390rm -f conftest.i conftest.err conftest.$ac_ext
4391if $ac_preproc_ok; then :
4392 break
4393fi
4394
4395 done
4396 ac_cv_prog_CPP=$CPP
4397
4398fi
4399 CPP=$ac_cv_prog_CPP
4400else
4401 ac_cv_prog_CPP=$CPP
4402fi
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4404$as_echo "$CPP" >&6; }
4405ac_preproc_ok=false
4406for ac_c_preproc_warn_flag in '' yes
4407do
4408 # Use a header file that comes with gcc, so configuring glibc
4409 # with a fresh cross-compiler works.
4410 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4411 # <limits.h> exists even on freestanding compilers.
4412 # On the NeXT, cc -E runs the code through the compiler's parser,
4413 # not just through cpp. "Syntax error" is here to catch this case.
4414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4415/* end confdefs.h. */
4416#ifdef __STDC__
4417# include <limits.h>
4418#else
4419# include <assert.h>
4420#endif
4421 Syntax error
4422_ACEOF
4423if ac_fn_c_try_cpp "$LINENO"; then :
4424
4425else
4426 # Broken: fails on valid input.
4427continue
4428fi
4429rm -f conftest.err conftest.i conftest.$ac_ext
4430
4431 # OK, works on sane cases. Now check whether nonexistent headers
4432 # can be detected and how.
4433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4434/* end confdefs.h. */
4435#include <ac_nonexistent.h>
4436_ACEOF
4437if ac_fn_c_try_cpp "$LINENO"; then :
4438 # Broken: success on invalid input.
4439continue
4440else
4441 # Passes both tests.
4442ac_preproc_ok=:
4443break
4444fi
4445rm -f conftest.err conftest.i conftest.$ac_ext
4446
4447done
4448# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4449rm -f conftest.i conftest.err conftest.$ac_ext
4450if $ac_preproc_ok; then :
4451
4452else
4453 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4455as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4456See \`config.log' for more details" "$LINENO" 5; }
4457fi
4458
4459ac_ext=c
4460ac_cpp='$CPP $CPPFLAGS'
4461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4463ac_compiler_gnu=$ac_cv_c_compiler_gnu
4464
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4466$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4467if ${ac_cv_path_GREP+:} false; then :
4468 $as_echo_n "(cached) " >&6
4469else
4470 if test -z "$GREP"; then
4471 ac_path_GREP_found=false
4472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
4478 for ac_prog in grep ggrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4481 as_fn_executable_p "$ac_path_GREP" || continue
4482# Check for GNU ac_path_GREP and select it if it is found.
4483 # Check for GNU $ac_path_GREP
4484case `"$ac_path_GREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4487*)
4488 ac_count=0
4489 $as_echo_n 0123456789 >"conftest.in"
4490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
4495 $as_echo 'GREP' >> "conftest.nl"
4496 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4498 as_fn_arith $ac_count + 1 && ac_count=$as_val
4499 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_GREP="$ac_path_GREP"
4502 ac_path_GREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
4510 $ac_path_GREP_found && break 3
4511 done
4512 done
4513 done
4514IFS=$as_save_IFS
4515 if test -z "$ac_cv_path_GREP"; then
4516 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4517 fi
4518else
4519 ac_cv_path_GREP=$GREP
4520fi
4521
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4524$as_echo "$ac_cv_path_GREP" >&6; }
4525 GREP="$ac_cv_path_GREP"
4526
4527
Łukasz Langaa785c872016-09-09 17:37:37 -07004528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4529$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4530if ${ac_cv_path_SED+:} false; then :
4531 $as_echo_n "(cached) " >&6
4532else
4533 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4534 for ac_i in 1 2 3 4 5 6 7; do
4535 ac_script="$ac_script$as_nl$ac_script"
4536 done
4537 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4538 { ac_script=; unset ac_script;}
4539 if test -z "$SED"; then
4540 ac_path_SED_found=false
4541 # Loop through the user's path and test for each of PROGNAME-LIST
4542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543for as_dir in $PATH
4544do
4545 IFS=$as_save_IFS
4546 test -z "$as_dir" && as_dir=.
4547 for ac_prog in sed gsed; do
4548 for ac_exec_ext in '' $ac_executable_extensions; do
4549 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4550 as_fn_executable_p "$ac_path_SED" || continue
4551# Check for GNU ac_path_SED and select it if it is found.
4552 # Check for GNU $ac_path_SED
4553case `"$ac_path_SED" --version 2>&1` in
4554*GNU*)
4555 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4556*)
4557 ac_count=0
4558 $as_echo_n 0123456789 >"conftest.in"
4559 while :
4560 do
4561 cat "conftest.in" "conftest.in" >"conftest.tmp"
4562 mv "conftest.tmp" "conftest.in"
4563 cp "conftest.in" "conftest.nl"
4564 $as_echo '' >> "conftest.nl"
4565 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4566 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4567 as_fn_arith $ac_count + 1 && ac_count=$as_val
4568 if test $ac_count -gt ${ac_path_SED_max-0}; then
4569 # Best one so far, save it but keep looking for a better one
4570 ac_cv_path_SED="$ac_path_SED"
4571 ac_path_SED_max=$ac_count
4572 fi
4573 # 10*(2^10) chars as input seems more than enough
4574 test $ac_count -gt 10 && break
4575 done
4576 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4577esac
4578
4579 $ac_path_SED_found && break 3
4580 done
4581 done
4582 done
4583IFS=$as_save_IFS
4584 if test -z "$ac_cv_path_SED"; then
4585 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4586 fi
4587else
4588 ac_cv_path_SED=$SED
4589fi
4590
4591fi
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4593$as_echo "$ac_cv_path_SED" >&6; }
4594 SED="$ac_cv_path_SED"
4595 rm -f conftest.sed
4596
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004597
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598
4599
Matthias Kloseb9621712010-04-24 17:59:49 +00004600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4601$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004603# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004604if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004606
4607 case $withval in
4608 no) with_cxx_main=no
4609 MAINCC='$(CC)';;
4610 yes) with_cxx_main=yes
4611 MAINCC='$(CXX)';;
4612 *) with_cxx_main=yes
4613 MAINCC=$withval
4614 if test -z "$CXX"
4615 then
4616 CXX=$withval
4617 fi;;
4618 esac
4619else
4620
4621 with_cxx_main=no
4622 MAINCC='$(CC)'
4623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004624fi
4625
Matthias Kloseb9621712010-04-24 17:59:49 +00004626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4627$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628
4629preset_cxx="$CXX"
4630if test -z "$CXX"
4631then
4632 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004633 gcc) if test -n "$ac_tool_prefix"; then
4634 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4635set dummy ${ac_tool_prefix}g++; ac_word=$2
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4637$as_echo_n "checking for $ac_word... " >&6; }
4638if ${ac_cv_path_CXX+:} false; then :
4639 $as_echo_n "(cached) " >&6
4640else
4641 case $CXX in
4642 [\\/]* | ?:[\\/]*)
4643 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4644 ;;
4645 *)
4646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647for as_dir in notfound
4648do
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004653 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4656 fi
4657done
4658 done
4659IFS=$as_save_IFS
4660
4661 ;;
4662esac
4663fi
4664CXX=$ac_cv_path_CXX
4665if test -n "$CXX"; then
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4667$as_echo "$CXX" >&6; }
4668else
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4670$as_echo "no" >&6; }
4671fi
4672
4673
4674fi
4675if test -z "$ac_cv_path_CXX"; then
4676 ac_pt_CXX=$CXX
4677 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681if ${ac_cv_path_ac_pt_CXX+:} false; then :
4682 $as_echo_n "(cached) " >&6
4683else
4684 case $ac_pt_CXX in
4685 [\\/]* | ?:[\\/]*)
4686 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4687 ;;
4688 *)
4689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in notfound
4691do
4692 IFS=$as_save_IFS
4693 test -z "$as_dir" && as_dir=.
4694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004696 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4697 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698 break 2
4699 fi
4700done
4701 done
4702IFS=$as_save_IFS
4703
4704 ;;
4705esac
4706fi
4707ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4708if test -n "$ac_pt_CXX"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4710$as_echo "$ac_pt_CXX" >&6; }
4711else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716 if test "x$ac_pt_CXX" = x; then
4717 CXX="g++"
4718 else
4719 case $cross_compiling:$ac_tool_warned in
4720yes:)
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4723ac_tool_warned=yes ;;
4724esac
4725 CXX=$ac_pt_CXX
4726 fi
4727else
4728 CXX="$ac_cv_path_CXX"
4729fi
4730 ;;
4731 cc) if test -n "$ac_tool_prefix"; then
4732 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4733set dummy ${ac_tool_prefix}c++; ac_word=$2
4734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004736if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004737 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738else
4739 case $CXX in
4740 [\\/]* | ?:[\\/]*)
4741 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4742 ;;
4743 *)
4744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in notfound
4746do
4747 IFS=$as_save_IFS
4748 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753 break 2
4754 fi
4755done
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759 ;;
4760esac
4761fi
4762CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004763if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4765$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004766else
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004770
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771
4772fi
4773if test -z "$ac_cv_path_CXX"; then
4774 ac_pt_CXX=$CXX
4775 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004779if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 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 +00004785 ;;
4786 *)
4787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in notfound
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 break 2
4797 fi
4798done
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802 ;;
4803esac
4804fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4806if test -n "$ac_pt_CXX"; then
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4808$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809else
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004813
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 if test "x$ac_pt_CXX" = x; then
4815 CXX="c++"
4816 else
4817 case $cross_compiling:$ac_tool_warned in
4818yes:)
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4821ac_tool_warned=yes ;;
4822esac
4823 CXX=$ac_pt_CXX
4824 fi
4825else
4826 CXX="$ac_cv_path_CXX"
4827fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 clang|*/clang) if test -n "$ac_tool_prefix"; then
4830 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4831set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if ${ac_cv_path_CXX+:} false; then :
4835 $as_echo_n "(cached) " >&6
4836else
4837 case $CXX in
4838 [\\/]* | ?:[\\/]*)
4839 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4840 ;;
4841 *)
4842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in notfound
4844do
4845 IFS=$as_save_IFS
4846 test -z "$as_dir" && as_dir=.
4847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004849 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851 break 2
4852 fi
4853done
4854 done
4855IFS=$as_save_IFS
4856
Ned Deilycbfb9a52012-06-23 16:02:19 -07004857 ;;
4858esac
4859fi
4860CXX=$ac_cv_path_CXX
4861if test -n "$CXX"; then
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4863$as_echo "$CXX" >&6; }
4864else
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869
4870fi
4871if test -z "$ac_cv_path_CXX"; then
4872 ac_pt_CXX=$CXX
4873 # Extract the first word of "clang++", so it can be a program name with args.
4874set dummy clang++; ac_word=$2
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_ac_pt_CXX+:} false; then :
4878 $as_echo_n "(cached) " >&6
4879else
4880 case $ac_pt_CXX in
4881 [\\/]* | ?:[\\/]*)
4882 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4883 ;;
4884 *)
4885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in notfound
4887do
4888 IFS=$as_save_IFS
4889 test -z "$as_dir" && as_dir=.
4890 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004892 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894 break 2
4895 fi
4896done
4897 done
4898IFS=$as_save_IFS
4899
4900 ;;
4901esac
4902fi
4903ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4904if test -n "$ac_pt_CXX"; then
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4906$as_echo "$ac_pt_CXX" >&6; }
4907else
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912 if test "x$ac_pt_CXX" = x; then
4913 CXX="clang++"
4914 else
4915 case $cross_compiling:$ac_tool_warned in
4916yes:)
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4919ac_tool_warned=yes ;;
4920esac
4921 CXX=$ac_pt_CXX
4922 fi
4923else
4924 CXX="$ac_cv_path_CXX"
4925fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004926 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004927 icc|*/icc) if test -n "$ac_tool_prefix"; then
4928 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4929set dummy ${ac_tool_prefix}icpc; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_CXX+:} false; then :
4933 $as_echo_n "(cached) " >&6
4934else
4935 case $CXX in
4936 [\\/]* | ?:[\\/]*)
4937 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4938 ;;
4939 *)
4940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in notfound
4942do
4943 IFS=$as_save_IFS
4944 test -z "$as_dir" && as_dir=.
4945 for ac_exec_ext in '' $ac_executable_extensions; do
4946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4947 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949 break 2
4950 fi
4951done
4952 done
4953IFS=$as_save_IFS
4954
4955 ;;
4956esac
4957fi
4958CXX=$ac_cv_path_CXX
4959if test -n "$CXX"; then
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4961$as_echo "$CXX" >&6; }
4962else
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968fi
4969if test -z "$ac_cv_path_CXX"; then
4970 ac_pt_CXX=$CXX
4971 # Extract the first word of "icpc", so it can be a program name with args.
4972set dummy icpc; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
4975if ${ac_cv_path_ac_pt_CXX+:} false; then :
4976 $as_echo_n "(cached) " >&6
4977else
4978 case $ac_pt_CXX in
4979 [\\/]* | ?:[\\/]*)
4980 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4981 ;;
4982 *)
4983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984for as_dir in notfound
4985do
4986 IFS=$as_save_IFS
4987 test -z "$as_dir" && as_dir=.
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4990 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4992 break 2
4993 fi
4994done
4995 done
4996IFS=$as_save_IFS
4997
4998 ;;
4999esac
5000fi
5001ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5002if test -n "$ac_pt_CXX"; then
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5004$as_echo "$ac_pt_CXX" >&6; }
5005else
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007$as_echo "no" >&6; }
5008fi
5009
5010 if test "x$ac_pt_CXX" = x; then
5011 CXX="icpc"
5012 else
5013 case $cross_compiling:$ac_tool_warned in
5014yes:)
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5016$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5017ac_tool_warned=yes ;;
5018esac
5019 CXX=$ac_pt_CXX
5020 fi
5021else
5022 CXX="$ac_cv_path_CXX"
5023fi
5024 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025 esac
5026 if test "$CXX" = "notfound"
5027 then
5028 CXX=""
5029 fi
5030fi
5031if test -z "$CXX"
5032then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005033 if test -n "$ac_tool_prefix"; then
5034 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5035 do
5036 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5037set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005040if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042else
5043 if test -n "$CXX"; then
5044 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5045else
5046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5047for as_dir in $PATH
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005053 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005055 break 2
5056 fi
5057done
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060
5061fi
5062fi
5063CXX=$ac_cv_prog_CXX
5064if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5066$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067else
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005070fi
5071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005073 test -n "$CXX" && break
5074 done
5075fi
5076if test -z "$CXX"; then
5077 ac_ct_CXX=$CXX
5078 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5079do
5080 # Extract the first word of "$ac_prog", so it can be a program name with args.
5081set dummy $ac_prog; ac_word=$2
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
5084if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5085 $as_echo_n "(cached) " >&6
5086else
5087 if test -n "$ac_ct_CXX"; then
5088 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5089else
5090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091for as_dir in $PATH
5092do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
5095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 ac_cv_prog_ac_ct_CXX="$ac_prog"
5098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5099 break 2
5100 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005102 done
5103IFS=$as_save_IFS
5104
5105fi
5106fi
5107ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5108if test -n "$ac_ct_CXX"; then
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5110$as_echo "$ac_ct_CXX" >&6; }
5111else
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
5114fi
5115
5116
5117 test -n "$ac_ct_CXX" && break
5118done
5119
5120 if test "x$ac_ct_CXX" = x; then
5121 CXX="notfound"
5122 else
5123 case $cross_compiling:$ac_tool_warned in
5124yes:)
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5127ac_tool_warned=yes ;;
5128esac
5129 CXX=$ac_ct_CXX
5130 fi
5131fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132
5133 if test "$CXX" = "notfound"
5134 then
5135 CXX=""
5136 fi
5137fi
5138if test "$preset_cxx" != "$CXX"
5139then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005140 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141
5142 By default, distutils will build C++ extension modules with \"$CXX\".
5143 If this is not intended, then set CXX on the configure command line.
5144 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005145$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146
5147 By default, distutils will build C++ extension modules with \"$CXX\".
5148 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005149 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005150fi
5151
5152
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005153MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5154
5155
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5157$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5158cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005159#undef bfin
5160#undef cris
5161#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005162#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005163#undef hppa
5164#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005165#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005166#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005167#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005168#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005170#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005171 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005172#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005173# if defined(__x86_64__) && defined(__LP64__)
5174 x86_64-linux-gnu
5175# elif defined(__x86_64__) && defined(__ILP32__)
5176 x86_64-linux-gnux32
5177# elif defined(__i386__)
5178 i386-linux-gnu
5179# elif defined(__aarch64__) && defined(__AARCH64EL__)
5180# if defined(__ILP32__)
5181 aarch64_ilp32-linux-gnu
5182# else
5183 aarch64-linux-gnu
5184# endif
5185# elif defined(__aarch64__) && defined(__AARCH64EB__)
5186# if defined(__ILP32__)
5187 aarch64_be_ilp32-linux-gnu
5188# else
5189 aarch64_be-linux-gnu
5190# endif
5191# elif defined(__alpha__)
5192 alpha-linux-gnu
5193# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5194# if defined(__ARMEL__)
5195 arm-linux-gnueabihf
5196# else
5197 armeb-linux-gnueabihf
5198# endif
5199# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5200# if defined(__ARMEL__)
5201 arm-linux-gnueabi
5202# else
5203 armeb-linux-gnueabi
5204# endif
5205# elif defined(__hppa__)
5206 hppa-linux-gnu
5207# elif defined(__ia64__)
5208 ia64-linux-gnu
5209# elif defined(__m68k__) && !defined(__mcoldfire__)
5210 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005211# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5212# if _MIPS_SIM == _ABIO32
5213 mipsisa32r6el-linux-gnu
5214# elif _MIPS_SIM == _ABIN32
5215 mipsisa64r6el-linux-gnuabin32
5216# elif _MIPS_SIM == _ABI64
5217 mipsisa64r6el-linux-gnuabi64
5218# else
5219# error unknown platform triplet
5220# endif
5221# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5222# if _MIPS_SIM == _ABIO32
5223 mipsisa32r6-linux-gnu
5224# elif _MIPS_SIM == _ABIN32
5225 mipsisa64r6-linux-gnuabin32
5226# elif _MIPS_SIM == _ABI64
5227 mipsisa64r6-linux-gnuabi64
5228# else
5229# error unknown platform triplet
5230# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005231# elif defined(__mips_hard_float) && defined(_MIPSEL)
5232# if _MIPS_SIM == _ABIO32
5233 mipsel-linux-gnu
5234# elif _MIPS_SIM == _ABIN32
5235 mips64el-linux-gnuabin32
5236# elif _MIPS_SIM == _ABI64
5237 mips64el-linux-gnuabi64
5238# else
5239# error unknown platform triplet
5240# endif
5241# elif defined(__mips_hard_float)
5242# if _MIPS_SIM == _ABIO32
5243 mips-linux-gnu
5244# elif _MIPS_SIM == _ABIN32
5245 mips64-linux-gnuabin32
5246# elif _MIPS_SIM == _ABI64
5247 mips64-linux-gnuabi64
5248# else
5249# error unknown platform triplet
5250# endif
5251# elif defined(__or1k__)
5252 or1k-linux-gnu
5253# elif defined(__powerpc__) && defined(__SPE__)
5254 powerpc-linux-gnuspe
5255# elif defined(__powerpc64__)
5256# if defined(__LITTLE_ENDIAN__)
5257 powerpc64le-linux-gnu
5258# else
5259 powerpc64-linux-gnu
5260# endif
5261# elif defined(__powerpc__)
5262 powerpc-linux-gnu
5263# elif defined(__s390x__)
5264 s390x-linux-gnu
5265# elif defined(__s390__)
5266 s390-linux-gnu
5267# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5268 sh4-linux-gnu
5269# elif defined(__sparc__) && defined(__arch64__)
5270 sparc64-linux-gnu
5271# elif defined(__sparc__)
5272 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005273# elif defined(__riscv)
5274# if __riscv_xlen == 32
5275 riscv32-linux-gnu
5276# elif __riscv_xlen == 64
5277 riscv64-linux-gnu
5278# else
5279# error unknown platform triplet
5280# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005281# else
5282# error unknown platform triplet
5283# endif
5284#elif defined(__FreeBSD_kernel__)
5285# if defined(__LP64__)
5286 x86_64-kfreebsd-gnu
5287# elif defined(__i386__)
5288 i386-kfreebsd-gnu
5289# else
5290# error unknown platform triplet
5291# endif
5292#elif defined(__gnu_hurd__)
5293 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005294#elif defined(__APPLE__)
5295 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005296#elif defined(__VXWORKS__)
5297 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298#else
5299# error unknown platform triplet
5300#endif
5301
5302EOF
5303
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005304if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5307$as_echo "$PLATFORM_TRIPLET" >&6; }
5308else
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5310$as_echo "none" >&6; }
5311fi
5312rm -f conftest.c conftest.out
5313
5314if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5315 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5316 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5317 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005318elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5319 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321
doko@ubuntu.com55532312016-06-14 08:55:19 +02005322if test x$MULTIARCH != x; then
5323 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5324fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325
5326
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5328$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5329save_LDFLAGS="$LDFLAGS"
5330LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005331
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5333/* end confdefs.h. */
5334
5335int
5336main ()
5337{
5338
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343if ac_fn_c_try_link "$LINENO"; then :
5344 NO_AS_NEEDED="-Wl,--no-as-needed"
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5346$as_echo "yes" >&6; }
5347else
5348 NO_AS_NEEDED=""
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352rm -f core conftest.err conftest.$ac_objext \
5353 conftest$ac_exeext conftest.$ac_ext
5354LDFLAGS="$save_LDFLAGS"
5355
5356
5357
5358# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5361$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005362if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364else
5365 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5366 then ac_cv_path_EGREP="$GREP -E"
5367 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 # Loop through the user's path and test for each of PROGNAME-LIST
5371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5373do
5374 IFS=$as_save_IFS
5375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 for ac_prog in egrep; do
5377 for ac_exec_ext in '' $ac_executable_extensions; do
5378 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005379 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005380# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 # Check for GNU $ac_path_EGREP
5382case `"$ac_path_EGREP" --version 2>&1` in
5383*GNU*)
5384 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5385*)
5386 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 while :
5389 do
5390 cat "conftest.in" "conftest.in" >"conftest.tmp"
5391 mv "conftest.tmp" "conftest.in"
5392 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5395 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5398 # Best one so far, save it but keep looking for a better one
5399 ac_cv_path_EGREP="$ac_path_EGREP"
5400 ac_path_EGREP_max=$ac_count
5401 fi
5402 # 10*(2^10) chars as input seems more than enough
5403 test $ac_count -gt 10 && break
5404 done
5405 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5406esac
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $ac_path_EGREP_found && break 3
5409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005414 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 +00005415 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416else
5417 ac_cv_path_EGREP=$EGREP
5418fi
5419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 fi
5421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5423$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005425
5426
Matthias Kloseb9621712010-04-24 17:59:49 +00005427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5428$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005429if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $as_echo_n "(cached) " >&6
5431else
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005433/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005434#include <stdlib.h>
5435#include <stdarg.h>
5436#include <string.h>
5437#include <float.h>
5438
5439int
5440main ()
5441{
5442
5443 ;
5444 return 0;
5445}
5446_ACEOF
5447if ac_fn_c_try_compile "$LINENO"; then :
5448 ac_cv_header_stdc=yes
5449else
5450 ac_cv_header_stdc=no
5451fi
5452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5453
5454if test $ac_cv_header_stdc = yes; then
5455 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457/* end confdefs.h. */
5458#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005459
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005460_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005464else
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005467rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
Matthias Kloseb9621712010-04-24 17:59:49 +00005469fi
5470
5471if test $ac_cv_header_stdc = yes; then
5472 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <stdlib.h>
5476
5477_ACEOF
5478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5479 $EGREP "free" >/dev/null 2>&1; then :
5480
5481else
5482 ac_cv_header_stdc=no
5483fi
5484rm -f conftest*
5485
5486fi
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5490 if test "$cross_compiling" = yes; then :
5491 :
5492else
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <ctype.h>
5496#include <stdlib.h>
5497#if ((' ' & 0x0FF) == 0x020)
5498# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5499# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5500#else
5501# define ISLOWER(c) \
5502 (('a' <= (c) && (c) <= 'i') \
5503 || ('j' <= (c) && (c) <= 'r') \
5504 || ('s' <= (c) && (c) <= 'z'))
5505# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5506#endif
5507
5508#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5509int
5510main ()
5511{
5512 int i;
5513 for (i = 0; i < 256; i++)
5514 if (XOR (islower (i), ISLOWER (i))
5515 || toupper (i) != TOUPPER (i))
5516 return 2;
5517 return 0;
5518}
5519_ACEOF
5520if ac_fn_c_try_run "$LINENO"; then :
5521
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5526 conftest.$ac_objext conftest.beam conftest.$ac_ext
5527fi
5528
5529fi
5530fi
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5532$as_echo "$ac_cv_header_stdc" >&6; }
5533if test $ac_cv_header_stdc = yes; then
5534
5535$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5536
5537fi
5538
5539# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5540for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5541 inttypes.h stdint.h unistd.h
5542do :
5543 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5544ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5545"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005546if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005547 cat >>confdefs.h <<_ACEOF
5548#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5549_ACEOF
5550
5551fi
5552
5553done
5554
5555
5556
5557 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 +02005558if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 MINIX=yes
5560else
5561 MINIX=
5562fi
5563
5564
5565 if test "$MINIX" = yes; then
5566
5567$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5568
5569
5570$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5571
5572
5573$as_echo "#define _MINIX 1" >>confdefs.h
5574
5575 fi
5576
5577
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5579$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005580if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 $as_echo_n "(cached) " >&6
5582else
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584/* end confdefs.h. */
5585
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005586# define __EXTENSIONS__ 1
5587 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005588int
5589main ()
5590{
5591
5592 ;
5593 return 0;
5594}
5595_ACEOF
5596if ac_fn_c_try_compile "$LINENO"; then :
5597 ac_cv_safe_to_define___extensions__=yes
5598else
5599 ac_cv_safe_to_define___extensions__=no
5600fi
5601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5602fi
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5604$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5605 test $ac_cv_safe_to_define___extensions__ = yes &&
5606 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5607
5608 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5609
5610 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5613
5614 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5615
5616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5619$as_echo_n "checking for the Android API level... " >&6; }
5620cat >> conftest.c <<EOF
5621#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005622android_api = __ANDROID_API__
5623arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005624#else
5625#error not Android
5626#endif
5627EOF
5628
5629if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005630 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5631 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5633$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005634 if test -z "$ANDROID_API_LEVEL"; then
5635 echo 'Fatal: you must define __ANDROID_API__'
5636 exit 1
5637 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005638
5639cat >>confdefs.h <<_ACEOF
5640#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5641_ACEOF
5642
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005643
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5645$as_echo_n "checking for the Android arm ABI... " >&6; }
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5647$as_echo "$_arm_arch" >&6; }
5648 if test "$_arm_arch" = 7; then
5649 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5650 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5651 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652else
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5654$as_echo "not Android" >&6; }
5655fi
5656rm -f conftest.c conftest.out
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658# Check for unsupported systems
5659case $ac_sys_system/$ac_sys_release in
5660atheos*|Linux*/1*)
5661 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5662 echo See README for details.
5663 exit 1;;
5664esac
5665
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5668$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669
5670# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005671if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 withval=$with_suffix;
5673 case $withval in
5674 no) EXEEXT=;;
5675 yes) EXEEXT=.exe;;
5676 *) EXEEXT=$withval;;
5677 esac
5678fi
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5681$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682
5683# Test whether we're running on a non-case-sensitive system, in which
5684# case we give a warning if no ext is given
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5687$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688if test ! -d CaseSensitiveTestDir; then
5689mkdir CaseSensitiveTestDir
5690fi
5691
5692if test -d casesensitivetestdir
5693then
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5695$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 BUILDEXEEXT=.exe
5697else
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 BUILDEXEEXT=$EXEEXT
5701fi
5702rmdir CaseSensitiveTestDir
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704case $ac_sys_system in
5705hp*|HP*)
5706 case $CC in
5707 cc|*/cc) CC="$CC -Ae";;
5708 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709esac
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5713$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714if test -z "$LIBRARY"
5715then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005716 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5719$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# LDLIBRARY is the name of the library to link against (as opposed to the
5722# name of the library into which to insert object files). BLDLIBRARY is also
5723# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5724# is blank as the main program is not linked directly against LDLIBRARY.
5725# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5726# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5727# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5728# DLLLIBRARY is the shared (i.e., DLL) library.
5729#
5730# RUNSHARED is used to run shared python without installed libraries
5731#
5732# INSTSONAME is the name of the shared library that will be use to install
5733# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005734#
5735# LDVERSION is the shared library version number, normally the Python version
5736# with the ABI build flags appended.
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740
5741
5742
5743
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745LDLIBRARY="$LIBRARY"
5746BLDLIBRARY='$(LDLIBRARY)'
5747INSTSONAME='$(LDLIBRARY)'
5748DLLLIBRARY=''
5749LDLIBRARYDIR=''
5750RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005751LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LINKCC is the command that links the python executable -- default is $(CC).
5754# If CXX is set, and if it is needed to link a main function that was
5755# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5756# python might then depend on the C++ runtime
5757# This is altered for AIX in order to build the export list before
5758# linking.
5759
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5761$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762if test -z "$LINKCC"
5763then
5764 LINKCC='$(PURIFY) $(MAINCC)'
5765 case $ac_sys_system in
5766 AIX*)
5767 exp_extra="\"\""
5768 if test $ac_sys_release -ge 5 -o \
5769 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5770 exp_extra="."
5771 fi
5772 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 QNX*)
5774 # qcc must be used because the other compilers do not
5775 # support -N.
5776 LINKCC=qcc;;
5777 esac
5778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5780$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5783# make sure we default having it set to "no": this is used by
5784# distutils.unixccompiler to know if it should add --enable-new-dtags
5785# to linker command lines, and failing to detect GNU ld simply results
5786# in the same bahaviour as before.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5789$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790ac_prog=ld
5791if test "$GCC" = yes; then
5792 ac_prog=`$CC -print-prog-name=ld`
5793fi
5794case `"$ac_prog" -V 2>&1 < /dev/null` in
5795 *GNU*)
5796 GNULD=yes;;
5797 *)
5798 GNULD=no;;
5799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5801$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5804$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 enableval=$enable_shared;
5808fi
5809
5810
5811if test -z "$enable_shared"
5812then
5813 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005814 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 enable_shared="yes";;
5816 *)
5817 enable_shared="no";;
5818 esac
5819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5821$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5824$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005826if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005827 enableval=$enable_profiling;
5828fi
5829
5830if test "x$enable_profiling" = xyes; then
5831 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005832 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834/* end confdefs.h. */
5835int main() { return 0; }
5836_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837if ac_fn_c_try_link "$LINENO"; then :
5838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842rm -f core conftest.err conftest.$ac_objext \
5843 conftest$ac_exeext conftest.$ac_ext
5844 CC="$ac_save_cc"
5845else
5846 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5849$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851if test "x$enable_profiling" = xyes; then
5852 BASECFLAGS="-pg $BASECFLAGS"
5853 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5857$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
5859# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5860# library that we build, but we do not want to link against it (we
5861# will find it with a -framework option). For this reason there is an
5862# extra variable BLDLIBRARY against which Python and the extension
5863# modules are linked, BLDLIBRARY. This is normally the same as
5864# LDLIBRARY, but empty for MacOSX framework builds.
5865if test "$enable_framework"
5866then
5867 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005868 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 BLDLIBRARY=''
5870else
5871 BLDLIBRARY='$(LDLIBRARY)'
5872fi
5873
5874# Other platforms follow
5875if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005876 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877
Matthias Kloseb9621712010-04-24 17:59:49 +00005878$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
5880 case $ac_sys_system in
5881 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005882 LDLIBRARY='libpython$(LDVERSION).dll.a'
5883 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
5885 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).so'
5887 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005888 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005890 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005891 then
5892 PY3LIBRARY=libpython3.so
5893 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005895 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).so'
5897 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005898 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005900 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005901 then
5902 PY3LIBRARY=libpython3.so
5903 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 hp*|HP*)
5906 case `uname -m` in
5907 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
5910 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).dylib'
5919 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005920 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005922 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005925 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
5927 esac
5928else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005929 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 case $ac_sys_system in
5931 CYGWIN*)
5932 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005933 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 esac
5936fi
5937
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005938if test "$cross_compiling" = yes; then
5939 RUNSHARED=
5940fi
5941
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5943$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005946if test -n "$ac_tool_prefix"; then
5947 for ac_prog in ar aal
5948 do
5949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005953if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
5956 if test -n "$AR"; then
5957 ac_cv_prog_AR="$AR" # Let the user override the test.
5958else
5959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5960for as_dir in $PATH
5961do
5962 IFS=$as_save_IFS
5963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005966 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 break 2
5969 fi
5970done
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972IFS=$as_save_IFS
5973
5974fi
5975fi
5976AR=$ac_cv_prog_AR
5977if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5979$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983fi
5984
5985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005986 test -n "$AR" && break
5987 done
5988fi
5989if test -z "$AR"; then
5990 ac_ct_AR=$AR
5991 for ac_prog in ar aal
5992do
5993 # Extract the first word of "$ac_prog", so it can be a program name with args.
5994set dummy $ac_prog; ac_word=$2
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
5997if ${ac_cv_prog_ac_ct_AR+:} false; then :
5998 $as_echo_n "(cached) " >&6
5999else
6000 if test -n "$ac_ct_AR"; then
6001 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6002else
6003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
6007 test -z "$as_dir" && as_dir=.
6008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 ac_cv_prog_ac_ct_AR="$ac_prog"
6011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012 break 2
6013 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006015 done
6016IFS=$as_save_IFS
6017
6018fi
6019fi
6020ac_ct_AR=$ac_cv_prog_ac_ct_AR
6021if test -n "$ac_ct_AR"; then
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6023$as_echo "$ac_ct_AR" >&6; }
6024else
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
6027fi
6028
6029
6030 test -n "$ac_ct_AR" && break
6031done
6032
6033 if test "x$ac_ct_AR" = x; then
6034 AR="ar"
6035 else
6036 case $cross_compiling:$ac_tool_warned in
6037yes:)
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6040ac_tool_warned=yes ;;
6041esac
6042 AR=$ac_ct_AR
6043 fi
6044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045
6046
6047# tweak ARFLAGS only if the user didn't set it on the command line
6048
6049if test -z "$ARFLAGS"
6050then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006051 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
6053
doko@ubuntu.com58844492012-06-30 18:25:32 +02006054if test -n "$ac_tool_prefix"; then
6055 for ac_prog in readelf
6056 do
6057 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6058set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_prog_READELF+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063else
6064 if test -n "$READELF"; then
6065 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
6072 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006074 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076 break 2
6077 fi
6078done
6079 done
6080IFS=$as_save_IFS
6081
6082fi
6083fi
6084READELF=$ac_cv_prog_READELF
6085if test -n "$READELF"; then
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6087$as_echo "$READELF" >&6; }
6088else
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094 test -n "$READELF" && break
6095 done
6096fi
6097if test -z "$READELF"; then
6098 ac_ct_READELF=$READELF
6099 for ac_prog in readelf
6100do
6101 # Extract the first word of "$ac_prog", so it can be a program name with args.
6102set dummy $ac_prog; ac_word=$2
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 if test -n "$ac_ct_READELF"; then
6109 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006118 ac_cv_prog_ac_ct_READELF="$ac_prog"
6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120 break 2
6121 fi
6122done
6123 done
6124IFS=$as_save_IFS
6125
6126fi
6127fi
6128ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6129if test -n "$ac_ct_READELF"; then
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6131$as_echo "$ac_ct_READELF" >&6; }
6132else
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138 test -n "$ac_ct_READELF" && break
6139done
6140
6141 if test "x$ac_ct_READELF" = x; then
6142 READELF=":"
6143 else
6144 case $cross_compiling:$ac_tool_warned in
6145yes:)
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6148ac_tool_warned=yes ;;
6149esac
6150 READELF=$ac_ct_READELF
6151 fi
6152fi
6153
6154if test "$cross_compiling" = yes; then
6155 case "$READELF" in
6156 readelf|:)
6157 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6158 ;;
6159 esac
6160fi
6161
6162
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006165hp*|HP*)
6166 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167 if test -z "$INSTALL"
6168 then
6169 INSTALL="${srcdir}/install-sh -c"
6170 fi
6171esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172# Find a good install program. We prefer a C program (faster),
6173# so one script is as good as another. But avoid the broken or
6174# incompatible versions:
6175# SysV /etc/install, /usr/sbin/install
6176# SunOS /usr/etc/install
6177# IRIX /sbin/install
6178# AIX /bin/install
6179# AmigaOS /C/install, which installs bootblocks on floppy discs
6180# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6181# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6182# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6183# OS/2's system install, which has a completely different semantic
6184# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185# Reject install programs that cannot install multiple files.
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6187$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006189if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191else
6192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195 IFS=$as_save_IFS
6196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 # Account for people who put trailing slashes in PATH elements.
6198case $as_dir/ in #((
6199 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 /usr/ucb/* ) ;;
6203 *)
6204 # OSF1 and SCO ODT 3.0 have their own names for install.
6205 # Don't use installbsd from OSF since it installs stuff as root
6206 # by default.
6207 for ac_prog in ginstall scoinst install; do
6208 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006209 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210 if test $ac_prog = install &&
6211 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6212 # AIX install. It has an incompatible calling convention.
6213 :
6214 elif test $ac_prog = install &&
6215 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6216 # program-specific install script used by HP pwplus--don't use.
6217 :
6218 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 rm -rf conftest.one conftest.two conftest.dir
6220 echo one > conftest.one
6221 echo two > conftest.two
6222 mkdir conftest.dir
6223 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6224 test -s conftest.one && test -s conftest.two &&
6225 test -s conftest.dir/conftest.one &&
6226 test -s conftest.dir/conftest.two
6227 then
6228 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6229 break 3
6230 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 fi
6232 fi
6233 done
6234 done
6235 ;;
6236esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006237
6238 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239IFS=$as_save_IFS
6240
Matthias Kloseb9621712010-04-24 17:59:49 +00006241rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242
6243fi
6244 if test "${ac_cv_path_install+set}" = set; then
6245 INSTALL=$ac_cv_path_install
6246 else
6247 # As a last resort, use the slow shell script. Don't cache a
6248 # value for INSTALL within a source directory, because that will
6249 # break other packages using the cache if that directory is
6250 # removed, or if the value is a relative name.
6251 INSTALL=$ac_install_sh
6252 fi
6253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6255$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256
6257# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6258# It thinks the first close brace ends the variable substitution.
6259test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6260
6261test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6262
6263test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6264
Matthias Klose93a0ef12012-03-15 18:08:34 +01006265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6266$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6267if test -z "$MKDIR_P"; then
6268 if ${ac_cv_path_mkdir+:} false; then :
6269 $as_echo_n "(cached) " >&6
6270else
6271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6273do
6274 IFS=$as_save_IFS
6275 test -z "$as_dir" && as_dir=.
6276 for ac_prog in mkdir gmkdir; do
6277 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006278 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006279 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6280 'mkdir (GNU coreutils) '* | \
6281 'mkdir (coreutils) '* | \
6282 'mkdir (fileutils) '4.1*)
6283 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6284 break 3;;
6285 esac
6286 done
6287 done
6288 done
6289IFS=$as_save_IFS
6290
6291fi
6292
6293 test -d ./--version && rmdir ./--version
6294 if test "${ac_cv_path_mkdir+set}" = set; then
6295 MKDIR_P="$ac_cv_path_mkdir -p"
6296 else
6297 # As a last resort, use the slow shell script. Don't cache a
6298 # value for MKDIR_P within a source directory, because that will
6299 # break other packages using the cache if that directory is
6300 # removed, or if the value is a relative name.
6301 MKDIR_P="$ac_install_sh -d"
6302 fi
6303fi
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6305$as_echo "$MKDIR_P" >&6; }
6306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307
6308# Not every filesystem supports hard links
6309
6310if test -z "$LN" ; then
6311 case $ac_sys_system in
6312 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 *) LN=ln;;
6314 esac
6315fi
6316
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006317# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006318
6319ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6323$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
6325# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006326if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 withval=$with_pydebug;
6328if test "$withval" != no
6329then
6330
Matthias Kloseb9621712010-04-24 17:59:49 +00006331$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6334$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006336 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006337else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339fi
6340else
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343fi
6344
6345
Victor Stinnerf4e47032019-04-25 00:56:28 +02006346# Check for --with-trace-refs
6347# --with-trace-refs
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6349$as_echo_n "checking for --with-trace-refs... " >&6; }
6350
6351# Check whether --with-trace-refs was given.
6352if test "${with_trace_refs+set}" = set; then :
6353 withval=$with_trace_refs;
6354else
6355 with_trace_refs=no
6356fi
6357
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6359$as_echo "$with_trace_refs" >&6; }
6360
6361if test "$with_trace_refs" = "yes"
6362then
6363
6364$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6365
6366fi
6367
6368# Check for --with-assertions.
6369# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006370assertions='false'
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6372$as_echo_n "checking for --with-assertions... " >&6; }
6373
6374# Check whether --with-assertions was given.
6375if test "${with_assertions+set}" = set; then :
6376 withval=$with_assertions;
6377if test "$withval" != no
6378then
6379 assertions='true'
6380fi
6381fi
6382
6383if test "$assertions" = 'true'; then
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6385$as_echo "yes" >&6; }
6386elif test "$Py_DEBUG" = 'true'; then
6387 assertions='true'
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6389$as_echo "implied by --with-pydebug" >&6; }
6390else
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
Brett Cannon63d98bc2016-09-06 17:12:40 -07006395# Enable optimization flags
6396
6397
6398Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6400$as_echo_n "checking for --enable-optimizations... " >&6; }
6401# Check whether --enable-optimizations was given.
6402if test "${enable_optimizations+set}" = set; then :
6403 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006404if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006405then
6406 Py_OPT='true'
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6408$as_echo "yes" >&6; };
6409else
6410 Py_OPT='false'
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; };
6413fi
6414else
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
6417fi
6418
6419if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006420 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6421 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006422 # 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 +00006423 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006424 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006425 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006426 DEF_MAKE_RULE="build_all"
6427else
6428 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006429 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006430 DEF_MAKE_RULE="all"
6431fi
6432
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006433
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6435$as_echo_n "checking PROFILE_TASK... " >&6; }
6436if test -z "$PROFILE_TASK"
6437then
6438 PROFILE_TASK='-m test --pgo'
6439fi
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6441$as_echo "$PROFILE_TASK" >&6; }
6442
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006443# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6444# normal names in the default $PATH (ie: Ubuntu). They exist under the
6445# non-suffixed name in their versioned llvm directory.
6446
6447llvm_bin_dir=''
6448llvm_path="${PATH}"
6449if test "${CC}" = "clang"
6450then
6451 clang_bin=`which clang`
6452 # Some systems install clang elsewhere as a symlink to the real path
6453 # which is where the related llvm tools are located.
6454 if test -L "${clang_bin}"
6455 then
6456 clang_dir=`dirname "${clang_bin}"`
6457 clang_bin=`readlink "${clang_bin}"`
6458 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6459 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6460 fi
6461fi
6462
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006463# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6465$as_echo_n "checking for --with-lto... " >&6; }
6466
6467# Check whether --with-lto was given.
6468if test "${with_lto+set}" = set; then :
6469 withval=$with_lto;
6470if test "$withval" != no
6471then
6472 Py_LTO='true'
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6474$as_echo "yes" >&6; };
6475else
6476 Py_LTO='false'
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478$as_echo "no" >&6; };
6479fi
6480else
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485if test "$Py_LTO" = 'true' ; then
6486 case $CC in
6487 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006488
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006490$as_echo_n "checking target system type... " >&6; }
6491if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006492 $as_echo_n "(cached) " >&6
6493else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006494 if test "x$target_alias" = x; then
6495 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006496else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6498 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6499fi
6500
6501fi
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6503$as_echo "$ac_cv_target" >&6; }
6504case $ac_cv_target in
6505*-*-*) ;;
6506*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6507esac
6508target=$ac_cv_target
6509ac_save_IFS=$IFS; IFS='-'
6510set x $ac_cv_target
6511shift
6512target_cpu=$1
6513target_vendor=$2
6514shift; shift
6515# Remember, the first character of IFS is used to create $*,
6516# except with old shells:
6517target_os=$*
6518IFS=$ac_save_IFS
6519case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6520
6521
6522# The aliases save the names the user supplied, while $host etc.
6523# will get canonicalized.
6524test -n "$target_alias" &&
6525 test "$program_prefix$program_suffix$program_transform_name" = \
6526 NONENONEs,x,x, &&
6527 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006528# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6529set dummy $target_alias-llvm-ar; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_LLVM_AR+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534else
6535 case $LLVM_AR in
6536 [\\/]* | ?:[\\/]*)
6537 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6538 ;;
6539 *)
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in ${llvm_path}
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551done
6552 done
6553IFS=$as_save_IFS
6554
6555 ;;
6556esac
6557fi
6558LLVM_AR=$ac_cv_path_LLVM_AR
6559if test -n "$LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6561$as_echo "$LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567
6568if test -z "$ac_cv_path_LLVM_AR"; then
6569 if test "$build" = "$target"; then
6570 ac_pt_LLVM_AR=$LLVM_AR
6571 # Extract the first word of "llvm-ar", so it can be a program name with args.
6572set dummy llvm-ar; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6576 $as_echo_n "(cached) " >&6
6577else
6578 case $ac_pt_LLVM_AR in
6579 [\\/]* | ?:[\\/]*)
6580 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6581 ;;
6582 *)
6583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in ${llvm_path}
6585do
6586 IFS=$as_save_IFS
6587 test -z "$as_dir" && as_dir=.
6588 for ac_exec_ext in '' $ac_executable_extensions; do
6589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592 break 2
6593 fi
6594done
6595 done
6596IFS=$as_save_IFS
6597
6598 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6599 ;;
6600esac
6601fi
6602ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6603if test -n "$ac_pt_LLVM_AR"; then
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6605$as_echo "$ac_pt_LLVM_AR" >&6; }
6606else
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610
6611 LLVM_AR=$ac_pt_LLVM_AR
6612 else
6613 LLVM_AR="''"
6614 fi
6615else
6616 LLVM_AR="$ac_cv_path_LLVM_AR"
6617fi
6618
6619
6620 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6621 then
6622 LLVM_AR_FOUND="found"
6623 else
6624 LLVM_AR_FOUND="not-found"
6625 fi
6626 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6627 then
6628 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6629 if test -n "${found_llvm_ar}"
6630 then
6631 LLVM_AR='/usr/bin/xcrun llvm-ar'
6632 LLVM_AR_FOUND=found
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6634$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6635 fi
6636 fi
6637 if test $LLVM_AR_FOUND = not-found
6638 then
6639 LLVM_PROFR_ERR=yes
6640 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6641 else
6642 LLVM_AR_ERR=no
6643 fi
6644 AR="${LLVM_AR}"
6645 case $ac_sys_system in
6646 Darwin*)
6647 # Any changes made here should be reflected in the GCC+Darwin case below
6648 LTOFLAGS="-flto -Wl,-export_dynamic"
6649 ;;
6650 *)
6651 LTOFLAGS="-flto"
6652 ;;
6653 esac
6654 ;;
6655 *gcc*)
6656 case $ac_sys_system in
6657 Darwin*)
6658 LTOFLAGS="-flto -Wl,-export_dynamic"
6659 ;;
6660 *)
6661 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6662 ;;
6663 esac
6664 ;;
6665 esac
6666
6667 if test "$ac_cv_prog_cc_g" = "yes"
6668 then
6669 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6670 # to get debug symbols.
6671 LTOFLAGS="$LTOFLAGS -g"
6672 fi
6673
stratakisf92c7aa2018-12-04 15:54:01 +01006674 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006675 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006676fi
6677
6678# Enable PGO flags.
6679
6680
6681
6682
6683
6684
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6686set dummy $target_alias-llvm-profdata; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6690 $as_echo_n "(cached) " >&6
6691else
6692 case $LLVM_PROFDATA in
6693 [\\/]* | ?:[\\/]*)
6694 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6695 ;;
6696 *)
6697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699do
6700 IFS=$as_save_IFS
6701 test -z "$as_dir" && as_dir=.
6702 for ac_exec_ext in '' $ac_executable_extensions; do
6703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006704 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706 break 2
6707 fi
6708done
6709 done
6710IFS=$as_save_IFS
6711
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ;;
6713esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006714fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6716if test -n "$LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6718$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
Gregory P. Smith799520c2016-09-07 16:10:00 -07006725if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6726 if test "$build" = "$target"; then
6727 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6728 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6729set dummy llvm-profdata; ac_word=$2
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731$as_echo_n "checking for $ac_word... " >&6; }
6732if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6733 $as_echo_n "(cached) " >&6
6734else
6735 case $ac_pt_LLVM_PROFDATA in
6736 [\\/]* | ?:[\\/]*)
6737 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6738 ;;
6739 *)
6740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in ${llvm_path}
6742do
6743 IFS=$as_save_IFS
6744 test -z "$as_dir" && as_dir=.
6745 for ac_exec_ext in '' $ac_executable_extensions; do
6746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749 break 2
6750 fi
6751done
6752 done
6753IFS=$as_save_IFS
6754
6755 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6756 ;;
6757esac
6758fi
6759ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6760if test -n "$ac_pt_LLVM_PROFDATA"; then
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6762$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6763else
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6765$as_echo "no" >&6; }
6766fi
6767
6768 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6769 else
6770 LLVM_PROFDATA="''"
6771 fi
6772else
6773 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6774fi
6775
6776
6777if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6778then
6779 LLVM_PROF_FOUND="found"
6780else
6781 LLVM_PROF_FOUND="not-found"
6782fi
6783if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6784then
6785 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6786 if test -n "${found_llvm_profdata}"
6787 then
6788 # llvm-profdata isn't directly in $PATH in some cases.
6789 # https://apple.stackexchange.com/questions/197053/
6790 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6791 LLVM_PROF_FOUND=found
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6793$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6794 fi
6795fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796LLVM_PROF_ERR=no
6797case $CC in
6798 *clang*)
6799 # Any changes made here should be reflected in the GCC+Darwin case below
6800 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6804 if test $LLVM_PROF_FOUND = not-found
6805 then
6806 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 if test "${REQUIRE_PGO}" = "yes"
6808 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006809 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 -07006810 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 fi
6812 ;;
6813 *gcc*)
6814 case $ac_sys_system in
6815 Darwin*)
6816 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6817 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006818 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 then
6822 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006823 if test "${REQUIRE_PGO}" = "yes"
6824 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006825 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 -07006826 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827 fi
6828 ;;
6829 *)
6830 PGO_PROF_GEN_FLAG="-fprofile-generate"
6831 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6832 LLVM_PROF_MERGER="true"
6833 LLVM_PROF_FILE=""
6834 ;;
6835 esac
6836 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006837 *icc*)
6838 PGO_PROF_GEN_FLAG="-prof-gen"
6839 PGO_PROF_USE_FLAG="-prof-use"
6840 LLVM_PROF_MERGER="true"
6841 LLVM_PROF_FILE=""
6842 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006843esac
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6846# merged with this chunk of code?
6847
6848# Optimizer/debugger flags
6849# ------------------------
6850# (The following bit of code is complicated enough - please keep things
6851# indented properly. Just pretend you're editing Python code. ;-)
6852
6853# There are two parallel sets of case statements below, one that checks to
6854# see if OPT was set and one that does BASECFLAGS setting based upon
6855# compiler and platform. BASECFLAGS tweaks need to be made even if the
6856# user set OPT.
6857
Victor Stinner23a683a2019-04-12 21:27:37 +02006858case $CC in
6859 *clang*)
6860 cc_is_clang=1
6861 ;;
6862 *)
6863 if $CC --version 2>&1 | grep -q clang
6864 then
6865 cc_is_clang=1
6866 else
6867 cc_is_clang=
6868 fi
6869esac
6870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871# tweak OPT based on compiler and platform, only if the user didn't set
6872# it on the command line
6873
Victor Stinner9ed34a82017-05-02 22:35:58 +02006874
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006875if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876then
6877 case $GCC in
6878 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6880 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6881 WRAP="-fwrapv"
6882 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006883
Victor Stinner35f3d242017-04-21 12:35:24 +02006884 if test -n "${cc_is_clang}"
6885 then
6886 # Clang also needs -fwrapv
6887 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006888 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6889 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006890 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006891 fi
6892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 case $ac_cv_prog_cc_g in
6894 yes)
6895 if test "$Py_DEBUG" = 'true' ; then
6896 # Optimization messes up debuggers, so turn it off for
6897 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006898 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006899 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006900 else
Victor Stinner28205b22017-04-21 11:24:34 +02006901 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006902 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 else
Victor Stinner28205b22017-04-21 11:24:34 +02006904 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905 fi
6906 ;;
6907 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006908 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 ;;
6910 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912 case $ac_sys_system in
6913 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6914 ;;
6915 esac
6916 ;;
6917
6918 *)
6919 OPT="-O"
6920 ;;
6921 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
6923
6924
6925
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006926
stratakiscf10a752018-12-19 18:19:01 +01006927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928# The -arch flags for universal builds on OSX
6929UNIVERSAL_ARCH_FLAGS=
6930
6931
6932# tweak BASECFLAGS based on compiler and platform
6933case $GCC in
6934yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006935 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006936
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6938$as_echo_n "checking for -Wextra... " >&6; }
6939 ac_save_cc="$CC"
6940 CC="$CC -Wextra -Werror"
6941 if ${ac_cv_extra_warnings+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h. */
6946
6947
6948int
6949main ()
6950{
6951
6952 ;
6953 return 0;
6954}
6955
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"; then :
6958
6959 ac_cv_extra_warnings=yes
6960
6961else
6962
6963 ac_cv_extra_warnings=no
6964
6965fi
6966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967fi
6968
6969 CC="$ac_save_cc"
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6971$as_echo "$ac_cv_extra_warnings" >&6; }
6972
6973 if test $ac_cv_extra_warnings = yes
6974 then
6975 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6976 fi
6977
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978 # Python doesn't violate C99 aliasing rules, but older versions of
6979 # GCC produce warnings for legal Python code. Enable
6980 # -fno-strict-aliasing on versions of GCC that support but produce
6981 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6983$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 ac_save_cc="$CC"
6985 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006987 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006992
Matthias Kloseb159a552010-04-25 21:00:44 +00006993
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006994int
6995main ()
6996{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006997
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998 ;
6999 return 0;
7000}
Matthias Kloseb159a552010-04-25 21:00:44 +00007001
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007003if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
7005 CC="$ac_save_cc -fstrict-aliasing"
7006 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008/* end confdefs.h. */
7009
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007010 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011int
7012main ()
7013{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007014double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015 ;
7016 return 0;
7017}
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007020if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007021
7022 ac_cv_no_strict_aliasing=no
7023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024else
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=yes
7027
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007028fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031else
Matthias Kloseb159a552010-04-25 21:00:44 +00007032
7033 ac_cv_no_strict_aliasing=no
7034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007037fi
7038
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007039 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007040 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7042$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044 then
7045 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7046 fi
7047
Zachary Ware5af85642015-12-21 12:09:17 -06007048 # ICC doesn't recognize the option, but only emits a warning
7049 ## XXX does it emit an unused result warning and can it be disabled?
7050 case "$CC" in
7051 *icc*)
7052 ac_cv_disable_unused_result_warning=no
7053 ;;
7054 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7056$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7057 ac_save_cc="$CC"
7058 CC="$CC -Wunused-result -Werror"
7059 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007060 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007061 $as_echo_n "(cached) " >&6
7062else
7063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7064/* end confdefs.h. */
7065
7066
7067int
7068main ()
7069{
7070
7071 ;
7072 return 0;
7073}
7074
7075_ACEOF
7076if ac_fn_c_try_compile "$LINENO"; then :
7077
7078 ac_cv_disable_unused_result_warning=yes
7079
7080else
7081
7082 ac_cv_disable_unused_result_warning=no
7083
7084fi
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086fi
7087
7088 CFLAGS="$save_CFLAGS"
7089 CC="$ac_save_cc"
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7091$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007092 ;;
7093 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007094
7095 if test $ac_cv_disable_unused_result_warning = yes
7096 then
7097 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007098 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7099 fi
7100
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7102$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7103 ac_save_cc="$CC"
7104 CC="$CC -Wunused-parameter -Werror"
7105 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7106 $as_echo_n "(cached) " >&6
7107else
7108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7109/* end confdefs.h. */
7110
7111
7112int
7113main ()
7114{
7115
7116 ;
7117 return 0;
7118}
7119
7120_ACEOF
7121if ac_fn_c_try_compile "$LINENO"; then :
7122
7123 ac_cv_disable_unused_parameter_warning=yes
7124
7125else
7126
7127 ac_cv_disable_unused_parameter_warning=no
7128
7129fi
7130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7131fi
7132
7133 CC="$ac_save_cc"
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7135$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7136
7137 if test $ac_cv_disable_unused_parameter_warning = yes
7138 then
7139 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7140 fi
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7143$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7144 ac_save_cc="$CC"
7145 CC="$CC -Wmissing-field-initializers -Werror"
7146 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7147 $as_echo_n "(cached) " >&6
7148else
7149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150/* end confdefs.h. */
7151
7152
7153int
7154main ()
7155{
7156
7157 ;
7158 return 0;
7159}
7160
7161_ACEOF
7162if ac_fn_c_try_compile "$LINENO"; then :
7163
7164 ac_cv_disable_missing_field_initializers=yes
7165
7166else
7167
7168 ac_cv_disable_missing_field_initializers=no
7169
7170fi
7171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7172fi
7173
7174 CC="$ac_save_cc"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7176$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7177
7178 if test $ac_cv_disable_missing_field_initializers = yes
7179 then
7180 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007181 fi
7182
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7184$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7185 ac_save_cc="$CC"
7186 CC="$CC -Wsign-compare"
7187 save_CFLAGS="$CFLAGS"
7188 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7189 $as_echo_n "(cached) " >&6
7190else
7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h. */
7193
7194
7195int
7196main ()
7197{
7198
7199 ;
7200 return 0;
7201}
7202
7203_ACEOF
7204if ac_fn_c_try_compile "$LINENO"; then :
7205
7206 ac_cv_enable_sign_compare_warning=yes
7207
7208else
7209
7210 ac_cv_enable_sign_compare_warning=no
7211
7212fi
7213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214fi
7215
7216 CFLAGS="$save_CFLAGS"
7217 CC="$ac_save_cc"
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7219$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7220
7221 if test $ac_cv_enable_sign_compare_warning = yes
7222 then
7223 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7224 fi
7225
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7227$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7228 ac_save_cc="$CC"
7229 CC="$CC -Wunreachable-code"
7230 save_CFLAGS="$CFLAGS"
7231 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7232 $as_echo_n "(cached) " >&6
7233else
7234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7235/* end confdefs.h. */
7236
7237
7238int
7239main ()
7240{
7241
7242 ;
7243 return 0;
7244}
7245
7246_ACEOF
7247if ac_fn_c_try_compile "$LINENO"; then :
7248
7249 ac_cv_enable_unreachable_code_warning=yes
7250
7251else
7252
7253 ac_cv_enable_unreachable_code_warning=no
7254
7255fi
7256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7257fi
7258
7259 CFLAGS="$save_CFLAGS"
7260 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007261
7262 # Don't enable unreachable code warning in debug mode, since it usually
7263 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007264 # Issue #24324: Unfortunately, the unreachable code warning does not work
7265 # correctly on gcc and has been silently removed from the compiler.
7266 # It is supported on clang but on OS X systems gcc may be an alias
7267 # for clang. Try to determine if the compiler is not really gcc and,
7268 # if so, only then enable the warning.
7269 if test $ac_cv_enable_unreachable_code_warning = yes && \
7270 test "$Py_DEBUG" != "true" && \
7271 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007272 then
7273 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007274 else
7275 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7278$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007279
INADA Naokie3364842018-06-05 20:40:53 +09007280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7281$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7282 ac_save_cc="$CC"
7283 CC="$CC -Werror -Wstrict-prototypes"
7284 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7285 $as_echo_n "(cached) " >&6
7286else
7287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7288/* end confdefs.h. */
7289
7290
7291int
7292main ()
7293{
7294
7295 ;
7296 return 0;
7297}
7298
7299_ACEOF
7300if ac_fn_c_try_compile "$LINENO"; then :
7301
7302 ac_cv_enable_strict_prototypes_warning=yes
7303
7304else
7305
7306 ac_cv_enable_strict_prototypes_warning=no
7307
7308fi
7309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310fi
7311
7312 CC="$ac_save_cc"
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7314$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7315
7316 if test $ac_cv_enable_strict_prototypes_warning = yes
7317 then
7318 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7319 fi
7320
Victor Stinner193ee0a2017-02-06 14:24:00 +01007321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7322$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7323 ac_save_cc="$CC"
7324 CC="$CC -Werror=implicit-function-declaration"
7325 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7326 $as_echo_n "(cached) " >&6
7327else
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329/* end confdefs.h. */
7330
7331
7332int
7333main ()
7334{
7335
7336 ;
7337 return 0;
7338}
7339
7340_ACEOF
7341if ac_fn_c_try_compile "$LINENO"; then :
7342
7343 ac_cv_enable_implicit_function_declaration_error=yes
7344
7345else
7346
7347 ac_cv_enable_implicit_function_declaration_error=no
7348
7349fi
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351fi
7352
7353 CC="$ac_save_cc"
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7355$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7356
7357 if test $ac_cv_enable_implicit_function_declaration_error = yes
7358 then
7359 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7360 fi
7361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7363 # support. Without this, treatment of subnormals doesn't follow
7364 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007365 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 alpha*)
7367 BASECFLAGS="$BASECFLAGS -mieee"
7368 ;;
7369 esac
7370
7371 case $ac_sys_system in
7372 SCO_SV*)
7373 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7374 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007375
Ned Deily87adb6e2013-10-18 21:09:56 -07007376 Darwin*)
7377 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7378 # used to be here, but non-Apple gcc doesn't accept them.
7379 if test "${CC}" = gcc
7380 then
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007382$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007383 case "${UNIVERSALSDK}" in
7384 */MacOSX10.4u.sdk)
7385 # Build using 10.4 SDK, force usage of gcc when the
7386 # compiler is gcc, otherwise the user will get very
7387 # confusing error messages when building on OSX 10.6
7388 CC=gcc-4.0
7389 CPP=cpp-4.0
7390 ;;
7391 esac
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007393$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007394 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395
Ned Deily87adb6e2013-10-18 21:09:56 -07007396 if test "${enable_universalsdk}"
7397 then
7398 case "$UNIVERSAL_ARCHS" in
7399 32-bit)
7400 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7401 LIPO_32BIT_FLAGS=""
7402 ARCH_RUN_32BIT=""
7403 ;;
7404 64-bit)
7405 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7406 LIPO_32BIT_FLAGS=""
7407 ARCH_RUN_32BIT="true"
7408 ;;
7409 all)
7410 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7411 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7412 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7413 ;;
7414 intel)
7415 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7416 LIPO_32BIT_FLAGS="-extract i386"
7417 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7418 ;;
7419 intel-32)
7420 UNIVERSAL_ARCH_FLAGS="-arch i386"
7421 LIPO_32BIT_FLAGS=""
7422 ARCH_RUN_32BIT=""
7423 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007424 intel-64)
7425 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7426 LIPO_32BIT_FLAGS=""
7427 ARCH_RUN_32BIT="true"
7428 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 3-way)
7430 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7431 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7432 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7433 ;;
7434 *)
7435 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7436 ;;
7437 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438
Ned Deily87adb6e2013-10-18 21:09:56 -07007439 if test "${UNIVERSALSDK}" != "/"
7440 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007441 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7442 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007444 else
7445 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7446 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 fi
7448 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 # Calculate an appropriate deployment target for this build:
7451 # The deployment target value is used explicitly to enable certain
7452 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007453 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007454 # component of the string returned by distutils.get_platform().
7455 #
7456 # Use the value from:
7457 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7458 # 2. the operating system version of the build machine if >= 10.6
7459 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7460 # below to pick either 10.3, 10.4, or 10.5 as the target.
7461 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462
Ned Deily87adb6e2013-10-18 21:09:56 -07007463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7464$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007465 cur_target_major=`sw_vers -productVersion | \
7466 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7467 cur_target_minor=`sw_vers -productVersion | \
7468 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7469 cur_target="${cur_target_major}.${cur_target_minor}"
7470 if test ${cur_target_major} -eq 10 && \
7471 test ${cur_target_minor} -ge 3 && \
7472 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007473 then
Ned Deily36820b62014-06-25 13:44:22 -07007474 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007475 cur_target=10.3
7476 if test ${enable_universalsdk}
7477 then
7478 case "$UNIVERSAL_ARCHS" in
7479 all|3-way|intel|64-bit)
7480 # These configurations were first supported in 10.5
7481 cur_target='10.5'
7482 ;;
7483 esac
7484 else
7485 if test `/usr/bin/arch` = "i386"
7486 then
7487 # 10.4 was the first release to support Intel archs
7488 cur_target="10.4"
7489 fi
7490 fi
7491 fi
7492 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007493
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7495 # environment with a value that is the same as what we'll use
7496 # in the Makefile to ensure that we'll get the same compiler
7497 # environment during configure and build time.
7498 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7499 export MACOSX_DEPLOYMENT_TARGET
7500 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7502$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007503
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 # end of Darwin* tests
7505 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506 esac
7507 ;;
7508
7509*)
7510 case $ac_sys_system in
7511 OpenUNIX*|UnixWare*)
7512 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7513 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514 SCO_SV*)
7515 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7516 ;;
7517 esac
7518 ;;
7519esac
7520
Zachary Ware5af85642015-12-21 12:09:17 -06007521# ICC needs -fp-model strict or floats behave badly
7522case "$CC" in
7523*icc*)
7524 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7525 ;;
7526esac
7527
T. Woutersddbfa2c2017-05-23 01:30:49 +02007528if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529 :
7530else
7531 OPT="-DNDEBUG $OPT"
7532fi
7533
7534if test "$ac_arch_flags"
7535then
7536 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7537fi
7538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539# On some compilers, pthreads are available without further options
7540# (e.g. MacOS X). On some of these systems, the compiler will not
7541# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7542# So we have to see first whether pthreads are available without
7543# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7545$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007546if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548else
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550 ac_cv_pthread_is_default=no
7551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553/* end confdefs.h. */
7554
Stefan Krah7dba5942012-11-22 22:49:11 +01007555#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556#include <pthread.h>
7557
7558void* routine(void* p){return NULL;}
7559
7560int main(){
7561 pthread_t p;
7562 if(pthread_create(&p,NULL,routine,NULL)!=0)
7563 return 1;
7564 (void)pthread_detach(p);
7565 return 0;
7566}
7567
7568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007569if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570
7571 ac_cv_pthread_is_default=yes
7572 ac_cv_kthread=no
7573 ac_cv_pthread=no
7574
7575else
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580fi
7581
7582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
7584
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7586$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587
7588
7589if test $ac_cv_pthread_is_default = yes
7590then
7591 ac_cv_kpthread=no
7592else
7593# -Kpthread, if available, provides the right #defines
7594# and linker options to make pthread_create available
7595# Some compilers won't report that they do not support -Kpthread,
7596# so we need to run a program to see whether it really made the
7597# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7599$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007600if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602else
7603 ac_save_cc="$CC"
7604CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007605if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606 ac_cv_kpthread=no
7607else
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609/* end confdefs.h. */
7610
Stefan Krah7dba5942012-11-22 22:49:11 +01007611#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612#include <pthread.h>
7613
7614void* routine(void* p){return NULL;}
7615
7616int main(){
7617 pthread_t p;
7618 if(pthread_create(&p,NULL,routine,NULL)!=0)
7619 return 1;
7620 (void)pthread_detach(p);
7621 return 0;
7622}
7623
7624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007625if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626 ac_cv_kpthread=yes
7627else
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
7633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634CC="$ac_save_cc"
7635fi
7636
Matthias Kloseb9621712010-04-24 17:59:49 +00007637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7638$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639fi
7640
7641if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7642then
7643# -Kthread, if available, provides the right #defines
7644# and linker options to make pthread_create available
7645# Some compilers won't report that they do not support -Kthread,
7646# so we need to run a program to see whether it really made the
7647# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7649$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007650if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652else
7653 ac_save_cc="$CC"
7654CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007655if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656 ac_cv_kthread=no
7657else
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659/* end confdefs.h. */
7660
Stefan Krah7dba5942012-11-22 22:49:11 +01007661#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662#include <pthread.h>
7663
7664void* routine(void* p){return NULL;}
7665
7666int main(){
7667 pthread_t p;
7668 if(pthread_create(&p,NULL,routine,NULL)!=0)
7669 return 1;
7670 (void)pthread_detach(p);
7671 return 0;
7672}
7673
7674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007675if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 ac_cv_kthread=yes
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682fi
7683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684CC="$ac_save_cc"
7685fi
7686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7688$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689fi
7690
7691if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7692then
7693# -pthread, if available, provides the right #defines
7694# and linker options to make pthread_create available
7695# Some compilers won't report that they do not support -pthread,
7696# so we need to run a program to see whether it really made the
7697# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7699$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007700if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702else
7703 ac_save_cc="$CC"
7704CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007705if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706 ac_cv_pthread=no
7707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709/* end confdefs.h. */
7710
Stefan Krah7dba5942012-11-22 22:49:11 +01007711#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712#include <pthread.h>
7713
7714void* routine(void* p){return NULL;}
7715
7716int main(){
7717 pthread_t p;
7718 if(pthread_create(&p,NULL,routine,NULL)!=0)
7719 return 1;
7720 (void)pthread_detach(p);
7721 return 0;
7722}
7723
7724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007725if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726 ac_cv_pthread=yes
7727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732fi
7733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734CC="$ac_save_cc"
7735fi
7736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7738$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739fi
7740
7741# If we have set a CC compiler flag for thread support then
7742# check if it works for CXX, too.
7743ac_cv_cxx_thread=no
7744if test ! -z "$CXX"
7745then
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7747$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748ac_save_cxx="$CXX"
7749
7750if test "$ac_cv_kpthread" = "yes"
7751then
7752 CXX="$CXX -Kpthread"
7753 ac_cv_cxx_thread=yes
7754elif test "$ac_cv_kthread" = "yes"
7755then
7756 CXX="$CXX -Kthread"
7757 ac_cv_cxx_thread=yes
7758elif test "$ac_cv_pthread" = "yes"
7759then
7760 CXX="$CXX -pthread"
7761 ac_cv_cxx_thread=yes
7762fi
7763
7764if test $ac_cv_cxx_thread = yes
7765then
7766 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7767 $CXX -c conftest.$ac_ext 2>&5
7768 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7769 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7770 then
7771 ac_cv_cxx_thread=yes
7772 else
7773 ac_cv_cxx_thread=no
7774 fi
7775 rm -fr conftest*
7776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7778$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779fi
7780CXX="$ac_save_cxx"
7781
7782
7783# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7785$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790/* end confdefs.h. */
7791#include <stdlib.h>
7792#include <stdarg.h>
7793#include <string.h>
7794#include <float.h>
7795
7796int
7797main ()
7798{
7799
7800 ;
7801 return 0;
7802}
7803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007804if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805 ac_cv_header_stdc=yes
7806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7810
7811if test $ac_cv_header_stdc = yes; then
7812 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007814/* end confdefs.h. */
7815#include <string.h>
7816
7817_ACEOF
7818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 $EGREP "memchr" >/dev/null 2>&1; then :
7820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821else
7822 ac_cv_header_stdc=no
7823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007824rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825
7826fi
7827
7828if test $ac_cv_header_stdc = yes; then
7829 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831/* end confdefs.h. */
7832#include <stdlib.h>
7833
7834_ACEOF
7835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 $EGREP "free" >/dev/null 2>&1; then :
7837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838else
7839 ac_cv_header_stdc=no
7840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007841rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842
7843fi
7844
7845if test $ac_cv_header_stdc = yes; then
7846 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848 :
7849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851/* end confdefs.h. */
7852#include <ctype.h>
7853#include <stdlib.h>
7854#if ((' ' & 0x0FF) == 0x020)
7855# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7856# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7857#else
7858# define ISLOWER(c) \
7859 (('a' <= (c) && (c) <= 'i') \
7860 || ('j' <= (c) && (c) <= 'r') \
7861 || ('s' <= (c) && (c) <= 'z'))
7862# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7863#endif
7864
7865#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7866int
7867main ()
7868{
7869 int i;
7870 for (i = 0; i < 256; i++)
7871 if (XOR (islower (i), ISLOWER (i))
7872 || toupper (i) != TOUPPER (i))
7873 return 2;
7874 return 0;
7875}
7876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007877if ac_fn_c_try_run "$LINENO"; then :
7878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879else
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884fi
7885
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886fi
7887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7889$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890if test $ac_cv_header_stdc = yes; then
7891
Matthias Kloseb9621712010-04-24 17:59:49 +00007892$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893
7894fi
7895
stratakise768c862018-01-23 16:11:24 +01007896for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007897fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007898ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007899sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007900utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007901poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007902sys/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 +01007903sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007904sys/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 +01007905sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007906sys/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 -07007907libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007908linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007909sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007910do :
7911 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7912ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007913if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007915#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007916_ACEOF
7917
7918fi
7919
Guido van Rossum627b2d71993-12-24 10:39:16 +00007920done
7921
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007922ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007923for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7926$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007927if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932#include <sys/types.h>
7933#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
7938if ((DIR *) 0)
7939return 0;
7940 ;
7941 return 0;
7942}
7943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007946else
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951eval ac_res=\$$as_ac_Header
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7953$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007954if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
7958
7959ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007962done
7963# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7964if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7966$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007967if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969else
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974/* Override any GCC internal prototype to avoid an error.
7975 Use char because int might match the return type of a GCC
7976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977#ifdef __cplusplus
7978extern "C"
7979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007980char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007981int
7982main ()
7983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ;
7986 return 0;
7987}
7988_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989for ac_lib in '' dir; do
7990 if test -z "$ac_lib"; then
7991 ac_res="none required"
7992 else
7993 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999rm -f core conftest.err conftest.$ac_objext \
8000 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008001 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004done
Victor Stinnere0be4232011-10-25 13:06:09 +02008005if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007else
8008 ac_cv_search_opendir=no
8009fi
8010rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008011LIBS=$ac_func_search_save_LIBS
8012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8014$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008016if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Michael W. Hudson54241132001-12-07 15:38:26 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8023$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008024if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008026else
8027 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031/* Override any GCC internal prototype to avoid an error.
8032 Use char because int might match the return type of a GCC
8033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034#ifdef __cplusplus
8035extern "C"
8036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008037char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ;
8043 return 0;
8044}
8045_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046for ac_lib in '' x; do
8047 if test -z "$ac_lib"; then
8048 ac_res="none required"
8049 else
8050 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008051 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008058 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061done
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064else
8065 ac_cv_search_opendir=no
8066fi
8067rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008068LIBS=$ac_func_search_save_LIBS
8069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8071$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008073if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008076fi
8077
8078fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8081$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008082if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008087#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008088int
8089main ()
8090{
8091return makedev(0, 0);
8092 ;
8093 return 0;
8094}
8095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008097 ac_cv_header_sys_types_h_makedev=yes
8098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008103
8104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8106$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107
8108if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008109ac_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 +02008110if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008111
Matthias Kloseb9621712010-04-24 17:59:49 +00008112$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008113
8114fi
8115
8116
8117
8118 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 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 +02008120if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008123
8124fi
8125
8126
8127 fi
8128fi
8129
Michael W. Hudson54241132001-12-07 15:38:26 +00008130
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008131# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8132# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8133SAVE_CFLAGS=$CFLAGS
8134CFLAGS="-std=c99 $CFLAGS"
8135for ac_header in bluetooth/bluetooth.h
8136do :
8137 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8138if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8139 cat >>confdefs.h <<_ACEOF
8140#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8141_ACEOF
8142
8143fi
8144
8145done
8146
8147CFLAGS=$SAVE_CFLAGS
8148
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008149# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8150for ac_header in net/if.h
8151do :
8152 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8153#ifdef STDC_HEADERS
8154# include <stdlib.h>
8155# include <stddef.h>
8156#else
8157# ifdef HAVE_STDLIB_H
8158# include <stdlib.h>
8159# endif
8160#endif
8161#ifdef HAVE_SYS_SOCKET_H
8162# include <sys/socket.h>
8163#endif
8164
8165"
Victor Stinnere0be4232011-10-25 13:06:09 +02008166if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008167 cat >>confdefs.h <<_ACEOF
8168#define HAVE_NET_IF_H 1
8169_ACEOF
8170
8171fi
8172
8173done
8174
8175
Martin v. Löwis11017b12006-01-14 18:12:57 +00008176# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008177for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008178do :
8179 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 +00008180#ifdef HAVE_ASM_TYPES_H
8181#include <asm/types.h>
8182#endif
8183#ifdef HAVE_SYS_SOCKET_H
8184#include <sys/socket.h>
8185#endif
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187"
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008189 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008190#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008191_ACEOF
8192
8193fi
8194
8195done
8196
8197
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008198# On Linux, qrtr.h requires asm/types.h
8199for ac_header in linux/qrtr.h
8200do :
8201 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8202#ifdef HAVE_ASM_TYPES_H
8203#include <asm/types.h>
8204#endif
8205#ifdef HAVE_SYS_SOCKET_H
8206#include <sys/socket.h>
8207#endif
8208
8209"
8210if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8211 cat >>confdefs.h <<_ACEOF
8212#define HAVE_LINUX_QRTR_H 1
8213_ACEOF
8214
8215fi
8216
8217done
8218
8219
caaveryeffc12f2017-09-06 18:18:10 -04008220for ac_header in linux/vm_sockets.h
8221do :
8222 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8223#ifdef HAVE_SYS_SOCKET_H
8224#include <sys/socket.h>
8225#endif
8226
8227"
8228if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8229 cat >>confdefs.h <<_ACEOF
8230#define HAVE_LINUX_VM_SOCKETS_H 1
8231_ACEOF
8232
8233fi
8234
8235done
8236
8237
Charles-François Natali47413c12011-10-06 19:47:44 +02008238# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008239for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008240do :
8241 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8242ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8243#ifdef HAVE_SYS_SOCKET_H
8244#include <sys/socket.h>
8245#endif
8246
8247"
8248if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8249 cat >>confdefs.h <<_ACEOF
8250#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8251_ACEOF
8252
8253fi
8254
8255done
8256
8257
Guido van Rossum627b2d71993-12-24 10:39:16 +00008258# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008259was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8261$as_echo_n "checking for clock_t in time.h... " >&6; }
8262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008263/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008264#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
8266_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008269 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008270else
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008274
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008275
Guido van Rossum627b2d71993-12-24 10:39:16 +00008276fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008277rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8280$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008281
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8283$as_echo_n "checking for makedev... " >&6; }
8284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008285/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008286
Jesus Cea740f53a2010-04-28 11:35:30 +00008287#if defined(MAJOR_IN_MKDEV)
8288#include <sys/mkdev.h>
8289#elif defined(MAJOR_IN_SYSMACROS)
8290#include <sys/sysmacros.h>
8291#else
8292#include <sys/types.h>
8293#endif
8294
Neal Norwitz11690112002-07-30 01:08:28 +00008295int
8296main ()
8297{
Jesus Cea740f53a2010-04-28 11:35:30 +00008298
8299 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008300 ;
8301 return 0;
8302}
Matthias Kloseb159a552010-04-25 21:00:44 +00008303
Neal Norwitz11690112002-07-30 01:08:28 +00008304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008306 ac_cv_has_makedev=yes
8307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310rm -f core conftest.err conftest.$ac_objext \
8311 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8313$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008314if test "$ac_cv_has_makedev" = "yes"; then
8315
Matthias Kloseb9621712010-04-24 17:59:49 +00008316$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008317
8318fi
8319
Christian Heimes985ecdc2013-11-20 11:46:18 +01008320# byte swapping
8321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8322$as_echo_n "checking for le64toh... " >&6; }
8323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8324/* end confdefs.h. */
8325
8326#ifdef HAVE_ENDIAN_H
8327#include <endian.h>
8328#elif defined(HAVE_SYS_ENDIAN_H)
8329#include <sys/endian.h>
8330#endif
8331
8332int
8333main ()
8334{
8335
8336 le64toh(1)
8337 ;
8338 return 0;
8339}
8340
8341_ACEOF
8342if ac_fn_c_try_link "$LINENO"; then :
8343 ac_cv_has_le64toh=yes
8344else
8345 ac_cv_has_le64toh=no
8346fi
8347rm -f core conftest.err conftest.$ac_objext \
8348 conftest$ac_exeext conftest.$ac_ext
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8350$as_echo "$ac_cv_has_le64toh" >&6; }
8351if test "$ac_cv_has_le64toh" = "yes"; then
8352
8353$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8354
8355fi
8356
Martin v. Löwis399a6892002-10-04 10:22:02 +00008357use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008358# Don't use largefile support for GNU/Hurd
8359case $ac_sys_system in GNU*)
8360 use_lfs=no
8361esac
8362
Martin v. Löwis399a6892002-10-04 10:22:02 +00008363if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008364# Two defines needed to enable largefile support on various platforms
8365# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008366case $ac_sys_system/$ac_sys_release in
8367AIX*)
8368
8369$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8370
8371 ;;
8372esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
8376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008378
Martin v. Löwis399a6892002-10-04 10:22:02 +00008379fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008380
Guido van Rossum84e7b241996-08-19 21:59:00 +00008381# Add some code to confdefs.h so that the test for off_t works on SCO
8382cat >> confdefs.h <<\EOF
8383#if defined(SCO_DS)
8384#undef _OFF_T
8385#endif
8386EOF
8387
Guido van Rossumef2255b2000-03-10 22:30:29 +00008388# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008389ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008391
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008392else
Martin v. Löwis11437992002-04-12 09:54:03 +00008393
8394cat >>confdefs.h <<_ACEOF
8395#define mode_t int
8396_ACEOF
8397
8398fi
8399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008403else
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
8405cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
8408
8409fi
8410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008412if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414else
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
8416cat >>confdefs.h <<_ACEOF
8417#define pid_t int
8418_ACEOF
8419
8420fi
8421
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008424#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008425_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008428if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430else
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
8432cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008434_ACEOF
8435
8436fi
8437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8439$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008440if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008444/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008445#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
8447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450 ac_cv_type_uid_t=yes
8451else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452 ac_cv_type_uid_t=no
8453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008454rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8458$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008459if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465
8466fi
8467
Mark Dickinson983bc162012-12-02 12:11:38 +00008468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008470if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008473
8474fi
8475
Stefan Krah1919b7e2012-03-21 18:25:23 +01008476ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8477if test "x$ac_cv_type___uint128_t" = xyes; then :
8478
8479$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8480
8481fi
8482
Jack Jansendd19cf82001-12-06 22:36:17 +00008483
Michael W. Hudson54241132001-12-07 15:38:26 +00008484# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008485# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486# The cast to long int works around a bug in the HP C Compiler
8487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8489# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8491$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008492if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 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 +00008496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 if test "$ac_cv_type_int" = yes; then
8499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008501as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008502See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 else
8504 ac_cv_sizeof_int=0
8505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8510$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512
8513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008515#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008516_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008517
8518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519# The cast to long int works around a bug in the HP C Compiler
8520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8522# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8524$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 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 +00008529
Martin v. Löwis11437992002-04-12 09:54:03 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 if test "$ac_cv_type_long" = yes; then
8532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008534as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536 else
8537 ac_cv_sizeof_long=0
8538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8543$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544
8545
8546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008548#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008549_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008550
8551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552# The cast to long int works around a bug in the HP C Compiler
8553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8555# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8557$as_echo_n "checking size of long long... " >&6; }
8558if ${ac_cv_sizeof_long_long+:} false; then :
8559 $as_echo_n "(cached) " >&6
8560else
8561 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8562
8563else
8564 if test "$ac_cv_type_long_long" = yes; then
8565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8567as_fn_error 77 "cannot compute sizeof (long long)
8568See \`config.log' for more details" "$LINENO" 5; }
8569 else
8570 ac_cv_sizeof_long_long=0
8571 fi
8572fi
8573
8574fi
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8576$as_echo "$ac_cv_sizeof_long_long" >&6; }
8577
8578
8579
8580cat >>confdefs.h <<_ACEOF
8581#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8582_ACEOF
8583
8584
8585# The cast to long int works around a bug in the HP C Compiler
8586# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8587# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8588# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8590$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008591if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008593else
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 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 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 if test "$ac_cv_type_void_p" = yes; then
8598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008600as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008601See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602 else
8603 ac_cv_sizeof_void_p=0
8604 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8609$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610
8611
8612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008614#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008616
8617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618# The cast to long int works around a bug in the HP C Compiler
8619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8621# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8623$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008624if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 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 +00008628
Martin v. Löwis11437992002-04-12 09:54:03 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 if test "$ac_cv_type_short" = yes; then
8631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008633as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008634See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 else
8636 ac_cv_sizeof_short=0
8637 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8642$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643
8644
8645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008647#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008648_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008649
8650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651# The cast to long int works around a bug in the HP C Compiler
8652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8654# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8656$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008657if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 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 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 if test "$ac_cv_type_float" = yes; then
8664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008666as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008667See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668 else
8669 ac_cv_sizeof_float=0
8670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8675$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676
8677
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008680#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008681_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008682
8683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684# The cast to long int works around a bug in the HP C Compiler
8685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8689$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 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 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 if test "$ac_cv_type_double" = yes; then
8697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008699as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008700See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 else
8702 ac_cv_sizeof_double=0
8703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8708$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709
8710
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008713#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008714_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008715
8716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717# The cast to long int works around a bug in the HP C Compiler
8718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8720# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8722$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008723if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 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 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 if test "$ac_cv_type_fpos_t" = yes; then
8730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008732as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008733See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734 else
8735 ac_cv_sizeof_fpos_t=0
8736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8741$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742
8743
8744
Martin v. Löwis11437992002-04-12 09:54:03 +00008745cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008746#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008747_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008748
Michael W. Hudson54241132001-12-07 15:38:26 +00008749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750# The cast to long int works around a bug in the HP C Compiler
8751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8753# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8755$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008756if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 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 +00008760
Martin v. Löwis18e16552006-02-15 17:27:45 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 if test "$ac_cv_type_size_t" = yes; then
8763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008765as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008766See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767 else
8768 ac_cv_sizeof_size_t=0
8769 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771
Martin v. Löwis18e16552006-02-15 17:27:45 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8774$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775
8776
8777
Martin v. Löwis18e16552006-02-15 17:27:45 +00008778cat >>confdefs.h <<_ACEOF
8779#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8780_ACEOF
8781
8782
Christian Heimes400adb02008-02-01 08:12:03 +00008783# The cast to long int works around a bug in the HP C Compiler
8784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8788$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 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 +00008793
Christian Heimes400adb02008-02-01 08:12:03 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type_pid_t" = yes; then
8796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008798as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008800 else
8801 ac_cv_sizeof_pid_t=0
8802 fi
8803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Christian Heimes400adb02008-02-01 08:12:03 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8807$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008808
8809
8810
8811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8813_ACEOF
8814
8815
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008816# The cast to long int works around a bug in the HP C Compiler
8817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8819# This bug is HP SR number 8606223364.
8820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8821$as_echo_n "checking size of uintptr_t... " >&6; }
8822if ${ac_cv_sizeof_uintptr_t+:} false; then :
8823 $as_echo_n "(cached) " >&6
8824else
8825 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8826
8827else
8828 if test "$ac_cv_type_uintptr_t" = yes; then
8829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8831as_fn_error 77 "cannot compute sizeof (uintptr_t)
8832See \`config.log' for more details" "$LINENO" 5; }
8833 else
8834 ac_cv_sizeof_uintptr_t=0
8835 fi
8836fi
8837
8838fi
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8840$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8841
8842
8843
8844cat >>confdefs.h <<_ACEOF
8845#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8846_ACEOF
8847
8848
Michael W. Hudson54241132001-12-07 15:38:26 +00008849
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008850
Eitan Adler3055c942018-05-15 22:58:09 -07008851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8852$as_echo_n "checking for long double... " >&6; }
8853if ${ac_cv_type_long_double+:} false; then :
8854 $as_echo_n "(cached) " >&6
8855else
8856 if test "$GCC" = yes; then
8857 ac_cv_type_long_double=yes
8858 else
8859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8860/* end confdefs.h. */
8861/* The Stardent Vistra knows sizeof (long double), but does
8862 not support it. */
8863 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008864int
8865main ()
8866{
Eitan Adler3055c942018-05-15 22:58:09 -07008867static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8868 sizeof (double) <= sizeof (long double))];
8869test_array [0] = 0;
8870return test_array [0];
8871
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008872 ;
8873 return 0;
8874}
8875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008876if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008877 ac_cv_type_long_double=yes
8878else
8879 ac_cv_type_long_double=no
8880fi
8881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8882 fi
8883fi
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8885$as_echo "$ac_cv_type_long_double" >&6; }
8886 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887
Matthias Kloseb9621712010-04-24 17:59:49 +00008888$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008889
Eitan Adler3055c942018-05-15 22:58:09 -07008890 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008892# The cast to long int works around a bug in the HP C Compiler
8893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8897$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008898if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 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 +00008902
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 if test "$ac_cv_type_long_double" = yes; then
8905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008907as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008908See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008909 else
8910 ac_cv_sizeof_long_double=0
8911 fi
8912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8916$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008917
8918
8919
8920cat >>confdefs.h <<_ACEOF
8921#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8922_ACEOF
8923
8924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926# The cast to long int works around a bug in the HP C Compiler
8927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8931$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008932if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008934else
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 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 +00008936
Thomas Woutersb2137042007-02-01 18:02:27 +00008937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 if test "$ac_cv_type__Bool" = yes; then
8939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008941as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008942See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943 else
8944 ac_cv_sizeof__Bool=0
8945 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008947
Thomas Woutersb2137042007-02-01 18:02:27 +00008948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8950$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951
8952
8953
Thomas Woutersb2137042007-02-01 18:02:27 +00008954cat >>confdefs.h <<_ACEOF
8955#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8956_ACEOF
8957
8958
Thomas Woutersb2137042007-02-01 18:02:27 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960# The cast to long int works around a bug in the HP C Compiler
8961# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8962# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8963# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8965$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008966if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968else
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970#ifdef HAVE_SYS_TYPES_H
8971#include <sys/types.h>
8972#endif
8973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976else
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 if test "$ac_cv_type_off_t" = yes; then
8978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008980as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008981See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982 else
8983 ac_cv_sizeof_off_t=0
8984 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8989$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991
8992
Martin v. Löwis11437992002-04-12 09:54:03 +00008993cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008994#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008995_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008996
Michael W. Hudson54241132001-12-07 15:38:26 +00008997
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008998
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9000$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009001if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009002 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9007$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008else
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9010$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009011fi
9012
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013# The cast to long int works around a bug in the HP C Compiler
9014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9016# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9018$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009019if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023#ifdef HAVE_SYS_TYPES_H
9024#include <sys/types.h>
9025#endif
9026#ifdef HAVE_TIME_H
9027#include <time.h>
9028#endif
9029
Matthias Kloseb9621712010-04-24 17:59:49 +00009030"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009032else
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 if test "$ac_cv_type_time_t" = yes; then
9034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009036as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009037See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038 else
9039 ac_cv_sizeof_time_t=0
9040 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9045$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009047
9048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009050#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009052
Michael W. Hudson54241132001-12-07 15:38:26 +00009053
9054
Trent Mick635f6fb2000-08-23 21:33:05 +00009055# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009056ac_save_cc="$CC"
9057if test "$ac_cv_kpthread" = "yes"
9058then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009059elif test "$ac_cv_kthread" = "yes"
9060then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009061elif test "$ac_cv_pthread" = "yes"
9062then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009063fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9066$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009067have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009070
9071 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009072int
9073main ()
9074{
Guido van Rossum12580492000-09-24 16:47:19 +00009075pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ;
9077 return 0;
9078}
Matthias Kloseb159a552010-04-25 21:00:44 +00009079
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009081if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009082 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9086$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009087if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9091# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9093$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009094if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096else
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098#ifdef HAVE_PTHREAD_H
9099#include <pthread.h>
9100#endif
9101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009104else
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 if test "$ac_cv_type_pthread_t" = yes; then
9106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009108as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009109See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009110 else
9111 ac_cv_sizeof_pthread_t=0
9112 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009114
Trent Mick635f6fb2000-08-23 21:33:05 +00009115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9117$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009119
9120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009122#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009124
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009125
Trent Mick635f6fb2000-08-23 21:33:05 +00009126fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009127
9128# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9129# This checking will be unnecessary after removing deprecated TLS API.
9130# The cast to long int works around a bug in the HP C Compiler
9131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133# This bug is HP SR number 8606223364.
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9135$as_echo_n "checking size of pthread_key_t... " >&6; }
9136if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138else
9139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9140"; then :
9141
9142else
9143 if test "$ac_cv_type_pthread_key_t" = yes; then
9144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9146as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9147See \`config.log' for more details" "$LINENO" 5; }
9148 else
9149 ac_cv_sizeof_pthread_key_t=0
9150 fi
9151fi
9152
9153fi
9154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9155$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9156
9157
9158
9159cat >>confdefs.h <<_ACEOF
9160#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9161_ACEOF
9162
9163
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9165$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9166if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9168/* end confdefs.h. */
9169#include <pthread.h>
9170int
9171main ()
9172{
9173pthread_key_t k; k * 1;
9174 ;
9175 return 0;
9176}
9177_ACEOF
9178if ac_fn_c_try_compile "$LINENO"; then :
9179 ac_pthread_key_t_is_arithmetic_type=yes
9180else
9181 ac_pthread_key_t_is_arithmetic_type=no
9182
9183fi
9184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9186$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9187 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9188
9189$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9190
9191 fi
9192else
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
9195fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009196CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009197
Michael W. Hudson54241132001-12-07 15:38:26 +00009198
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009199case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009200 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009201 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9202 ;;
9203 Darwin/*)
9204 OTHER_LIBTOOL_OPT=""
9205 ;;
9206esac
9207
9208
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009209
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009210case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009211 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009212 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9213 if test "${enable_universalsdk}"; then
9214 :
9215 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009216 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009217 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009218 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009219 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009220 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009221 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009222 if test ${gcc_version} '<' 4.0
9223 then
9224 LIBTOOL_CRUFT="-lcc_dynamic"
9225 else
9226 LIBTOOL_CRUFT=""
9227 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009229 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230else
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009233
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234 #include <unistd.h>
9235 int main(int argc, char*argv[])
9236 {
9237 if (sizeof(long) == 4) {
9238 return 0;
9239 } else {
9240 return 1;
9241 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009242 }
9243
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009245if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009246 ac_osx_32bit=yes
9247else
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009252fi
9253
9254
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009256 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 i386)
9258 MACOSX_DEFAULT_ARCH="i386"
9259 ;;
9260 ppc)
9261 MACOSX_DEFAULT_ARCH="ppc"
9262 ;;
9263 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009264 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009265 ;;
9266 esac
9267 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009268 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 i386)
9270 MACOSX_DEFAULT_ARCH="x86_64"
9271 ;;
9272 ppc)
9273 MACOSX_DEFAULT_ARCH="ppc64"
9274 ;;
9275 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009276 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277 ;;
9278 esac
9279
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009280 fi
9281
9282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009284 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9287$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009288if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009290 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009292 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define WITH_NEXT_FRAMEWORK 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: yes" >&5
9297$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009298 if test $enable_shared = "yes"
9299 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009300 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 +00009301 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302else
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305fi
9306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9308$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009309case $ac_sys_system/$ac_sys_release in
9310 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009313
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9315$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009316 ;;
9317 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009320 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009321esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322
Guido van Rossum0a516c91994-09-12 10:58:40 +00009323# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324
Michael W. Hudson54241132001-12-07 15:38:26 +00009325
9326
9327
9328
Benjamin Peterson99f03762010-04-11 22:15:28 +00009329
Thomas Wouters477c8d52006-05-27 19:21:47 +00009330
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009331# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9332# -- usually .so, .sl on HP-UX, .dll on Cygwin
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9334$as_echo_n "checking the extension of shared libraries... " >&6; }
9335if test -z "$SHLIB_SUFFIX"; then
9336 case $ac_sys_system in
9337 hp*|HP*)
9338 case `uname -m` in
9339 ia64) SHLIB_SUFFIX=.so;;
9340 *) SHLIB_SUFFIX=.sl;;
9341 esac
9342 ;;
9343 CYGWIN*) SHLIB_SUFFIX=.dll;;
9344 *) SHLIB_SUFFIX=.so;;
9345 esac
9346fi
9347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9348$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009349
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009351# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352# (Shared libraries in this instance are shared modules to be loaded into
9353# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9355$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356if test -z "$LDSHARED"
9357then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009358 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009359 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009360 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009361 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009362 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009364 if test "$GCC" = "yes" ; then
9365 LDSHARED='$(CC) -shared'
9366 LDCXXSHARED='$(CXX) -shared'
9367 else
9368 LDSHARED='$(CC) -G'
9369 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009370 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009371 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009372 if test "$GCC" = "yes" ; then
9373 LDSHARED='$(CC) -shared'
9374 LDCXXSHARED='$(CXX) -shared'
9375 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009376 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009377 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009378 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009379 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009380 LDSHARED='$(CC) -bundle'
9381 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009382 if test "$enable_framework" ; then
9383 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009384 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9385 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009386 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009387 else
9388 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009389 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009390 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009391 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009392 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009393 LDSHARED='$(CC) -bundle'
9394 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009395 if test "$enable_framework" ; then
9396 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009397 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9398 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009399 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009400 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009401 # No framework, use the Python app as bundle-loader
9402 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009403 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009404 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009405 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009406 Darwin/*)
9407 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9408 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009409
Ned Deily36820b62014-06-25 13:44:22 -07009410 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9411 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9412 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9413 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9414 if test ${dep_target_major} -eq 10 && \
9415 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009416 then
Ned Deily36820b62014-06-25 13:44:22 -07009417 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009418 LDSHARED='$(CC) -bundle'
9419 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009420 if test "$enable_framework" ; then
9421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009424 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009425 else
9426 # No framework, use the Python app as bundle-loader
9427 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9428 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009429 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009430 fi
Ned Deily36820b62014-06-25 13:44:22 -07009431 else
9432 # building for OS X 10.3 and later
9433 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9434 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9435 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009436 fi
9437 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009438 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009439 LDSHARED='$(CC) -shared'
9440 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009441 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009442 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009443 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009444 LDSHARED='$(CC) -shared'
9445 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009446 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009447 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009448 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009449 OpenBSD*)
9450 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9451 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009452 LDSHARED='$(CC) -shared $(CCSHARED)'
9453 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009454 else
9455 case `uname -r` in
9456 [01].* | 2.[0-7] | 2.[0-7].*)
9457 LDSHARED="ld -Bshareable ${LDFLAGS}"
9458 ;;
9459 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009460 LDSHARED='$(CC) -shared $(CCSHARED)'
9461 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009462 ;;
9463 esac
9464 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009465 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009466 LDSHARED='$(CC) -shared'
9467 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009468 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469 if test "$GCC" = "yes" ; then
9470 LDSHARED='$(CC) -shared'
9471 LDCXXSHARED='$(CXX) -shared'
9472 else
9473 LDSHARED='$(CC) -G'
9474 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009475 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009476 SCO_SV*)
9477 LDSHARED='$(CC) -Wl,-G,-Bexport'
9478 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9479 CYGWIN*)
9480 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9481 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482 *) LDSHARED="ld";;
9483 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9486$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009487LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009488BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009489# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009490# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9492$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493if test -z "$CCSHARED"
9494then
Guido van Rossum07397971997-04-29 21:49:50 +00009495 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009496 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009497 then CCSHARED="-fPIC";
9498 elif test `uname -p` = sparc;
9499 then CCSHARED="-xcode=pic32";
9500 else CCSHARED="-Kpic";
9501 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009502 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009503 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009504 else CCSHARED="+z";
9505 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009506 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009507 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009508 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009509 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009510 if test "$GCC" = "yes"
9511 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009512 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009513 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009514 SCO_SV*)
9515 if test "$GCC" = "yes"
9516 then CCSHARED="-fPIC"
9517 else CCSHARED="-Kpic -belf"
9518 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009519 VxWorks*)
9520 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9524$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009526# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9528$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529if test -z "$LINKFORSHARED"
9530then
Guido van Rossum07397971997-04-29 21:49:50 +00009531 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009532 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009533 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009534 LINKFORSHARED="-Wl,-E -Wl,+s";;
9535# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009536 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009537 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009538 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009540 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009541
9542 # Issue #18075: the default maximum stack size (8MBytes) is too
9543 # small for the default recursion limit. Increase the stack size
9544 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009545 # Note: This matches the value of THREAD_STACK_SIZE in
9546 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009547 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9548
Jack Jansene578a632001-08-15 01:27:14 +00009549 if test "$enable_framework"
9550 then
Jack Jansenda49e192005-01-07 13:08:22 +00009551 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009552 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009553 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009554 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009555 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009556 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009557 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009558 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9559 then
9560 LINKFORSHARED="-Wl,--export-dynamic"
9561 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009562 SunOS/5*) case $CC in
9563 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009564 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009565 then
9566 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009567 fi;;
9568 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009569 CYGWIN*)
9570 if test $enable_shared = "no"
9571 then
9572 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9573 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009574 QNX*)
9575 # -Wl,-E causes the symbols to be added to the dynamic
9576 # symbol table so that they can be found when a module
9577 # is loaded. -N 2048K causes the stack size to be set
9578 # to 2048 kilobytes so that the stack doesn't overflow
9579 # when running test_compile.py.
9580 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009581 VxWorks*)
9582 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009583 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9586$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009587
Michael W. Hudson54241132001-12-07 15:38:26 +00009588
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009589
Matthias Kloseb9621712010-04-24 17:59:49 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9591$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009592if test ! "$LIBRARY" = "$LDLIBRARY"
9593then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009594 case $ac_sys_system in
9595 CYGWIN*)
9596 # Cygwin needs CCSHARED when building extension DLLs
9597 # but not when building the interpreter DLL.
9598 CFLAGSFORSHARED='';;
9599 *)
9600 CFLAGSFORSHARED='$(CCSHARED)'
9601 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9604$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009605
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009606# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9607# library (with --enable-shared).
9608# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009609# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9610# if it is not required, since it creates a dependency of the shared library
9611# to LIBS. This, in turn, means that applications linking the shared libpython
9612# don't need to link LIBS explicitly. The default should be only changed
9613# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9616$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009617case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009618 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009619 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009620esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9622$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009623
9624
Guido van Rossum627b2d71993-12-24 10:39:16 +00009625# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9627$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009629 $as_echo_n "(cached) " >&6
9630else
9631 ac_check_lib_save_LIBS=$LIBS
9632LIBS="-lsendfile $LIBS"
9633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635
9636/* Override any GCC internal prototype to avoid an error.
9637 Use char because int might match the return type of a GCC
9638 builtin and then its argument prototype would still apply. */
9639#ifdef __cplusplus
9640extern "C"
9641#endif
9642char sendfile ();
9643int
9644main ()
9645{
9646return sendfile ();
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651if ac_fn_c_try_link "$LINENO"; then :
9652 ac_cv_lib_sendfile_sendfile=yes
9653else
9654 ac_cv_lib_sendfile_sendfile=no
9655fi
9656rm -f core conftest.err conftest.$ac_objext \
9657 conftest$ac_exeext conftest.$ac_ext
9658LIBS=$ac_check_lib_save_LIBS
9659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9661$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009662if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009663 cat >>confdefs.h <<_ACEOF
9664#define HAVE_LIBSENDFILE 1
9665_ACEOF
9666
9667 LIBS="-lsendfile $LIBS"
9668
9669fi
9670
Matthias Kloseb9621712010-04-24 17:59:49 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9672$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009677LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681/* Override any GCC internal prototype to avoid an error.
9682 Use char because int might match the return type of a GCC
9683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009684#ifdef __cplusplus
9685extern "C"
9686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009687char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009688int
9689main ()
9690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ;
9693 return 0;
9694}
9695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009703LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9706$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009707if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 cat >>confdefs.h <<_ACEOF
9709#define HAVE_LIBDL 1
9710_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009711
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009712 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009713
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009714fi
9715 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9717$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009722LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729#ifdef __cplusplus
9730extern "C"
9731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009732char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
9735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9751$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009752if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 cat >>confdefs.h <<_ACEOF
9754#define HAVE_LIBDLD 1
9755_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009757 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009758
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009759fi
9760 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009761
Michael Felt0d3ccb42017-12-30 22:39:20 +01009762# checks for uuid.h location
9763for ac_header in uuid/uuid.h uuid.h
9764do :
9765 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9766ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9767if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9768 cat >>confdefs.h <<_ACEOF
9769#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9770_ACEOF
9771
9772fi
9773
9774done
9775
9776
Berker Peksag9a10ff42017-11-08 23:09:16 +03009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9778$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9780/* end confdefs.h. */
9781#include <uuid/uuid.h>
9782int
9783main ()
9784{
9785
9786#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009787void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009788#endif
9789
9790 ;
9791 return 0;
9792}
9793_ACEOF
9794if ac_fn_c_try_compile "$LINENO"; then :
9795
9796$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9797
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9799$as_echo "yes" >&6; }
9800else
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803
9804fi
9805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9806
Michael Felt0d3ccb42017-12-30 22:39:20 +01009807# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009808# FreeBSD and OpenBSD provides support as well
9809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9810$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9812/* end confdefs.h. */
9813#include <uuid.h>
9814int
9815main ()
9816{
9817
9818#ifndef uuid_create
9819void *x = uuid_create
9820#endif
9821
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826if ac_fn_c_try_compile "$LINENO"; then :
9827
9828$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9829
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9831$as_echo "yes" >&6; }
9832else
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9834$as_echo "no" >&6; }
9835
9836fi
9837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9838
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009839# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9840# stream in big-endian byte-order
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9842$as_echo_n "checking for uuid_enc_be... " >&6; }
9843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9844/* end confdefs.h. */
9845#include <uuid.h>
9846int
9847main ()
9848{
9849
9850#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009851void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009852#endif
9853
9854 ;
9855 return 0;
9856}
9857_ACEOF
9858if ac_fn_c_try_compile "$LINENO"; then :
9859
9860$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9861
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9863$as_echo "yes" >&6; }
9864else
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867
9868fi
9869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9870
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009871# 'Real Time' functions on Solaris
9872# posix4 on Solaris 2.6
9873# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009875$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009876if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009878else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009879 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883/* Override any GCC internal prototype to avoid an error.
9884 Use char because int might match the return type of a GCC
9885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009886#ifdef __cplusplus
9887extern "C"
9888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009889char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890int
9891main ()
9892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ;
9895 return 0;
9896}
9897_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898for ac_lib in '' pthread rt posix4; do
9899 if test -z "$ac_lib"; then
9900 ac_res="none required"
9901 else
9902 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009903 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908rm -f core conftest.err conftest.$ac_objext \
9909 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009910 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913done
Victor Stinnere0be4232011-10-25 13:06:09 +02009914if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916else
9917 ac_cv_search_sem_init=no
9918fi
9919rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009920LIBS=$ac_func_search_save_LIBS
9921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9923$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009925if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009927
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009928fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009929
Martin v. Löwis519adae2003-09-20 10:47:47 +00009930
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9933$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009934if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009936else
9937 ac_check_lib_save_LIBS=$LIBS
9938LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009940/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942/* Override any GCC internal prototype to avoid an error.
9943 Use char because int might match the return type of a GCC
9944 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945#ifdef __cplusplus
9946extern "C"
9947#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009948char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949int
9950main ()
9951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953 ;
9954 return 0;
9955}
9956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009958 ac_cv_lib_intl_textdomain=yes
9959else
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962rm -f core conftest.err conftest.$ac_objext \
9963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964LIBS=$ac_check_lib_save_LIBS
9965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9967$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009968if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969
Matthias Kloseb9621712010-04-24 17:59:49 +00009970$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009971
Brett Cannonc6d936e2009-06-07 20:09:53 +00009972 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009973fi
9974
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009975
9976# checks for system dependent C++ extensions support
9977case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9979$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009981/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009982
Georg Brandl59e87bd2011-02-15 19:48:59 +00009983 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009984int
9985main ()
9986{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009987loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 ;
9989 return 0;
9990}
Matthias Kloseb159a552010-04-25 21:00:44 +00009991
Martin v. Löwis11437992002-04-12 09:54:03 +00009992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009993if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009994
Matthias Kloseb159a552010-04-25 21:00:44 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009997
Matthias Kloseb159a552010-04-25 21:00:44 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010000
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010001else
Matthias Kloseb159a552010-04-25 21:00:44 +000010002
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010004$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010005
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007rm -f core conftest.err conftest.$ac_objext \
10008 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010009 *) ;;
10010esac
10011
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012# check for systems that require aligned memory access
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10014$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010015if ${ac_cv_aligned_required+:} false; then :
10016 $as_echo_n "(cached) " >&6
10017else
10018 if test "$cross_compiling" = yes; then :
10019 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010020else
10021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10022/* end confdefs.h. */
10023
10024int main()
10025{
10026 char s[16];
10027 int i, *p1, *p2;
10028 for (i=0; i < 16; i++)
10029 s[i] = i;
10030 p1 = (int*)(s+1);
10031 p2 = (int*)(s+2);
10032 if (*p1 == *p2)
10033 return 1;
10034 return 0;
10035}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010036_ACEOF
10037if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010038 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010039else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010040 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010041fi
10042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10043 conftest.$ac_objext conftest.beam conftest.$ac_ext
10044fi
10045
10046
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010047fi
10048
10049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10050$as_echo "$ac_cv_aligned_required" >&6; }
10051if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010052
10053$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10054
10055fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010056
10057# str, bytes and memoryview hash algorithm
10058
10059
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10061$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10062
10063# Check whether --with-hash_algorithm was given.
10064if test "${with_hash_algorithm+set}" = set; then :
10065 withval=$with_hash_algorithm;
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10067$as_echo "$withval" >&6; }
10068case "$withval" in
10069 siphash24)
10070 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10071
10072 ;;
10073 fnv)
10074 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10075
10076 ;;
10077 *)
10078 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10079 ;;
10080esac
10081
10082else
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10084$as_echo "default" >&6; }
10085fi
10086
10087
Charles-François Natalid30b0222014-05-08 23:08:51 +010010088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10089$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10090
10091# Check whether --with-address_sanitizer was given.
10092if test "${with_address_sanitizer+set}" = set; then :
10093 withval=$with_address_sanitizer;
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10095$as_echo "$withval" >&6; }
10096BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10097LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010098# ASan works by controlling memory allocation, our own malloc interferes.
10099with_pymalloc="no"
10100
10101else
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
10104fi
10105
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10108$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10109
10110# Check whether --with-memory_sanitizer was given.
10111if test "${with_memory_sanitizer+set}" = set; then :
10112 withval=$with_memory_sanitizer;
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10114$as_echo "$withval" >&6; }
10115BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10116LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10117# MSan works by controlling memory allocation, our own malloc interferes.
10118with_pymalloc="no"
10119
10120else
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
10123fi
10124
10125
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10127$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10128
10129# Check whether --with-undefined_behavior_sanitizer was given.
10130if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10131 withval=$with_undefined_behavior_sanitizer;
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10133$as_echo "$withval" >&6; }
10134BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10135LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010136
10137else
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
Guido van Rossum70c7f481998-03-26 18:44:10 +000010143# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10145$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010146if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010148else
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010150LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154/* Override any GCC internal prototype to avoid an error.
10155 Use char because int might match the return type of a GCC
10156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157#ifdef __cplusplus
10158extern "C"
10159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010160char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010161int
10162main ()
10163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ;
10166 return 0;
10167}
10168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010174rm -f core conftest.err conftest.$ac_objext \
10175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010176LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10179$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010180if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010181 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010182fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010183 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10185$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010186if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010188else
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010190LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194/* Override any GCC internal prototype to avoid an error.
10195 Use char because int might match the return type of a GCC
10196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010197#ifdef __cplusplus
10198extern "C"
10199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010200char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010201int
10202main ()
10203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 ;
10206 return 0;
10207}
10208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010216LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10219$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010220if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010221 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010222fi
10223 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10226$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10232$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010233LIBS="$withval $LIBS"
10234
10235else
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238fi
10239
Guido van Rossum7f43da71994-08-01 12:15:30 +000010240
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010241
10242
10243
10244
10245
10246
Victor Stinner23a683a2019-04-12 21:27:37 +020010247
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010248if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10249 if test -n "$ac_tool_prefix"; then
10250 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10251set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10253$as_echo_n "checking for $ac_word... " >&6; }
10254if ${ac_cv_path_PKG_CONFIG+:} false; then :
10255 $as_echo_n "(cached) " >&6
10256else
10257 case $PKG_CONFIG in
10258 [\\/]* | ?:[\\/]*)
10259 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10260 ;;
10261 *)
10262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10263for as_dir in $PATH
10264do
10265 IFS=$as_save_IFS
10266 test -z "$as_dir" && as_dir=.
10267 for ac_exec_ext in '' $ac_executable_extensions; do
10268 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10269 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10271 break 2
10272 fi
10273done
10274 done
10275IFS=$as_save_IFS
10276
10277 ;;
10278esac
10279fi
10280PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10281if test -n "$PKG_CONFIG"; then
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10283$as_echo "$PKG_CONFIG" >&6; }
10284else
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10286$as_echo "no" >&6; }
10287fi
10288
10289
10290fi
10291if test -z "$ac_cv_path_PKG_CONFIG"; then
10292 ac_pt_PKG_CONFIG=$PKG_CONFIG
10293 # Extract the first word of "pkg-config", so it can be a program name with args.
10294set dummy pkg-config; ac_word=$2
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296$as_echo_n "checking for $ac_word... " >&6; }
10297if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10298 $as_echo_n "(cached) " >&6
10299else
10300 case $ac_pt_PKG_CONFIG in
10301 [\\/]* | ?:[\\/]*)
10302 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10303 ;;
10304 *)
10305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306for as_dir in $PATH
10307do
10308 IFS=$as_save_IFS
10309 test -z "$as_dir" && as_dir=.
10310 for ac_exec_ext in '' $ac_executable_extensions; do
10311 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10312 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10313 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314 break 2
10315 fi
10316done
10317 done
10318IFS=$as_save_IFS
10319
10320 ;;
10321esac
10322fi
10323ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10324if test -n "$ac_pt_PKG_CONFIG"; then
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10326$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10327else
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330fi
10331
10332 if test "x$ac_pt_PKG_CONFIG" = x; then
10333 PKG_CONFIG=""
10334 else
10335 case $cross_compiling:$ac_tool_warned in
10336yes:)
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10339ac_tool_warned=yes ;;
10340esac
10341 PKG_CONFIG=$ac_pt_PKG_CONFIG
10342 fi
10343else
10344 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10345fi
10346
10347fi
10348if test -n "$PKG_CONFIG"; then
10349 _pkg_min_version=0.9.0
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10351$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10352 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10354$as_echo "yes" >&6; }
10355 else
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358 PKG_CONFIG=""
10359 fi
10360fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010361
10362# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10364$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010365
10366# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010368 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010369else
10370 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010371fi
10372
10373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10375$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010376
10377# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10379$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010380
10381# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010382if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010383 withval=$with_system_ffi;
10384fi
10385
10386
Zachary Waref40d4dd2016-09-17 01:25:24 -050010387if test "$ac_sys_system" = "Darwin"
10388then
10389 case "$with_system_ffi" in
10390 "")
10391 with_system_ffi="no"
10392 ;;
10393 yes|no)
10394 ;;
10395 *)
10396 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10397 ;;
10398 esac
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10400$as_echo "$with_system_ffi" >&6; }
10401else
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10403$as_echo "yes" >&6; }
10404 if test "$with_system_ffi" != ""
10405 then
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10407$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10408 fi
10409 with_system_ffi="yes"
10410fi
Zachary Ware935043d2016-09-09 17:01:21 -070010411
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010412if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010413 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10414else
10415 LIBFFI_INCLUDEDIR=""
10416fi
10417
10418
Stefan Krah60187b52012-03-23 19:06:27 +010010419# Check for use of the system libmpdec library
10420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10421$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10422
10423# Check whether --with-system_libmpdec was given.
10424if test "${with_system_libmpdec+set}" = set; then :
10425 withval=$with_system_libmpdec;
10426else
10427 with_system_libmpdec="no"
10428fi
10429
10430
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10432$as_echo "$with_system_libmpdec" >&6; }
10433
Benjamin Peterson076ed002010-10-31 17:11:02 +000010434# Check for support for loadable sqlite extensions
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10436$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10437# Check whether --enable-loadable-sqlite-extensions was given.
10438if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10439 enableval=$enable_loadable_sqlite_extensions;
10440else
10441 enable_loadable_sqlite_extensions="no"
10442fi
10443
10444
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10446$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10447
Ned Deilyd819b932013-09-06 01:07:05 -070010448# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10449
10450
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10452$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10453
10454# Check whether --with-tcltk-includes was given.
10455if test "${with_tcltk_includes+set}" = set; then :
10456 withval=$with_tcltk_includes;
10457else
10458 with_tcltk_includes="default"
10459fi
10460
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10462$as_echo "$with_tcltk_includes" >&6; }
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10464$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10465
10466# Check whether --with-tcltk-libs was given.
10467if test "${with_tcltk_libs+set}" = set; then :
10468 withval=$with_tcltk_libs;
10469else
10470 with_tcltk_libs="default"
10471fi
10472
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10474$as_echo "$with_tcltk_libs" >&6; }
10475if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10476then
10477 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10478 then
10479 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10480 fi
10481 TCLTK_INCLUDES=""
10482 TCLTK_LIBS=""
10483else
10484 TCLTK_INCLUDES="$with_tcltk_includes"
10485 TCLTK_LIBS="$with_tcltk_libs"
10486fi
10487
Matthias Klose55708cc2009-04-30 08:06:49 +000010488# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10490$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010491
10492# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010493if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010494 withval=$with_dbmliborder;
10495if test x$with_dbmliborder = xyes
10496then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010497as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010498else
10499 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10500 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10501 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010502 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010503 fi
10504 done
10505fi
10506fi
10507
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10509$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010510
Martin v. Löwis11437992002-04-12 09:54:03 +000010511# Templates for things AC_DEFINEd more than once.
10512# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010513
10514
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010515if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010516then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010517 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010519
10520 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010521elif test "$ac_cv_kpthread" = "yes"
10522then
10523 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010524 if test "$ac_cv_cxx_thread" = "yes"; then
10525 CXX="$CXX -Kpthread"
10526 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010527 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010528elif test "$ac_cv_kthread" = "yes"
10529then
10530 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010531 if test "$ac_cv_cxx_thread" = "yes"; then
10532 CXX="$CXX -Kthread"
10533 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010534 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535elif test "$ac_cv_pthread" = "yes"
10536then
10537 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010538 if test "$ac_cv_cxx_thread" = "yes"; then
10539 CXX="$CXX -pthread"
10540 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010542else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543 if test ! -z "$withval" -a -d "$withval"
10544 then LDFLAGS="$LDFLAGS -L$withval"
10545 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010546
10547 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010548 # define _POSIX_THREADS in unistd.h. Some apparently don't
10549 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10551$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010554
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010555#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010556#ifdef _POSIX_THREADS
10557yes
10558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
10560_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563 unistd_defines_pthreads=yes
10564else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565 unistd_defines_pthreads=no
10566fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010567rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10570$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010571
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010573
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010574 # Just looking for pthread_create in libpthread is not enough:
10575 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10576 # So we really have to include pthread.h, and then link.
10577 _libs=$LIBS
10578 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10580$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010583
10584#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010585#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010586
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010587void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010588int
10589main ()
10590{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010591
10592pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ;
10594 return 0;
10595}
10596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10600$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010601 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010602
Guido van Rossum02a1c402000-02-25 19:26:31 +000010603else
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010605 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010607if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010608
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010609 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010610
Guido van Rossumad678af1998-10-02 14:42:15 +000010611else
Guido van Rossumad678af1998-10-02 14:42:15 +000010612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10614$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010615if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010617else
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010619LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623/* Override any GCC internal prototype to avoid an error.
10624 Use char because int might match the return type of a GCC
10625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010626#ifdef __cplusplus
10627extern "C"
10628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010629char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010630int
10631main ()
10632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 ;
10635 return 0;
10636}
10637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010643rm -f core conftest.err conftest.$ac_objext \
10644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010645LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10648$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010649if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010650
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010651 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010652 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010653
Greg Steinadf63d62000-07-05 10:38:09 +000010654else
Greg Steinadf63d62000-07-05 10:38:09 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10657$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010658if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010660else
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010662LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010669#ifdef __cplusplus
10670extern "C"
10671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010672char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010673int
10674main ()
10675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010688LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10691$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010693
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010694 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010695 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010696
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010697else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10700$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010703else
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010705LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709/* Override any GCC internal prototype to avoid an error.
10710 Use char because int might match the return type of a GCC
10711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010712#ifdef __cplusplus
10713extern "C"
10714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010715char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
10718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010731LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10734$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010735if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010738 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010739
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010740else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10743$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010744if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010748LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752/* Override any GCC internal prototype to avoid an error.
10753 Use char because int might match the return type of a GCC
10754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010755#ifdef __cplusplus
10756extern "C"
10757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010774LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10777$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010778if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010779
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010780 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010781 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010782
Guido van Rossumb93a8621998-05-07 13:27:32 +000010783else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010784
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010785 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10786
Guido van Rossum2d38f911996-06-26 19:47:01 +000010787fi
10788
Guido van Rossum627b2d71993-12-24 10:39:16 +000010789
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010790fi
10791
Guido van Rossum0be3e491997-05-22 20:33:33 +000010792fi
10793
Guido van Rossum49545951997-12-02 19:28:29 +000010794fi
10795
Guido van Rossumb93a8621998-05-07 13:27:32 +000010796fi
10797
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10803$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010804if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806else
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010808LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812/* Override any GCC internal prototype to avoid an error.
10813 Use char because int might match the return type of a GCC
10814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010815#ifdef __cplusplus
10816extern "C"
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010819int
10820main ()
10821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ;
10824 return 0;
10825}
10826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010832rm -f core conftest.err conftest.$ac_objext \
10833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010834LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10837$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010838if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010839
Martin v. Löwis130fb172001-07-19 11:00:41 +000010840 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010841
Guido van Rossum627b2d71993-12-24 10:39:16 +000010842fi
10843
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010844
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010845fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847if test "$posix_threads" = "yes"; then
10848 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010851
10852 fi
10853
10854 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10855 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010856 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010858
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 ;;
10860 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010862
10863 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010864 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010865$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010866
10867 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868 esac
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10871$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010874else
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876 ac_cv_pthread_system_supported=no
10877else
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010880
10881 #include <stdio.h>
10882 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010883 void *foo(void *parm) {
10884 return NULL;
10885 }
10886 main() {
10887 pthread_attr_t attr;
10888 pthread_t id;
10889 if (pthread_attr_init(&attr)) exit(-1);
10890 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10891 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10892 exit(0);
10893 }
10894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896 ac_cv_pthread_system_supported=yes
10897else
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010902fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904
Guido van Rossum627b2d71993-12-24 10:39:16 +000010905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10908$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010909 if test "$ac_cv_pthread_system_supported" = "yes"; then
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010912
10913 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 for ac_func in pthread_sigmask
10915do :
10916 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010917if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010919#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010920_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010921 case $ac_sys_system in
10922 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010925
10926 ;;
10927 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010928fi
10929done
10930
pdoxe14679c2017-10-05 00:01:56 -070010931 for ac_func in pthread_getcpuclockid
10932do :
10933 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10934if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10935 cat >>confdefs.h <<_ACEOF
10936#define HAVE_PTHREAD_GETCPUCLOCKID 1
10937_ACEOF
10938
10939fi
10940done
10941
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010942fi
10943
10944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10948$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955 ipv6=no
10956 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10958$as_echo "yes" >&6; }
10959 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960
10961 ipv6=yes
10962 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964else
Martin v. Löwis11437992002-04-12 09:54:03 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 /* AF_INET6 available check */
10969#include <sys/types.h>
10970#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010971int
10972main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010974int domain = AF_INET6;
10975 ;
10976 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977}
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010979if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10982$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985else
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010994if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10996$as_echo_n "checking if RFC2553 API is available... " >&6; }
10997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010999
11000 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011001#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011002int
11003main ()
11004{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011005struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011006 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ;
11008 return 0;
11009}
Matthias Kloseb159a552010-04-25 21:00:44 +000011010
Martin v. Löwis11437992002-04-12 09:54:03 +000011011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011013
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011016 ipv6=yes
11017
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011018else
Matthias Kloseb159a552010-04-25 21:00:44 +000011019
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011022 ipv6=no
11023
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011026fi
11027
11028if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011030
11031fi
11032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033fi
11034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035
11036ipv6type=unknown
11037ipv6lib=none
11038ipv6trylibc=no
11039
11040if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11042$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011043 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11044 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045 case $i in
11046 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050#include <netinet/in.h>
11051#ifdef IPV6_INRIA_VERSION
11052yes
11053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011057 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060
11061 ;;
11062 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011066#include <netinet/in.h>
11067#ifdef __KAME__
11068yes
11069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073 ipv6type=$i;
11074 ipv6lib=inet6
11075 ipv6libdir=/usr/local/v6/lib
11076 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011078rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079
11080 ;;
11081 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011083/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085#include <features.h>
11086#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11087yes
11088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092 ipv6type=$i;
11093 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011095rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096
11097 ;;
11098 linux-inet6)
11099 if test -d /usr/inet6; then
11100 ipv6type=$i
11101 ipv6lib=inet6
11102 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011103 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104 fi
11105 ;;
11106 solaris)
11107 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011108 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 ipv6type=$i
11110 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111 fi
11112 fi
11113 ;;
11114 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118#include <sys/param.h>
11119#ifdef _TOSHIBA_INET6
11120yes
11121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125 ipv6type=$i;
11126 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011127 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011129rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130
11131 ;;
11132 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011134/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136#include </usr/local/v6/include/sys/v6config.h>
11137#ifdef __V6D__
11138yes
11139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143 ipv6type=$i;
11144 ipv6lib=v6;
11145 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011146 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011148rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149
11150 ;;
11151 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155#include <sys/param.h>
11156#ifdef _ZETA_MINAMI_INET6
11157yes
11158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162 ipv6type=$i;
11163 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011164 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011166rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167
11168 ;;
11169 esac
11170 if test "$ipv6type" != "unknown"; then
11171 break
11172 fi
11173 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11175$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176fi
11177
11178if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11179 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11180 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11181 echo "using lib$ipv6lib"
11182 else
11183 if test $ipv6trylibc = "yes"; then
11184 echo "using libc"
11185 else
11186 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11187 echo "You need to fetch lib$ipv6lib.a from appropriate"
11188 echo 'ipv6 kit and compile beforehand.'
11189 exit 1
11190 fi
11191 fi
11192fi
11193
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11195$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197/* end confdefs.h. */
11198 /* CAN_RAW_FD_FRAMES available check */
11199#include <linux/can/raw.h>
11200int
11201main ()
11202{
11203int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11204 ;
11205 return 0;
11206}
11207_ACEOF
11208if ac_fn_c_try_compile "$LINENO"; then :
11209
11210
11211$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11212
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11214$as_echo "yes" >&6; }
11215
11216else
11217
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220
11221fi
11222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11223
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011224# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11226$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230 withval=$with_doc_strings;
11231fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011232
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011233
11234if test -z "$with_doc_strings"
11235then with_doc_strings="yes"
11236fi
11237if test "$with_doc_strings" != "no"
11238then
11239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011241
11242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11244$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011245
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011246# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11248$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011251if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011252 withval=$with_pymalloc;
11253fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011254
Neil Schemenauera35c6882001-02-27 04:45:05 +000011255
Neil Schemenauer16c22972002-03-22 15:34:49 +000011256if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011257then
11258 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011259fi
11260if test "$with_pymalloc" != "no"
11261then
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011264
11265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11267$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011268
Nick Coghlan6ea41862017-06-11 13:16:15 +100011269# Check for --with-c-locale-coercion
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11271$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11272
11273# Check whether --with-c-locale-coercion was given.
11274if test "${with_c_locale_coercion+set}" = set; then :
11275 withval=$with_c_locale_coercion;
11276fi
11277
11278
11279if test -z "$with_c_locale_coercion"
11280then
11281 with_c_locale_coercion="yes"
11282fi
11283if test "$with_c_locale_coercion" != "no"
11284then
11285
11286$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11287
11288fi
11289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11290$as_echo "$with_c_locale_coercion" >&6; }
11291
Benjamin Peterson05159c42009-12-03 03:01:27 +000011292# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11294$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295
11296# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011298 withval=$with_valgrind;
11299else
11300 with_valgrind=no
11301fi
11302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11304$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011305if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 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 +020011307if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011310
11311else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011312 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011313
11314fi
11315
11316
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011317 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011318fi
11319
Łukasz Langaa785c872016-09-09 17:37:37 -070011320# Check for DTrace support
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11322$as_echo_n "checking for --with-dtrace... " >&6; }
11323
11324# Check whether --with-dtrace was given.
11325if test "${with_dtrace+set}" = set; then :
11326 withval=$with_dtrace;
11327else
11328 with_dtrace=no
11329fi
11330
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11332$as_echo "$with_dtrace" >&6; }
11333
11334
11335
11336
11337
11338DTRACE=
11339DFLAGS=
11340DTRACE_HEADERS=
11341DTRACE_OBJS=
11342
11343if test "$with_dtrace" = "yes"
11344then
11345 # Extract the first word of "dtrace", so it can be a program name with args.
11346set dummy dtrace; ac_word=$2
11347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11348$as_echo_n "checking for $ac_word... " >&6; }
11349if ${ac_cv_path_DTRACE+:} false; then :
11350 $as_echo_n "(cached) " >&6
11351else
11352 case $DTRACE in
11353 [\\/]* | ?:[\\/]*)
11354 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11355 ;;
11356 *)
11357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11358for as_dir in $PATH
11359do
11360 IFS=$as_save_IFS
11361 test -z "$as_dir" && as_dir=.
11362 for ac_exec_ext in '' $ac_executable_extensions; do
11363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11364 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11366 break 2
11367 fi
11368done
11369 done
11370IFS=$as_save_IFS
11371
11372 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11373 ;;
11374esac
11375fi
11376DTRACE=$ac_cv_path_DTRACE
11377if test -n "$DTRACE"; then
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11379$as_echo "$DTRACE" >&6; }
11380else
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383fi
11384
11385
11386 if test "$DTRACE" = "not found"; then
11387 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11388 fi
11389
11390$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11391
11392 DTRACE_HEADERS="Include/pydtrace_probes.h"
11393
11394 # On OS X, DTrace providers do not need to be explicitly compiled and
11395 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11396 # generation flag '-G'. We check for presence of this flag, rather than
11397 # hardcoding support by OS, in the interest of robustness.
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11399$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11400if ${ac_cv_dtrace_link+:} false; then :
11401 $as_echo_n "(cached) " >&6
11402else
11403 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011404 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011405 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11406 ac_cv_dtrace_link=yes
11407
11408fi
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11410$as_echo "$ac_cv_dtrace_link" >&6; }
11411 if test "$ac_cv_dtrace_link" = "yes"; then
11412 DTRACE_OBJS="Python/pydtrace.o"
11413 fi
11414fi
11415
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011416# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011417
Guido van Rossum98935bf2001-09-05 19:13:16 +000011418DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011419
Guido van Rossume97ee181999-12-20 21:27:22 +000011420# the dlopen() function means we might want to use dynload_shlib.o. some
11421# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011422for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011423do :
11424 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011425if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011428_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011429
Guido van Rossume97ee181999-12-20 21:27:22 +000011430fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011431done
Guido van Rossume97ee181999-12-20 21:27:22 +000011432
Michael W. Hudson54241132001-12-07 15:38:26 +000011433
Guido van Rossume97ee181999-12-20 21:27:22 +000011434# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11435# loading of modules.
11436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11438$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011439if test -z "$DYNLOADFILE"
11440then
11441 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011442 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11443 if test "$ac_cv_func_dlopen" = yes
11444 then DYNLOADFILE="dynload_shlib.o"
11445 else DYNLOADFILE="dynload_aix.o"
11446 fi
11447 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011448 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011449 *)
11450 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11451 # out any dynamic loading
11452 if test "$ac_cv_func_dlopen" = yes
11453 then DYNLOADFILE="dynload_shlib.o"
11454 else DYNLOADFILE="dynload_stub.o"
11455 fi
11456 ;;
11457 esac
11458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11460$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011461if test "$DYNLOADFILE" != "dynload_stub.o"
11462then
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011465
11466fi
11467
Neil Schemenauer4e425612001-06-19 15:44:15 +000011468# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11469
Michael W. Hudson54241132001-12-07 15:38:26 +000011470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11472$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011473if test -z "$MACHDEP_OBJS"
11474then
Jack Jansene578a632001-08-15 01:27:14 +000011475 MACHDEP_OBJS=$extra_machdep_objs
11476else
11477 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011478fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011479if test -z "$MACHDEP_OBJS"; then
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11481$as_echo "none" >&6; }
11482else
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11484$as_echo "$MACHDEP_OBJS" >&6; }
11485fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011486
Guido van Rossum627b2d71993-12-24 10:39:16 +000011487# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011488for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011489 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11490 faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011491 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011492 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011493 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011494 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011495 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011496 if_nameindex \
Inada Naokibee31ce2019-05-30 16:35:41 +090011497 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011498 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011499 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011500 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011501 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11502 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011503 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011504 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011505 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011506 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11507 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011508 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011509 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011510 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011511 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011512 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011513do :
11514 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11515ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011516if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011521fi
11522done
11523
Michael W. Hudson54241132001-12-07 15:38:26 +000011524
Benjamin Peterson40caa052018-09-12 15:52:40 -070011525# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11526# links. Some libc implementations have a stub lchmod implementation that always
11527# returns an error.
11528if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011529 for ac_func in lchmod
11530do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011531 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11532if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011533 cat >>confdefs.h <<_ACEOF
11534#define HAVE_LCHMOD 1
11535_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011536
11537fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011538done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011539
11540fi
11541
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011542ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11543 #include <dirent.h>
11544"
11545if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11546
11547$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11548
11549fi
11550
11551
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011552# For some functions, having a definition is not sufficient, since
11553# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11555$as_echo_n "checking for chroot... " >&6; }
11556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559int
11560main ()
11561{
11562void *x=chroot
11563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570
Matthias Kloseb159a552010-04-25 21:00:44 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576
11577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11580$as_echo_n "checking for link... " >&6; }
11581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584int
11585main ()
11586{
11587void *x=link
11588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011601
11602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11605$as_echo_n "checking for symlink... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609int
11610main ()
11611{
11612void *x=symlink
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011620
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11630$as_echo_n "checking for fchdir... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633#include <unistd.h>
11634int
11635main ()
11636{
11637void *x=fchdir
11638 ;
11639 return 0;
11640}
11641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011645
Matthias Kloseb159a552010-04-25 21:00:44 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011651
11652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11655$as_echo_n "checking for fsync... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011658#include <unistd.h>
11659int
11660main ()
11661{
11662void *x=fsync
11663 ;
11664 return 0;
11665}
11666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011670
Matthias Kloseb159a552010-04-25 21:00:44 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011676
11677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11680$as_echo_n "checking for fdatasync... " >&6; }
11681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011682/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011683#include <unistd.h>
11684int
11685main ()
11686{
11687void *x=fdatasync
11688 ;
11689 return 0;
11690}
11691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011695
Matthias Kloseb159a552010-04-25 21:00:44 +000011696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011701
11702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11705$as_echo_n "checking for epoll... " >&6; }
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011707/* end confdefs.h. */
11708#include <sys/epoll.h>
11709int
11710main ()
11711{
11712void *x=epoll_create
11713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011720
Matthias Kloseb159a552010-04-25 21:00:44 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011722$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011726
11727fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11730$as_echo_n "checking for epoll_create1... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11732/* end confdefs.h. */
11733#include <sys/epoll.h>
11734int
11735main ()
11736{
11737void *x=epoll_create1
11738 ;
11739 return 0;
11740}
11741_ACEOF
11742if ac_fn_c_try_compile "$LINENO"; then :
11743
11744$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11745
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11747$as_echo "yes" >&6; }
11748else
11749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
11751
11752fi
11753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11755$as_echo_n "checking for kqueue... " >&6; }
11756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011757/* end confdefs.h. */
11758
11759#include <sys/types.h>
11760#include <sys/event.h>
11761
11762int
11763main ()
11764{
11765int x=kqueue()
11766 ;
11767 return 0;
11768}
11769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011773
Matthias Kloseb159a552010-04-25 21:00:44 +000011774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011775$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011776else
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11778$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011779
11780fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11783$as_echo_n "checking for prlimit... " >&6; }
11784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11785/* end confdefs.h. */
11786
11787#include <sys/time.h>
11788#include <sys/resource.h>
11789
11790int
11791main ()
11792{
11793void *x=prlimit
11794 ;
11795 return 0;
11796}
11797_ACEOF
11798if ac_fn_c_try_compile "$LINENO"; then :
11799
11800$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11801
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11803$as_echo "yes" >&6; }
11804else
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807
11808fi
11809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11810
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11812$as_echo_n "checking for memfd_create... " >&6; }
11813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11814/* end confdefs.h. */
11815
11816#ifdef HAVE_SYS_MMAN_H
11817#include <sys/mman.h>
11818#endif
11819#ifdef HAVE_SYS_MEMFD_H
11820#include <sys/memfd.h>
11821#endif
11822
11823int
11824main ()
11825{
11826void *x=memfd_create
11827 ;
11828 return 0;
11829}
11830_ACEOF
11831if ac_fn_c_try_compile "$LINENO"; then :
11832
11833$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11834
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11836$as_echo "yes" >&6; }
11837else
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11839$as_echo "no" >&6; }
11840
11841fi
11842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11843
Martin v. Löwisd5843682002-11-21 20:41:28 +000011844# On some systems (eg. FreeBSD 5), we would find a definition of the
11845# functions ctermid_r, setgroups in the library, but no prototype
11846# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11847# address to avoid compiler warnings and potential miscompilations
11848# because of the missing prototypes.
11849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11851$as_echo_n "checking for ctermid_r... " >&6; }
11852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011854
Martin v. Löwisd5843682002-11-21 20:41:28 +000011855#include <stdio.h>
11856
Martin v. Löwisd5843682002-11-21 20:41:28 +000011857int
11858main ()
11859{
11860void* p = ctermid_r
11861 ;
11862 return 0;
11863}
11864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011868
Matthias Kloseb159a552010-04-25 21:00:44 +000011869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011870$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011874
11875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11879$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011880if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011881 $as_echo_n "(cached) " >&6
11882else
11883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011884/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011885#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011886int
11887main ()
11888{
11889void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011890
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011891 ;
11892 return 0;
11893}
11894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011896 ac_cv_flock_decl=yes
11897else
11898 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011899
11900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011902
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011903fi
11904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11905$as_echo "$ac_cv_flock_decl" >&6; }
11906if test "x${ac_cv_flock_decl}" = xyes; then
11907 for ac_func in flock
11908do :
11909 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011910if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011911 cat >>confdefs.h <<_ACEOF
11912#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011913_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011914
Antoine Pitroua3000072010-09-07 14:52:42 +000011915else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011917$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011918if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011919 $as_echo_n "(cached) " >&6
11920else
11921 ac_check_lib_save_LIBS=$LIBS
11922LIBS="-lbsd $LIBS"
11923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11924/* end confdefs.h. */
11925
11926/* Override any GCC internal prototype to avoid an error.
11927 Use char because int might match the return type of a GCC
11928 builtin and then its argument prototype would still apply. */
11929#ifdef __cplusplus
11930extern "C"
11931#endif
11932char flock ();
11933int
11934main ()
11935{
11936return flock ();
11937 ;
11938 return 0;
11939}
11940_ACEOF
11941if ac_fn_c_try_link "$LINENO"; then :
11942 ac_cv_lib_bsd_flock=yes
11943else
11944 ac_cv_lib_bsd_flock=no
11945fi
11946rm -f core conftest.err conftest.$ac_objext \
11947 conftest$ac_exeext conftest.$ac_ext
11948LIBS=$ac_check_lib_save_LIBS
11949fi
11950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11951$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011952if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011953 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011954
11955
11956$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11957
11958
11959fi
11960
11961
11962fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011963done
11964
Antoine Pitroua3000072010-09-07 14:52:42 +000011965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11968$as_echo_n "checking for getpagesize... " >&6; }
11969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011971
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011972#include <unistd.h>
11973
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011974int
11975main ()
11976{
11977void* p = getpagesize
11978 ;
11979 return 0;
11980}
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011985
Matthias Kloseb159a552010-04-25 21:00:44 +000011986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011991
11992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011994
Victor Stinner984890f2011-11-24 13:53:38 +010011995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11996$as_echo_n "checking for broken unsetenv... " >&6; }
11997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11998/* end confdefs.h. */
11999
12000#include <stdlib.h>
12001
12002int
12003main ()
12004{
12005int res = unsetenv("DUMMY")
12006 ;
12007 return 0;
12008}
12009_ACEOF
12010if ac_fn_c_try_compile "$LINENO"; then :
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12012$as_echo "no" >&6; }
12013else
12014
12015$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12016
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12018$as_echo "yes" >&6; }
12019
12020fi
12021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12022
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012023for ac_prog in true
12024do
12025 # Extract the first word of "$ac_prog", so it can be a program name with args.
12026set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12028$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012031else
12032 if test -n "$TRUE"; then
12033 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12034else
12035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038 IFS=$as_save_IFS
12039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012042 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 $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 +000012044 break 2
12045 fi
12046done
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012049
12050fi
12051fi
12052TRUE=$ac_cv_prog_TRUE
12053if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12055$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012059fi
12060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012062 test -n "$TRUE" && break
12063done
12064test -n "$TRUE" || TRUE="/bin/true"
12065
12066
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12068$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012069if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012071else
12072 ac_check_lib_save_LIBS=$LIBS
12073LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012075/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077/* Override any GCC internal prototype to avoid an error.
12078 Use char because int might match the return type of a GCC
12079 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012080#ifdef __cplusplus
12081extern "C"
12082#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012084int
12085main ()
12086{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088 ;
12089 return 0;
12090}
12091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012092if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012093 ac_cv_lib_c_inet_aton=yes
12094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012097rm -f core conftest.err conftest.$ac_objext \
12098 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012099LIBS=$ac_check_lib_save_LIBS
12100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12102$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012103if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012104 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12107$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110else
12111 ac_check_lib_save_LIBS=$LIBS
12112LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116/* Override any GCC internal prototype to avoid an error.
12117 Use char because int might match the return type of a GCC
12118 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012119#ifdef __cplusplus
12120extern "C"
12121#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012122char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012123int
12124main ()
12125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012132 ac_cv_lib_resolv_inet_aton=yes
12133else
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136rm -f core conftest.err conftest.$ac_objext \
12137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012138LIBS=$ac_check_lib_save_LIBS
12139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12141$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012143 cat >>confdefs.h <<_ACEOF
12144#define HAVE_LIBRESOLV 1
12145_ACEOF
12146
12147 LIBS="-lresolv $LIBS"
12148
12149fi
12150
12151
12152fi
12153
12154
Christian Heimesd0764e22007-12-04 15:00:33 +000012155# On Tru64, chflags seems to be present, but calling it will
12156# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12158$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012163 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012166/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012167
Christian Heimesd0764e22007-12-04 15:00:33 +000012168#include <sys/stat.h>
12169#include <unistd.h>
12170int main(int argc, char*argv[])
12171{
12172 if(chflags(argv[0], 0) != 0)
12173 return 1;
12174 return 0;
12175}
Ned Deily3eb67d52011-06-28 00:00:28 -070012176
Christian Heimesd0764e22007-12-04 15:00:33 +000012177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012178if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012179 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12184 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012185fi
12186
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12190$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012191if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012194 ac_cv_have_chflags="yes"
12195else
12196 ac_cv_have_chflags="no"
12197fi
12198
12199fi
12200if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012203
12204fi
12205
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12207$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012210else
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012212 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012215/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012216
Christian Heimesd0764e22007-12-04 15:00:33 +000012217#include <sys/stat.h>
12218#include <unistd.h>
12219int main(int argc, char*argv[])
12220{
12221 if(lchflags(argv[0], 0) != 0)
12222 return 1;
12223 return 0;
12224}
Ned Deily3eb67d52011-06-28 00:00:28 -070012225
Christian Heimesd0764e22007-12-04 15:00:33 +000012226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012227if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012228 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012229else
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012234fi
12235
12236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12239$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012240if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012242if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012243 ac_cv_have_lchflags="yes"
12244else
12245 ac_cv_have_lchflags="no"
12246fi
12247
12248fi
12249if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012252
12253fi
12254
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012255case $ac_sys_system/$ac_sys_release in
12256Darwin/*)
12257 _CUR_CFLAGS="${CFLAGS}"
12258 _CUR_LDFLAGS="${LDFLAGS}"
12259 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12260 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12261 ;;
12262esac
12263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12265$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012268else
12269 ac_check_lib_save_LIBS=$LIBS
12270LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012272/* end confdefs.h. */
12273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274/* Override any GCC internal prototype to avoid an error.
12275 Use char because int might match the return type of a GCC
12276 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012277#ifdef __cplusplus
12278extern "C"
12279#endif
12280char inflateCopy ();
12281int
12282main ()
12283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012285 ;
12286 return 0;
12287}
12288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012290 ac_cv_lib_z_inflateCopy=yes
12291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012294rm -f core conftest.err conftest.$ac_objext \
12295 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012296LIBS=$ac_check_lib_save_LIBS
12297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12299$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012303
12304fi
12305
12306
12307case $ac_sys_system/$ac_sys_release in
12308Darwin/*)
12309 CFLAGS="${_CUR_CFLAGS}"
12310 LDFLAGS="${_CUR_LDFLAGS}"
12311 ;;
12312esac
12313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12315$as_echo_n "checking for hstrerror... " >&6; }
12316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012317/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012318
Martin v. Löwise9416172003-05-03 10:12:45 +000012319#include <netdb.h>
12320
Martin v. Löwise9416172003-05-03 10:12:45 +000012321int
12322main ()
12323{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012324void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012332
Matthias Kloseb159a552010-04-25 21:00:44 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012334$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012335else
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012338
12339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012340rm -f core conftest.err conftest.$ac_objext \
12341 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12344$as_echo_n "checking for inet_aton... " >&6; }
12345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012347
Martin v. Löwis86d66262006-02-17 08:40:11 +000012348#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012349#include <sys/socket.h>
12350#include <netinet/in.h>
12351#include <arpa/inet.h>
12352
Martin v. Löwise9416172003-05-03 10:12:45 +000012353int
12354main ()
12355{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012356void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012357 ;
12358 return 0;
12359}
12360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
Matthias Kloseb159a552010-04-25 21:00:44 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012367else
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12369$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012370
12371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012372rm -f core conftest.err conftest.$ac_objext \
12373 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12376$as_echo_n "checking for inet_pton... " >&6; }
12377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012379
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012380#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012381#include <sys/socket.h>
12382#include <netinet/in.h>
12383#include <arpa/inet.h>
12384
Martin v. Löwise9416172003-05-03 10:12:45 +000012385int
12386main ()
12387{
12388void* p = inet_pton
12389 ;
12390 return 0;
12391}
12392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012394
Matthias Kloseb9621712010-04-24 17:59:49 +000012395$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012396
Matthias Kloseb159a552010-04-25 21:00:44 +000012397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012398$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12401$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012402
12403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012405
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012406# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12408$as_echo_n "checking for setgroups... " >&6; }
12409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012411
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012412#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012413#ifdef HAVE_GRP_H
12414#include <grp.h>
12415#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012416
Martin v. Löwisd5843682002-11-21 20:41:28 +000012417int
12418main ()
12419{
12420void* p = setgroups
12421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012428
Matthias Kloseb159a552010-04-25 21:00:44 +000012429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012430$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12433$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012434
12435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012437
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012438# check for openpty and forkpty
12439
12440for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012441do :
12442 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012443if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012445#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012446_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012447
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012448else
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12450$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012451if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453else
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459/* Override any GCC internal prototype to avoid an error.
12460 Use char because int might match the return type of a GCC
12461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012462#ifdef __cplusplus
12463extern "C"
12464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012465char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012466int
12467main ()
12468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 ;
12471 return 0;
12472}
12473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012476else
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012479rm -f core conftest.err conftest.$ac_objext \
12480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012481LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12484$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012485if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12490$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012491if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012493else
12494 ac_check_lib_save_LIBS=$LIBS
12495LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012497/* end confdefs.h. */
12498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499/* Override any GCC internal prototype to avoid an error.
12500 Use char because int might match the return type of a GCC
12501 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012502#ifdef __cplusplus
12503extern "C"
12504#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012505char openpty ();
12506int
12507main ()
12508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012510 ;
12511 return 0;
12512}
12513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012515 ac_cv_lib_bsd_openpty=yes
12516else
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012519rm -f core conftest.err conftest.$ac_objext \
12520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012521LIBS=$ac_check_lib_save_LIBS
12522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12524$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012525if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012527 LIBS="$LIBS -lbsd"
12528fi
12529
12530
12531fi
12532
Fred Drake8cef4cf2000-06-28 16:40:38 +000012533
12534fi
12535done
12536
12537for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012538do :
12539 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012540if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012542#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012543_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012544
Fred Drake8cef4cf2000-06-28 16:40:38 +000012545else
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12547$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012548if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012550else
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012552LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556/* Override any GCC internal prototype to avoid an error.
12557 Use char because int might match the return type of a GCC
12558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012559#ifdef __cplusplus
12560extern "C"
12561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012562char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012563int
12564main ()
12565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 ;
12568 return 0;
12569}
12570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012576rm -f core conftest.err conftest.$ac_objext \
12577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012578LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12581$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012582if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012584 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012585else
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12587$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012588if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590else
12591 ac_check_lib_save_LIBS=$LIBS
12592LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012594/* end confdefs.h. */
12595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596/* Override any GCC internal prototype to avoid an error.
12597 Use char because int might match the return type of a GCC
12598 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012599#ifdef __cplusplus
12600extern "C"
12601#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012602char forkpty ();
12603int
12604main ()
12605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012612 ac_cv_lib_bsd_forkpty=yes
12613else
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012616rm -f core conftest.err conftest.$ac_objext \
12617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012618LIBS=$ac_check_lib_save_LIBS
12619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12621$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012622if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012624 LIBS="$LIBS -lbsd"
12625fi
12626
12627
12628fi
12629
Fred Drake8cef4cf2000-06-28 16:40:38 +000012630
12631fi
12632done
12633
Jack Jansendd19cf82001-12-06 22:36:17 +000012634
Michael W. Hudson54241132001-12-07 15:38:26 +000012635# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012636for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012637do :
12638 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12639ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012640if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012642#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012643_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646done
12647
Michael W. Hudson54241132001-12-07 15:38:26 +000012648
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012649ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012650if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012651 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012652
Martin v. Löwis1142de32002-03-29 16:28:31 +000012653else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012655 *" dup2.$ac_objext "* ) ;;
12656 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012658esac
12659
Martin v. Löwis1142de32002-03-29 16:28:31 +000012660fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012661
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012662ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012663if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012664 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12665
12666else
12667 case " $LIBOBJS " in
12668 *" strdup.$ac_objext "* ) ;;
12669 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12670 ;;
12671esac
12672
12673fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012674
12675
12676for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012677do :
12678 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012679if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012686int
12687main ()
12688{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 ;
12691 return 0;
12692}
12693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012697
Guido van Rossum627b2d71993-12-24 10:39:16 +000012698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012700
Guido van Rossum627b2d71993-12-24 10:39:16 +000012701fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012702done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012703
Jack Jansen150753c2003-03-29 22:07:47 +000012704for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012705do :
12706 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012707if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012708 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012712/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012713#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012714int
12715main ()
12716{
12717setpgrp(0,0);
12718 ;
12719 return 0;
12720}
12721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012723
Matthias Kloseb9621712010-04-24 17:59:49 +000012724$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012725
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012728
12729fi
12730done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012731
Thomas Wouters3a584202000-08-05 23:28:51 +000012732for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012733do :
12734 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012735if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012737#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012741#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_compile "$LINENO"; then :
12751
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752else
Skip Montanaro6dead952003-09-25 14:50:04 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012755
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012761done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762
Michael W. Hudson54241132001-12-07 15:38:26 +000012763
Gregory P. Smith387512c2018-12-30 15:42:32 -080012764# We search for both crypt and crypt_r as one or the other may be defined
12765# This gets us our -lcrypt in LIBS when required on the target platform.
12766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12767$as_echo_n "checking for library containing crypt... " >&6; }
12768if ${ac_cv_search_crypt+:} false; then :
12769 $as_echo_n "(cached) " >&6
12770else
12771 ac_func_search_save_LIBS=$LIBS
12772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12773/* end confdefs.h. */
12774
12775/* Override any GCC internal prototype to avoid an error.
12776 Use char because int might match the return type of a GCC
12777 builtin and then its argument prototype would still apply. */
12778#ifdef __cplusplus
12779extern "C"
12780#endif
12781char crypt ();
12782int
12783main ()
12784{
12785return crypt ();
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790for ac_lib in '' crypt; do
12791 if test -z "$ac_lib"; then
12792 ac_res="none required"
12793 else
12794 ac_res=-l$ac_lib
12795 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12796 fi
12797 if ac_fn_c_try_link "$LINENO"; then :
12798 ac_cv_search_crypt=$ac_res
12799fi
12800rm -f core conftest.err conftest.$ac_objext \
12801 conftest$ac_exeext
12802 if ${ac_cv_search_crypt+:} false; then :
12803 break
12804fi
12805done
12806if ${ac_cv_search_crypt+:} false; then :
12807
12808else
12809 ac_cv_search_crypt=no
12810fi
12811rm conftest.$ac_ext
12812LIBS=$ac_func_search_save_LIBS
12813fi
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12815$as_echo "$ac_cv_search_crypt" >&6; }
12816ac_res=$ac_cv_search_crypt
12817if test "$ac_res" != no; then :
12818 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12819
12820fi
12821
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12823$as_echo_n "checking for library containing crypt_r... " >&6; }
12824if ${ac_cv_search_crypt_r+:} false; then :
12825 $as_echo_n "(cached) " >&6
12826else
12827 ac_func_search_save_LIBS=$LIBS
12828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12829/* end confdefs.h. */
12830
12831/* Override any GCC internal prototype to avoid an error.
12832 Use char because int might match the return type of a GCC
12833 builtin and then its argument prototype would still apply. */
12834#ifdef __cplusplus
12835extern "C"
12836#endif
12837char crypt_r ();
12838int
12839main ()
12840{
12841return crypt_r ();
12842 ;
12843 return 0;
12844}
12845_ACEOF
12846for ac_lib in '' crypt; do
12847 if test -z "$ac_lib"; then
12848 ac_res="none required"
12849 else
12850 ac_res=-l$ac_lib
12851 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12852 fi
12853 if ac_fn_c_try_link "$LINENO"; then :
12854 ac_cv_search_crypt_r=$ac_res
12855fi
12856rm -f core conftest.err conftest.$ac_objext \
12857 conftest$ac_exeext
12858 if ${ac_cv_search_crypt_r+:} false; then :
12859 break
12860fi
12861done
12862if ${ac_cv_search_crypt_r+:} false; then :
12863
12864else
12865 ac_cv_search_crypt_r=no
12866fi
12867rm conftest.$ac_ext
12868LIBS=$ac_func_search_save_LIBS
12869fi
12870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12871$as_echo "$ac_cv_search_crypt_r" >&6; }
12872ac_res=$ac_cv_search_crypt_r
12873if test "$ac_res" != no; then :
12874 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12875
12876fi
12877
12878
12879ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12880if test "x$ac_cv_func_crypt_r" = xyes; then :
12881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12882/* end confdefs.h. */
12883
12884#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12885#include <crypt.h>
12886
12887int
12888main ()
12889{
12890
12891struct crypt_data d;
12892char *r = crypt_r("", "", &d);
12893
12894 ;
12895 return 0;
12896}
12897_ACEOF
12898if ac_fn_c_try_compile "$LINENO"; then :
12899
12900$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12901
12902fi
12903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12904
12905fi
12906
12907
Victor Stinnere0be4232011-10-25 13:06:09 +020012908for ac_func in clock_gettime
12909do :
12910 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12911if test "x$ac_cv_func_clock_gettime" = xyes; then :
12912 cat >>confdefs.h <<_ACEOF
12913#define HAVE_CLOCK_GETTIME 1
12914_ACEOF
12915
12916else
12917
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12919$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12920if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12921 $as_echo_n "(cached) " >&6
12922else
12923 ac_check_lib_save_LIBS=$LIBS
12924LIBS="-lrt $LIBS"
12925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12926/* end confdefs.h. */
12927
12928/* Override any GCC internal prototype to avoid an error.
12929 Use char because int might match the return type of a GCC
12930 builtin and then its argument prototype would still apply. */
12931#ifdef __cplusplus
12932extern "C"
12933#endif
12934char clock_gettime ();
12935int
12936main ()
12937{
12938return clock_gettime ();
12939 ;
12940 return 0;
12941}
12942_ACEOF
12943if ac_fn_c_try_link "$LINENO"; then :
12944 ac_cv_lib_rt_clock_gettime=yes
12945else
12946 ac_cv_lib_rt_clock_gettime=no
12947fi
12948rm -f core conftest.err conftest.$ac_objext \
12949 conftest$ac_exeext conftest.$ac_ext
12950LIBS=$ac_check_lib_save_LIBS
12951fi
12952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12953$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12954if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12955
Victor Stinner7efb8332014-08-29 15:41:08 +020012956 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012957 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12958
12959
12960$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12961
12962
12963fi
12964
12965
12966fi
12967done
12968
12969
12970for ac_func in clock_getres
12971do :
12972 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12973if test "x$ac_cv_func_clock_getres" = xyes; then :
12974 cat >>confdefs.h <<_ACEOF
12975#define HAVE_CLOCK_GETRES 1
12976_ACEOF
12977
12978else
12979
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12981$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12982if ${ac_cv_lib_rt_clock_getres+:} false; then :
12983 $as_echo_n "(cached) " >&6
12984else
12985 ac_check_lib_save_LIBS=$LIBS
12986LIBS="-lrt $LIBS"
12987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12988/* end confdefs.h. */
12989
12990/* Override any GCC internal prototype to avoid an error.
12991 Use char because int might match the return type of a GCC
12992 builtin and then its argument prototype would still apply. */
12993#ifdef __cplusplus
12994extern "C"
12995#endif
12996char clock_getres ();
12997int
12998main ()
12999{
13000return clock_getres ();
13001 ;
13002 return 0;
13003}
13004_ACEOF
13005if ac_fn_c_try_link "$LINENO"; then :
13006 ac_cv_lib_rt_clock_getres=yes
13007else
13008 ac_cv_lib_rt_clock_getres=no
13009fi
13010rm -f core conftest.err conftest.$ac_objext \
13011 conftest$ac_exeext conftest.$ac_ext
13012LIBS=$ac_check_lib_save_LIBS
13013fi
13014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13015$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13016if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13017
13018 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13019
13020
13021fi
13022
13023
13024fi
13025done
13026
13027
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013028for ac_func in clock_settime
13029do :
13030 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13031if test "x$ac_cv_func_clock_settime" = xyes; then :
13032 cat >>confdefs.h <<_ACEOF
13033#define HAVE_CLOCK_SETTIME 1
13034_ACEOF
13035
13036else
13037
13038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13039$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13040if ${ac_cv_lib_rt_clock_settime+:} false; then :
13041 $as_echo_n "(cached) " >&6
13042else
13043 ac_check_lib_save_LIBS=$LIBS
13044LIBS="-lrt $LIBS"
13045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046/* end confdefs.h. */
13047
13048/* Override any GCC internal prototype to avoid an error.
13049 Use char because int might match the return type of a GCC
13050 builtin and then its argument prototype would still apply. */
13051#ifdef __cplusplus
13052extern "C"
13053#endif
13054char clock_settime ();
13055int
13056main ()
13057{
13058return clock_settime ();
13059 ;
13060 return 0;
13061}
13062_ACEOF
13063if ac_fn_c_try_link "$LINENO"; then :
13064 ac_cv_lib_rt_clock_settime=yes
13065else
13066 ac_cv_lib_rt_clock_settime=no
13067fi
13068rm -f core conftest.err conftest.$ac_objext \
13069 conftest$ac_exeext conftest.$ac_ext
13070LIBS=$ac_check_lib_save_LIBS
13071fi
13072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13073$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13074if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13075
13076 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13077
13078
13079fi
13080
13081
13082fi
13083done
13084
13085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13087$as_echo_n "checking for major... " >&6; }
13088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013090
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013091#if defined(MAJOR_IN_MKDEV)
13092#include <sys/mkdev.h>
13093#elif defined(MAJOR_IN_SYSMACROS)
13094#include <sys/sysmacros.h>
13095#else
13096#include <sys/types.h>
13097#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013098
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013099int
13100main ()
13101{
13102
13103 makedev(major(0),minor(0));
13104
13105 ;
13106 return 0;
13107}
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013110
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13115$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013116
13117else
Skip Montanaro6dead952003-09-25 14:50:04 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13120$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013121
13122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013123rm -f core conftest.err conftest.$ac_objext \
13124 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013125
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013126# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013127# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13129$as_echo_n "checking for getaddrinfo... " >&6; }
13130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013132
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013133#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013134#include <sys/socket.h>
13135#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013136#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137
Martin v. Löwis11437992002-04-12 09:54:03 +000013138int
13139main ()
13140{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013141getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ;
13143 return 0;
13144}
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147 have_getaddrinfo=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151rm -f core conftest.err conftest.$ac_objext \
13152 conftest$ac_exeext conftest.$ac_ext
13153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13154$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013155if test $have_getaddrinfo = yes
13156then
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13158$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013159 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013161else
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013163
13164if test "${enable_ipv6+set}" = set; then
13165 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13166else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013167 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013168fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013171/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172
Stefan Krah19c21392012-11-22 23:47:32 +010013173#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174#include <sys/types.h>
13175#include <netdb.h>
13176#include <string.h>
13177#include <sys/socket.h>
13178#include <netinet/in.h>
13179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013180int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181{
13182 int passive, gaierr, inet4 = 0, inet6 = 0;
13183 struct addrinfo hints, *ai, *aitop;
13184 char straddr[INET6_ADDRSTRLEN], strport[16];
13185
13186 for (passive = 0; passive <= 1; passive++) {
13187 memset(&hints, 0, sizeof(hints));
13188 hints.ai_family = AF_UNSPEC;
13189 hints.ai_flags = passive ? AI_PASSIVE : 0;
13190 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013191 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13193 (void)gai_strerror(gaierr);
13194 goto bad;
13195 }
13196 for (ai = aitop; ai; ai = ai->ai_next) {
13197 if (ai->ai_addr == NULL ||
13198 ai->ai_addrlen == 0 ||
13199 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13200 straddr, sizeof(straddr), strport, sizeof(strport),
13201 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13202 goto bad;
13203 }
13204 switch (ai->ai_family) {
13205 case AF_INET:
13206 if (strcmp(strport, "54321") != 0) {
13207 goto bad;
13208 }
13209 if (passive) {
13210 if (strcmp(straddr, "0.0.0.0") != 0) {
13211 goto bad;
13212 }
13213 } else {
13214 if (strcmp(straddr, "127.0.0.1") != 0) {
13215 goto bad;
13216 }
13217 }
13218 inet4++;
13219 break;
13220 case AF_INET6:
13221 if (strcmp(strport, "54321") != 0) {
13222 goto bad;
13223 }
13224 if (passive) {
13225 if (strcmp(straddr, "::") != 0) {
13226 goto bad;
13227 }
13228 } else {
13229 if (strcmp(straddr, "::1") != 0) {
13230 goto bad;
13231 }
13232 }
13233 inet6++;
13234 break;
13235 case AF_UNSPEC:
13236 goto bad;
13237 break;
13238 default:
13239 /* another family support? */
13240 break;
13241 }
13242 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013243 freeaddrinfo(aitop);
13244 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245 }
13246
13247 if (!(inet4 == 0 || inet4 == 2))
13248 goto bad;
13249 if (!(inet6 == 0 || inet6 == 2))
13250 goto bad;
13251
13252 if (aitop)
13253 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013254 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013255
13256 bad:
13257 if (aitop)
13258 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260}
13261
Martin v. Löwis11437992002-04-12 09:54:03 +000013262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13269 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013272fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013275
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13277$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13278
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013279if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013280then
13281 if test $ipv6 = yes
13282 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283 echo 'Fatal: You must get working getaddrinfo() function.'
13284 echo ' or you can specify "--disable-ipv6"'.
13285 exit 1
13286 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013287else
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013290
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013292
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013293for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013294do :
13295 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013296if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013298#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013299_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301fi
13302done
13303
Michael W. Hudson54241132001-12-07 15:38:26 +000013304
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13307$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013308if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310else
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013312/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313#include <sys/types.h>
13314#include <sys/time.h>
13315#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
13320if ((struct tm *) 0)
13321return 0;
13322 ;
13323 return 0;
13324}
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13334$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013335if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338
13339fi
13340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13342$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013343if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013347/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348#include <sys/types.h>
13349#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351int
13352main ()
13353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354struct tm tm;
13355 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 ;
13358 return 0;
13359}
13360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362 ac_cv_struct_tm=time.h
13363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13369$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013370if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373
13374fi
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376ac_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 +000013377#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379"
Victor Stinnere0be4232011-10-25 13:06:09 +020013380if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
13382cat >>confdefs.h <<_ACEOF
13383#define HAVE_STRUCT_TM_TM_ZONE 1
13384_ACEOF
13385
13386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013388
Martin v. Löwis11437992002-04-12 09:54:03 +000013389if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392
13393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13395"
Victor Stinnere0be4232011-10-25 13:06:09 +020013396if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400fi
13401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013403#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404_ACEOF
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13407$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013408if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410else
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013412/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013413#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414#if !HAVE_DECL_TZNAME
13415extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418int
13419main ()
13420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 ;
13423 return 0;
13424}
13425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013426if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013427 ac_cv_var_tzname=yes
13428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013431rm -f core conftest.err conftest.$ac_objext \
13432 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13435$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013436 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440 fi
13441fi
13442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443ac_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 +020013444if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
13446cat >>confdefs.h <<_ACEOF
13447#define HAVE_STRUCT_STAT_ST_RDEV 1
13448_ACEOF
13449
13450
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453ac_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 +020013454if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456cat >>confdefs.h <<_ACEOF
13457#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13458_ACEOF
13459
13460
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013461fi
13462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463ac_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 +020013464if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013465
13466cat >>confdefs.h <<_ACEOF
13467#define HAVE_STRUCT_STAT_ST_FLAGS 1
13468_ACEOF
13469
13470
13471fi
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473ac_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 +020013474if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013475
13476cat >>confdefs.h <<_ACEOF
13477#define HAVE_STRUCT_STAT_ST_GEN 1
13478_ACEOF
13479
13480
13481fi
13482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483ac_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 +020013484if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013485
13486cat >>confdefs.h <<_ACEOF
13487#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13488_ACEOF
13489
13490
13491fi
13492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493ac_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 +020013494if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496cat >>confdefs.h <<_ACEOF
13497#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13498_ACEOF
13499
13500
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013501fi
13502
Stefan Krah267b6392016-04-26 01:09:18 +020013503ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13504 #include <sys/types.h>
13505 #include <pwd.h>
13506
13507"
13508if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13509
13510cat >>confdefs.h <<_ACEOF
13511#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13512_ACEOF
13513
13514
13515fi
13516ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13517 #include <sys/types.h>
13518 #include <pwd.h>
13519
13520"
13521if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13522
13523cat >>confdefs.h <<_ACEOF
13524#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13525_ACEOF
13526
13527
13528fi
13529
Zachary Ware6a6967e2016-10-01 00:47:27 -050013530# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13531ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13532"
13533if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13534
13535cat >>confdefs.h <<_ACEOF
13536#define HAVE_SIGINFO_T_SI_BAND 1
13537_ACEOF
13538
13539
13540fi
13541
Michael W. Hudson54241132001-12-07 15:38:26 +000013542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13544$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013545if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547else
Matthias Kloseb159a552010-04-25 21:00:44 +000013548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013551#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013552int
13553main ()
13554{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ;
13557 return 0;
13558}
13559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561 ac_cv_header_time_altzone=yes
13562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567fi
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13570$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574
13575fi
13576
Guido van Rossumda88dad1995-01-26 00:46:29 +000013577was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13579$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013581/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013582
13583#include <sys/types.h>
13584#include <sys/select.h>
13585#include <sys/time.h>
13586
Martin v. Löwis11437992002-04-12 09:54:03 +000013587int
13588main ()
13589{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590;
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ;
13592 return 0;
13593}
13594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013599
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013600 was_it_defined=yes
13601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13605$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13608$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013609if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611else
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013613/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013614#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013615int
13616main ()
13617{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 ;
13620 return 0;
13621}
13622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624 ac_cv_struct_addrinfo=yes
13625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13632$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013633if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636
13637fi
13638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13640$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013641if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013645/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013646
13647# include <sys/types.h>
13648# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013649int
13650main ()
13651{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013652struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013658 ac_cv_struct_sockaddr_storage=yes
13659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663fi
13664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13666$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013667if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013670
13671fi
13672
Christian Heimesdffa3942016-09-05 23:54:41 +020013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13674$as_echo_n "checking for sockaddr_alg... " >&6; }
13675if ${ac_cv_struct_sockaddr_alg+:} false; then :
13676 $as_echo_n "(cached) " >&6
13677else
13678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679/* end confdefs.h. */
13680
13681# include <sys/types.h>
13682# include <sys/socket.h>
13683# include <linux/if_alg.h>
13684int
13685main ()
13686{
13687struct sockaddr_alg s
13688 ;
13689 return 0;
13690}
13691_ACEOF
13692if ac_fn_c_try_compile "$LINENO"; then :
13693 ac_cv_struct_sockaddr_alg=yes
13694else
13695 ac_cv_struct_sockaddr_alg=no
13696fi
13697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13698fi
13699
13700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13701$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13702if test $ac_cv_struct_sockaddr_alg = yes; then
13703
13704$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13705
13706fi
13707
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13711$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013712if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013717$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013718int
13719main ()
13720{
13721static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013722test_array [0] = 0;
13723return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
13725 ;
13726 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013727}
Martin v. Löwis11437992002-04-12 09:54:03 +000013728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013729if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013730 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13737$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740
13741fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13744$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013745if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013749/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750
Martin v. Löwis11437992002-04-12 09:54:03 +000013751int
13752main ()
13753{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013756 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013758 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760 char const *const *pcpcc;
13761 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 /* NEC SVR4.0.2 mips cc rejects this. */
13763 struct point {int x, y;};
13764 static struct point const zero = {0,0};
13765 /* AIX XL C 1.02.0.0 rejects this.
13766 It does not let you subtract one const X* pointer from another in
13767 an arm of an if-expression whose if-part is not a constant
13768 expression */
13769 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772 ++pcpcc;
13773 ppc = (char**) pcpcc;
13774 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013775 { /* SCO 3.2v4 cc rejects this sort of thing. */
13776 char tx;
13777 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 }
13783 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13784 int x[] = {25, 17};
13785 const int *foo = &x[0];
13786 ++foo;
13787 }
13788 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13789 typedef const int *iptr;
13790 iptr p = 0;
13791 ++p;
13792 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013793 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013795 struct s { int j; const int *ap[3]; } bx;
13796 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 }
13798 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13799 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013803#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013804
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ;
13806 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013807}
Martin v. Löwis11437992002-04-12 09:54:03 +000013808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013809if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810 ac_cv_c_const=yes
13811else
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13817$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821
13822fi
13823
Michael W. Hudson54241132001-12-07 15:38:26 +000013824
Guido van Rossumda88dad1995-01-26 00:46:29 +000013825works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13827$as_echo_n "checking for working signed char... " >&6; }
13828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013829/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013830
Martin v. Löwis11437992002-04-12 09:54:03 +000013831int
13832main ()
13833{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 ;
13836 return 0;
13837}
13838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013840 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013841else
Skip Montanaro6dead952003-09-25 14:50:04 +000013842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013844
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013845
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13849$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013850
Guido van Rossumda88dad1995-01-26 00:46:29 +000013851have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13853$as_echo_n "checking for prototypes... " >&6; }
13854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013855/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013856int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013857int
13858main ()
13859{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 ;
13862 return 0;
13863}
13864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Matthias Kloseb159a552010-04-25 21:00:44 +000013869 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13873$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874
Guido van Rossumda88dad1995-01-26 00:46:29 +000013875works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13877$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013879/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013880
13881#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013882int foo(int x, ...) {
13883 va_list va;
13884 va_start(va, x);
13885 va_arg(va, int);
13886 va_arg(va, char *);
13887 va_arg(va, double);
13888 return 0;
13889}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013890
Martin v. Löwis11437992002-04-12 09:54:03 +000013891int
13892main ()
13893{
Guido van Rossum90eea071996-08-30 20:58:57 +000013894return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 ;
13896 return 0;
13897}
13898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013900
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013904 works=yes
13905
Guido van Rossum627b2d71993-12-24 10:39:16 +000013906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13909$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910
Martin v. Löwisd6320502004-08-12 13:45:08 +000013911# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13913$as_echo_n "checking for socketpair... " >&6; }
13914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013915/* end confdefs.h. */
13916
13917#include <sys/types.h>
13918#include <sys/socket.h>
13919
13920int
13921main ()
13922{
13923void *x=socketpair
13924 ;
13925 return 0;
13926}
13927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013931
Matthias Kloseb159a552010-04-25 21:00:44 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013933$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13936$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013937
13938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013940
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013941# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13943$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013945/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946#include <sys/types.h>
13947#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013948int
13949main ()
13950{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013951struct sockaddr x;
13952x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 ;
13954 return 0;
13955}
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_compile "$LINENO"; then :
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13959$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013962
13963else
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13965$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013966
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013969
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013970# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013974if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13979$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980 OLD_CFLAGS=$CFLAGS
13981 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013983/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984
13985# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987int
13988main ()
13989{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
13991 char *name;
13992 struct hostent *he, *res;
13993 char buffer[2048];
13994 int buflen = 2048;
13995 int h_errnop;
13996
13997 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
13999 ;
14000 return 0;
14001}
14002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14011$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013else
Skip Montanaro6dead952003-09-25 14:50:04 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14016$as_echo "no" >&6; }
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14018$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014021
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014022# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024int
14025main ()
14026{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027
14028 char *name;
14029 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014030 char buffer[2048];
14031 int buflen = 2048;
14032 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014033
Matthias Kloseb159a552010-04-25 21:00:44 +000014034 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
14036 ;
14037 return 0;
14038}
14039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014043
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
Matthias Kloseb159a552010-04-25 21:00:44 +000014045$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14048$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014049
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014050else
Skip Montanaro6dead952003-09-25 14:50:04 +000014051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14053$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14055$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14057/* end confdefs.h. */
14058
14059# include <netdb.h>
14060
14061int
14062main ()
14063{
14064
14065 char *name;
14066 struct hostent *he;
14067 struct hostent_data data;
14068
14069 (void) gethostbyname_r(name, he, &data);
14070
14071 ;
14072 return 0;
14073}
14074_ACEOF
14075if ac_fn_c_try_compile "$LINENO"; then :
14076
14077 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14078
14079
14080$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14081
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14083$as_echo "yes" >&6; }
14084
14085else
14086
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14088$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014089
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014095
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014098 CFLAGS=$OLD_CFLAGS
14099
14100else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 for ac_func in gethostbyname
14103do :
14104 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014105if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014107#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014108_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014110fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014111done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112
Michael W. Hudson54241132001-12-07 15:38:26 +000014113
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014114fi
14115
Michael W. Hudson54241132001-12-07 15:38:26 +000014116
14117
14118
14119
14120
14121
Guido van Rossum627b2d71993-12-24 10:39:16 +000014122# checks for system services
14123# (none yet)
14124
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014125# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014126ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014127if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014128
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14131$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014132if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014134else
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014136LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140/* Override any GCC internal prototype to avoid an error.
14141 Use char because int might match the return type of a GCC
14142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014143#ifdef __cplusplus
14144extern "C"
14145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014146char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014147int
14148main ()
14149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ;
14152 return 0;
14153}
14154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014160rm -f core conftest.err conftest.$ac_objext \
14161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014162LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14165$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014166if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 cat >>confdefs.h <<_ACEOF
14168#define HAVE_LIBIEEE 1
14169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014170
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014171 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014172
Guido van Rossum627b2d71993-12-24 10:39:16 +000014173fi
14174
Michael W. Hudson54241132001-12-07 15:38:26 +000014175
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014176fi
14177
Michael W. Hudson54241132001-12-07 15:38:26 +000014178
Guido van Rossum7f43da71994-08-01 12:15:30 +000014179# check for --with-libm=...
14180
Guido van Rossum563e7081996-09-10 18:20:48 +000014181case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014182Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014183*) LIBM=-lm
14184esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14186$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014189if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014191if test "$withval" = no
14192then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14194$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014195elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014196then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14198$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014199else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014200fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014201else
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14203$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204fi
14205
Guido van Rossum7f43da71994-08-01 12:15:30 +000014206
14207# check for --with-libc=...
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14210$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014213if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014215if test "$withval" = no
14216then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14218$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014219elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014220then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14222$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014223else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014224fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014225else
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14227$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228fi
14229
Guido van Rossum7f43da71994-08-01 12:15:30 +000014230
Stefan Krah1919b7e2012-03-21 18:25:23 +010014231# **************************************
14232# * Check for gcc x64 inline assembler *
14233# **************************************
14234
14235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14236$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14238/* end confdefs.h. */
14239
14240int
14241main ()
14242{
14243
14244 __asm__ __volatile__ ("movq %rcx, %rax");
14245
14246 ;
14247 return 0;
14248}
14249_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014250if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014251 have_gcc_asm_for_x64=yes
14252else
14253 have_gcc_asm_for_x64=no
14254fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014255rm -f core conftest.err conftest.$ac_objext \
14256 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14258$as_echo "$have_gcc_asm_for_x64" >&6; }
14259if test "$have_gcc_asm_for_x64" = yes
14260then
14261
14262$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14263
14264fi
14265
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014266# **************************************************
14267# * Check for various properties of floating point *
14268# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014269
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14271$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14272if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014274else
14275
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014276
14277ax_cv_c_float_words_bigendian=unknown
14278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279/* end confdefs.h. */
14280
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014281
14282double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14283
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014284
14285_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014286if ac_fn_c_try_compile "$LINENO"; then :
14287
14288
14289if grep noonsees conftest.$ac_objext >/dev/null ; then
14290 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014291fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014292if grep seesnoon conftest.$ac_objext >/dev/null ; then
14293 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14294 ax_cv_c_float_words_bigendian=no
14295 else
14296 ax_cv_c_float_words_bigendian=unknown
14297 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298fi
14299
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014300
14301fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014303fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14305$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014306
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014307case $ax_cv_c_float_words_bigendian in
14308 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014310$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14311 ;;
14312 no)
14313 ;;
14314 *)
14315 as_fn_error $? "
14316
14317Unknown float word ordering. You need to manually preset
14318ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14319
14320 " "$LINENO" 5 ;;
14321esac
14322
14323
14324if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325then
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014329elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014330then
14331
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014332$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14333
14334else
14335 # Some ARM platforms use a mixed-endian representation for doubles.
14336 # While Python doesn't currently have full support for these platforms
14337 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14338 # conversions work.
14339 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14340 # or little, then it must be this?
14341
Matthias Kloseb9621712010-04-24 17:59:49 +000014342$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014343
14344fi
14345
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014346# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014347# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014348# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014349# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014350# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014351# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014352
14353# This inline assembler syntax may also work for suncc and icc,
14354# so we try it on all platforms.
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14357$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014359/* end confdefs.h. */
14360
14361int
14362main ()
14363{
14364
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014365 unsigned short cw;
14366 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14367 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014368
14369 ;
14370 return 0;
14371}
14372_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014373if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014374 have_gcc_asm_for_x87=yes
14375else
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014377fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014378rm -f core conftest.err conftest.$ac_objext \
14379 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14381$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014382if test "$have_gcc_asm_for_x87" = yes
14383then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014384
Matthias Kloseb9621712010-04-24 17:59:49 +000014385$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014386
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14390$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14392/* end confdefs.h. */
14393
14394int
14395main ()
14396{
14397
14398 unsigned int fpcr;
14399 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14400 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14401
14402 ;
14403 return 0;
14404}
14405_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014406if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014407 have_gcc_asm_for_mc68881=yes
14408else
14409 have_gcc_asm_for_mc68881=no
14410fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014411rm -f core conftest.err conftest.$ac_objext \
14412 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14414$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14415if test "$have_gcc_asm_for_mc68881" = yes
14416then
14417
14418$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14419
14420fi
14421
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014422# Detect whether system arithmetic is subject to x87-style double
14423# rounding issues. The result of this test has little meaning on non
14424# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14425# mode is round-to-nearest and double rounding issues are present, and
14426# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14428$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014429# $BASECFLAGS may affect the result
14430ac_save_cc="$CC"
14431CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014432if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014433 ac_cv_x87_double_rounding=no
14434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014436/* end confdefs.h. */
14437
14438#include <stdlib.h>
14439#include <math.h>
14440int main() {
14441 volatile double x, y, z;
14442 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14443 x = 0.99999999999999989; /* 1-2**-53 */
14444 y = 1./x;
14445 if (y != 1.)
14446 exit(0);
14447 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14448 x = 1e16;
14449 y = 2.99999;
14450 z = x + y;
14451 if (z != 1e16+4.)
14452 exit(0);
14453 /* both tests show evidence of double rounding */
14454 exit(1);
14455}
14456
14457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014458if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014459 ac_cv_x87_double_rounding=no
14460else
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014465fi
14466
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014467CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14469$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014470if test "$ac_cv_x87_double_rounding" = yes
14471then
14472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014474
14475fi
14476
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014477# ************************************
14478# * Check for mathematical functions *
14479# ************************************
14480
14481LIBS_SAVE=$LIBS
14482LIBS="$LIBS $LIBM"
14483
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014484for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14485do :
14486 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14487ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014488if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014489 cat >>confdefs.h <<_ACEOF
14490#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14491_ACEOF
14492
14493fi
14494done
14495
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014496for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014497do :
14498 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14499ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014500if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014501 cat >>confdefs.h <<_ACEOF
14502#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14503_ACEOF
14504
14505fi
14506done
14507
14508ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14509"
Victor Stinnere0be4232011-10-25 13:06:09 +020014510if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014511 ac_have_decl=1
14512else
14513 ac_have_decl=0
14514fi
14515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_DECL_ISINF $ac_have_decl
14518_ACEOF
14519ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14520"
Victor Stinnere0be4232011-10-25 13:06:09 +020014521if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014522 ac_have_decl=1
14523else
14524 ac_have_decl=0
14525fi
14526
14527cat >>confdefs.h <<_ACEOF
14528#define HAVE_DECL_ISNAN $ac_have_decl
14529_ACEOF
14530ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14531"
Victor Stinnere0be4232011-10-25 13:06:09 +020014532if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014533 ac_have_decl=1
14534else
14535 ac_have_decl=0
14536fi
14537
14538cat >>confdefs.h <<_ACEOF
14539#define HAVE_DECL_ISFINITE $ac_have_decl
14540_ACEOF
14541
14542
Mark Dickinsona614f042009-11-28 12:48:43 +000014543# For multiprocessing module, check that sem_open
14544# actually works. For FreeBSD versions <= 7.2,
14545# the kernel module that provides POSIX semaphores
14546# isn't loaded by default, so an attempt to call
14547# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14549$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014550if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014554 ac_cv_posix_semaphores_enabled=yes
14555else
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014557/* end confdefs.h. */
14558
14559#include <unistd.h>
14560#include <fcntl.h>
14561#include <stdio.h>
14562#include <semaphore.h>
14563#include <sys/stat.h>
14564
14565int main(void) {
14566 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14567 if (a == SEM_FAILED) {
14568 perror("sem_open");
14569 return 1;
14570 }
14571 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014572 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014573 return 0;
14574}
14575
14576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014577if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014578 ac_cv_posix_semaphores_enabled=yes
14579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014584fi
14585
14586
Mark Dickinsona614f042009-11-28 12:48:43 +000014587fi
14588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14590$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014591if test $ac_cv_posix_semaphores_enabled = no
14592then
14593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014595
14596fi
14597
Mark Dickinson10683072009-04-18 21:18:19 +000014598# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14600$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014601if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014605 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014608/* end confdefs.h. */
14609
14610#include <unistd.h>
14611#include <fcntl.h>
14612#include <stdio.h>
14613#include <semaphore.h>
14614#include <sys/stat.h>
14615
14616int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014617 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014618 int count;
14619 int res;
14620 if(a==SEM_FAILED){
14621 perror("sem_open");
14622 return 1;
14623
14624 }
14625 res = sem_getvalue(a, &count);
14626 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014627 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014628 return res==-1 ? 1 : 0;
14629}
14630
Mark Dickinson10683072009-04-18 21:18:19 +000014631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014632if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014633 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014634else
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014639fi
14640
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014641
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014642fi
14643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14645$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014646if test $ac_cv_broken_sem_getvalue = yes
14647then
14648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014650
14651fi
14652
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014653ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14654"
14655if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14656 ac_have_decl=1
14657else
14658 ac_have_decl=0
14659fi
14660
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14663_ACEOF
14664ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14665"
14666if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14667 ac_have_decl=1
14668else
14669 ac_have_decl=0
14670fi
14671
14672cat >>confdefs.h <<_ACEOF
14673#define HAVE_DECL_RTLD_NOW $ac_have_decl
14674_ACEOF
14675ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14676"
14677if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14678 ac_have_decl=1
14679else
14680 ac_have_decl=0
14681fi
14682
14683cat >>confdefs.h <<_ACEOF
14684#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14685_ACEOF
14686ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14687"
14688if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14689 ac_have_decl=1
14690else
14691 ac_have_decl=0
14692fi
14693
14694cat >>confdefs.h <<_ACEOF
14695#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14696_ACEOF
14697ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14698"
14699if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14700 ac_have_decl=1
14701else
14702 ac_have_decl=0
14703fi
14704
14705cat >>confdefs.h <<_ACEOF
14706#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14707_ACEOF
14708ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14709"
14710if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14711 ac_have_decl=1
14712else
14713 ac_have_decl=0
14714fi
14715
14716cat >>confdefs.h <<_ACEOF
14717#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14718_ACEOF
14719ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14720"
14721if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14722 ac_have_decl=1
14723else
14724 ac_have_decl=0
14725fi
14726
14727cat >>confdefs.h <<_ACEOF
14728#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14729_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014730ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14731"
14732if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14733 ac_have_decl=1
14734else
14735 ac_have_decl=0
14736fi
14737
14738cat >>confdefs.h <<_ACEOF
14739#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14740_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014741
14742
Mark Dickinsonbd792642009-03-18 20:06:12 +000014743# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14745$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014746# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014747if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014748 enableval=$enable_big_digits; case $enable_big_digits in
14749yes)
14750 enable_big_digits=30 ;;
14751no)
14752 enable_big_digits=15 ;;
1475315|30)
14754 ;;
14755*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014756 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 +000014757esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14759$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014760
14761cat >>confdefs.h <<_ACEOF
14762#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14763_ACEOF
14764
14765
14766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14768$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014769fi
14770
14771
Guido van Rossumef2255b2000-03-10 22:30:29 +000014772# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014773ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014774if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014775
14776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014778
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014779 wchar_h="yes"
14780
Guido van Rossumef2255b2000-03-10 22:30:29 +000014781else
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014783
14784fi
14785
Michael W. Hudson54241132001-12-07 15:38:26 +000014786
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014788# determine wchar_t size
14789if test "$wchar_h" = yes
14790then
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14796$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014797if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014799else
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14801"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803else
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 if test "$ac_cv_type_wchar_t" = yes; then
14805 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014807as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014808See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 else
14810 ac_cv_sizeof_wchar_t=0
14811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14816$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817
14818
14819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014821#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014822_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014823
Michael W. Hudson54241132001-12-07 15:38:26 +000014824
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014825fi
14826
Matthias Kloseb9621712010-04-24 17:59:49 +000014827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14828$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014829have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014831/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014832
14833#include <tcl.h>
14834#if TCL_UTF_MAX != 6
14835# error "NOT UCS4_TCL"
14836#endif
14837int
14838main ()
14839{
14840
14841 ;
14842 return 0;
14843}
14844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014846
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014849
14850 have_ucs4_tcl=yes
14851
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14855$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014856
Skip Montanaro6dead952003-09-25 14:50:04 +000014857# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014858if test "$wchar_h" = yes
14859then
14860 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14862$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014863 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014865else
14866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014868 ac_cv_wchar_t_signed=yes
14869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014871/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014872
14873 #include <wchar.h>
14874 int main()
14875 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014876 /* Success: exit code 0 */
14877 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014878 }
14879
14880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014881if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014882 ac_cv_wchar_t_signed=yes
14883else
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014888fi
14889
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014890fi
14891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14893$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894fi
14895
Michael Osipov3738fad2018-08-24 18:17:19 +020014896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14897$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014898# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014899if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014900 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014901then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
Michael Osipov3738fad2018-08-24 18:17:19 +020014905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14906$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014907else
Michael Osipov3738fad2018-08-24 18:17:19 +020014908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14909$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014910fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911
14912# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14914$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014915if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917else
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 ac_cv_c_bigendian=unknown
14919 # See if we're dealing with a universal compiler.
14920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14921/* end confdefs.h. */
14922#ifndef __APPLE_CC__
14923 not a universal capable compiler
14924 #endif
14925 typedef int dummy;
14926
Skip Montanaro6dead952003-09-25 14:50:04 +000014927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014928if ac_fn_c_try_compile "$LINENO"; then :
14929
14930 # Check for potential -arch flags. It is not universal unless
14931 # there are at least two -arch flags with different values.
14932 ac_arch=
14933 ac_prev=
14934 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14935 if test -n "$ac_prev"; then
14936 case $ac_word in
14937 i?86 | x86_64 | ppc | ppc64)
14938 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14939 ac_arch=$ac_word
14940 else
14941 ac_cv_c_bigendian=universal
14942 break
14943 fi
14944 ;;
14945 esac
14946 ac_prev=
14947 elif test "x$ac_word" = "x-arch"; then
14948 ac_prev=arch
14949 fi
14950 done
14951fi
14952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14953 if test $ac_cv_c_bigendian = unknown; then
14954 # See if sys/param.h defines the BYTE_ORDER macro.
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014956/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014959
Martin v. Löwis11437992002-04-12 09:54:03 +000014960int
14961main ()
14962{
Matthias Kloseb9621712010-04-24 17:59:49 +000014963#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14964 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14965 && LITTLE_ENDIAN)
14966 bogus endian macros
14967 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014968
14969 ;
14970 return 0;
14971}
14972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014973if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014974 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014977#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014979
Martin v. Löwis11437992002-04-12 09:54:03 +000014980int
14981main ()
14982{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014983#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 not big endian
14985 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
14987 ;
14988 return 0;
14989}
14990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014991if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014992 ac_cv_c_bigendian=yes
14993else
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014997fi
14998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14999 fi
15000 if test $ac_cv_c_bigendian = unknown; then
15001 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015003/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015004#include <limits.h>
15005
Martin v. Löwis11437992002-04-12 09:54:03 +000015006int
15007main ()
15008{
Matthias Kloseb9621712010-04-24 17:59:49 +000015009#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15010 bogus endian macros
15011 #endif
15012
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ;
15014 return 0;
15015}
15016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015017if ac_fn_c_try_compile "$LINENO"; then :
15018 # It does; now see whether it defined to _BIG_ENDIAN or not.
15019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15020/* end confdefs.h. */
15021#include <limits.h>
15022
15023int
15024main ()
15025{
15026#ifndef _BIG_ENDIAN
15027 not big endian
15028 #endif
15029
15030 ;
15031 return 0;
15032}
15033_ACEOF
15034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015036else
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15040fi
15041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15042 fi
15043 if test $ac_cv_c_bigendian = unknown; then
15044 # Compile a test program.
15045 if test "$cross_compiling" = yes; then :
15046 # Try to guess by grepping values from an object file.
15047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15048/* end confdefs.h. */
15049short int ascii_mm[] =
15050 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15051 short int ascii_ii[] =
15052 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15053 int use_ascii (int i) {
15054 return ascii_mm[i] + ascii_ii[i];
15055 }
15056 short int ebcdic_ii[] =
15057 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15058 short int ebcdic_mm[] =
15059 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15060 int use_ebcdic (int i) {
15061 return ebcdic_mm[i] + ebcdic_ii[i];
15062 }
15063 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065int
15066main ()
15067{
15068return use_ascii (foo) == use_ebcdic (foo);
15069 ;
15070 return 0;
15071}
15072_ACEOF
15073if ac_fn_c_try_compile "$LINENO"; then :
15074 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15075 ac_cv_c_bigendian=yes
15076 fi
15077 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15078 if test "$ac_cv_c_bigendian" = unknown; then
15079 ac_cv_c_bigendian=no
15080 else
15081 # finding both strings is unlikely to happen, but who knows?
15082 ac_cv_c_bigendian=unknown
15083 fi
15084 fi
15085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015087else
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015089/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015091int
15092main ()
15093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 /* Are we little or big endian? From Harbison&Steele. */
15096 union
15097 {
15098 long int l;
15099 char c[sizeof (long int)];
15100 } u;
15101 u.l = 1;
15102 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103
15104 ;
15105 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015106}
Martin v. Löwis11437992002-04-12 09:54:03 +000015107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015109 ac_cv_c_bigendian=no
15110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15120$as_echo "$ac_cv_c_bigendian" >&6; }
15121 case $ac_cv_c_bigendian in #(
15122 yes)
15123 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15124;; #(
15125 no)
15126 ;; #(
15127 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015128
Matthias Kloseb9621712010-04-24 17:59:49 +000015129$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015130
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 ;; #(
15132 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015134 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015136
Michael W. Hudson54241132001-12-07 15:38:26 +000015137
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015138# ABI version string for Python extension modules. This appears between the
15139# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15140# from the following attributes which affect the ABI of this Python build (in
15141# this order):
15142#
15143# * The Python implementation (always 'cpython-' for us)
15144# * The major and minor version numbers
15145# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015146#
15147# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015148# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15149# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015150#
15151# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15152# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015153
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15155$as_echo_n "checking ABIFLAGS... " >&6; }
15156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15157$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15159$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015160SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15162$as_echo "$SOABI" >&6; }
15163
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015164# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15165if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015166 # Similar to SOABI but remove "d" flag from ABIFLAGS
15167
15168 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15169
15170cat >>confdefs.h <<_ACEOF
15171#define ALT_SOABI "${ALT_SOABI}"
15172_ACEOF
15173
15174fi
15175
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015176
15177case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015178 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015179 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15180 *)
15181 EXT_SUFFIX=${SHLIB_SUFFIX};;
15182esac
15183
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15185$as_echo_n "checking LDVERSION... " >&6; }
15186LDVERSION='$(VERSION)$(ABIFLAGS)'
15187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15188$as_echo "$LDVERSION" >&6; }
15189
E. M. Brayc994c8f2019-05-24 17:33:47 +020015190# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015191
E. M. Brayb1fc4172019-05-24 18:39:39 +020015192if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015193 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015194else
15195 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015196fi
15197
doko@python.org87421192013-01-26 11:39:31 +010015198
doko@ubuntu.com55532312016-06-14 08:55:19 +020015199if test x$PLATFORM_TRIPLET = x; then
15200 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15201else
15202 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15203fi
doko@python.org87421192013-01-26 11:39:31 +010015204
15205
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015206# Check whether right shifting a negative integer extends the sign bit
15207# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15209$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015210if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015212else
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
Matthias Kloseb9621712010-04-24 17:59:49 +000015214if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015215 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015216else
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015218/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015219
15220int main()
15221{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015222 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015223}
15224
Martin v. Löwis11437992002-04-12 09:54:03 +000015225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015226if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015227 ac_cv_rshift_extends_sign=yes
15228else
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015233fi
15234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235fi
15236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15238$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015239if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015240then
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015243
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015244fi
15245
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015246# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15248$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015249if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015251else
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015255#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015256int
15257main ()
15258{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015259
15260 FILE *f = fopen("/dev/null", "r");
15261 flockfile(f);
15262 getc_unlocked(f);
15263 funlockfile(f);
15264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ;
15266 return 0;
15267}
15268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015269if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015270 ac_cv_have_getc_unlocked=yes
15271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 ac_cv_have_getc_unlocked=no
15273fi
15274rm -f core conftest.err conftest.$ac_objext \
15275 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277
Matthias Kloseb9621712010-04-24 17:59:49 +000015278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15279$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015280if test "$ac_cv_have_getc_unlocked" = yes
15281then
Martin v. Löwis11437992002-04-12 09:54:03 +000015282
Matthias Kloseb9621712010-04-24 17:59:49 +000015283$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015284
15285fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015286
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015287# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015288# save the value of LIBS so we don't actually link Python with readline
15289LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015290
Gregory P. Smith18820942008-09-07 06:24:49 +000015291# On some systems we need to link readline to a termcap compatible
15292# library. NOTE: Keep the precedence of listed libraries synchronised
15293# with setup.py.
15294py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15296$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015297for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015298 if test -z "$py_libtermcap"; then
15299 READLINE_LIBS="-lreadline"
15300 else
15301 READLINE_LIBS="-lreadline -l$py_libtermcap"
15302 fi
15303 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015305/* end confdefs.h. */
15306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307/* Override any GCC internal prototype to avoid an error.
15308 Use char because int might match the return type of a GCC
15309 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015310#ifdef __cplusplus
15311extern "C"
15312#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015313char readline ();
15314int
15315main ()
15316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015318 ;
15319 return 0;
15320}
15321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015323 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015325rm -f core conftest.err conftest.$ac_objext \
15326 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015327 if test $py_cv_lib_readline = yes; then
15328 break
15329 fi
15330done
15331# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15332#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015333if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15335$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015336else
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15338$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015341
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015342fi
15343
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015344# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015346/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015347#include <readline/readline.h>
15348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015349if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015350 have_readline=yes
15351else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015352 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015353
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015354fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015355rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015356if test $have_readline = yes
15357then
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015359/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015360#include <readline/readline.h>
15361
15362_ACEOF
15363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015365
Matthias Kloseb9621712010-04-24 17:59:49 +000015366$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015367
15368fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015369rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015370
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015372/* end confdefs.h. */
15373#include <readline/readline.h>
15374
15375_ACEOF
15376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015380
15381fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015382rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015383
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015384fi
15385
Martin v. Löwis0daad592001-09-30 21:09:59 +000015386# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15388$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015389if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015391else
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015393LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397/* Override any GCC internal prototype to avoid an error.
15398 Use char because int might match the return type of a GCC
15399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015400#ifdef __cplusplus
15401extern "C"
15402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015403char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015404int
15405main ()
15406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ;
15409 return 0;
15410}
15411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015414else
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015417rm -f core conftest.err conftest.$ac_objext \
15418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015419LIBS=$ac_check_lib_save_LIBS
15420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15422$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015423if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015426
Martin v. Löwis0daad592001-09-30 21:09:59 +000015427fi
15428
Michael W. Hudson54241132001-12-07 15:38:26 +000015429
Thomas Wouters89d996e2007-09-08 17:39:28 +000015430# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15432$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015433if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015435else
15436 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015437LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015439/* end confdefs.h. */
15440
15441/* Override any GCC internal prototype to avoid an error.
15442 Use char because int might match the return type of a GCC
15443 builtin and then its argument prototype would still apply. */
15444#ifdef __cplusplus
15445extern "C"
15446#endif
15447char rl_completion_display_matches_hook ();
15448int
15449main ()
15450{
15451return rl_completion_display_matches_hook ();
15452 ;
15453 return 0;
15454}
15455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015456if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015457 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15458else
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015461rm -f core conftest.err conftest.$ac_objext \
15462 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015463LIBS=$ac_check_lib_save_LIBS
15464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15466$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015467if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015470
15471fi
15472
15473
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015474# also in 4.0, but not in editline
15475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15476$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15477if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15478 $as_echo_n "(cached) " >&6
15479else
15480 ac_check_lib_save_LIBS=$LIBS
15481LIBS="-lreadline $READLINE_LIBS $LIBS"
15482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15483/* end confdefs.h. */
15484
15485/* Override any GCC internal prototype to avoid an error.
15486 Use char because int might match the return type of a GCC
15487 builtin and then its argument prototype would still apply. */
15488#ifdef __cplusplus
15489extern "C"
15490#endif
15491char rl_resize_terminal ();
15492int
15493main ()
15494{
15495return rl_resize_terminal ();
15496 ;
15497 return 0;
15498}
15499_ACEOF
15500if ac_fn_c_try_link "$LINENO"; then :
15501 ac_cv_lib_readline_rl_resize_terminal=yes
15502else
15503 ac_cv_lib_readline_rl_resize_terminal=no
15504fi
15505rm -f core conftest.err conftest.$ac_objext \
15506 conftest$ac_exeext conftest.$ac_ext
15507LIBS=$ac_check_lib_save_LIBS
15508fi
15509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15510$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15511if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15512
15513$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15514
15515fi
15516
15517
Martin v. Löwis0daad592001-09-30 21:09:59 +000015518# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15520$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015521if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015523else
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015525LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529/* Override any GCC internal prototype to avoid an error.
15530 Use char because int might match the return type of a GCC
15531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015532#ifdef __cplusplus
15533extern "C"
15534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015535char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015536int
15537main ()
15538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015539return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ;
15541 return 0;
15542}
15543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015546else
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015549rm -f core conftest.err conftest.$ac_objext \
15550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015551LIBS=$ac_check_lib_save_LIBS
15552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15554$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015555if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015556
Matthias Kloseb9621712010-04-24 17:59:49 +000015557$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015558
Guido van Rossum353ae582001-07-10 16:45:32 +000015559fi
15560
Jack Jansendd19cf82001-12-06 22:36:17 +000015561
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015562# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015564/* end confdefs.h. */
15565#include <readline/readline.h>
15566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015567if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015568 have_readline=yes
15569else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015570 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015571
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015573rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015574if test $have_readline = yes
15575then
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015577/* end confdefs.h. */
15578#include <readline/readline.h>
15579
15580_ACEOF
15581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015583
Matthias Kloseb9621712010-04-24 17:59:49 +000015584$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015585
15586fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015587rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015588
15589fi
15590
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15592$as_echo_n "checking for append_history in -lreadline... " >&6; }
15593if ${ac_cv_lib_readline_append_history+:} false; then :
15594 $as_echo_n "(cached) " >&6
15595else
15596 ac_check_lib_save_LIBS=$LIBS
15597LIBS="-lreadline $READLINE_LIBS $LIBS"
15598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15599/* end confdefs.h. */
15600
15601/* Override any GCC internal prototype to avoid an error.
15602 Use char because int might match the return type of a GCC
15603 builtin and then its argument prototype would still apply. */
15604#ifdef __cplusplus
15605extern "C"
15606#endif
15607char append_history ();
15608int
15609main ()
15610{
15611return append_history ();
15612 ;
15613 return 0;
15614}
15615_ACEOF
15616if ac_fn_c_try_link "$LINENO"; then :
15617 ac_cv_lib_readline_append_history=yes
15618else
15619 ac_cv_lib_readline_append_history=no
15620fi
15621rm -f core conftest.err conftest.$ac_objext \
15622 conftest$ac_exeext conftest.$ac_ext
15623LIBS=$ac_check_lib_save_LIBS
15624fi
15625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15626$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15627if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15628
15629$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15630
15631fi
15632
15633
Martin v. Löwis82bca632006-02-10 20:49:30 +000015634# End of readline checks: restore LIBS
15635LIBS=$LIBS_no_readline
15636
Matthias Kloseb9621712010-04-24 17:59:49 +000015637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15638$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015639if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015640 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015641else
Martin v. Löwis11437992002-04-12 09:54:03 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015644 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015645else
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015647/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015648
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015649#include <stdlib.h>
15650#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015651int main()
15652{
15653 int val1 = nice(1);
15654 if (val1 != -1 && val1 == nice(2))
15655 exit(0);
15656 exit(1);
15657}
15658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015660if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015661 ac_cv_broken_nice=yes
15662else
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15666 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015667fi
15668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669fi
15670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15672$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015673if test "$ac_cv_broken_nice" = yes
15674then
Martin v. Löwis11437992002-04-12 09:54:03 +000015675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015677
15678fi
15679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15681$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015682if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015684else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015686 ac_cv_broken_poll=no
15687else
Matthias Kloseb9621712010-04-24 17:59:49 +000015688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015689/* end confdefs.h. */
15690
15691#include <poll.h>
15692
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015693int main()
15694{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015695 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015696 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015697
15698 close (42);
15699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015700 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015701 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015702 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015703 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015704 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015705 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015706 return 1;
15707}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015708
15709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015710if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015711 ac_cv_broken_poll=yes
15712else
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015719fi
15720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15722$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015723if test "$ac_cv_broken_poll" = yes
15724then
15725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015727
15728fi
15729
Martin v. Löwis1d459062005-03-14 21:23:33 +000015730# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15732$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015733if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015735else
15736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015738 ac_cv_working_tzset=no
15739else
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015742
15743#include <stdlib.h>
15744#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015745#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015746
15747#if HAVE_TZNAME
15748extern char *tzname[];
15749#endif
15750
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015751int main()
15752{
Brett Cannon18367812003-09-19 00:59:16 +000015753 /* Note that we need to ensure that not only does tzset(3)
15754 do 'something' with localtime, but it works as documented
15755 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015756 This includes making sure that tzname is set properly if
15757 tm->tm_zone does not exist since it is the alternative way
15758 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015759
15760 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015761 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015762 */
15763
Martin v. Löwis1d459062005-03-14 21:23:33 +000015764 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015765 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15766
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015767 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015768 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015769 if (localtime(&groundhogday)->tm_hour != 0)
15770 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015771#if HAVE_TZNAME
15772 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15773 if (strcmp(tzname[0], "UTC") ||
15774 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15775 exit(1);
15776#endif
Brett Cannon18367812003-09-19 00:59:16 +000015777
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015778 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015779 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015780 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015781 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015782#if HAVE_TZNAME
15783 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15784 exit(1);
15785#endif
Brett Cannon18367812003-09-19 00:59:16 +000015786
15787 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15788 tzset();
15789 if (localtime(&groundhogday)->tm_hour != 11)
15790 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015791#if HAVE_TZNAME
15792 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15793 exit(1);
15794#endif
15795
15796#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015797 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15798 exit(1);
15799 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15800 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015801#endif
Brett Cannon18367812003-09-19 00:59:16 +000015802
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015803 exit(0);
15804}
15805
15806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015807if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015808 ac_cv_working_tzset=yes
15809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015814fi
15815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816fi
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15819$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015820if test "$ac_cv_working_tzset" = yes
15821then
15822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015824
15825fi
15826
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015827# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15829$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015830if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015832else
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015834/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015835#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015836int
15837main ()
15838{
15839
15840struct stat st;
15841st.st_mtim.tv_nsec = 1;
15842
15843 ;
15844 return 0;
15845}
15846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015848 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015849else
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15853fi
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15856$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015857if test "$ac_cv_stat_tv_nsec" = yes
15858then
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015861
15862fi
15863
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015864# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15866$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015867if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015869else
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015871/* end confdefs.h. */
15872#include <sys/stat.h>
15873int
15874main ()
15875{
15876
15877struct stat st;
15878st.st_mtimespec.tv_nsec = 1;
15879
15880 ;
15881 return 0;
15882}
15883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015885 ac_cv_stat_tv_nsec2=yes
15886else
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15890fi
15891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15893$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015894if test "$ac_cv_stat_tv_nsec2" = yes
15895then
15896
Matthias Kloseb9621712010-04-24 17:59:49 +000015897$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015898
15899fi
15900
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015901# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015902ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015903if test "$cross_compiling" = no; then
15904 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15905fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015906
15907for ac_header in curses.h ncurses.h
15908do :
15909 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15910ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15911if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15912 cat >>confdefs.h <<_ACEOF
15913#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15914_ACEOF
15915
15916fi
15917
15918done
15919
15920
15921# On Solaris, term.h requires curses.h
15922for ac_header in term.h
15923do :
15924 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15925#ifdef HAVE_CURSES_H
15926#include <curses.h>
15927#endif
15928
15929"
15930if test "x$ac_cv_header_term_h" = xyes; then :
15931 cat >>confdefs.h <<_ACEOF
15932#define HAVE_TERM_H 1
15933_ACEOF
15934
15935fi
15936
15937done
15938
15939
Jack Jansen666b1e72001-10-31 12:11:48 +000015940# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15942$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015943if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015944 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015945else
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015947/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015948#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015949int
15950main ()
15951{
Jack Jansen666b1e72001-10-31 12:11:48 +000015952
15953 int rtn;
15954 rtn = mvwdelch(0,0,0);
15955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 ;
15957 return 0;
15958}
15959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015960if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015961 ac_cv_mvwdelch_is_expression=yes
15962else
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15966fi
15967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15969$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015970
15971if test "$ac_cv_mvwdelch_is_expression" = yes
15972then
Martin v. Löwis11437992002-04-12 09:54:03 +000015973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015975
15976fi
15977
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015978# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15979# structs since version 5.7. If the macro is defined as zero before including
15980# [n]curses.h, ncurses will expose fields of the structs regardless of the
15981# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15983$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015984if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015986else
Matthias Kloseb9621712010-04-24 17:59:49 +000015987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015988/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015989
15990 #define NCURSES_OPAQUE 0
15991 #include <curses.h>
15992
Martin v. Löwis11437992002-04-12 09:54:03 +000015993int
15994main ()
15995{
Jack Jansen666b1e72001-10-31 12:11:48 +000015996
15997 WINDOW *w;
15998 w->_flags = 0;
15999
Martin v. Löwis11437992002-04-12 09:54:03 +000016000 ;
16001 return 0;
16002}
16003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016004if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016005 ac_cv_window_has_flags=yes
16006else
Matthias Kloseb9621712010-04-24 17:59:49 +000016007 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16010fi
16011
Matthias Kloseb9621712010-04-24 17:59:49 +000016012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16013$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016014
Jack Jansen666b1e72001-10-31 12:11:48 +000016015
16016if test "$ac_cv_window_has_flags" = yes
16017then
Martin v. Löwis11437992002-04-12 09:54:03 +000016018
Matthias Kloseb9621712010-04-24 17:59:49 +000016019$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016020
16021fi
16022
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16024$as_echo_n "checking for is_pad... " >&6; }
16025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16026/* end confdefs.h. */
16027#include <curses.h>
16028int
16029main ()
16030{
16031
16032#ifndef is_pad
16033void *x=is_pad
16034#endif
16035
16036 ;
16037 return 0;
16038}
16039_ACEOF
16040if ac_fn_c_try_compile "$LINENO"; then :
16041
16042$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16043
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16045$as_echo "yes" >&6; }
16046else
16047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16048$as_echo "no" >&6; }
16049
16050fi
16051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16054$as_echo_n "checking for is_term_resized... " >&6; }
16055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016056/* end confdefs.h. */
16057#include <curses.h>
16058int
16059main ()
16060{
16061void *x=is_term_resized
16062 ;
16063 return 0;
16064}
16065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016069
Matthias Kloseb159a552010-04-25 21:00:44 +000016070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016071$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016072else
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16074$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016075
16076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16080$as_echo_n "checking for resize_term... " >&6; }
16081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016082/* end confdefs.h. */
16083#include <curses.h>
16084int
16085main ()
16086{
16087void *x=resize_term
16088 ;
16089 return 0;
16090}
16091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016092if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016095
Matthias Kloseb159a552010-04-25 21:00:44 +000016096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016097$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016098else
Matthias Kloseb9621712010-04-24 17:59:49 +000016099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16100$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016101
16102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16106$as_echo_n "checking for resizeterm... " >&6; }
16107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016108/* end confdefs.h. */
16109#include <curses.h>
16110int
16111main ()
16112{
16113void *x=resizeterm
16114 ;
16115 return 0;
16116}
16117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016118if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016119
Matthias Kloseb9621712010-04-24 17:59:49 +000016120$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016121
Matthias Kloseb159a552010-04-25 21:00:44 +000016122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016123$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016124else
Matthias Kloseb9621712010-04-24 17:59:49 +000016125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16126$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016127
16128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016130
16131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16132$as_echo_n "checking for immedok... " >&6; }
16133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16134/* end confdefs.h. */
16135#include <curses.h>
16136int
16137main ()
16138{
16139
16140#ifndef immedok
16141void *x=immedok
16142#endif
16143
16144 ;
16145 return 0;
16146}
16147_ACEOF
16148if ac_fn_c_try_compile "$LINENO"; then :
16149
16150$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16151
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16153$as_echo "yes" >&6; }
16154else
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16156$as_echo "no" >&6; }
16157
16158fi
16159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16160
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16162$as_echo_n "checking for syncok... " >&6; }
16163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16164/* end confdefs.h. */
16165#include <curses.h>
16166int
16167main ()
16168{
16169
16170#ifndef syncok
16171void *x=syncok
16172#endif
16173
16174 ;
16175 return 0;
16176}
16177_ACEOF
16178if ac_fn_c_try_compile "$LINENO"; then :
16179
16180$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16181
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16183$as_echo "yes" >&6; }
16184else
16185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186$as_echo "no" >&6; }
16187
16188fi
16189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16190
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16192$as_echo_n "checking for wchgat... " >&6; }
16193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16194/* end confdefs.h. */
16195#include <curses.h>
16196int
16197main ()
16198{
16199
16200#ifndef wchgat
16201void *x=wchgat
16202#endif
16203
16204 ;
16205 return 0;
16206}
16207_ACEOF
16208if ac_fn_c_try_compile "$LINENO"; then :
16209
16210$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16211
16212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16213$as_echo "yes" >&6; }
16214else
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16216$as_echo "no" >&6; }
16217
16218fi
16219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16220
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16222$as_echo_n "checking for filter... " >&6; }
16223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16224/* end confdefs.h. */
16225#include <curses.h>
16226int
16227main ()
16228{
16229
16230#ifndef filter
16231void *x=filter
16232#endif
16233
16234 ;
16235 return 0;
16236}
16237_ACEOF
16238if ac_fn_c_try_compile "$LINENO"; then :
16239
16240$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16241
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16243$as_echo "yes" >&6; }
16244else
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16246$as_echo "no" >&6; }
16247
16248fi
16249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16250
16251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16252$as_echo_n "checking for has_key... " >&6; }
16253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254/* end confdefs.h. */
16255#include <curses.h>
16256int
16257main ()
16258{
16259
16260#ifndef has_key
16261void *x=has_key
16262#endif
16263
16264 ;
16265 return 0;
16266}
16267_ACEOF
16268if ac_fn_c_try_compile "$LINENO"; then :
16269
16270$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16271
16272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16273$as_echo "yes" >&6; }
16274else
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16276$as_echo "no" >&6; }
16277
16278fi
16279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16280
16281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16282$as_echo_n "checking for typeahead... " >&6; }
16283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16284/* end confdefs.h. */
16285#include <curses.h>
16286int
16287main ()
16288{
16289
16290#ifndef typeahead
16291void *x=typeahead
16292#endif
16293
16294 ;
16295 return 0;
16296}
16297_ACEOF
16298if ac_fn_c_try_compile "$LINENO"; then :
16299
16300$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16301
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16303$as_echo "yes" >&6; }
16304else
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16306$as_echo "no" >&6; }
16307
16308fi
16309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16310
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16312$as_echo_n "checking for use_env... " >&6; }
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315#include <curses.h>
16316int
16317main ()
16318{
16319
16320#ifndef use_env
16321void *x=use_env
16322#endif
16323
16324 ;
16325 return 0;
16326}
16327_ACEOF
16328if ac_fn_c_try_compile "$LINENO"; then :
16329
16330$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16331
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16333$as_echo "yes" >&6; }
16334else
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16336$as_echo "no" >&6; }
16337
16338fi
16339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016340# last curses configure check
16341CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16344$as_echo "$as_me: checking for device files" >&6;}
16345
16346if test "x$cross_compiling" = xyes; then
16347 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16349$as_echo_n "checking for /dev/ptmx... " >&6; }
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16351$as_echo "not set" >&6; }
16352 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16353 fi
16354 if test "${ac_cv_file__dev_ptc+set}" != set; then
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16356$as_echo_n "checking for /dev/ptc... " >&6; }
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16358$as_echo "not set" >&6; }
16359 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16360 fi
16361fi
16362
Matthias Kloseb9621712010-04-24 17:59:49 +000016363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16364$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016365if ${ac_cv_file__dev_ptmx+:} false; then :
16366 $as_echo_n "(cached) " >&6
16367else
16368 test "$cross_compiling" = yes &&
16369 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16370if test -r "/dev/ptmx"; then
16371 ac_cv_file__dev_ptmx=yes
16372else
16373 ac_cv_file__dev_ptmx=no
16374fi
16375fi
16376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16377$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16378if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016379
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016380fi
16381
16382if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016383
Matthias Kloseb9621712010-04-24 17:59:49 +000016384$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016385
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16388$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016389if ${ac_cv_file__dev_ptc+:} false; then :
16390 $as_echo_n "(cached) " >&6
16391else
16392 test "$cross_compiling" = yes &&
16393 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16394if test -r "/dev/ptc"; then
16395 ac_cv_file__dev_ptc=yes
16396else
16397 ac_cv_file__dev_ptc=no
16398fi
16399fi
16400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16401$as_echo "$ac_cv_file__dev_ptc" >&6; }
16402if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016403
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016404fi
16405
16406if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016407
Matthias Kloseb9621712010-04-24 17:59:49 +000016408$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016409
Neal Norwitz865400f2003-03-21 01:42:58 +000016410fi
16411
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016412if test $ac_sys_system = Darwin
16413then
16414 LIBS="$LIBS -framework CoreFoundation"
16415fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016416
Matthias Kloseb9621712010-04-24 17:59:49 +000016417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16418$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016419if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016420 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016421else
Matthias Kloseb9621712010-04-24 17:59:49 +000016422 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016423 ac_cv_have_size_t_format="cross -- assuming yes"
16424
Thomas Wouters477c8d52006-05-27 19:21:47 +000016425else
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016427/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016428
Thomas Wouters477c8d52006-05-27 19:21:47 +000016429#include <stdio.h>
16430#include <stddef.h>
16431#include <string.h>
16432
Christian Heimes2c181612007-12-17 20:04:13 +000016433#ifdef HAVE_SYS_TYPES_H
16434#include <sys/types.h>
16435#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016436
16437#ifdef HAVE_SSIZE_T
16438typedef ssize_t Py_ssize_t;
16439#elif SIZEOF_VOID_P == SIZEOF_LONG
16440typedef long Py_ssize_t;
16441#else
16442typedef int Py_ssize_t;
16443#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016444
Christian Heimes2c181612007-12-17 20:04:13 +000016445int main()
16446{
16447 char buffer[256];
16448
Thomas Wouters477c8d52006-05-27 19:21:47 +000016449 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16450 return 1;
16451
Thomas Wouters89f507f2006-12-13 04:49:30 +000016452 if (strcmp(buffer, "123"))
16453 return 1;
16454
16455 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16456 return 1;
16457
16458 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016459 return 1;
16460
16461 return 0;
16462}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016463
Thomas Wouters477c8d52006-05-27 19:21:47 +000016464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016465if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016466 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016467else
Matthias Kloseb9621712010-04-24 17:59:49 +000016468 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16471 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016472fi
16473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16476$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016477if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016480
16481fi
16482
Matthias Kloseb9621712010-04-24 17:59:49 +000016483ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016484#ifdef HAVE_SYS_TYPES_H
16485#include <sys/types.h>
16486#endif
16487#ifdef HAVE_SYS_SOCKET_H
16488#include <sys/socket.h>
16489#endif
16490
Matthias Kloseb9621712010-04-24 17:59:49 +000016491"
Victor Stinnere0be4232011-10-25 13:06:09 +020016492if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016493
Martin v. Löwis11437992002-04-12 09:54:03 +000016494else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016497
16498fi
16499
Michael W. Hudson54241132001-12-07 15:38:26 +000016500
Matthias Kloseb9621712010-04-24 17:59:49 +000016501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16502$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016503if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016505else
Matthias Kloseb9621712010-04-24 17:59:49 +000016506 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016507 ac_cv_broken_mbstowcs=no
16508else
Matthias Kloseb9621712010-04-24 17:59:49 +000016509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016510/* end confdefs.h. */
16511
Stefan Krah19c21392012-11-22 23:47:32 +010016512#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016513#include<stdlib.h>
16514int main() {
16515 size_t len = -1;
16516 const char *str = "text";
16517 len = mbstowcs(NULL, str, 0);
16518 return (len != 4);
16519}
16520
16521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016522if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016523 ac_cv_broken_mbstowcs=no
16524else
Matthias Kloseb9621712010-04-24 17:59:49 +000016525 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016529fi
16530
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016531fi
16532
Matthias Kloseb9621712010-04-24 17:59:49 +000016533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16534$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016535if test "$ac_cv_broken_mbstowcs" = yes
16536then
16537
Matthias Kloseb9621712010-04-24 17:59:49 +000016538$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016539
16540fi
16541
Antoine Pitroub52ec782009-01-25 16:34:23 +000016542# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16544$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016545
16546# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016547if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016548 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016549if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016550then
16551
Matthias Kloseb9621712010-04-24 17:59:49 +000016552$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016553
Matthias Kloseb9621712010-04-24 17:59:49 +000016554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16555$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016556fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016557if test "$withval" = no
16558then
16559
16560$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16561
Matthias Kloseb9621712010-04-24 17:59:49 +000016562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16563$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016564fi
16565
Antoine Pitrou042b1282010-08-13 21:15:58 +000016566else
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16568$as_echo "no value specified" >&6; }
16569fi
16570
Antoine Pitroub52ec782009-01-25 16:34:23 +000016571
Matthias Kloseb17289e2012-03-15 19:51:34 +010016572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16573$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16574if ${ac_cv_computed_gotos+:} false; then :
16575 $as_echo_n "(cached) " >&6
16576else
16577 if test "$cross_compiling" = yes; then :
16578 if test "${with_computed_gotos+set}" = set; then
16579 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16580 else
16581 ac_cv_computed_gotos=no
16582 fi
16583else
16584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16585/* end confdefs.h. */
16586
16587int main(int argc, char **argv)
16588{
16589 static void *targets[1] = { &&LABEL1 };
16590 goto LABEL2;
16591LABEL1:
16592 return 0;
16593LABEL2:
16594 goto *targets[0];
16595 return 1;
16596}
16597
16598_ACEOF
16599if ac_fn_c_try_run "$LINENO"; then :
16600 ac_cv_computed_gotos=yes
16601else
16602 ac_cv_computed_gotos=no
16603fi
16604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16605 conftest.$ac_objext conftest.beam conftest.$ac_ext
16606fi
16607
16608fi
16609
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16611$as_echo "$ac_cv_computed_gotos" >&6; }
16612case "$ac_cv_computed_gotos" in yes*)
16613
16614$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16615
16616esac
16617
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016618case $ac_sys_system in
16619AIX*)
16620
16621$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16622 ;;
16623esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016624
Michael W. Hudson54241132001-12-07 15:38:26 +000016625
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016626
16627
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016628for h in `(cd $srcdir;echo Python/thread_*.h)`
16629do
16630 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16631done
16632
Michael W. Hudson54241132001-12-07 15:38:26 +000016633
Victor Stinner21a74a92019-04-11 22:28:12 +020016634SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16636$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016637for dir in $SRCDIRS; do
16638 if test ! -d $dir; then
16639 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016640 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016641done
Matthias Kloseb9621712010-04-24 17:59:49 +000016642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16643$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016644
Stefan Krah1919b7e2012-03-21 18:25:23 +010016645# Availability of -O2:
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16647$as_echo_n "checking for -O2... " >&6; }
16648saved_cflags="$CFLAGS"
16649CFLAGS="-O2"
16650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16651/* end confdefs.h. */
16652
16653int
16654main ()
16655{
16656
16657
16658 ;
16659 return 0;
16660}
16661_ACEOF
16662if ac_fn_c_try_compile "$LINENO"; then :
16663 have_O2=yes
16664else
16665 have_O2=no
16666fi
16667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16669$as_echo "$have_O2" >&6; }
16670CFLAGS="$saved_cflags"
16671
16672# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16673# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16675$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16676saved_cflags="$CFLAGS"
16677CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16678if test "$have_O2" = no; then
16679 CFLAGS=""
16680fi
16681if test "$cross_compiling" = yes; then :
16682 have_glibc_memmove_bug=undefined
16683else
16684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16685/* end confdefs.h. */
16686
16687#include <stdio.h>
16688#include <stdlib.h>
16689#include <string.h>
16690void foo(void *p, void *q) { memmove(p, q, 19); }
16691int main() {
16692 char a[32] = "123456789000000000";
16693 foo(&a[9], a);
16694 if (strcmp(a, "123456789123456789000000000") != 0)
16695 return 1;
16696 foo(a, &a[9]);
16697 if (strcmp(a, "123456789000000000") != 0)
16698 return 1;
16699 return 0;
16700}
16701
16702_ACEOF
16703if ac_fn_c_try_run "$LINENO"; then :
16704 have_glibc_memmove_bug=no
16705else
16706 have_glibc_memmove_bug=yes
16707fi
16708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16709 conftest.$ac_objext conftest.beam conftest.$ac_ext
16710fi
16711
16712CFLAGS="$saved_cflags"
16713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16714$as_echo "$have_glibc_memmove_bug" >&6; }
16715if test "$have_glibc_memmove_bug" = yes; then
16716
16717$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16718
16719fi
16720
16721if test "$have_gcc_asm_for_x87" = yes; then
16722 # Some versions of gcc miscompile inline asm:
16723 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16724 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16725 case $CC in
16726 *gcc*)
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16728$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16729 saved_cflags="$CFLAGS"
16730 CFLAGS="-O2"
16731 if test "$cross_compiling" = yes; then :
16732 have_ipa_pure_const_bug=undefined
16733else
16734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16735/* end confdefs.h. */
16736
16737 __attribute__((noinline)) int
16738 foo(int *p) {
16739 int r;
16740 asm ( "movl \$6, (%1)\n\t"
16741 "xorl %0, %0\n\t"
16742 : "=r" (r) : "r" (p) : "memory"
16743 );
16744 return r;
16745 }
16746 int main() {
16747 int p = 8;
16748 if ((foo(&p) ? : p) != 6)
16749 return 1;
16750 return 0;
16751 }
16752
16753_ACEOF
16754if ac_fn_c_try_run "$LINENO"; then :
16755 have_ipa_pure_const_bug=no
16756else
16757 have_ipa_pure_const_bug=yes
16758fi
16759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16760 conftest.$ac_objext conftest.beam conftest.$ac_ext
16761fi
16762
16763 CFLAGS="$saved_cflags"
16764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16765$as_echo "$have_ipa_pure_const_bug" >&6; }
16766 if test "$have_ipa_pure_const_bug" = yes; then
16767
16768$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16769
16770 fi
16771 ;;
16772 esac
16773fi
16774
Victor Stinner4f5366e2015-01-09 02:13:19 +010016775# Check for stdatomic.h
16776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16777$as_echo_n "checking for stdatomic.h... " >&6; }
16778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16779/* end confdefs.h. */
16780
16781
16782 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016783 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016784 int main() {
16785 int loaded_value = atomic_load(&value);
16786 return 0;
16787 }
16788
16789
16790_ACEOF
16791if ac_fn_c_try_link "$LINENO"; then :
16792 have_stdatomic_h=yes
16793else
16794 have_stdatomic_h=no
16795fi
16796rm -f core conftest.err conftest.$ac_objext \
16797 conftest$ac_exeext conftest.$ac_ext
16798
16799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16800$as_echo "$have_stdatomic_h" >&6; }
16801
16802if test "$have_stdatomic_h" = yes; then
16803
16804$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16805
16806fi
16807
16808# Check for GCC >= 4.7 __atomic builtins
16809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16810$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16812/* end confdefs.h. */
16813
16814
16815 volatile int val = 1;
16816 int main() {
16817 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16818 return 0;
16819 }
16820
16821
16822_ACEOF
16823if ac_fn_c_try_link "$LINENO"; then :
16824 have_builtin_atomic=yes
16825else
16826 have_builtin_atomic=no
16827fi
16828rm -f core conftest.err conftest.$ac_objext \
16829 conftest$ac_exeext conftest.$ac_ext
16830
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16832$as_echo "$have_builtin_atomic" >&6; }
16833
16834if test "$have_builtin_atomic" = yes; then
16835
16836$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16837
16838fi
16839
Ned Deily322f5ba2013-11-21 23:01:59 -080016840# ensurepip option
16841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16842$as_echo_n "checking for ensurepip... " >&6; }
16843
16844# Check whether --with-ensurepip was given.
16845if test "${with_ensurepip+set}" = set; then :
16846 withval=$with_ensurepip;
16847else
16848 with_ensurepip=upgrade
16849fi
16850
16851case $with_ensurepip in #(
16852 yes|upgrade) :
16853 ENSUREPIP=upgrade ;; #(
16854 install) :
16855 ENSUREPIP=install ;; #(
16856 no) :
16857 ENSUREPIP=no ;; #(
16858 *) :
16859 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16860esac
16861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16862$as_echo "$ENSUREPIP" >&6; }
16863
16864
Victor Stinner35a97c02015-03-08 02:59:09 +010016865# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16867$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16869/* end confdefs.h. */
16870
16871
16872 #include <dirent.h>
16873
16874 int main() {
16875 struct dirent entry;
16876 return entry.d_type == DT_UNKNOWN;
16877 }
16878
16879
16880_ACEOF
16881if ac_fn_c_try_link "$LINENO"; then :
16882 have_dirent_d_type=yes
16883else
16884 have_dirent_d_type=no
16885fi
16886rm -f core conftest.err conftest.$ac_objext \
16887 conftest$ac_exeext conftest.$ac_ext
16888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16889$as_echo "$have_dirent_d_type" >&6; }
16890
16891if test "$have_dirent_d_type" = yes; then
16892
16893$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16894
16895fi
16896
Victor Stinner9eb57c52015-03-19 22:21:49 +010016897# check if the Linux getrandom() syscall is available
16898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16899$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16901/* end confdefs.h. */
16902
16903
Victor Stinner1b80b242016-04-12 22:34:58 +020016904 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016905 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016906 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016907
16908 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016909 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016910 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016911 const int flags = GRND_NONBLOCK;
16912 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016913 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016914 return 0;
16915 }
16916
16917
16918_ACEOF
16919if ac_fn_c_try_link "$LINENO"; then :
16920 have_getrandom_syscall=yes
16921else
16922 have_getrandom_syscall=no
16923fi
16924rm -f core conftest.err conftest.$ac_objext \
16925 conftest$ac_exeext conftest.$ac_ext
16926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16927$as_echo "$have_getrandom_syscall" >&6; }
16928
16929if test "$have_getrandom_syscall" = yes; then
16930
16931$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16932
16933fi
16934
Victor Stinner3abf44e2015-09-18 15:38:37 +020016935# check if the getrandom() function is available
16936# the test was written for the Solaris function of <sys/random.h>
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16938$as_echo_n "checking for the getrandom() function... " >&6; }
16939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16940/* end confdefs.h. */
16941
16942
16943 #include <sys/random.h>
16944
16945 int main() {
16946 char buffer[1];
16947 const size_t buflen = sizeof(buffer);
16948 const int flags = 0;
16949 /* ignore the result, Python checks for ENOSYS at runtime */
16950 (void)getrandom(buffer, buflen, flags);
16951 return 0;
16952 }
16953
16954
16955_ACEOF
16956if ac_fn_c_try_link "$LINENO"; then :
16957 have_getrandom=yes
16958else
16959 have_getrandom=no
16960fi
16961rm -f core conftest.err conftest.$ac_objext \
16962 conftest$ac_exeext conftest.$ac_ext
16963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16964$as_echo "$have_getrandom" >&6; }
16965
16966if test "$have_getrandom" = yes; then
16967
16968$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16969
16970fi
16971
Neil Schemenauer5741c452019-02-08 10:48:46 -080016972# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16973# shm_* may only be available if linking against librt
16974save_LIBS="$LIBS"
16975save_includes_default="$ac_includes_default"
16976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16977$as_echo_n "checking for library containing shm_open... " >&6; }
16978if ${ac_cv_search_shm_open+:} false; then :
16979 $as_echo_n "(cached) " >&6
16980else
16981 ac_func_search_save_LIBS=$LIBS
16982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16983/* end confdefs.h. */
16984
16985/* Override any GCC internal prototype to avoid an error.
16986 Use char because int might match the return type of a GCC
16987 builtin and then its argument prototype would still apply. */
16988#ifdef __cplusplus
16989extern "C"
16990#endif
16991char shm_open ();
16992int
16993main ()
16994{
16995return shm_open ();
16996 ;
16997 return 0;
16998}
16999_ACEOF
17000for ac_lib in '' rt; do
17001 if test -z "$ac_lib"; then
17002 ac_res="none required"
17003 else
17004 ac_res=-l$ac_lib
17005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17006 fi
17007 if ac_fn_c_try_link "$LINENO"; then :
17008 ac_cv_search_shm_open=$ac_res
17009fi
17010rm -f core conftest.err conftest.$ac_objext \
17011 conftest$ac_exeext
17012 if ${ac_cv_search_shm_open+:} false; then :
17013 break
17014fi
17015done
17016if ${ac_cv_search_shm_open+:} false; then :
17017
17018else
17019 ac_cv_search_shm_open=no
17020fi
17021rm conftest.$ac_ext
17022LIBS=$ac_func_search_save_LIBS
17023fi
17024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17025$as_echo "$ac_cv_search_shm_open" >&6; }
17026ac_res=$ac_cv_search_shm_open
17027if test "$ac_res" != no; then :
17028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17029
17030fi
17031
17032if test "$ac_cv_search_shm_open" = "-lrt"; then
17033
17034$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17035
17036fi
17037for ac_header in sys/mman.h
17038do :
17039 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17040if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17041 cat >>confdefs.h <<_ACEOF
17042#define HAVE_SYS_MMAN_H 1
17043_ACEOF
17044
17045fi
17046
17047done
17048
17049# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17050ac_includes_default="\
17051${ac_includes_default}
17052#ifndef __cplusplus
17053# ifdef HAVE_SYS_MMAN_H
17054# include <sys/mman.h>
17055# endif
17056#endif
17057"
17058for ac_func in shm_open shm_unlink
17059do :
17060 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17061ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17062if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17063 cat >>confdefs.h <<_ACEOF
17064#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17065_ACEOF
17066
17067fi
17068done
17069
17070# we don't want to link with librt always, restore LIBS
17071LIBS="$save_LIBS"
17072ac_includes_default="$save_includes_default"
17073
Christian Heimesff5be6e2018-01-20 13:19:21 +010017074# Check for usable OpenSSL
17075
17076 found=false
17077
17078# Check whether --with-openssl was given.
17079if test "${with_openssl+set}" = set; then :
17080 withval=$with_openssl;
17081 case "$withval" in
17082 "" | y | ye | yes | n | no)
17083 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17084 ;;
17085 *) ssldirs="$withval"
17086 ;;
17087 esac
17088
17089else
17090
17091 # if pkg-config is installed and openssl has installed a .pc file,
17092 # then use that information and don't search ssldirs
17093 if test -n "$ac_tool_prefix"; then
17094 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17095set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097$as_echo_n "checking for $ac_word... " >&6; }
17098if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17099 $as_echo_n "(cached) " >&6
17100else
17101 if test -n "$PKG_CONFIG"; then
17102 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17103else
17104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17105for as_dir in $PATH
17106do
17107 IFS=$as_save_IFS
17108 test -z "$as_dir" && as_dir=.
17109 for ac_exec_ext in '' $ac_executable_extensions; do
17110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17111 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17113 break 2
17114 fi
17115done
17116 done
17117IFS=$as_save_IFS
17118
17119fi
17120fi
17121PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17122if test -n "$PKG_CONFIG"; then
17123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17124$as_echo "$PKG_CONFIG" >&6; }
17125else
17126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17127$as_echo "no" >&6; }
17128fi
17129
17130
17131fi
17132if test -z "$ac_cv_prog_PKG_CONFIG"; then
17133 ac_ct_PKG_CONFIG=$PKG_CONFIG
17134 # Extract the first word of "pkg-config", so it can be a program name with args.
17135set dummy pkg-config; ac_word=$2
17136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17137$as_echo_n "checking for $ac_word... " >&6; }
17138if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17139 $as_echo_n "(cached) " >&6
17140else
17141 if test -n "$ac_ct_PKG_CONFIG"; then
17142 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17143else
17144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17145for as_dir in $PATH
17146do
17147 IFS=$as_save_IFS
17148 test -z "$as_dir" && as_dir=.
17149 for ac_exec_ext in '' $ac_executable_extensions; do
17150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17151 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17153 break 2
17154 fi
17155done
17156 done
17157IFS=$as_save_IFS
17158
17159fi
17160fi
17161ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17162if test -n "$ac_ct_PKG_CONFIG"; then
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17164$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17165else
17166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17167$as_echo "no" >&6; }
17168fi
17169
17170 if test "x$ac_ct_PKG_CONFIG" = x; then
17171 PKG_CONFIG=""
17172 else
17173 case $cross_compiling:$ac_tool_warned in
17174yes:)
17175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17177ac_tool_warned=yes ;;
17178esac
17179 PKG_CONFIG=$ac_ct_PKG_CONFIG
17180 fi
17181else
17182 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17183fi
17184
17185 if test x"$PKG_CONFIG" != x""; then
17186 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17187 if test $? = 0; then
17188 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17189 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17190 found=true
17191 fi
17192 fi
17193
17194 # no such luck; use some default ssldirs
17195 if ! $found; then
17196 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17197 fi
17198
17199
17200fi
17201
17202
17203
17204 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17205 # an 'openssl' subdirectory
17206
17207 if ! $found; then
17208 OPENSSL_INCLUDES=
17209 for ssldir in $ssldirs; do
17210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17211$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17212 if test -f "$ssldir/include/openssl/ssl.h"; then
17213 OPENSSL_INCLUDES="-I$ssldir/include"
17214 OPENSSL_LDFLAGS="-L$ssldir/lib"
17215 OPENSSL_LIBS="-lssl -lcrypto"
17216 found=true
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17218$as_echo "yes" >&6; }
17219 break
17220 else
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17222$as_echo "no" >&6; }
17223 fi
17224 done
17225
17226 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17227 # it will just work!
17228 fi
17229
17230 # try the preprocessor and linker with our new flags,
17231 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17232
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17234$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17235 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17236 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17237
17238 save_LIBS="$LIBS"
17239 save_LDFLAGS="$LDFLAGS"
17240 save_CPPFLAGS="$CPPFLAGS"
17241 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17242 LIBS="$OPENSSL_LIBS $LIBS"
17243 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17245/* end confdefs.h. */
17246#include <openssl/ssl.h>
17247int
17248main ()
17249{
17250SSL_new(NULL)
17251 ;
17252 return 0;
17253}
17254_ACEOF
17255if ac_fn_c_try_link "$LINENO"; then :
17256
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17258$as_echo "yes" >&6; }
17259 have_openssl=yes
17260
17261else
17262
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17264$as_echo "no" >&6; }
17265 have_openssl=no
17266
17267fi
17268rm -f core conftest.err conftest.$ac_objext \
17269 conftest$ac_exeext conftest.$ac_ext
17270 CPPFLAGS="$save_CPPFLAGS"
17271 LDFLAGS="$save_LDFLAGS"
17272 LIBS="$save_LIBS"
17273
17274
17275
17276
17277
17278
17279if test "$have_openssl" = yes; then
17280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17281$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17282
17283 save_LIBS="$LIBS"
17284 save_LDFLAGS="$LDFLAGS"
17285 save_CPPFLAGS="$CPPFLAGS"
17286 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17287 LIBS="$OPENSSL_LIBS $LIBS"
17288 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17289
17290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17291/* end confdefs.h. */
17292
17293 #include <openssl/x509_vfy.h>
17294
17295int
17296main ()
17297{
17298
17299 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17300 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17301 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17302 X509_VERIFY_PARAM_set_hostflags(p, 0);
17303
17304 ;
17305 return 0;
17306}
17307
17308_ACEOF
17309if ac_fn_c_try_link "$LINENO"; then :
17310
17311 ac_cv_has_x509_verify_param_set1_host=yes
17312
17313else
17314
17315 ac_cv_has_x509_verify_param_set1_host=no
17316
17317fi
17318rm -f core conftest.err conftest.$ac_objext \
17319 conftest$ac_exeext conftest.$ac_ext
17320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17321$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17322 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17323
17324$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17325
17326 fi
17327
17328 CPPFLAGS="$save_CPPFLAGS"
17329 LDFLAGS="$save_LDFLAGS"
17330 LIBS="$save_LIBS"
17331fi
17332
Christian Heimes892d66e2018-01-29 14:10:18 +010017333# ssl module default cipher suite string
17334
17335
17336
17337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17338$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17339
17340# Check whether --with-ssl-default-suites was given.
17341if test "${with_ssl_default_suites+set}" = set; then :
17342 withval=$with_ssl_default_suites;
17343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17344$as_echo "$withval" >&6; }
17345case "$withval" in
17346 python)
17347 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17348
17349 ;;
17350 openssl)
17351 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17352
17353 ;;
17354 *)
17355 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17356
17357 cat >>confdefs.h <<_ACEOF
17358#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17359_ACEOF
17360
17361 ;;
17362esac
17363
17364else
17365
17366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17367$as_echo "python" >&6; }
17368$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17369
17370
17371fi
17372
17373
17374
Guido van Rossum627b2d71993-12-24 10:39:16 +000017375# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017376ac_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 +000017377
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017378ac_config_files="$ac_config_files Modules/ld_so_aix"
17379
Martin v. Löwis11437992002-04-12 09:54:03 +000017380cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017381# This file is a shell script that caches the results of configure
17382# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017383# scripts and configure runs, see configure's option --config-cache.
17384# It is not useful on other systems. If it contains results you don't
17385# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017386#
Martin v. Löwis11437992002-04-12 09:54:03 +000017387# config.status only pays attention to the cache file if you give it
17388# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017389#
Skip Montanaro6dead952003-09-25 14:50:04 +000017390# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017391# loading this file, other *unset* `ac_cv_foo' will be assigned the
17392# following values.
17393
17394_ACEOF
17395
Guido van Rossumf78abae1997-01-21 22:02:36 +000017396# The following way of writing the cache mishandles newlines in values,
17397# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017399# Ultrix sh set writes to stderr and can't be redirected directly,
17400# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401(
17402 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17403 eval ac_val=\$$ac_var
17404 case $ac_val in #(
17405 *${as_nl}*)
17406 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017407 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17408$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 esac
17410 case $ac_var in #(
17411 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17413 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414 esac ;;
17415 esac
17416 done
17417
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17420 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 # `set' does not quote correctly, so add quotes: double-quote
17422 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017423 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017424 "s/'/'\\\\''/g;
17425 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017427 *)
17428 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017430 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 esac |
17432 sort
17433) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017438 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17439 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17441 :end' >>confcache
17442if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17443 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017444 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017445 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17446$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017447 if test ! -f "$cache_file" || test -h "$cache_file"; then
17448 cat confcache >"$cache_file"
17449 else
17450 case $cache_file in #(
17451 */* | ?:*)
17452 mv -f confcache "$cache_file"$$ &&
17453 mv -f "$cache_file"$$ "$cache_file" ;; #(
17454 *)
17455 mv -f confcache "$cache_file" ;;
17456 esac
17457 fi
17458 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017459 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017460 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17461$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017462 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017463fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017464rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017465
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017466test "x$prefix" = xNONE && prefix=$ac_default_prefix
17467# Let make expand exec_prefix.
17468test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017469
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017470DEFS=-DHAVE_CONFIG_H
17471
Skip Montanaro6dead952003-09-25 14:50:04 +000017472ac_libobjs=
17473ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017474U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017475for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17476 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017478 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17480 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017481 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17482 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017483done
17484LIBOBJS=$ac_libobjs
17485
17486LTLIBOBJS=$ac_ltlibobjs
17487
17488
Martin v. Löwis11437992002-04-12 09:54:03 +000017489
Matthias Kloseb9621712010-04-24 17:59:49 +000017490
Victor Stinnere0be4232011-10-25 13:06:09 +020017491: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017492ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017493ac_clean_files_save=$ac_clean_files
17494ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017495{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17496$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17497as_write_fail=0
17498cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017499#! $SHELL
17500# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017501# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017502# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017503# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017504
Martin v. Löwis11437992002-04-12 09:54:03 +000017505debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017506ac_cs_recheck=false
17507ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017508
Matthias Kloseb9621712010-04-24 17:59:49 +000017509SHELL=\${CONFIG_SHELL-$SHELL}
17510export SHELL
17511_ASEOF
17512cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17513## -------------------- ##
17514## M4sh Initialization. ##
17515## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517# Be more Bourne compatible
17518DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017519if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 emulate sh
17521 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017522 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017523 # is contrary to our usage. Disable this feature.
17524 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017526else
Matthias Kloseb9621712010-04-24 17:59:49 +000017527 case `(set -o) 2>/dev/null` in #(
17528 *posix*) :
17529 set -o posix ;; #(
17530 *) :
17531 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017533fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017534
17535
Matthias Kloseb9621712010-04-24 17:59:49 +000017536as_nl='
17537'
17538export as_nl
17539# Printing a long string crashes Solaris 7 /usr/bin/printf.
17540as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17541as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17542as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17543# Prefer a ksh shell builtin over an external printf program on Solaris,
17544# but without wasting forks for bash or zsh.
17545if test -z "$BASH_VERSION$ZSH_VERSION" \
17546 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17547 as_echo='print -r --'
17548 as_echo_n='print -rn --'
17549elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17550 as_echo='printf %s\n'
17551 as_echo_n='printf %s'
17552else
17553 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17554 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17555 as_echo_n='/usr/ucb/echo -n'
17556 else
17557 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17558 as_echo_n_body='eval
17559 arg=$1;
17560 case $arg in #(
17561 *"$as_nl"*)
17562 expr "X$arg" : "X\\(.*\\)$as_nl";
17563 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17564 esac;
17565 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17566 '
17567 export as_echo_n_body
17568 as_echo_n='sh -c $as_echo_n_body as_echo'
17569 fi
17570 export as_echo_body
17571 as_echo='sh -c $as_echo_body as_echo'
17572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017573
17574# The user is always right.
17575if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017576 PATH_SEPARATOR=:
17577 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17578 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17579 PATH_SEPARATOR=';'
17580 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583
17584# IFS
17585# We need space, tab and new line, in precisely that order. Quoting is
17586# there to prevent editors from complaining about space-tab.
17587# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17588# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589IFS=" "" $as_nl"
17590
17591# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017592as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017593case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 *[\\/]* ) as_myself=$0 ;;
17595 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017596for as_dir in $PATH
17597do
17598 IFS=$as_save_IFS
17599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017600 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017604 ;;
17605esac
17606# We did not find ourselves, most probably we were run as `sh COMMAND'
17607# in which case we are not to be found in the path.
17608if test "x$as_myself" = x; then
17609 as_myself=$0
17610fi
17611if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017612 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17613 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614fi
17615
Matthias Kloseb9621712010-04-24 17:59:49 +000017616# Unset variables that we do not need and which cause bugs (e.g. in
17617# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17618# suppresses any "Segmentation fault" message there. '((' could
17619# trigger a bug in pdksh 5.2.14.
17620for as_var in BASH_ENV ENV MAIL MAILPATH
17621do eval test x\${$as_var+set} = xset \
17622 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623done
17624PS1='$ '
17625PS2='> '
17626PS4='+ '
17627
17628# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017629LC_ALL=C
17630export LC_ALL
17631LANGUAGE=C
17632export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633
Matthias Kloseb9621712010-04-24 17:59:49 +000017634# CDPATH.
17635(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17636
17637
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017638# as_fn_error STATUS ERROR [LINENO LOG_FD]
17639# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017640# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17641# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017642# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017643as_fn_error ()
17644{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017645 as_status=$1; test $as_status -eq 0 && as_status=1
17646 if test "$4"; then
17647 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17648 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017649 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017650 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 as_fn_exit $as_status
17652} # as_fn_error
17653
17654
17655# as_fn_set_status STATUS
17656# -----------------------
17657# Set $? to STATUS, without forking.
17658as_fn_set_status ()
17659{
17660 return $1
17661} # as_fn_set_status
17662
17663# as_fn_exit STATUS
17664# -----------------
17665# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17666as_fn_exit ()
17667{
17668 set +e
17669 as_fn_set_status $1
17670 exit $1
17671} # as_fn_exit
17672
17673# as_fn_unset VAR
17674# ---------------
17675# Portably unset VAR.
17676as_fn_unset ()
17677{
17678 { eval $1=; unset $1;}
17679}
17680as_unset=as_fn_unset
17681# as_fn_append VAR VALUE
17682# ----------------------
17683# Append the text in VALUE to the end of the definition contained in VAR. Take
17684# advantage of any shell optimizations that allow amortized linear growth over
17685# repeated appends, instead of the typical quadratic growth present in naive
17686# implementations.
17687if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17688 eval 'as_fn_append ()
17689 {
17690 eval $1+=\$2
17691 }'
17692else
17693 as_fn_append ()
17694 {
17695 eval $1=\$$1\$2
17696 }
17697fi # as_fn_append
17698
17699# as_fn_arith ARG...
17700# ------------------
17701# Perform arithmetic evaluation on the ARGs, and store the result in the
17702# global $as_val. Take advantage of shells that can avoid forks. The arguments
17703# must be portable across $(()) and expr.
17704if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17705 eval 'as_fn_arith ()
17706 {
17707 as_val=$(( $* ))
17708 }'
17709else
17710 as_fn_arith ()
17711 {
17712 as_val=`expr "$@" || test $? -eq 1`
17713 }
17714fi # as_fn_arith
17715
17716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717if expr a : '\(a\)' >/dev/null 2>&1 &&
17718 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17719 as_expr=expr
17720else
17721 as_expr=false
17722fi
17723
17724if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17725 as_basename=basename
17726else
17727 as_basename=false
17728fi
17729
Matthias Kloseb9621712010-04-24 17:59:49 +000017730if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17731 as_dirname=dirname
17732else
17733 as_dirname=false
17734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736as_me=`$as_basename -- "$0" ||
17737$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17738 X"$0" : 'X\(//\)$' \| \
17739 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017740$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 sed '/^.*\/\([^/][^/]*\)\/*$/{
17742 s//\1/
17743 q
17744 }
17745 /^X\/\(\/\/\)$/{
17746 s//\1/
17747 q
17748 }
17749 /^X\/\(\/\).*/{
17750 s//\1/
17751 q
17752 }
17753 s/.*/./; q'`
17754
Matthias Kloseb9621712010-04-24 17:59:49 +000017755# Avoid depending upon Character Ranges.
17756as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17757as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17758as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17759as_cr_digits='0123456789'
17760as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761
17762ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017763case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 xy) ECHO_C='\c';;
17768 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17769 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 esac;;
17771*)
17772 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017774
Martin v. Löwis11437992002-04-12 09:54:03 +000017775rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776if test -d conf$$.dir; then
17777 rm -f conf$$.dir/conf$$.file
17778else
17779 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017780 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017782if (echo >conf$$.file) 2>/dev/null; then
17783 if ln -s conf$$.file conf$$ 2>/dev/null; then
17784 as_ln_s='ln -s'
17785 # ... but there are two gotchas:
17786 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17787 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017788 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017789 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017790 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017791 elif ln conf$$.file conf$$ 2>/dev/null; then
17792 as_ln_s=ln
17793 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017794 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017796else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017797 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17800rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017801
Matthias Kloseb9621712010-04-24 17:59:49 +000017802
17803# as_fn_mkdir_p
17804# -------------
17805# Create "$as_dir" as a directory, including parents if necessary.
17806as_fn_mkdir_p ()
17807{
17808
17809 case $as_dir in #(
17810 -*) as_dir=./$as_dir;;
17811 esac
17812 test -d "$as_dir" || eval $as_mkdir_p || {
17813 as_dirs=
17814 while :; do
17815 case $as_dir in #(
17816 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17817 *) as_qdir=$as_dir;;
17818 esac
17819 as_dirs="'$as_qdir' $as_dirs"
17820 as_dir=`$as_dirname -- "$as_dir" ||
17821$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17822 X"$as_dir" : 'X\(//\)[^/]' \| \
17823 X"$as_dir" : 'X\(//\)$' \| \
17824 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17825$as_echo X"$as_dir" |
17826 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17827 s//\1/
17828 q
17829 }
17830 /^X\(\/\/\)[^/].*/{
17831 s//\1/
17832 q
17833 }
17834 /^X\(\/\/\)$/{
17835 s//\1/
17836 q
17837 }
17838 /^X\(\/\).*/{
17839 s//\1/
17840 q
17841 }
17842 s/.*/./; q'`
17843 test -d "$as_dir" && break
17844 done
17845 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017846 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017847
17848
17849} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017850if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017851 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017852else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017853 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017854 as_mkdir_p=false
17855fi
17856
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017857
17858# as_fn_executable_p FILE
17859# -----------------------
17860# Test if FILE is an executable regular file.
17861as_fn_executable_p ()
17862{
17863 test -f "$1" && test -x "$1"
17864} # as_fn_executable_p
17865as_test_x='test -x'
17866as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
17868# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017869as_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 +000017870
17871# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017872as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
17874
Martin v. Löwis11437992002-04-12 09:54:03 +000017875exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017876## ----------------------------------- ##
17877## Main body of $CONFIG_STATUS script. ##
17878## ----------------------------------- ##
17879_ASEOF
17880test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017881
Matthias Kloseb9621712010-04-24 17:59:49 +000017882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17883# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017884# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885# values after options handling.
17886ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017887This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017888generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017889
17890 CONFIG_FILES = $CONFIG_FILES
17891 CONFIG_HEADERS = $CONFIG_HEADERS
17892 CONFIG_LINKS = $CONFIG_LINKS
17893 CONFIG_COMMANDS = $CONFIG_COMMANDS
17894 $ $0 $@
17895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896on `(hostname || uname -n) 2>/dev/null | sed 1q`
17897"
17898
Martin v. Löwis11437992002-04-12 09:54:03 +000017899_ACEOF
17900
Matthias Kloseb9621712010-04-24 17:59:49 +000017901case $ac_config_files in *"
17902"*) set x $ac_config_files; shift; ac_config_files=$*;;
17903esac
17904
17905case $ac_config_headers in *"
17906"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17907esac
17908
17909
17910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017911# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017912config_files="$ac_config_files"
17913config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017916
Matthias Kloseb9621712010-04-24 17:59:49 +000017917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017918ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017919\`$as_me' instantiates files and other configuration actions
17920from templates according to the current configuration. Unless the files
17921and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
Matthias Kloseb9621712010-04-24 17:59:49 +000017923Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017924
17925 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 --config print configuration, then exit
17928 -q, --quiet, --silent
17929 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 -d, --debug don't remove temporary files
17931 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017932 --file=FILE[:TEMPLATE]
17933 instantiate the configuration file FILE
17934 --header=FILE[:TEMPLATE]
17935 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
17937Configuration files:
17938$config_files
17939
17940Configuration headers:
17941$config_headers
17942
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017943Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017946cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17947ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017948ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017949python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017950configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017951 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017952
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017953Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017954This config.status script is free software; the Free Software Foundation
17955gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956
17957ac_pwd='$ac_pwd'
17958srcdir='$srcdir'
17959INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017960MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017961test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017962_ACEOF
17963
Matthias Kloseb9621712010-04-24 17:59:49 +000017964cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17965# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017966ac_need_defaults=:
17967while test $# != 0
17968do
17969 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017970 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17972 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017973 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017975 --*=)
17976 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17977 ac_optarg=
17978 ac_shift=:
17979 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017981 ac_option=$1
17982 ac_optarg=$2
17983 ac_shift=shift
17984 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 esac
17986
Skip Montanaro6dead952003-09-25 14:50:04 +000017987 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017989 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17990 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017992 $as_echo "$ac_cs_version"; exit ;;
17993 --config | --confi | --conf | --con | --co | --c )
17994 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 debug=: ;;
17997 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017998 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017999 case $ac_optarg in
18000 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018001 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 esac
18003 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018004 ac_need_defaults=false;;
18005 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018006 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018007 case $ac_optarg in
18008 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18009 esac
18010 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012 --he | --h)
18013 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018014 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018015Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018017 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18019 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18020 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018021
18022 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018023 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018024Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018025
Matthias Kloseb9621712010-04-24 17:59:49 +000018026 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018028
18029 esac
18030 shift
18031done
18032
Skip Montanaro6dead952003-09-25 14:50:04 +000018033ac_configure_extra_args=
18034
18035if $ac_cs_silent; then
18036 exec 6>/dev/null
18037 ac_configure_extra_args="$ac_configure_extra_args --silent"
18038fi
18039
18040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018041cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018042if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018043 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018044 shift
18045 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18046 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018048 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018049fi
18050
Martin v. Löwis11437992002-04-12 09:54:03 +000018051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053exec 5>>config.log
18054{
18055 echo
18056 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18057## Running $as_me. ##
18058_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018059 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018065
Matthias Kloseb9621712010-04-24 17:59:49 +000018066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067
18068# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018069for ac_config_target in $ac_config_targets
18070do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071 case $ac_config_target in
18072 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18073 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18074 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018075 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18076 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018078 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018079 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018080 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018081 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082
Victor Stinnere0be4232011-10-25 13:06:09 +020018083 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 esac
18085done
18086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087
Martin v. Löwis11437992002-04-12 09:54:03 +000018088# If the user did not use the arguments to specify the items to instantiate,
18089# then the envvar interface is used. Set only those that are not.
18090# We use the long form for the default assignment because of an extremely
18091# bizarre bug on SunOS 4.1.3.
18092if $ac_need_defaults; then
18093 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18094 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18095fi
18096
Skip Montanaro6dead952003-09-25 14:50:04 +000018097# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018099# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100# Hook for its removal unless debugging.
18101# Note that there is a small window in which the directory will not be cleaned:
18102# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018103$debug ||
18104{
Victor Stinnere0be4232011-10-25 13:06:09 +020018105 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018107 : "${ac_tmp:=$tmp}"
18108 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018110 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018111}
Martin v. Löwis11437992002-04-12 09:54:03 +000018112# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018113
Martin v. Löwis11437992002-04-12 09:54:03 +000018114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018116 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018117} ||
18118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 tmp=./conf$$-$RANDOM
18120 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018121} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018122ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018123
Matthias Kloseb9621712010-04-24 17:59:49 +000018124# Set up the scripts for CONFIG_FILES section.
18125# No need to generate them if there are no CONFIG_FILES.
18126# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018128
Matthias Kloseb9621712010-04-24 17:59:49 +000018129
18130ac_cr=`echo X | tr X '\015'`
18131# On cygwin, bash can eat \r inside `` if the user requested igncr.
18132# But we know of no other shell where ac_cr would be empty at this
18133# point, so we can use a bashism as a fallback.
18134if test "x$ac_cr" = x; then
18135 eval ac_cr=\$\'\\r\'
18136fi
18137ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18138if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018139 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018140else
18141 ac_cs_awk_cr=$ac_cr
18142fi
18143
Victor Stinnere0be4232011-10-25 13:06:09 +020018144echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018145_ACEOF
18146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147
Matthias Kloseb9621712010-04-24 17:59:49 +000018148{
18149 echo "cat >conf$$subs.awk <<_ACEOF" &&
18150 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18151 echo "_ACEOF"
18152} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018153 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18154ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018155ac_delim='%!_!# '
18156for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018157 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018158 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159
Matthias Kloseb9621712010-04-24 17:59:49 +000018160 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18161 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018162 break
18163 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018164 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165 else
18166 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018167 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168done
Matthias Kloseb9621712010-04-24 17:59:49 +000018169rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170
Matthias Kloseb9621712010-04-24 17:59:49 +000018171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018172cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018174sed -n '
18175h
18176s/^/S["/; s/!.*/"]=/
18177p
18178g
18179s/^[^!]*!//
18180:repl
18181t repl
18182s/'"$ac_delim"'$//
18183t delim
18184:nl
18185h
18186s/\(.\{148\}\)..*/\1/
18187t more1
18188s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18189p
18190n
18191b repl
18192:more1
18193s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18194p
18195g
18196s/.\{148\}//
18197t nl
18198:delim
18199h
18200s/\(.\{148\}\)..*/\1/
18201t more2
18202s/["\\]/\\&/g; s/^/"/; s/$/"/
18203p
18204b
18205:more2
18206s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18207p
18208g
18209s/.\{148\}//
18210t delim
18211' <conf$$subs.awk | sed '
18212/^[^""]/{
18213 N
18214 s/\n//
18215}
18216' >>$CONFIG_STATUS || ac_write_fail=1
18217rm -f conf$$subs.awk
18218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18219_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018220cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018221 for (key in S) S_is_set[key] = 1
18222 FS = ""
18223
18224}
18225{
18226 line = $ 0
18227 nfields = split(line, field, "@")
18228 substed = 0
18229 len = length(field[1])
18230 for (i = 2; i < nfields; i++) {
18231 key = field[i]
18232 keylen = length(key)
18233 if (S_is_set[key]) {
18234 value = S[key]
18235 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18236 len += length(value) + length(field[++i])
18237 substed = 1
18238 } else
18239 len += 1 + keylen
18240 }
18241
18242 print line
18243}
18244
18245_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18248if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18249 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18250else
18251 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018252fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018253 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018254_ACEOF
18255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018256# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18257# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258# trailing colons and then remove the whole line if VPATH becomes empty
18259# (actually we leave an empty line to preserve line numbers).
18260if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018261 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18262h
18263s///
18264s/^/:/
18265s/[ ]*$/:/
18266s/:\$(srcdir):/:/g
18267s/:\${srcdir}:/:/g
18268s/:@srcdir@:/:/g
18269s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018271x
18272s/\(=[ ]*\).*/\1/
18273G
18274s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275s/^[^=]*=[ ]*$//
18276}'
18277fi
18278
Matthias Kloseb9621712010-04-24 17:59:49 +000018279cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018280fi # test -n "$CONFIG_FILES"
18281
Matthias Kloseb9621712010-04-24 17:59:49 +000018282# Set up the scripts for CONFIG_HEADERS section.
18283# No need to generate them if there are no CONFIG_HEADERS.
18284# This happens for instance with `./config.status Makefile'.
18285if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018286cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018287BEGIN {
18288_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018289
Matthias Kloseb9621712010-04-24 17:59:49 +000018290# Transform confdefs.h into an awk script `defines.awk', embedded as
18291# here-document in config.status, that substitutes the proper values into
18292# config.h.in to produce config.h.
18293
18294# Create a delimiter string that does not exist in confdefs.h, to ease
18295# handling of long lines.
18296ac_delim='%!_!# '
18297for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018298 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18299 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018300 break
18301 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018302 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018303 else
18304 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18305 fi
18306done
18307
18308# For the awk script, D is an array of macro values keyed by name,
18309# likewise P contains macro parameters if any. Preserve backslash
18310# newline sequences.
18311
18312ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18313sed -n '
18314s/.\{148\}/&'"$ac_delim"'/g
18315t rset
18316:rset
18317s/^[ ]*#[ ]*define[ ][ ]*/ /
18318t def
18319d
18320:def
18321s/\\$//
18322t bsnl
18323s/["\\]/\\&/g
18324s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18325D["\1"]=" \3"/p
18326s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18327d
18328:bsnl
18329s/["\\]/\\&/g
18330s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18331D["\1"]=" \3\\\\\\n"\\/p
18332t cont
18333s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18334t cont
18335d
18336:cont
18337n
18338s/.\{148\}/&'"$ac_delim"'/g
18339t clear
18340:clear
18341s/\\$//
18342t bsnlc
18343s/["\\]/\\&/g; s/^/"/; s/$/"/p
18344d
18345:bsnlc
18346s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18347b cont
18348' <confdefs.h | sed '
18349s/'"$ac_delim"'/"\\\
18350"/g' >>$CONFIG_STATUS || ac_write_fail=1
18351
18352cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18353 for (key in D) D_is_set[key] = 1
18354 FS = ""
18355}
18356/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18357 line = \$ 0
18358 split(line, arg, " ")
18359 if (arg[1] == "#") {
18360 defundef = arg[2]
18361 mac1 = arg[3]
18362 } else {
18363 defundef = substr(arg[1], 2)
18364 mac1 = arg[2]
18365 }
18366 split(mac1, mac2, "(") #)
18367 macro = mac2[1]
18368 prefix = substr(line, 1, index(line, defundef) - 1)
18369 if (D_is_set[macro]) {
18370 # Preserve the white space surrounding the "#".
18371 print prefix "define", macro P[macro] D[macro]
18372 next
18373 } else {
18374 # Replace #undef with comments. This is necessary, for example,
18375 # in the case of _POSIX_SOURCE, which is predefined and required
18376 # on some systems where configure will not decide to define it.
18377 if (defundef == "undef") {
18378 print "/*", prefix defundef, macro, "*/"
18379 next
18380 }
18381 }
18382}
18383{ print }
18384_ACAWK
18385_ACEOF
18386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018387 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018388fi # test -n "$CONFIG_HEADERS"
18389
18390
18391eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18392shift
18393for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394do
18395 case $ac_tag in
18396 :[FHLC]) ac_mode=$ac_tag; continue;;
18397 esac
18398 case $ac_mode$ac_tag in
18399 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018400 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 :[FH]-) ac_tag=-:-;;
18402 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18403 esac
18404 ac_save_IFS=$IFS
18405 IFS=:
18406 set x $ac_tag
18407 IFS=$ac_save_IFS
18408 shift
18409 ac_file=$1
18410 shift
18411
18412 case $ac_mode in
18413 :L) ac_source=$1;;
18414 :[FH])
18415 ac_file_inputs=
18416 for ac_f
18417 do
18418 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018419 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 *) # Look for the file first in the build tree, then in the source tree
18421 # (if the path is not absolute). The absolute path cannot be DOS-style,
18422 # because $ac_f cannot contain `:'.
18423 test -f "$ac_f" ||
18424 case $ac_f in
18425 [\\/$]*) false;;
18426 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18427 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018428 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018430 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18431 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432 done
18433
18434 # Let's still pretend it is `configure' which instantiates (i.e., don't
18435 # use $as_me), people would be surprised to read:
18436 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018437 configure_input='Generated from '`
18438 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18439 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 if test x"$ac_file" != x-; then
18441 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018442 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18443$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018445 # Neutralize special characters interpreted by sed in replacement strings.
18446 case $configure_input in #(
18447 *\&* | *\|* | *\\* )
18448 ac_sed_conf_input=`$as_echo "$configure_input" |
18449 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18450 *) ac_sed_conf_input=$configure_input;;
18451 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452
18453 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018454 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18455 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456 esac
18457 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 esac
18459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018461$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462 X"$ac_file" : 'X\(//\)[^/]' \| \
18463 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018465$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18467 s//\1/
18468 q
18469 }
18470 /^X\(\/\/\)[^/].*/{
18471 s//\1/
18472 q
18473 }
18474 /^X\(\/\/\)$/{
18475 s//\1/
18476 q
18477 }
18478 /^X\(\/\).*/{
18479 s//\1/
18480 q
18481 }
18482 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018483 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018484 ac_builddir=.
18485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486case "$ac_dir" in
18487.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18488*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018489 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018491 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492 case $ac_top_builddir_sub in
18493 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18494 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18495 esac ;;
18496esac
18497ac_abs_top_builddir=$ac_pwd
18498ac_abs_builddir=$ac_pwd$ac_dir_suffix
18499# for backward compatibility:
18500ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018501
18502case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505 ac_top_srcdir=$ac_top_builddir_sub
18506 ac_abs_top_srcdir=$ac_pwd ;;
18507 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018508 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509 ac_top_srcdir=$srcdir
18510 ac_abs_top_srcdir=$srcdir ;;
18511 *) # Relative name.
18512 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18513 ac_top_srcdir=$ac_top_build_prefix$srcdir
18514 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018515esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018517
Martin v. Löwis11437992002-04-12 09:54:03 +000018518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519 case $ac_mode in
18520 :F)
18521 #
18522 # CONFIG_FILE
18523 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018524
18525 case $INSTALL in
18526 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018529 ac_MKDIR_P=$MKDIR_P
18530 case $MKDIR_P in
18531 [\\/$]* | ?:[\\/]* ) ;;
18532 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18533 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018534_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535
Matthias Kloseb9621712010-04-24 17:59:49 +000018536cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537# If the template does not know about datarootdir, expand it.
18538# FIXME: This hack should be removed a few years after 2.60.
18539ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018540ac_sed_dataroot='
18541/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 p
18543 q
18544}
18545/@datadir@/p
18546/@docdir@/p
18547/@infodir@/p
18548/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018549/@mandir@/p'
18550case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551*datarootdir*) ac_datarootdir_seen=yes;;
18552*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18554$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557 ac_datarootdir_hack='
18558 s&@datadir@&$datadir&g
18559 s&@docdir@&$docdir&g
18560 s&@infodir@&$infodir&g
18561 s&@localedir@&$localedir&g
18562 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018563 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564esac
18565_ACEOF
18566
18567# Neutralize VPATH when `$srcdir' = `.'.
18568# Shell code in configure.ac might set extrasub.
18569# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018570cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18571ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018572$extrasub
18573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018574cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018575:t
18576/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018577s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018579s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580s&@srcdir@&$ac_srcdir&;t t
18581s&@abs_srcdir@&$ac_abs_srcdir&;t t
18582s&@top_srcdir@&$ac_top_srcdir&;t t
18583s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18584s&@builddir@&$ac_builddir&;t t
18585s&@abs_builddir@&$ac_abs_builddir&;t t
18586s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18587s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018588s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018590"
Victor Stinnere0be4232011-10-25 13:06:09 +020018591eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18592 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018595 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18596 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18597 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018598 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018599which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018600$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018601which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018602
Victor Stinnere0be4232011-10-25 13:06:09 +020018603 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018605 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18606 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018607 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018608 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609 ;;
18610 :H)
18611 #
18612 # CONFIG_HEADER
18613 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018615 {
18616 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018617 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18618 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018619 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018620 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018621 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18622$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018624 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018625 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018626 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 fi
18628 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018629 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018630 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018631 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635
18636 esac
18637
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018638
18639 case $ac_file$ac_mode in
18640 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18641
18642 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643done # for ac_tag
18644
Guido van Rossum627b2d71993-12-24 10:39:16 +000018645
Matthias Kloseb9621712010-04-24 17:59:49 +000018646as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018647_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018648ac_clean_files=$ac_clean_files_save
18649
Matthias Kloseb9621712010-04-24 17:59:49 +000018650test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018651 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018652
Martin v. Löwis11437992002-04-12 09:54:03 +000018653
18654# configure is writing to config.log, and then calls config.status.
18655# config.status does its own redirection, appending to config.log.
18656# Unfortunately, on DOS this fails, as config.log is still kept open
18657# by configure, so config.status won't be able to write to it; its
18658# output is simply discarded. So we exec the FD to /dev/null,
18659# effectively closing config.log, so it can be properly (re)opened and
18660# appended to by config.status. When coming back to configure, we
18661# need to make the FD available again.
18662if test "$no_create" != yes; then
18663 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018664 ac_config_status_args=
18665 test "$silent" = yes &&
18666 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018667 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018668 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 exec 5>>config.log
18670 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18671 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018672 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018673fi
18674if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18676$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018677fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018678
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018679
Christian Heimes75ed8902013-11-20 01:11:18 +010018680echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018681if test ! -f Modules/Setup.local
18682then
18683 echo "# Edit this file for local setup changes" >Modules/Setup.local
18684fi
18685
Christian Heimes75ed8902013-11-20 01:11:18 +010018686echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018687$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018688 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018689 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018690mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018691
18692if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18693 echo "" >&6
18694 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018695 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 +000018696 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018697 echo "" >&6
18698 echo "" >&6
18699fi
18700