blob: e96683622b3045564e42346fddfdfea22d7ad977 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200816with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700856PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinnerb477d192020-01-22 22:48:16 +01001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001400\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001465 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001474 create a universal binary build. SDKDIR specifies
1475 which macOS SDK should be used to perform the build,
1476 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001478 create a Python.framework rather than a traditional
1479 Unix install. optional INSTALLDIR specifies the
1480 installation path. see Mac/README.rst (default is
1481 no)
1482 --enable-shared enable building a shared Python library (default is
1483 no)
1484 --enable-profiling enable C-level code profiling with gprof (default is
1485 no)
1486 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1487 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001488 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001489 support loadable extensions in _sqlite module, see
1490 Doc/library/sqlite3.rst (default is no)
1491 --enable-ipv6 enable ipv6 (with ipv4) support, see
1492 Doc/library/socket.rst (default is yes if supported)
1493 --enable-big-digits[=15|30]
1494 use big digits (30 or 15 bits) for Python longs
1495 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
1497Optional Packages:
1498 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1499 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001500 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001501 specify the kind of universal binary that should be
1502 created. this option is only valid when
1503 --enable-universalsdk is set; options are:
1504 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1505 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001507 specify the name for the python framework on macOS
1508 only valid when --enable-framework is set. see
1509 Mac/README.rst (default is 'Python')
1510 --with-cxx-main[=COMPILER]
1511 compile main() and link Python executable with C++
1512 compiler specified in COMPILER (default is $CXX)
1513 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1514 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001515 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001516 (default is no)
1517 --with-assertions build with C assertions enabled (default is no)
1518 --with-lto enable Link-Time-Optimization in any build (default
1519 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001520 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001521 select hash algorithm for use in Python/pyhash.c
1522 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001523 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001524 enable AddressSanitizer memory error detector,
1525 'asan' (default is no)
1526 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1527 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001528 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001529 enable UndefinedBehaviorSanitizer undefined
1530 behaviour detector, 'ubsan' (default is no)
1531 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001532 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001533 library, see Doc/library/pyexpat.rst (default is no)
1534 --with-system-ffi build _ctypes module using an installed ffi library,
1535 see Doc/library/ctypes.rst (default is
1536 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001537 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001538 library, see Doc/library/decimal.rst (default is no)
Ned Deilyd819b932013-09-06 01:07:05 -07001539 --with-tcltk-includes='-I...'
1540 override search for Tcl and Tk include files
1541 --with-tcltk-libs='-L...'
1542 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001543 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001544 override order to check db backends for dbm; a valid
1545 value is a colon separated string with the backend
1546 names `ndbm', `gdbm' and `bdb'.
1547 --with-doc-strings enable documentation strings (default is yes)
1548 --with-pymalloc enable specialized mallocs (default is yes)
1549 --with-c-locale-coercion
1550 enable C locale coercion to a UTF-8 based locale
1551 (default is yes)
1552 --with-valgrind enable Valgrind support (default is no)
1553 --with-dtrace enable DTrace support (default is no)
1554 --with-libm=STRING override libm math library to STRING (default is
1555 system-dependent)
1556 --with-libc=STRING override libc C library to STRING (default is
1557 system-dependent)
1558 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001559 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001560 --with-ensurepip[=install|upgrade|no]
1561 "install" or "upgrade" using bundled pip (default is
1562 upgrade)
1563 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001564 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001565 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001566 Python's preferred selection (default), openssl:
1567 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001568 custom string, PROTOCOL_SSLv2 ignores the setting,
1569 see Doc/library/ssl.rst
Martin v. Löwis11437992002-04-12 09:54:03 +00001570
1571Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001572 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 CC C compiler command
1574 CFLAGS C compiler flags
1575 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1576 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001581 PROFILE_TASK
1582 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001583 PKG_CONFIG path to pkg-config utility
1584 PKG_CONFIG_PATH
1585 directories to add to pkg-config's search path
1586 PKG_CONFIG_LIBDIR
1587 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589Use these variables to override the choices made by `configure' or to help
1590it to find libraries and programs with nonstandard names/locations.
1591
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001592Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001595fi
1596
1597if test "$ac_init_help" = "recursive"; then
1598 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 test -d "$ac_dir" ||
1601 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1602 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_builddir=.
1604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605case "$ac_dir" in
1606.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1607*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001610 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 case $ac_top_builddir_sub in
1612 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1613 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1614 esac ;;
1615esac
1616ac_abs_top_builddir=$ac_pwd
1617ac_abs_builddir=$ac_pwd$ac_dir_suffix
1618# for backward compatibility:
1619ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001620
1621case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 ac_top_srcdir=$ac_top_builddir_sub
1625 ac_abs_top_srcdir=$ac_pwd ;;
1626 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 ac_top_srcdir=$srcdir
1629 ac_abs_top_srcdir=$srcdir ;;
1630 *) # Relative name.
1631 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1632 ac_top_srcdir=$ac_top_build_prefix$srcdir
1633 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001634esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 cd "$ac_dir" || { ac_status=$?; continue; }
1638 # Check for guested configure.
1639 if test -f "$ac_srcdir/configure.gnu"; then
1640 echo &&
1641 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1642 elif test -f "$ac_srcdir/configure"; then
1643 echo &&
1644 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001646 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001647 fi || ac_status=$?
1648 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 done
1650fi
1651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001653if $ac_init_version; then
1654 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001655python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001656generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001658Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001659This configure script is free software; the Free Software Foundation
1660gives unlimited permission to copy, distribute and modify it.
1661_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001662 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001664
1665## ------------------------ ##
1666## Autoconf initialization. ##
1667## ------------------------ ##
1668
1669# ac_fn_c_try_compile LINENO
1670# --------------------------
1671# Try to compile conftest.$ac_ext, and return whether this succeeded.
1672ac_fn_c_try_compile ()
1673{
1674 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1675 rm -f conftest.$ac_objext
1676 if { { ac_try="$ac_compile"
1677case "(($ac_try" in
1678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1679 *) ac_try_echo=$ac_try;;
1680esac
1681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1682$as_echo "$ac_try_echo"; } >&5
1683 (eval "$ac_compile") 2>conftest.err
1684 ac_status=$?
1685 if test -s conftest.err; then
1686 grep -v '^ *+' conftest.err >conftest.er1
1687 cat conftest.er1 >&5
1688 mv -f conftest.er1 conftest.err
1689 fi
1690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1691 test $ac_status = 0; } && {
1692 test -z "$ac_c_werror_flag" ||
1693 test ! -s conftest.err
1694 } && test -s conftest.$ac_objext; then :
1695 ac_retval=0
1696else
1697 $as_echo "$as_me: failed program was:" >&5
1698sed 's/^/| /' conftest.$ac_ext >&5
1699
1700 ac_retval=1
1701fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001702 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001703 as_fn_set_status $ac_retval
1704
1705} # ac_fn_c_try_compile
1706
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001707# ac_fn_c_try_cpp LINENO
1708# ----------------------
1709# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1710ac_fn_c_try_cpp ()
1711{
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1713 if { { ac_try="$ac_cpp conftest.$ac_ext"
1714case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717esac
1718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719$as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1726 fi
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } > conftest.i && {
1729 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 }; then :
1732 ac_retval=0
1733else
1734 $as_echo "$as_me: failed program was:" >&5
1735sed 's/^/| /' conftest.$ac_ext >&5
1736
1737 ac_retval=1
1738fi
1739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740 as_fn_set_status $ac_retval
1741
1742} # ac_fn_c_try_cpp
1743
Matthias Kloseb9621712010-04-24 17:59:49 +00001744# ac_fn_c_try_link LINENO
1745# -----------------------
1746# Try to link conftest.$ac_ext, and return whether this succeeded.
1747ac_fn_c_try_link ()
1748{
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 rm -f conftest.$ac_objext conftest$ac_exeext
1751 if { { ac_try="$ac_link"
1752case "(($ac_try" in
1753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1754 *) ac_try_echo=$ac_try;;
1755esac
1756eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1757$as_echo "$ac_try_echo"; } >&5
1758 (eval "$ac_link") 2>conftest.err
1759 ac_status=$?
1760 if test -s conftest.err; then
1761 grep -v '^ *+' conftest.err >conftest.er1
1762 cat conftest.er1 >&5
1763 mv -f conftest.er1 conftest.err
1764 fi
1765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1766 test $ac_status = 0; } && {
1767 test -z "$ac_c_werror_flag" ||
1768 test ! -s conftest.err
1769 } && test -s conftest$ac_exeext && {
1770 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001771 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001772 }; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
1777
1778 ac_retval=1
1779fi
1780 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1781 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1782 # interfere with the next link command; also delete a directory that is
1783 # left behind by Apple's compiler. We do this before executing the actions.
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_link
1789
Matthias Kloseb9621712010-04-24 17:59:49 +00001790# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1793# the include files in INCLUDES and setting the cache variable VAR
1794# accordingly.
1795ac_fn_c_check_header_mongrel ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001798 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1800$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001801if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 $as_echo_n "(cached) " >&6
1803fi
1804eval ac_res=\$$3
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1806$as_echo "$ac_res" >&6; }
1807else
1808 # Is the header compilable?
1809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1810$as_echo_n "checking $2 usability... " >&6; }
1811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1812/* end confdefs.h. */
1813$4
1814#include <$2>
1815_ACEOF
1816if ac_fn_c_try_compile "$LINENO"; then :
1817 ac_header_compiler=yes
1818else
1819 ac_header_compiler=no
1820fi
1821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1823$as_echo "$ac_header_compiler" >&6; }
1824
1825# Is the header present?
1826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1827$as_echo_n "checking $2 presence... " >&6; }
1828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h. */
1830#include <$2>
1831_ACEOF
1832if ac_fn_c_try_cpp "$LINENO"; then :
1833 ac_header_preproc=yes
1834else
1835 ac_header_preproc=no
1836fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001837rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1839$as_echo "$ac_header_preproc" >&6; }
1840
1841# So? What about this header?
1842case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1843 yes:no: )
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1845$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1847$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1848 ;;
1849 no:yes:* )
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1851$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1853$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1855$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1857$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1859$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001860( $as_echo "## --------------------------------------- ##
1861## Report this to https://bugs.python.org/ ##
1862## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001863 ) | sed "s/^/$as_me: WARNING: /" >&2
1864 ;;
1865esac
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001868if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001869 $as_echo_n "(cached) " >&6
1870else
1871 eval "$3=\$ac_header_compiler"
1872fi
1873eval ac_res=\$$3
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1875$as_echo "$ac_res" >&6; }
1876fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001878
1879} # ac_fn_c_check_header_mongrel
1880
1881# ac_fn_c_try_run LINENO
1882# ----------------------
1883# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1884# that executables *can* be run.
1885ac_fn_c_try_run ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 if { { ac_try="$ac_link"
1889case "(($ac_try" in
1890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1891 *) ac_try_echo=$ac_try;;
1892esac
1893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1894$as_echo "$ac_try_echo"; } >&5
1895 (eval "$ac_link") 2>&5
1896 ac_status=$?
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1899 { { case "(($ac_try" in
1900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1901 *) ac_try_echo=$ac_try;;
1902esac
1903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1904$as_echo "$ac_try_echo"; } >&5
1905 (eval "$ac_try") 2>&5
1906 ac_status=$?
1907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1908 test $ac_status = 0; }; }; then :
1909 ac_retval=0
1910else
1911 $as_echo "$as_me: program exited with status $ac_status" >&5
1912 $as_echo "$as_me: failed program was:" >&5
1913sed 's/^/| /' conftest.$ac_ext >&5
1914
1915 ac_retval=$ac_status
1916fi
1917 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919 as_fn_set_status $ac_retval
1920
1921} # ac_fn_c_try_run
1922
1923# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1924# -------------------------------------------------------
1925# Tests whether HEADER exists and can be compiled using the include files in
1926# INCLUDES, setting the cache variable VAR accordingly.
1927ac_fn_c_check_header_compile ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938#include <$2>
1939_ACEOF
1940if ac_fn_c_try_compile "$LINENO"; then :
1941 eval "$3=yes"
1942else
1943 eval "$3=no"
1944fi
1945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1946fi
1947eval ac_res=\$$3
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1949$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001951
1952} # ac_fn_c_check_header_compile
1953
Matthias Kloseb9621712010-04-24 17:59:49 +00001954# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1955# -------------------------------------------
1956# Tests whether TYPE exists after having included INCLUDES, setting cache
1957# variable VAR accordingly.
1958ac_fn_c_check_type ()
1959{
1960 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1962$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001963if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001964 $as_echo_n "(cached) " >&6
1965else
1966 eval "$3=no"
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969$4
1970int
1971main ()
1972{
1973if (sizeof ($2))
1974 return 0;
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$4
1983int
1984main ()
1985{
1986if (sizeof (($2)))
1987 return 0;
1988 ;
1989 return 0;
1990}
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993
1994else
1995 eval "$3=yes"
1996fi
1997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998fi
1999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000fi
2001eval ac_res=\$$3
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006} # ac_fn_c_check_type
2007
Matthias Kloseb9621712010-04-24 17:59:49 +00002008# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2009# --------------------------------------------
2010# Tries to find the compile-time value of EXPR in a program that includes
2011# INCLUDES, setting VAR accordingly. Returns whether the value could be
2012# computed
2013ac_fn_c_compute_int ()
2014{
2015 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016 if test "$cross_compiling" = yes; then
2017 # Depending upon the size, compute the lo and hi bounds.
2018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$4
2021int
2022main ()
2023{
2024static int test_array [1 - 2 * !(($2) >= 0)];
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_lo=0 ac_mid=0
2034 while :; do
2035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h. */
2037$4
2038int
2039main ()
2040{
2041static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002042test_array [0] = 0;
2043return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002044
2045 ;
2046 return 0;
2047}
2048_ACEOF
2049if ac_fn_c_try_compile "$LINENO"; then :
2050 ac_hi=$ac_mid; break
2051else
2052 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2053 if test $ac_lo -le $ac_mid; then
2054 ac_lo= ac_hi=
2055 break
2056 fi
2057 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2058fi
2059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2060 done
2061else
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) < 0)];
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_hi=-1 ac_mid=-1
2078 while :; do
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
2082int
2083main ()
2084{
2085static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002086test_array [0] = 0;
2087return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002088
2089 ;
2090 return 0;
2091}
2092_ACEOF
2093if ac_fn_c_try_compile "$LINENO"; then :
2094 ac_lo=$ac_mid; break
2095else
2096 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2097 if test $ac_mid -le $ac_hi; then
2098 ac_lo= ac_hi=
2099 break
2100 fi
2101 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2102fi
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104 done
2105else
2106 ac_lo= ac_hi=
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111# Binary search between lo and hi bounds.
2112while test "x$ac_lo" != "x$ac_hi"; do
2113 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002121test_array [0] = 0;
2122return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129 ac_hi=$ac_mid
2130else
2131 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134done
2135case $ac_lo in #((
2136?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2137'') ac_retval=1 ;;
2138esac
2139 else
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h. */
2142$4
2143static long int longval () { return $2; }
2144static unsigned long int ulongval () { return $2; }
2145#include <stdio.h>
2146#include <stdlib.h>
2147int
2148main ()
2149{
2150
2151 FILE *f = fopen ("conftest.val", "w");
2152 if (! f)
2153 return 1;
2154 if (($2) < 0)
2155 {
2156 long int i = longval ();
2157 if (i != ($2))
2158 return 1;
2159 fprintf (f, "%ld", i);
2160 }
2161 else
2162 {
2163 unsigned long int i = ulongval ();
2164 if (i != ($2))
2165 return 1;
2166 fprintf (f, "%lu", i);
2167 }
2168 /* Do not output a trailing newline, as this causes \r\n confusion
2169 on some platforms. */
2170 return ferror (f) || fclose (f) != 0;
2171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_run "$LINENO"; then :
2177 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2178else
2179 ac_retval=1
2180fi
2181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2182 conftest.$ac_objext conftest.beam conftest.$ac_ext
2183rm -f conftest.val
2184
2185 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002186 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 as_fn_set_status $ac_retval
2188
2189} # ac_fn_c_compute_int
2190
2191# ac_fn_c_check_func LINENO FUNC VAR
2192# ----------------------------------
2193# Tests whether FUNC exists, setting the cache variable VAR accordingly
2194ac_fn_c_check_func ()
2195{
2196 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2198$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002199if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002200 $as_echo_n "(cached) " >&6
2201else
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2205 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2206#define $2 innocuous_$2
2207
2208/* System header to define __stub macros and hopefully few prototypes,
2209 which can conflict with char $2 (); below.
2210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2211 <limits.h> exists even on freestanding compilers. */
2212
2213#ifdef __STDC__
2214# include <limits.h>
2215#else
2216# include <assert.h>
2217#endif
2218
2219#undef $2
2220
2221/* Override any GCC internal prototype to avoid an error.
2222 Use char because int might match the return type of a GCC
2223 builtin and then its argument prototype would still apply. */
2224#ifdef __cplusplus
2225extern "C"
2226#endif
2227char $2 ();
2228/* The GNU C library defines this for functions which it implements
2229 to always fail with ENOSYS. Some functions are actually named
2230 something starting with __ and the normal name is an alias. */
2231#if defined __stub_$2 || defined __stub___$2
2232choke me
2233#endif
2234
2235int
2236main ()
2237{
2238return $2 ();
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243if ac_fn_c_try_link "$LINENO"; then :
2244 eval "$3=yes"
2245else
2246 eval "$3=no"
2247fi
2248rm -f core conftest.err conftest.$ac_objext \
2249 conftest$ac_exeext conftest.$ac_ext
2250fi
2251eval ac_res=\$$3
2252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2253$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002254 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002255
2256} # ac_fn_c_check_func
2257
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002258# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2259# ---------------------------------------------
2260# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2261# accordingly.
2262ac_fn_c_check_decl ()
2263{
2264 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265 as_decl_name=`echo $2|sed 's/ *(.*//'`
2266 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2268$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2269if eval \${$3+:} false; then :
2270 $as_echo_n "(cached) " >&6
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$4
2275int
2276main ()
2277{
2278#ifndef $as_decl_name
2279#ifdef __cplusplus
2280 (void) $as_decl_use;
2281#else
2282 (void) $as_decl_name;
2283#endif
2284#endif
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"; then :
2291 eval "$3=yes"
2292else
2293 eval "$3=no"
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$3
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
2300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301
2302} # ac_fn_c_check_decl
2303
Matthias Kloseb9621712010-04-24 17:59:49 +00002304# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2305# ----------------------------------------------------
2306# Tries to find if the field MEMBER exists in type AGGR, after including
2307# INCLUDES, setting cache variable VAR accordingly.
2308ac_fn_c_check_member ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2312$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002313if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$5
2319int
2320main ()
2321{
2322static $2 ac_aggr;
2323if (ac_aggr.$3)
2324return 0;
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$4=yes"
2331else
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h. */
2334$5
2335int
2336main ()
2337{
2338static $2 ac_aggr;
2339if (sizeof ac_aggr.$3)
2340return 0;
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"; then :
2346 eval "$4=yes"
2347else
2348 eval "$4=no"
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353fi
2354eval ac_res=\$$4
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002358
2359} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002361This file contains any messages produced by compilers while
2362running configure, to aid debugging if configure makes a mistake.
2363
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002364It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002365generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002366
2367 $ $0 $@
2368
2369_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002371{
2372cat <<_ASUNAME
2373## --------- ##
2374## Platform. ##
2375## --------- ##
2376
2377hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2378uname -m = `(uname -m) 2>/dev/null || echo unknown`
2379uname -r = `(uname -r) 2>/dev/null || echo unknown`
2380uname -s = `(uname -s) 2>/dev/null || echo unknown`
2381uname -v = `(uname -v) 2>/dev/null || echo unknown`
2382
2383/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2384/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2385
2386/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2387/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2388/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002390/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2391/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2392/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2393
2394_ASUNAME
2395
2396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2397for as_dir in $PATH
2398do
2399 IFS=$as_save_IFS
2400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 $as_echo "PATH: $as_dir"
2402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002404
2405} >&5
2406
2407cat >&5 <<_ACEOF
2408
2409
2410## ----------- ##
2411## Core tests. ##
2412## ----------- ##
2413
2414_ACEOF
2415
2416
2417# Keep a trace of the command line.
2418# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002420# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002421# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002422ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002423ac_configure_args0=
2424ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002425ac_must_keep_next=false
2426for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002427do
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 for ac_arg
2429 do
2430 case $ac_arg in
2431 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2432 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2433 | -silent | --silent | --silen | --sile | --sil)
2434 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 esac
2438 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002439 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002443 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002445 case $ac_arg in
2446 *=* | --config-cache | -C | -disable-* | --disable-* \
2447 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2448 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2449 | -with-* | --with-* | -without-* | --without-* | --x)
2450 case "$ac_configure_args0 " in
2451 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2452 esac
2453 ;;
2454 -* ) ac_must_keep_next=true ;;
2455 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 ;;
2459 esac
2460 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002461done
Matthias Kloseb9621712010-04-24 17:59:49 +00002462{ ac_configure_args0=; unset ac_configure_args0;}
2463{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002464
2465# When interrupted or exit'd, cleanup temporary files, and complete
2466# config.log. We remove comments because anyway the quotes in there
2467# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468# WARNING: Use '\'' to represent an apostrophe within the trap.
2469# 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 +00002470trap 'exit_status=$?
2471 # Save into config.log some information that might help in debugging.
2472 {
2473 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002474
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002475 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002476## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002477## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
2479 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480(
2481 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2482 eval ac_val=\$$ac_var
2483 case $ac_val in #(
2484 *${as_nl}*)
2485 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2487$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
2489 case $ac_var in #(
2490 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2492 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac ;;
2494 esac
2495 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2498 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 "s/'\''/'\''\\\\'\'''\''/g;
2501 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2502 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002503 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002505 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 esac |
2507 sort
2508)
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002512## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 echo
2515 for ac_var in $ac_subst_vars
2516 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 eval ac_val=\$$ac_var
2518 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 done | sort
2523 echo
2524
2525 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002526 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002528## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 echo
2530 for ac_var in $ac_subst_files
2531 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 eval ac_val=\$$ac_var
2533 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 done | sort
2538 echo
2539 fi
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002542 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002543## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo
2548 fi
2549 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 $as_echo "$as_me: caught signal $ac_signal"
2551 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 rm -f core *.core core.conftest.* &&
2554 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002557for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002559done
2560ac_signal=0
2561
2562# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565$as_echo "/* confdefs.h */" > confdefs.h
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567# Predefined preprocessor variables.
2568
2569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_NAME "$PACKAGE_NAME"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_VERSION "$PACKAGE_VERSION"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_STRING "$PACKAGE_STRING"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2587_ACEOF
2588
Matthias Kloseb9621712010-04-24 17:59:49 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_URL "$PACKAGE_URL"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593
2594# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002595# Prefer an explicitly selected file to automatically selected ones.
2596ac_site_file1=NONE
2597ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 # We do not want a PATH search for config.site.
2600 case $CONFIG_SITE in #((
2601 -*) ac_site_file1=./$CONFIG_SITE;;
2602 */*) ac_site_file1=$CONFIG_SITE;;
2603 *) ac_site_file1=./$CONFIG_SITE;;
2604 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 ac_site_file1=$prefix/share/config.site
2607 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608else
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 ac_site_file1=$ac_default_prefix/share/config.site
2610 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002612for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613do
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 test "x$ac_site_file" = xNONE && continue
2615 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2617$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619 . "$ac_site_file" \
2620 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2622as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002623See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624 fi
2625done
2626
2627if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 # Some versions of bash will fail to source /dev/null (special files
2629 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2630 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2632$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2635 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 esac
2637 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638else
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2640$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 >$cache_file
2642fi
2643
2644# Check that the precious variables saved in the cache have kept the same
2645# value.
2646ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2649 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2651 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 case $ac_old_set,$ac_new_set in
2653 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2655$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 +00002656 ac_cache_corrupted=: ;;
2657 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2659$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 ac_cache_corrupted=: ;;
2661 ,);;
2662 *)
2663 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 # differences in whitespace do not lead to failure.
2665 ac_old_val_w=`echo x $ac_old_val`
2666 ac_new_val_w=`echo x $ac_new_val`
2667 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2669$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2670 ac_cache_corrupted=:
2671 else
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2673$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2674 eval $ac_var=\$ac_old_val
2675 fi
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2677$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2679$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 fi;;
2681 esac
2682 # Pass precious variables to config.status.
2683 if test "$ac_new_set" = set; then
2684 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 *) ac_arg=$ac_var=$ac_new_val ;;
2687 esac
2688 case " $ac_configure_args " in
2689 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 esac
2692 fi
2693done
2694if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2698$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002699 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002701## -------------------- ##
2702## Main body of script. ##
2703## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704
Guido van Rossum7f43da71994-08-01 12:15:30 +00002705ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002706ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2709ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710
Guido van Rossum627b2d71993-12-24 10:39:16 +00002711
Michael W. Hudson54241132001-12-07 15:38:26 +00002712
Trent Nelson4d4ec652012-10-16 08:51:24 -04002713
Christian Heimesff5be6e2018-01-20 13:19:21 +01002714
2715
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002716if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002717 # If we're building out-of-tree, we need to make sure the following
2718 # resources get picked up before their $srcdir counterparts.
2719 # Objects/ -> typeslots.inc
2720 # Include/ -> Python-ast.h, graminit.h
2721 # Python/ -> importlib.h
2722 # (A side effect of this is that these resources will automatically be
2723 # regenerated when building out-of-tree, regardless of whether or not
2724 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2725 # off.)
2726 BASECPPFLAGS="-IObjects -IInclude -IPython"
2727else
2728 BASECPPFLAGS=""
2729fi
2730
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731
2732
2733
2734
Victor Stinner9ed34a82017-05-02 22:35:58 +02002735if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737# Extract the first word of "git", so it can be a program name with args.
2738set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2740$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742 $as_echo_n "(cached) " >&6
2743else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744 if test -n "$HAS_GIT"; then
2745 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2748for as_dir in $PATH
2749do
2750 IFS=$as_save_IFS
2751 test -z "$as_dir" && as_dir=.
2752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2756 break 2
2757 fi
2758done
2759 done
2760IFS=$as_save_IFS
2761
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
2764fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765HAS_GIT=$ac_cv_prog_HAS_GIT
2766if test -n "$HAS_GIT"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2768$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769else
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2771$as_echo "no" >&6; }
2772fi
2773
2774
2775else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002776HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779then
Xiang Zhang4c855572018-08-20 22:36:19 +08002780 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2781 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2782 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002783else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002784 GITVERSION=""
2785 GITTAG=""
2786 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787fi
2788
2789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002790ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002791
2792
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002793ac_aux_dir=
2794for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2795 if test -f "$ac_dir/install-sh"; then
2796 ac_aux_dir=$ac_dir
2797 ac_install_sh="$ac_aux_dir/install-sh -c"
2798 break
2799 elif test -f "$ac_dir/install.sh"; then
2800 ac_aux_dir=$ac_dir
2801 ac_install_sh="$ac_aux_dir/install.sh -c"
2802 break
2803 elif test -f "$ac_dir/shtool"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/shtool install -c"
2806 break
2807 fi
2808done
2809if test -z "$ac_aux_dir"; then
2810 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2811fi
2812
2813# These three variables are undocumented and unsupported,
2814# and are intended to be withdrawn in a future Autoconf release.
2815# They can cause serious problems if a builder's source tree is in a directory
2816# whose full name contains unusual characters.
2817ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2818ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2819ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2820
2821
2822# Make sure we can run config.sub.
2823$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2824 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2825
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2827$as_echo_n "checking build system type... " >&6; }
2828if ${ac_cv_build+:} false; then :
2829 $as_echo_n "(cached) " >&6
2830else
2831 ac_build_alias=$build_alias
2832test "x$ac_build_alias" = x &&
2833 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2834test "x$ac_build_alias" = x &&
2835 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2836ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2837 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2838
2839fi
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2841$as_echo "$ac_cv_build" >&6; }
2842case $ac_cv_build in
2843*-*-*) ;;
2844*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2845esac
2846build=$ac_cv_build
2847ac_save_IFS=$IFS; IFS='-'
2848set x $ac_cv_build
2849shift
2850build_cpu=$1
2851build_vendor=$2
2852shift; shift
2853# Remember, the first character of IFS is used to create $*,
2854# except with old shells:
2855build_os=$*
2856IFS=$ac_save_IFS
2857case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2858
2859
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2861$as_echo_n "checking host system type... " >&6; }
2862if ${ac_cv_host+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864else
2865 if test "x$host_alias" = x; then
2866 ac_cv_host=$ac_cv_build
2867else
2868 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2869 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2870fi
2871
2872fi
2873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2874$as_echo "$ac_cv_host" >&6; }
2875case $ac_cv_host in
2876*-*-*) ;;
2877*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2878esac
2879host=$ac_cv_host
2880ac_save_IFS=$IFS; IFS='-'
2881set x $ac_cv_host
2882shift
2883host_cpu=$1
2884host_vendor=$2
2885shift; shift
2886# Remember, the first character of IFS is used to create $*,
2887# except with old shells:
2888host_os=$*
2889IFS=$ac_save_IFS
2890case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2891
2892
2893
doko@python.orga10e4a92013-01-25 18:45:12 +01002894
2895
Ned Deilyfcbc2462014-08-22 13:32:49 -07002896# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2897rm -f pybuilddir.txt
2898
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002899for ac_prog in python$PACKAGE_VERSION python3 python
2900do
2901 # Extract the first word of "$ac_prog", so it can be a program name with args.
2902set dummy $ac_prog; ac_word=$2
2903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2904$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906 $as_echo_n "(cached) " >&6
2907else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908 if test -n "$PYTHON_FOR_REGEN"; then
2909 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910else
2911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912for as_dir in $PATH
2913do
2914 IFS=$as_save_IFS
2915 test -z "$as_dir" && as_dir=.
2916 for ac_exec_ext in '' $ac_executable_extensions; do
2917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2920 break 2
2921 fi
2922done
2923 done
2924IFS=$as_save_IFS
2925
2926fi
2927fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2929if test -n "$PYTHON_FOR_REGEN"; then
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2931$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932else
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2934$as_echo "no" >&6; }
2935fi
2936
2937
Victor Stinnera5c62a82017-05-03 18:21:48 +02002938 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002939done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002940test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002941
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002942
2943
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944if test "$cross_compiling" = yes; then
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2946$as_echo_n "checking for python interpreter for cross build... " >&6; }
2947 if test -z "$PYTHON_FOR_BUILD"; then
2948 for interp in python$PACKAGE_VERSION python3 python; do
2949 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002950 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 +02002951 break
2952 fi
2953 interp=
2954 done
2955 if test x$interp = x; then
2956 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2957 fi
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2959$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002960 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 +02002961 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002962elif test "$cross_compiling" = maybe; then
2963 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002964else
2965 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2966fi
2967
2968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969
Benjamin Petersond23f8222009-04-05 19:13:16 +00002970if test "$prefix" != "/"; then
2971 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2972fi
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
2976
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002977# We don't use PACKAGE_ variables, and they cause conflicts
2978# with other autoconf-based packages that include Python.h
2979grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2980rm confdefs.h
2981mv confdefs.h.new confdefs.h
2982
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002983
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002984VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002985
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002986# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002987
2988SOVERSION=1.0
2989
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002990# The later defininition of _XOPEN_SOURCE disables certain features
2991# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
2995
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2998# them.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003001
3002
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003008
3009
Martin v. Löwisd6320502004-08-12 13:45:08 +00003010# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003011# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3012# them.
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003015
3016
3017
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003018define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003019
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003020# Arguments passed to configure.
3021
3022CONFIG_ARGS="$ac_configure_args"
3023
Matthias Kloseb9621712010-04-24 17:59:49 +00003024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3025$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003027if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 case $enableval in
3030 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003031 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003032 # information
3033 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003034 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003036 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3037 if test ! -d "${enableval}"
3038 then
3039 enableval=/
3040 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
3044 case $enableval in
3045 no)
3046 UNIVERSALSDK=
3047 enable_universalsdk=
3048 ;;
3049 *)
3050 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051 if test ! -d "${UNIVERSALSDK}"
3052 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003053 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055 ;;
3056 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003057
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058
Thomas Wouters477c8d52006-05-27 19:21:47 +00003059else
3060
3061 UNIVERSALSDK=
3062 enable_universalsdk=
3063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003064fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066if test -n "${UNIVERSALSDK}"
3067then
Matthias Kloseb9621712010-04-24 17:59:49 +00003068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3069$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070else
Matthias Kloseb9621712010-04-24 17:59:49 +00003071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3072$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003075
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003076
Ned Deily87adb6e2013-10-18 21:09:56 -07003077ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003078
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079# For backward compatibility reasons we prefer to select '32-bit' if available,
3080# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003082if test "`uname -s`" = "Darwin"
3083then
3084 if test -n "${UNIVERSALSDK}"
3085 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003086 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003087 then
3088 UNIVERSAL_ARCHS="intel"
3089 fi
3090 fi
3091fi
3092
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003093
Matthias Kloseb9621712010-04-24 17:59:49 +00003094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3095$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096
3097# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003098if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003100 UNIVERSAL_ARCHS="$withval"
3101
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102fi
3103
Ned Deily87adb6e2013-10-18 21:09:56 -07003104if test -n "${UNIVERSALSDK}"
3105then
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3107$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3108else
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3110$as_echo "no" >&6; }
3111fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003112
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003113
3114# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003115if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003116 withval=$with_framework_name;
3117 PYTHONFRAMEWORK=${withval}
3118 PYTHONFRAMEWORKDIR=${withval}.framework
3119 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3120
3121else
3122
3123 PYTHONFRAMEWORK=Python
3124 PYTHONFRAMEWORKDIR=Python.framework
3125 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3126
3127fi
3128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003131 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003132 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003133 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003134 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 esac
3136 case $enableval in
3137 no)
3138 PYTHONFRAMEWORK=
3139 PYTHONFRAMEWORKDIR=no-framework
3140 PYTHONFRAMEWORKPREFIX=
3141 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003142 FRAMEWORKINSTALLFIRST=
3143 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 FRAMEWORKALTINSTALLFIRST=
3145 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003146 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 if test "x${prefix}" = "xNONE"; then
3148 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3149 else
3150 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3151 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003152 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003153 ;;
3154 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003156 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003157 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003158 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003159 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3160 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003161 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003163
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003164 if test "x${prefix}" = "xNONE" ; then
3165 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170
3171 case "${enableval}" in
3172 /System*)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 if test "${prefix}" = "NONE" ; then
3175 # See below
3176 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3177 fi
3178 ;;
3179
3180 /Library*)
3181 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3182 ;;
3183
3184 */Library/Frameworks)
3185 MDIR="`dirname "${enableval}"`"
3186 MDIR="`dirname "${MDIR}"`"
3187 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3188
3189 if test "${prefix}" = "NONE"; then
3190 # User hasn't specified the
3191 # --prefix option, but wants to install
3192 # the framework in a non-default location,
3193 # ensure that the compatibility links get
3194 # installed relative to that prefix as well
3195 # instead of in /usr/local.
3196 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3197 fi
3198 ;;
3199
3200 *)
3201 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3202 ;;
3203 esac
3204
Jack Jansen127e56e2001-09-11 14:41:54 +00003205 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003207 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003213 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3214
3215 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3216
Jack Jansene578a632001-08-15 01:27:14 +00003217 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
Guido van Rossum563e7081996-09-10 18:20:48 +00003219else
Martin v. Löwis11437992002-04-12 09:54:03 +00003220
Jack Jansene578a632001-08-15 01:27:14 +00003221 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003222 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003223 PYTHONFRAMEWORKPREFIX=
3224 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225 FRAMEWORKINSTALLFIRST=
3226 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003227 FRAMEWORKALTINSTALLFIRST=
3228 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003229 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003230 if test "x${prefix}" = "xNONE" ; then
3231 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3232 else
3233 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3234 fi
Jack Jansene578a632001-08-15 01:27:14 +00003235 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003236
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238fi
3239
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
3241
Michael W. Hudson54241132001-12-07 15:38:26 +00003242
3243
3244
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003247
3248
3249
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003250
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003251
Ned Deilyb8f944f2013-11-21 22:42:25 -08003252
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003253
3254cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003255#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003256_ACEOF
3257
3258
Jack Jansene578a632001-08-15 01:27:14 +00003259##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003260## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003261## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003262##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263# Set name for machine-dependent library files
3264
Matthias Kloseb9621712010-04-24 17:59:49 +00003265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3266$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267if test -z "$MACHDEP"
3268then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003269 # avoid using uname for cross builds
3270 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003271 # ac_sys_system and ac_sys_release are used for setting
3272 # a lot of different things including 'define_xopen_source'
3273 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003275 *-*-linux-android*)
3276 ac_sys_system=Linux-android
3277 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 *-*-linux*)
3279 ac_sys_system=Linux
3280 ;;
3281 *-*-cygwin*)
3282 ac_sys_system=Cygwin
3283 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003284 *-*-vxworks*)
3285 ac_sys_system=VxWorks
3286 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 *)
3288 # for now, limit cross builds to known configurations
3289 MACHDEP="unknown"
3290 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3291 esac
3292 ac_sys_release=
3293 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003294 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003295 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003296 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003297 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003299 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003300 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003301 fi
3302 ac_md_system=`echo $ac_sys_system |
3303 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3304 ac_md_release=`echo $ac_sys_release |
3305 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3306 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003307
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003308 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003309 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003310 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003311 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003312 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003313 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003315fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3317$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003318
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003319
3320if test "$cross_compiling" = yes; then
3321 case "$host" in
3322 *-*-linux*)
3323 case "$host_cpu" in
3324 arm*)
3325 _host_cpu=arm
3326 ;;
3327 *)
3328 _host_cpu=$host_cpu
3329 esac
3330 ;;
3331 *-*-cygwin*)
3332 _host_cpu=
3333 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003334 *-*-vxworks*)
3335 _host_cpu=$host_cpu
3336 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003337 *)
3338 # for now, limit cross builds to known configurations
3339 MACHDEP="unknown"
3340 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3341 esac
3342 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3343fi
3344
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003345# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3346# disable features if it is defined, without any means to access these
3347# features as extensions. For these systems, we skip the definition of
3348# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3349# some feature, make sure there is no alternative way to access this
3350# feature. Also, when using wildcards, make sure you have verified the
3351# need for not defining _XOPEN_SOURCE on all systems matching the
3352# wildcard, and that the wildcard does not include future systems
3353# (which may remove their limitations).
3354case $ac_sys_system/$ac_sys_release in
3355 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3356 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003357 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003358 # In addition, Stefan Krah confirms that issue #1244610 exists through
3359 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003360 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003361 define_xopen_source=no
3362 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3363 # also defined. This can be overridden by defining _BSD_SOURCE
3364 # As this has a different meaning on Linux, only define it on OpenBSD
3365
Matthias Kloseb9621712010-04-24 17:59:49 +00003366$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003367
3368 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003369 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003370 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3371 # also defined. This can be overridden by defining _BSD_SOURCE
3372 # As this has a different meaning on Linux, only define it on OpenBSD
3373
Matthias Kloseb9621712010-04-24 17:59:49 +00003374$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003375
3376 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003377 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3378 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3379 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003380 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 +00003381 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003382 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3383 # request to enable features supported by the standard as a request
3384 # to disable features not supported by the standard. The best way
3385 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3386 # entirely and define __EXTENSIONS__ instead.
3387 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003388 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003389 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3390 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003391 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003392 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003393 define_xopen_source=no;;
3394 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003395 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003396 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003397 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003398 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3399 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3400 # identifies itself as Darwin/7.*
3401 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3402 # disables platform specific features beyond repair.
3403 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3404 # has no effect, don't bother defining them
3405 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003406 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003407 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003408 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003409 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3410 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3411 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003412 AIX/4)
3413 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003414 AIX/5)
3415 if test `uname -r` -eq 1; then
3416 define_xopen_source=no
3417 fi
3418 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003419 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3420 # defining NI_NUMERICHOST.
3421 QNX/6.3.2)
3422 define_xopen_source=no
3423 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003424 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3425 # in network headers still using system V types.
3426 VxWorks/*)
3427 define_xopen_source=no
3428 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003429
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003430esac
3431
3432if test $define_xopen_source = yes
3433then
Victor Stinner14d098d2011-09-07 22:29:43 +02003434 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Victor Stinner14d098d2011-09-07 22:29:43 +02003436$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
3439 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3440 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3441 # several APIs are not declared. Since this is also needed in some
3442 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003443
Matthias Kloseb9621712010-04-24 17:59:49 +00003444$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
3446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003448$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450fi
3451
Christian Heimes647cd872013-12-07 23:39:33 +01003452# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3453case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003454 hp*|HP*)
3455 define_stdc_a1=yes;;
3456 *)
3457 define_stdc_a1=no;;
3458esac
3459
3460if test $define_stdc_a1 = yes
3461then
Christian Heimes647cd872013-12-07 23:39:33 +01003462
3463$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3464
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465fi
Christian Heimes647cd872013-12-07 23:39:33 +01003466
Jack Jansen6b08a402004-06-03 12:41:45 +00003467# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3468# it may influence the way we can build extensions, so distutils
3469# needs to check it
3470
Thomas Wouters477c8d52006-05-27 19:21:47 +00003471
Jack Jansen6b08a402004-06-03 12:41:45 +00003472CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003473EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003474
Guido van Rossum627b2d71993-12-24 10:39:16 +00003475# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003476
3477# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3478# for debug/optimization stuff. BASECFLAGS is for flags that are required
3479# just to get things to compile and link. Users are free to override OPT
3480# when running configure or make. The build should not break if they do.
3481# BASECFLAGS should generally not be messed with, however.
3482
Guido van Rossum8b131c51995-03-09 14:10:13 +00003483# If the user switches compilers, we can't believe the cache
3484if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3485then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003486 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003487(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488fi
3489
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003490# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3491# when the compiler supports them, but we don't always want -O2, and
3492# we set -g later.
3493if test -z "$CFLAGS"; then
3494 CFLAGS=
3495fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496
3497if test "$ac_sys_system" = "Darwin"
3498then
3499 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003500 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 # information
3502 if test -z "${CC}"
3503 then
3504 found_gcc=
3505 found_clang=
3506 as_save_IFS=$IFS; IFS=:
3507 for as_dir in $PATH
3508 do
3509 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003510 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003512 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513 fi
3514 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003515 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003516 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003517 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518 fi
3519 fi
3520 done
3521 IFS=$as_save_IFS
3522
3523 if test -n "$found_gcc" -a -n "$found_clang"
3524 then
3525 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3526 then
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3528$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3529 CC="$found_clang"
3530 CXX="$found_clang++"
3531 fi
3532
3533
3534 elif test -z "$found_gcc" -a -n "$found_clang"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3537$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3538 CC="$found_clang"
3539 CXX="$found_clang++"
3540
3541 elif test -z "$found_gcc" -a -z "$found_clang"
3542 then
3543 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3544 if test -n "${found_clang}"
3545 then
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3547$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3548 CC="${found_clang}"
3549 CXX="`/usr/bin/xcrun -find clang++`"
3550
3551 # else: use default behaviour
3552 fi
3553 fi
3554 fi
3555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_ext=c
3557ac_cpp='$CPP $CPPFLAGS'
3558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3560ac_compiler_gnu=$ac_cv_c_compiler_gnu
3561if test -n "$ac_tool_prefix"; then
3562 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3563set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003566if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
Jack Jansendd19cf82001-12-06 22:36:17 +00003587fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003590if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3592$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003593else
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599fi
3600if test -z "$ac_cv_prog_CC"; then
3601 ac_ct_CC=$CC
3602 # Extract the first word of "gcc", so it can be a program name with args.
3603set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003606if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
3609 if test -n "$ac_ct_CC"; then
3610 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $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 +00003621 break 2
3622 fi
3623done
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003626
3627fi
3628fi
3629ac_ct_CC=$ac_cv_prog_ac_ct_CC
3630if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3632$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 if test "x$ac_ct_CC" = x; then
3639 CC=""
3640 else
3641 case $cross_compiling:$ac_tool_warned in
3642yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645ac_tool_warned=yes ;;
3646esac
3647 CC=$ac_ct_CC
3648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
3650 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003651fi
3652
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test -n "$ac_tool_prefix"; then
3655 # 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 +00003656set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003659if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $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 +00003674 break 2
3675 fi
3676done
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
3680fi
3681fi
3682CC=$ac_cv_prog_CC
3683if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3685$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689fi
3690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694if test -z "$CC"; then
3695 # Extract the first word of "cc", so it can be a program name with args.
3696set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003699if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3714 ac_prog_rejected=yes
3715 continue
3716 fi
3717 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725if test $ac_prog_rejected = yes; then
3726 # We found a bogon in the path, so make sure we never use it.
3727 set dummy $ac_cv_prog_CC
3728 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 # We chose a different compiler from the bogus one.
3731 # However, it has the same basename, so the bogon will be chosen
3732 # first if we set CC to just the basename; use the full file name.
3733 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003734 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 fi
3736fi
3737fi
3738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003739CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750if test -z "$CC"; then
3751 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 do
3754 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3755set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003760else
3761 if test -n "$CC"; then
3762 ac_cv_prog_CC="$CC" # Let the user override the test.
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781CC=$ac_cv_prog_CC
3782if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3784$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$CC" && break
3792 done
3793fi
3794if test -z "$CC"; then
3795 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797do
3798 # Extract the first word of "$ac_prog", so it can be a program name with args.
3799set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
3805 if test -n "$ac_ct_CC"; then
3806 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3807else
3808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
3818 fi
3819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
3824fi
3825ac_ct_CC=$ac_cv_prog_ac_ct_CC
3826if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3828$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$ac_ct_CC" && break
3836done
Michael W. Hudson54241132001-12-07 15:38:26 +00003837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838 if test "x$ac_ct_CC" = x; then
3839 CC=""
3840 else
3841 case $cross_compiling:$ac_tool_warned in
3842yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845ac_tool_warned=yes ;;
3846esac
3847 CC=$ac_ct_CC
3848 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850
3851fi
3852
3853
Matthias Kloseb9621712010-04-24 17:59:49 +00003854test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003856as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003857See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
3859# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3861set X $ac_compile
3862ac_compiler=$2
3863for ac_option in --version -v -V -qversion; do
3864 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865case "(($ac_try" in
3866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3867 *) ac_try_echo=$ac_try;;
3868esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3870$as_echo "$ac_try_echo"; } >&5
3871 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 if test -s conftest.err; then
3874 sed '10a\
3875... rest of stderr output deleted ...
3876 10q' conftest.err >conftest.er1
3877 cat conftest.er1 >&5
3878 fi
3879 rm -f conftest.er1 conftest.err
3880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3881 test $ac_status = 0; }
3882done
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003885/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003886
Martin v. Löwis11437992002-04-12 09:54:03 +00003887int
3888main ()
3889{
3890
3891 ;
3892 return 0;
3893}
3894_ACEOF
3895ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003896ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003897# Try to create an executable without -o first, disregard a.out.
3898# It will help us diagnose broken compilers, and finding out an intuition
3899# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3901$as_echo_n "checking whether the C compiler works... " >&6; }
3902ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3903
3904# The possible output files:
3905ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907ac_rmfiles=
3908for ac_file in $ac_files
3909do
3910 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3913 esac
3914done
3915rm -f $ac_rmfiles
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003925 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3929# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3930# in a Makefile. We should not override ac_cv_exeext if it was cached,
3931# so that the user can short-circuit this test for compilers unknown to
3932# Autoconf.
3933for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003934do
3935 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003938 ;;
3939 [ab].out )
3940 # We found the default executable, but exeext='' is most
3941 # certainly right.
3942 break;;
3943 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 then :; else
3946 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3947 fi
3948 # We set ac_cv_exeext here because the later test for it is not
3949 # safe: cross compilers may not add the suffix if given an `-o'
3950 # argument, so we may need to know it at that point already.
3951 # Even if this section looks crufty: it has the advantage of
3952 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 break;;
3954 * )
3955 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 esac
3957done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958test "$ac_cv_exeext" = no && ac_cv_exeext=
3959
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003960else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 ac_file=''
3962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003963if test -z "$ac_file"; then :
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3965$as_echo "no" >&6; }
3966$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003967sed 's/^/| /' conftest.$ac_ext >&5
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003971as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003972See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003973else
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3978$as_echo_n "checking for C compiler default output file name... " >&6; }
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3980$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3986$as_echo_n "checking for suffix of executables... " >&6; }
3987if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3999# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4000# work properly (i.e., refer to `conftest.exe'), while it won't with
4001# `rm'.
4002for ac_file in conftest.exe conftest conftest.*; do
4003 test -f "$ac_file" || continue
4004 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4007 break;;
4008 * ) break;;
4009 esac
4010done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004011else
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004014as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004015See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f conftest conftest$ac_cv_exeext
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4019$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020
4021rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004022EXEEXT=$ac_cv_exeext
4023ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025/* end confdefs.h. */
4026#include <stdio.h>
4027int
4028main ()
4029{
4030FILE *f = fopen ("conftest.out", "w");
4031 return ferror (f) || fclose (f) != 0;
4032
4033 ;
4034 return 0;
4035}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004037ac_clean_files="$ac_clean_files conftest.out"
4038# Check that the compiler produces executables we can run. If not, either
4039# the compiler is broken, or we cross compile.
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4041$as_echo_n "checking whether we are cross compiling... " >&6; }
4042if test "$cross_compiling" != yes; then
4043 { { ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4049$as_echo "$ac_try_echo"; } >&5
4050 (eval "$ac_link") 2>&5
4051 ac_status=$?
4052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4053 test $ac_status = 0; }
4054 if { ac_try='./conftest$ac_cv_exeext'
4055 { { case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
4059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
4061 (eval "$ac_try") 2>&5
4062 ac_status=$?
4063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }; }; then
4065 cross_compiling=no
4066 else
4067 if test "$cross_compiling" = maybe; then
4068 cross_compiling=yes
4069 else
4070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004072as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004073If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004074See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 fi
4076 fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4079$as_echo "$cross_compiling" >&6; }
4080
4081rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4082ac_clean_files=$ac_clean_files_save
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4084$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004085if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo_n "(cached) " >&6
4087else
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004089/* end confdefs.h. */
4090
4091int
4092main ()
4093{
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
4099rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004100if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111 for ac_file in conftest.o conftest.obj conftest.*; do
4112 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4116 break;;
4117 esac
4118done
4119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004121sed 's/^/| /' conftest.$ac_ext >&5
4122
Matthias Kloseb9621712010-04-24 17:59:49 +00004123{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004125as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004126See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4131$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132OBJEXT=$ac_cv_objext
4133ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4135$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004141
Martin v. Löwis11437992002-04-12 09:54:03 +00004142int
4143main ()
4144{
4145#ifndef __GNUC__
4146 choke me
4147#endif
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 ac_compiler_gnu=yes
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_cv_c_compiler_gnu=$ac_compiler_gnu
4160
4161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4163$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4164if test $ac_compiler_gnu = yes; then
4165 GCC=yes
4166else
4167 GCC=
4168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004169ac_test_CFLAGS=${CFLAGS+set}
4170ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4172$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004173if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 ac_save_c_werror_flag=$ac_c_werror_flag
4177 ac_c_werror_flag=yes
4178 ac_cv_prog_cc_g=no
4179 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004192 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193else
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 CFLAGS=""
4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207
Matthias Kloseb9621712010-04-24 17:59:49 +00004208else
4209 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_c_werror_flag=$ac_save_c_werror_flag
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4233$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004236elif test $ac_cv_prog_cc_g = yes; then
4237 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 CFLAGS="-g -O2"
4239 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241 fi
4242else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243 if test "$GCC" = yes; then
4244 CFLAGS="-O2"
4245 else
4246 CFLAGS=
4247 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4250$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004251if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004253else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004255ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#include <stdarg.h>
4259#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004260struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4262struct buf { int x; };
4263FILE * (*rcsopen) (struct buf *, struct stat *, int);
4264static char *e (p, i)
4265 char **p;
4266 int i;
4267{
4268 return p[i];
4269}
4270static char *f (char * (*g) (char **, int), char **p, ...)
4271{
4272 char *s;
4273 va_list v;
4274 va_start (v,p);
4275 s = g (p, va_arg (v,int));
4276 va_end (v);
4277 return s;
4278}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279
4280/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4281 function prototypes and stuff, but not '\xHH' hex character constants.
4282 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4285 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4290 inside strings and character constants. */
4291#define FOO(x) 'x'
4292int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4293
Skip Montanaro6dead952003-09-25 14:50:04 +00004294int test (int i, double x);
4295struct s1 {int (*f) (int a);};
4296struct s2 {int (*f) (double a);};
4297int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4298int argc;
4299char **argv;
4300int
4301main ()
4302{
4303return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4304 ;
4305 return 0;
4306}
4307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4309 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004310do
4311 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315rm -f core conftest.err conftest.$ac_objext
4316 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004317done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004319CC=$ac_save_CC
4320
4321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322# AC_CACHE_VAL
4323case "x$ac_cv_prog_cc_c89" in
4324 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4326$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4329$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4333$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004334esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Matthias Kloseb9621712010-04-24 17:59:49 +00004337fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004338
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_ext=c
4340ac_cpp='$CPP $CPPFLAGS'
4341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4343ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004345ac_ext=c
4346ac_cpp='$CPP $CPPFLAGS'
4347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4349ac_compiler_gnu=$ac_cv_c_compiler_gnu
4350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4351$as_echo_n "checking how to run the C preprocessor... " >&6; }
4352# On Suns, sometimes $CPP names a directory.
4353if test -n "$CPP" && test -d "$CPP"; then
4354 CPP=
4355fi
4356if test -z "$CPP"; then
4357 if ${ac_cv_prog_CPP+:} false; then :
4358 $as_echo_n "(cached) " >&6
4359else
4360 # Double quotes because CPP needs to be expanded
4361 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4362 do
4363 ac_preproc_ok=false
4364for ac_c_preproc_warn_flag in '' yes
4365do
4366 # Use a header file that comes with gcc, so configuring glibc
4367 # with a fresh cross-compiler works.
4368 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4369 # <limits.h> exists even on freestanding compilers.
4370 # On the NeXT, cc -E runs the code through the compiler's parser,
4371 # not just through cpp. "Syntax error" is here to catch this case.
4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4373/* end confdefs.h. */
4374#ifdef __STDC__
4375# include <limits.h>
4376#else
4377# include <assert.h>
4378#endif
4379 Syntax error
4380_ACEOF
4381if ac_fn_c_try_cpp "$LINENO"; then :
4382
4383else
4384 # Broken: fails on valid input.
4385continue
4386fi
4387rm -f conftest.err conftest.i conftest.$ac_ext
4388
4389 # OK, works on sane cases. Now check whether nonexistent headers
4390 # can be detected and how.
4391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392/* end confdefs.h. */
4393#include <ac_nonexistent.h>
4394_ACEOF
4395if ac_fn_c_try_cpp "$LINENO"; then :
4396 # Broken: success on invalid input.
4397continue
4398else
4399 # Passes both tests.
4400ac_preproc_ok=:
4401break
4402fi
4403rm -f conftest.err conftest.i conftest.$ac_ext
4404
4405done
4406# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4407rm -f conftest.i conftest.err conftest.$ac_ext
4408if $ac_preproc_ok; then :
4409 break
4410fi
4411
4412 done
4413 ac_cv_prog_CPP=$CPP
4414
4415fi
4416 CPP=$ac_cv_prog_CPP
4417else
4418 ac_cv_prog_CPP=$CPP
4419fi
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4421$as_echo "$CPP" >&6; }
4422ac_preproc_ok=false
4423for ac_c_preproc_warn_flag in '' yes
4424do
4425 # Use a header file that comes with gcc, so configuring glibc
4426 # with a fresh cross-compiler works.
4427 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4428 # <limits.h> exists even on freestanding compilers.
4429 # On the NeXT, cc -E runs the code through the compiler's parser,
4430 # not just through cpp. "Syntax error" is here to catch this case.
4431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4432/* end confdefs.h. */
4433#ifdef __STDC__
4434# include <limits.h>
4435#else
4436# include <assert.h>
4437#endif
4438 Syntax error
4439_ACEOF
4440if ac_fn_c_try_cpp "$LINENO"; then :
4441
4442else
4443 # Broken: fails on valid input.
4444continue
4445fi
4446rm -f conftest.err conftest.i conftest.$ac_ext
4447
4448 # OK, works on sane cases. Now check whether nonexistent headers
4449 # can be detected and how.
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451/* end confdefs.h. */
4452#include <ac_nonexistent.h>
4453_ACEOF
4454if ac_fn_c_try_cpp "$LINENO"; then :
4455 # Broken: success on invalid input.
4456continue
4457else
4458 # Passes both tests.
4459ac_preproc_ok=:
4460break
4461fi
4462rm -f conftest.err conftest.i conftest.$ac_ext
4463
4464done
4465# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4466rm -f conftest.i conftest.err conftest.$ac_ext
4467if $ac_preproc_ok; then :
4468
4469else
4470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4472as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4473See \`config.log' for more details" "$LINENO" 5; }
4474fi
4475
4476ac_ext=c
4477ac_cpp='$CPP $CPPFLAGS'
4478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4480ac_compiler_gnu=$ac_cv_c_compiler_gnu
4481
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4483$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4484if ${ac_cv_path_GREP+:} false; then :
4485 $as_echo_n "(cached) " >&6
4486else
4487 if test -z "$GREP"; then
4488 ac_path_GREP_found=false
4489 # Loop through the user's path and test for each of PROGNAME-LIST
4490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4492do
4493 IFS=$as_save_IFS
4494 test -z "$as_dir" && as_dir=.
4495 for ac_prog in grep ggrep; do
4496 for ac_exec_ext in '' $ac_executable_extensions; do
4497 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4498 as_fn_executable_p "$ac_path_GREP" || continue
4499# Check for GNU ac_path_GREP and select it if it is found.
4500 # Check for GNU $ac_path_GREP
4501case `"$ac_path_GREP" --version 2>&1` in
4502*GNU*)
4503 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4504*)
4505 ac_count=0
4506 $as_echo_n 0123456789 >"conftest.in"
4507 while :
4508 do
4509 cat "conftest.in" "conftest.in" >"conftest.tmp"
4510 mv "conftest.tmp" "conftest.in"
4511 cp "conftest.in" "conftest.nl"
4512 $as_echo 'GREP' >> "conftest.nl"
4513 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4514 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4515 as_fn_arith $ac_count + 1 && ac_count=$as_val
4516 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4517 # Best one so far, save it but keep looking for a better one
4518 ac_cv_path_GREP="$ac_path_GREP"
4519 ac_path_GREP_max=$ac_count
4520 fi
4521 # 10*(2^10) chars as input seems more than enough
4522 test $ac_count -gt 10 && break
4523 done
4524 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4525esac
4526
4527 $ac_path_GREP_found && break 3
4528 done
4529 done
4530 done
4531IFS=$as_save_IFS
4532 if test -z "$ac_cv_path_GREP"; then
4533 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4534 fi
4535else
4536 ac_cv_path_GREP=$GREP
4537fi
4538
4539fi
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4541$as_echo "$ac_cv_path_GREP" >&6; }
4542 GREP="$ac_cv_path_GREP"
4543
4544
Łukasz Langaa785c872016-09-09 17:37:37 -07004545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4546$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4547if ${ac_cv_path_SED+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4551 for ac_i in 1 2 3 4 5 6 7; do
4552 ac_script="$ac_script$as_nl$ac_script"
4553 done
4554 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4555 { ac_script=; unset ac_script;}
4556 if test -z "$SED"; then
4557 ac_path_SED_found=false
4558 # Loop through the user's path and test for each of PROGNAME-LIST
4559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4560for as_dir in $PATH
4561do
4562 IFS=$as_save_IFS
4563 test -z "$as_dir" && as_dir=.
4564 for ac_prog in sed gsed; do
4565 for ac_exec_ext in '' $ac_executable_extensions; do
4566 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4567 as_fn_executable_p "$ac_path_SED" || continue
4568# Check for GNU ac_path_SED and select it if it is found.
4569 # Check for GNU $ac_path_SED
4570case `"$ac_path_SED" --version 2>&1` in
4571*GNU*)
4572 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4573*)
4574 ac_count=0
4575 $as_echo_n 0123456789 >"conftest.in"
4576 while :
4577 do
4578 cat "conftest.in" "conftest.in" >"conftest.tmp"
4579 mv "conftest.tmp" "conftest.in"
4580 cp "conftest.in" "conftest.nl"
4581 $as_echo '' >> "conftest.nl"
4582 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4583 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4584 as_fn_arith $ac_count + 1 && ac_count=$as_val
4585 if test $ac_count -gt ${ac_path_SED_max-0}; then
4586 # Best one so far, save it but keep looking for a better one
4587 ac_cv_path_SED="$ac_path_SED"
4588 ac_path_SED_max=$ac_count
4589 fi
4590 # 10*(2^10) chars as input seems more than enough
4591 test $ac_count -gt 10 && break
4592 done
4593 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4594esac
4595
4596 $ac_path_SED_found && break 3
4597 done
4598 done
4599 done
4600IFS=$as_save_IFS
4601 if test -z "$ac_cv_path_SED"; then
4602 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4603 fi
4604else
4605 ac_cv_path_SED=$SED
4606fi
4607
4608fi
4609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4610$as_echo "$ac_cv_path_SED" >&6; }
4611 SED="$ac_cv_path_SED"
4612 rm -f conftest.sed
4613
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004614
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616
Matthias Kloseb9621712010-04-24 17:59:49 +00004617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4618$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004620# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004621if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004622 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623
4624 case $withval in
4625 no) with_cxx_main=no
4626 MAINCC='$(CC)';;
4627 yes) with_cxx_main=yes
4628 MAINCC='$(CXX)';;
4629 *) with_cxx_main=yes
4630 MAINCC=$withval
4631 if test -z "$CXX"
4632 then
4633 CXX=$withval
4634 fi;;
4635 esac
4636else
4637
4638 with_cxx_main=no
4639 MAINCC='$(CC)'
4640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004641fi
4642
Matthias Kloseb9621712010-04-24 17:59:49 +00004643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4644$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646preset_cxx="$CXX"
4647if test -z "$CXX"
4648then
4649 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004650 gcc) if test -n "$ac_tool_prefix"; then
4651 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4652set dummy ${ac_tool_prefix}g++; ac_word=$2
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if ${ac_cv_path_CXX+:} false; then :
4656 $as_echo_n "(cached) " >&6
4657else
4658 case $CXX in
4659 [\\/]* | ?:[\\/]*)
4660 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4661 ;;
4662 *)
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in notfound
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004670 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4673 fi
4674done
4675 done
4676IFS=$as_save_IFS
4677
4678 ;;
4679esac
4680fi
4681CXX=$ac_cv_path_CXX
4682if test -n "$CXX"; then
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4684$as_echo "$CXX" >&6; }
4685else
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687$as_echo "no" >&6; }
4688fi
4689
4690
4691fi
4692if test -z "$ac_cv_path_CXX"; then
4693 ac_pt_CXX=$CXX
4694 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004695set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698if ${ac_cv_path_ac_pt_CXX+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700else
4701 case $ac_pt_CXX in
4702 [\\/]* | ?:[\\/]*)
4703 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4704 ;;
4705 *)
4706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in notfound
4708do
4709 IFS=$as_save_IFS
4710 test -z "$as_dir" && as_dir=.
4711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 break 2
4716 fi
4717done
4718 done
4719IFS=$as_save_IFS
4720
4721 ;;
4722esac
4723fi
4724ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4725if test -n "$ac_pt_CXX"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4727$as_echo "$ac_pt_CXX" >&6; }
4728else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
4731fi
4732
4733 if test "x$ac_pt_CXX" = x; then
4734 CXX="g++"
4735 else
4736 case $cross_compiling:$ac_tool_warned in
4737yes:)
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4740ac_tool_warned=yes ;;
4741esac
4742 CXX=$ac_pt_CXX
4743 fi
4744else
4745 CXX="$ac_cv_path_CXX"
4746fi
4747 ;;
4748 cc) if test -n "$ac_tool_prefix"; then
4749 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4750set dummy ${ac_tool_prefix}c++; ac_word=$2
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004753if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755else
4756 case $CXX in
4757 [\\/]* | ?:[\\/]*)
4758 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4759 ;;
4760 *)
4761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762for as_dir in notfound
4763do
4764 IFS=$as_save_IFS
4765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 break 2
4771 fi
4772done
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776 ;;
4777esac
4778fi
4779CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4782$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004783else
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788
4789fi
4790if test -z "$ac_cv_path_CXX"; then
4791 ac_pt_CXX=$CXX
4792 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 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 +00004802 ;;
4803 *)
4804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805for as_dir in notfound
4806do
4807 IFS=$as_save_IFS
4808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 break 2
4814 fi
4815done
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 ;;
4820esac
4821fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4823if test -n "$ac_pt_CXX"; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4825$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004826else
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 if test "x$ac_pt_CXX" = x; then
4832 CXX="c++"
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840 CXX=$ac_pt_CXX
4841 fi
4842else
4843 CXX="$ac_cv_path_CXX"
4844fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 clang|*/clang) if test -n "$ac_tool_prefix"; then
4847 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4848set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4850$as_echo_n "checking for $ac_word... " >&6; }
4851if ${ac_cv_path_CXX+:} false; then :
4852 $as_echo_n "(cached) " >&6
4853else
4854 case $CXX in
4855 [\\/]* | ?:[\\/]*)
4856 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4857 ;;
4858 *)
4859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860for as_dir in notfound
4861do
4862 IFS=$as_save_IFS
4863 test -z "$as_dir" && as_dir=.
4864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004866 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4868 break 2
4869 fi
4870done
4871 done
4872IFS=$as_save_IFS
4873
Ned Deilycbfb9a52012-06-23 16:02:19 -07004874 ;;
4875esac
4876fi
4877CXX=$ac_cv_path_CXX
4878if test -n "$CXX"; then
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4880$as_echo "$CXX" >&6; }
4881else
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883$as_echo "no" >&6; }
4884fi
4885
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886
4887fi
4888if test -z "$ac_cv_path_CXX"; then
4889 ac_pt_CXX=$CXX
4890 # Extract the first word of "clang++", so it can be a program name with args.
4891set dummy clang++; ac_word=$2
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893$as_echo_n "checking for $ac_word... " >&6; }
4894if ${ac_cv_path_ac_pt_CXX+:} false; then :
4895 $as_echo_n "(cached) " >&6
4896else
4897 case $ac_pt_CXX in
4898 [\\/]* | ?:[\\/]*)
4899 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4900 ;;
4901 *)
4902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903for as_dir in notfound
4904do
4905 IFS=$as_save_IFS
4906 test -z "$as_dir" && as_dir=.
4907 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004909 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911 break 2
4912 fi
4913done
4914 done
4915IFS=$as_save_IFS
4916
4917 ;;
4918esac
4919fi
4920ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4921if test -n "$ac_pt_CXX"; then
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4923$as_echo "$ac_pt_CXX" >&6; }
4924else
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
4927fi
4928
4929 if test "x$ac_pt_CXX" = x; then
4930 CXX="clang++"
4931 else
4932 case $cross_compiling:$ac_tool_warned in
4933yes:)
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4936ac_tool_warned=yes ;;
4937esac
4938 CXX=$ac_pt_CXX
4939 fi
4940else
4941 CXX="$ac_cv_path_CXX"
4942fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004943 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004944 icc|*/icc) if test -n "$ac_tool_prefix"; then
4945 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4946set dummy ${ac_tool_prefix}icpc; ac_word=$2
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948$as_echo_n "checking for $ac_word... " >&6; }
4949if ${ac_cv_path_CXX+:} false; then :
4950 $as_echo_n "(cached) " >&6
4951else
4952 case $CXX in
4953 [\\/]* | ?:[\\/]*)
4954 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4955 ;;
4956 *)
4957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in notfound
4959do
4960 IFS=$as_save_IFS
4961 test -z "$as_dir" && as_dir=.
4962 for ac_exec_ext in '' $ac_executable_extensions; do
4963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4964 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966 break 2
4967 fi
4968done
4969 done
4970IFS=$as_save_IFS
4971
4972 ;;
4973esac
4974fi
4975CXX=$ac_cv_path_CXX
4976if test -n "$CXX"; then
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4978$as_echo "$CXX" >&6; }
4979else
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981$as_echo "no" >&6; }
4982fi
4983
4984
4985fi
4986if test -z "$ac_cv_path_CXX"; then
4987 ac_pt_CXX=$CXX
4988 # Extract the first word of "icpc", so it can be a program name with args.
4989set dummy icpc; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_ac_pt_CXX+:} false; then :
4993 $as_echo_n "(cached) " >&6
4994else
4995 case $ac_pt_CXX in
4996 [\\/]* | ?:[\\/]*)
4997 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4998 ;;
4999 *)
5000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in notfound
5002do
5003 IFS=$as_save_IFS
5004 test -z "$as_dir" && as_dir=.
5005 for ac_exec_ext in '' $ac_executable_extensions; do
5006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009 break 2
5010 fi
5011done
5012 done
5013IFS=$as_save_IFS
5014
5015 ;;
5016esac
5017fi
5018ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5019if test -n "$ac_pt_CXX"; then
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5021$as_echo "$ac_pt_CXX" >&6; }
5022else
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027 if test "x$ac_pt_CXX" = x; then
5028 CXX="icpc"
5029 else
5030 case $cross_compiling:$ac_tool_warned in
5031yes:)
5032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5034ac_tool_warned=yes ;;
5035esac
5036 CXX=$ac_pt_CXX
5037 fi
5038else
5039 CXX="$ac_cv_path_CXX"
5040fi
5041 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042 esac
5043 if test "$CXX" = "notfound"
5044 then
5045 CXX=""
5046 fi
5047fi
5048if test -z "$CXX"
5049then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005050 if test -n "$ac_tool_prefix"; then
5051 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5052 do
5053 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005057if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059else
5060 if test -n "$CXX"; then
5061 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005070 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072 break 2
5073 fi
5074done
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077
5078fi
5079fi
5080CXX=$ac_cv_prog_CXX
5081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5083$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084else
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087fi
5088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005090 test -n "$CXX" && break
5091 done
5092fi
5093if test -z "$CXX"; then
5094 ac_ct_CXX=$CXX
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096do
5097 # Extract the first word of "$ac_prog", so it can be a program name with args.
5098set dummy $ac_prog; ac_word=$2
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
5101if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5102 $as_echo_n "(cached) " >&6
5103else
5104 if test -n "$ac_ct_CXX"; then
5105 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
5112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 ac_cv_prog_ac_ct_CXX="$ac_prog"
5115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116 break 2
5117 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005119 done
5120IFS=$as_save_IFS
5121
5122fi
5123fi
5124ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5125if test -n "$ac_ct_CXX"; then
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5127$as_echo "$ac_ct_CXX" >&6; }
5128else
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134 test -n "$ac_ct_CXX" && break
5135done
5136
5137 if test "x$ac_ct_CXX" = x; then
5138 CXX="notfound"
5139 else
5140 case $cross_compiling:$ac_tool_warned in
5141yes:)
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5144ac_tool_warned=yes ;;
5145esac
5146 CXX=$ac_ct_CXX
5147 fi
5148fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005149
5150 if test "$CXX" = "notfound"
5151 then
5152 CXX=""
5153 fi
5154fi
5155if test "$preset_cxx" != "$CXX"
5156then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005157 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005158
5159 By default, distutils will build C++ extension modules with \"$CXX\".
5160 If this is not intended, then set CXX on the configure command line.
5161 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005162$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163
5164 By default, distutils will build C++ extension modules with \"$CXX\".
5165 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005166 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167fi
5168
5169
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005170MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5171
5172
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5174$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5175cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005176#undef bfin
5177#undef cris
5178#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005179#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005180#undef hppa
5181#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005183#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005184#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005185#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005186#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005187#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005188 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005189#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005190# if defined(__x86_64__) && defined(__LP64__)
5191 x86_64-linux-gnu
5192# elif defined(__x86_64__) && defined(__ILP32__)
5193 x86_64-linux-gnux32
5194# elif defined(__i386__)
5195 i386-linux-gnu
5196# elif defined(__aarch64__) && defined(__AARCH64EL__)
5197# if defined(__ILP32__)
5198 aarch64_ilp32-linux-gnu
5199# else
5200 aarch64-linux-gnu
5201# endif
5202# elif defined(__aarch64__) && defined(__AARCH64EB__)
5203# if defined(__ILP32__)
5204 aarch64_be_ilp32-linux-gnu
5205# else
5206 aarch64_be-linux-gnu
5207# endif
5208# elif defined(__alpha__)
5209 alpha-linux-gnu
5210# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5211# if defined(__ARMEL__)
5212 arm-linux-gnueabihf
5213# else
5214 armeb-linux-gnueabihf
5215# endif
5216# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5217# if defined(__ARMEL__)
5218 arm-linux-gnueabi
5219# else
5220 armeb-linux-gnueabi
5221# endif
5222# elif defined(__hppa__)
5223 hppa-linux-gnu
5224# elif defined(__ia64__)
5225 ia64-linux-gnu
5226# elif defined(__m68k__) && !defined(__mcoldfire__)
5227 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005228# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5229# if _MIPS_SIM == _ABIO32
5230 mipsisa32r6el-linux-gnu
5231# elif _MIPS_SIM == _ABIN32
5232 mipsisa64r6el-linux-gnuabin32
5233# elif _MIPS_SIM == _ABI64
5234 mipsisa64r6el-linux-gnuabi64
5235# else
5236# error unknown platform triplet
5237# endif
5238# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5239# if _MIPS_SIM == _ABIO32
5240 mipsisa32r6-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mipsisa64r6-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mipsisa64r6-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005248# elif defined(__mips_hard_float) && defined(_MIPSEL)
5249# if _MIPS_SIM == _ABIO32
5250 mipsel-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64el-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64el-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__mips_hard_float)
5259# if _MIPS_SIM == _ABIO32
5260 mips-linux-gnu
5261# elif _MIPS_SIM == _ABIN32
5262 mips64-linux-gnuabin32
5263# elif _MIPS_SIM == _ABI64
5264 mips64-linux-gnuabi64
5265# else
5266# error unknown platform triplet
5267# endif
5268# elif defined(__or1k__)
5269 or1k-linux-gnu
5270# elif defined(__powerpc__) && defined(__SPE__)
5271 powerpc-linux-gnuspe
5272# elif defined(__powerpc64__)
5273# if defined(__LITTLE_ENDIAN__)
5274 powerpc64le-linux-gnu
5275# else
5276 powerpc64-linux-gnu
5277# endif
5278# elif defined(__powerpc__)
5279 powerpc-linux-gnu
5280# elif defined(__s390x__)
5281 s390x-linux-gnu
5282# elif defined(__s390__)
5283 s390-linux-gnu
5284# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5285 sh4-linux-gnu
5286# elif defined(__sparc__) && defined(__arch64__)
5287 sparc64-linux-gnu
5288# elif defined(__sparc__)
5289 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005290# elif defined(__riscv)
5291# if __riscv_xlen == 32
5292 riscv32-linux-gnu
5293# elif __riscv_xlen == 64
5294 riscv64-linux-gnu
5295# else
5296# error unknown platform triplet
5297# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298# else
5299# error unknown platform triplet
5300# endif
5301#elif defined(__FreeBSD_kernel__)
5302# if defined(__LP64__)
5303 x86_64-kfreebsd-gnu
5304# elif defined(__i386__)
5305 i386-kfreebsd-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__gnu_hurd__)
5310 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005311#elif defined(__APPLE__)
5312 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005313#elif defined(__VXWORKS__)
5314 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315#else
5316# error unknown platform triplet
5317#endif
5318
5319EOF
5320
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005321if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5324$as_echo "$PLATFORM_TRIPLET" >&6; }
5325else
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5327$as_echo "none" >&6; }
5328fi
5329rm -f conftest.c conftest.out
5330
5331if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5332 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5333 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5334 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005335elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5336 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005337fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005338
doko@ubuntu.com55532312016-06-14 08:55:19 +02005339if test x$MULTIARCH != x; then
5340 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5341fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342
5343
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5345$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5346save_LDFLAGS="$LDFLAGS"
5347LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005348
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5350/* end confdefs.h. */
5351
5352int
5353main ()
5354{
5355
5356 ;
5357 return 0;
5358}
5359_ACEOF
5360if ac_fn_c_try_link "$LINENO"; then :
5361 NO_AS_NEEDED="-Wl,--no-as-needed"
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5363$as_echo "yes" >&6; }
5364else
5365 NO_AS_NEEDED=""
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369rm -f core conftest.err conftest.$ac_objext \
5370 conftest$ac_exeext conftest.$ac_ext
5371LDFLAGS="$save_LDFLAGS"
5372
5373
5374
5375# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5378$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005379if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381else
5382 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5383 then ac_cv_path_EGREP="$GREP -E"
5384 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 # Loop through the user's path and test for each of PROGNAME-LIST
5388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5390do
5391 IFS=$as_save_IFS
5392 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 for ac_prog in egrep; do
5394 for ac_exec_ext in '' $ac_executable_extensions; do
5395 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005396 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005397# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 # Check for GNU $ac_path_EGREP
5399case `"$ac_path_EGREP" --version 2>&1` in
5400*GNU*)
5401 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5402*)
5403 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 while :
5406 do
5407 cat "conftest.in" "conftest.in" >"conftest.tmp"
5408 mv "conftest.tmp" "conftest.in"
5409 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5412 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5415 # Best one so far, save it but keep looking for a better one
5416 ac_cv_path_EGREP="$ac_path_EGREP"
5417 ac_path_EGREP_max=$ac_count
5418 fi
5419 # 10*(2^10) chars as input seems more than enough
5420 test $ac_count -gt 10 && break
5421 done
5422 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5423esac
5424
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 $ac_path_EGREP_found && break 3
5426 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005431 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 +00005432 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433else
5434 ac_cv_path_EGREP=$EGREP
5435fi
5436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 fi
5438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5440$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005442
5443
Matthias Kloseb9621712010-04-24 17:59:49 +00005444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5445$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005446if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $as_echo_n "(cached) " >&6
5448else
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005450/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005451#include <stdlib.h>
5452#include <stdarg.h>
5453#include <string.h>
5454#include <float.h>
5455
5456int
5457main ()
5458{
5459
5460 ;
5461 return 0;
5462}
5463_ACEOF
5464if ac_fn_c_try_compile "$LINENO"; then :
5465 ac_cv_header_stdc=yes
5466else
5467 ac_cv_header_stdc=no
5468fi
5469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5470
5471if test $ac_cv_header_stdc = yes; then
5472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005476
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005477_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005481else
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005484rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
Matthias Kloseb9621712010-04-24 17:59:49 +00005486fi
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <stdlib.h>
5493
5494_ACEOF
5495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5496 $EGREP "free" >/dev/null 2>&1; then :
5497
5498else
5499 ac_cv_header_stdc=no
5500fi
5501rm -f conftest*
5502
5503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5507 if test "$cross_compiling" = yes; then :
5508 :
5509else
5510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h. */
5512#include <ctype.h>
5513#include <stdlib.h>
5514#if ((' ' & 0x0FF) == 0x020)
5515# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5516# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5517#else
5518# define ISLOWER(c) \
5519 (('a' <= (c) && (c) <= 'i') \
5520 || ('j' <= (c) && (c) <= 'r') \
5521 || ('s' <= (c) && (c) <= 'z'))
5522# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5523#endif
5524
5525#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5526int
5527main ()
5528{
5529 int i;
5530 for (i = 0; i < 256; i++)
5531 if (XOR (islower (i), ISLOWER (i))
5532 || toupper (i) != TOUPPER (i))
5533 return 2;
5534 return 0;
5535}
5536_ACEOF
5537if ac_fn_c_try_run "$LINENO"; then :
5538
5539else
5540 ac_cv_header_stdc=no
5541fi
5542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5543 conftest.$ac_objext conftest.beam conftest.$ac_ext
5544fi
5545
5546fi
5547fi
5548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5549$as_echo "$ac_cv_header_stdc" >&6; }
5550if test $ac_cv_header_stdc = yes; then
5551
5552$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5553
5554fi
5555
5556# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5557for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5558 inttypes.h stdint.h unistd.h
5559do :
5560 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5561ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5562"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005563if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005564 cat >>confdefs.h <<_ACEOF
5565#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5566_ACEOF
5567
5568fi
5569
5570done
5571
5572
5573
5574 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 +02005575if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 MINIX=yes
5577else
5578 MINIX=
5579fi
5580
5581
5582 if test "$MINIX" = yes; then
5583
5584$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5585
5586
5587$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5588
5589
5590$as_echo "#define _MINIX 1" >>confdefs.h
5591
5592 fi
5593
5594
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5596$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005597if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005598 $as_echo_n "(cached) " >&6
5599else
5600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5601/* end confdefs.h. */
5602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005603# define __EXTENSIONS__ 1
5604 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005605int
5606main ()
5607{
5608
5609 ;
5610 return 0;
5611}
5612_ACEOF
5613if ac_fn_c_try_compile "$LINENO"; then :
5614 ac_cv_safe_to_define___extensions__=yes
5615else
5616 ac_cv_safe_to_define___extensions__=no
5617fi
5618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5619fi
5620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5621$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5622 test $ac_cv_safe_to_define___extensions__ = yes &&
5623 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5624
5625 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5626
5627 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5628
5629 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5630
5631 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5632
5633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634
Xavier de Gaye95750b12016-07-09 11:05:42 +02005635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5636$as_echo_n "checking for the Android API level... " >&6; }
5637cat >> conftest.c <<EOF
5638#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005639android_api = __ANDROID_API__
5640arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641#else
5642#error not Android
5643#endif
5644EOF
5645
5646if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005647 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5648 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5650$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005651 if test -z "$ANDROID_API_LEVEL"; then
5652 echo 'Fatal: you must define __ANDROID_API__'
5653 exit 1
5654 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005655
5656cat >>confdefs.h <<_ACEOF
5657#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5658_ACEOF
5659
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005660
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5662$as_echo_n "checking for the Android arm ABI... " >&6; }
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5664$as_echo "$_arm_arch" >&6; }
5665 if test "$_arm_arch" = 7; then
5666 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5667 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5668 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669else
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5671$as_echo "not Android" >&6; }
5672fi
5673rm -f conftest.c conftest.out
5674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675# Check for unsupported systems
5676case $ac_sys_system/$ac_sys_release in
5677atheos*|Linux*/1*)
5678 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5679 echo See README for details.
5680 exit 1;;
5681esac
5682
5683
Matthias Kloseb9621712010-04-24 17:59:49 +00005684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5685$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
5687# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005688if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 withval=$with_suffix;
5690 case $withval in
5691 no) EXEEXT=;;
5692 yes) EXEEXT=.exe;;
5693 *) EXEEXT=$withval;;
5694 esac
5695fi
5696
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5698$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
5700# Test whether we're running on a non-case-sensitive system, in which
5701# case we give a warning if no ext is given
5702
Matthias Kloseb9621712010-04-24 17:59:49 +00005703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5704$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705if test ! -d CaseSensitiveTestDir; then
5706mkdir CaseSensitiveTestDir
5707fi
5708
5709if test -d casesensitivetestdir
5710then
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5712$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 BUILDEXEEXT=.exe
5714else
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5716$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 BUILDEXEEXT=$EXEEXT
5718fi
5719rmdir CaseSensitiveTestDir
5720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721case $ac_sys_system in
5722hp*|HP*)
5723 case $CC in
5724 cc|*/cc) CC="$CC -Ae";;
5725 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726esac
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
Matthias Kloseb9621712010-04-24 17:59:49 +00005729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5730$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731if test -z "$LIBRARY"
5732then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005733 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5736$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737
5738# LDLIBRARY is the name of the library to link against (as opposed to the
5739# name of the library into which to insert object files). BLDLIBRARY is also
5740# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5741# is blank as the main program is not linked directly against LDLIBRARY.
5742# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5743# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5744# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5745# DLLLIBRARY is the shared (i.e., DLL) library.
5746#
5747# RUNSHARED is used to run shared python without installed libraries
5748#
5749# INSTSONAME is the name of the shared library that will be use to install
5750# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005751#
5752# LDVERSION is the shared library version number, normally the Python version
5753# with the ABI build flags appended.
5754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
5756
5757
5758
5759
5760
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762LDLIBRARY="$LIBRARY"
5763BLDLIBRARY='$(LDLIBRARY)'
5764INSTSONAME='$(LDLIBRARY)'
5765DLLLIBRARY=''
5766LDLIBRARYDIR=''
5767RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005768LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770# LINKCC is the command that links the python executable -- default is $(CC).
5771# If CXX is set, and if it is needed to link a main function that was
5772# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5773# python might then depend on the C++ runtime
5774# This is altered for AIX in order to build the export list before
5775# linking.
5776
Matthias Kloseb9621712010-04-24 17:59:49 +00005777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5778$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779if test -z "$LINKCC"
5780then
5781 LINKCC='$(PURIFY) $(MAINCC)'
5782 case $ac_sys_system in
5783 AIX*)
5784 exp_extra="\"\""
5785 if test $ac_sys_release -ge 5 -o \
5786 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5787 exp_extra="."
5788 fi
5789 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 QNX*)
5791 # qcc must be used because the other compilers do not
5792 # support -N.
5793 LINKCC=qcc;;
5794 esac
5795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5797$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798
5799# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5800# make sure we default having it set to "no": this is used by
5801# distutils.unixccompiler to know if it should add --enable-new-dtags
5802# to linker command lines, and failing to detect GNU ld simply results
5803# in the same bahaviour as before.
5804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5806$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807ac_prog=ld
5808if test "$GCC" = yes; then
5809 ac_prog=`$CC -print-prog-name=ld`
5810fi
5811case `"$ac_prog" -V 2>&1 < /dev/null` in
5812 *GNU*)
5813 GNULD=yes;;
5814 *)
5815 GNULD=no;;
5816esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5818$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5821$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 enableval=$enable_shared;
5825fi
5826
5827
5828if test -z "$enable_shared"
5829then
5830 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005831 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832 enable_shared="yes";;
5833 *)
5834 enable_shared="no";;
5835 esac
5836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5838$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
Matthias Kloseb9621712010-04-24 17:59:49 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5841$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005843if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844 enableval=$enable_profiling;
5845fi
5846
5847if test "x$enable_profiling" = xyes; then
5848 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005849 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851/* end confdefs.h. */
5852int main() { return 0; }
5853_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005854if ac_fn_c_try_link "$LINENO"; then :
5855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005857 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005859rm -f core conftest.err conftest.$ac_objext \
5860 conftest$ac_exeext conftest.$ac_ext
5861 CC="$ac_save_cc"
5862else
5863 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5866$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868if test "x$enable_profiling" = xyes; then
5869 BASECFLAGS="-pg $BASECFLAGS"
5870 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
5872
Matthias Kloseb9621712010-04-24 17:59:49 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5874$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875
5876# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5877# library that we build, but we do not want to link against it (we
5878# will find it with a -framework option). For this reason there is an
5879# extra variable BLDLIBRARY against which Python and the extension
5880# modules are linked, BLDLIBRARY. This is normally the same as
5881# LDLIBRARY, but empty for MacOSX framework builds.
5882if test "$enable_framework"
5883then
5884 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005885 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 BLDLIBRARY=''
5887else
5888 BLDLIBRARY='$(LDLIBRARY)'
5889fi
5890
5891# Other platforms follow
5892if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005893 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897 case $ac_sys_system in
5898 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).dll.a'
5900 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
5904 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005907 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005908 then
5909 PY3LIBRARY=libpython3.so
5910 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005912 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).so'
5914 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005917 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005918 then
5919 PY3LIBRARY=libpython3.so
5920 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
5922 hp*|HP*)
5923 case `uname -m` in
5924 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ;;
5927 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005928 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).dylib'
5936 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005939 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005941 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005942 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
5944 esac
5945else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005946 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 case $ac_sys_system in
5948 CYGWIN*)
5949 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 esac
5953fi
5954
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005955if test "$cross_compiling" = yes; then
5956 RUNSHARED=
5957fi
5958
Matthias Kloseb9621712010-04-24 17:59:49 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5960$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005963if test -n "$ac_tool_prefix"; then
5964 for ac_prog in ar aal
5965 do
5966 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5967set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5969$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005970if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
5973 if test -n "$AR"; then
5974 ac_cv_prog_AR="$AR" # Let the user override the test.
5975else
5976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979 IFS=$as_save_IFS
5980 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005983 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 break 2
5986 fi
5987done
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989IFS=$as_save_IFS
5990
5991fi
5992fi
5993AR=$ac_cv_prog_AR
5994if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5996$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997else
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
6001
6002
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 test -n "$AR" && break
6004 done
6005fi
6006if test -z "$AR"; then
6007 ac_ct_AR=$AR
6008 for ac_prog in ar aal
6009do
6010 # Extract the first word of "$ac_prog", so it can be a program name with args.
6011set dummy $ac_prog; ac_word=$2
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013$as_echo_n "checking for $ac_word... " >&6; }
6014if ${ac_cv_prog_ac_ct_AR+:} false; then :
6015 $as_echo_n "(cached) " >&6
6016else
6017 if test -n "$ac_ct_AR"; then
6018 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6019else
6020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023 IFS=$as_save_IFS
6024 test -z "$as_dir" && as_dir=.
6025 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006027 ac_cv_prog_ac_ct_AR="$ac_prog"
6028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029 break 2
6030 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006032 done
6033IFS=$as_save_IFS
6034
6035fi
6036fi
6037ac_ct_AR=$ac_cv_prog_ac_ct_AR
6038if test -n "$ac_ct_AR"; then
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6040$as_echo "$ac_ct_AR" >&6; }
6041else
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
6044fi
6045
6046
6047 test -n "$ac_ct_AR" && break
6048done
6049
6050 if test "x$ac_ct_AR" = x; then
6051 AR="ar"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6057ac_tool_warned=yes ;;
6058esac
6059 AR=$ac_ct_AR
6060 fi
6061fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062
6063
6064# tweak ARFLAGS only if the user didn't set it on the command line
6065
6066if test -z "$ARFLAGS"
6067then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006068 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
6070
doko@ubuntu.com58844492012-06-30 18:25:32 +02006071if test -n "$ac_tool_prefix"; then
6072 for ac_prog in readelf
6073 do
6074 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6075set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6077$as_echo_n "checking for $ac_word... " >&6; }
6078if ${ac_cv_prog_READELF+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080else
6081 if test -n "$READELF"; then
6082 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6083else
6084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH
6086do
6087 IFS=$as_save_IFS
6088 test -z "$as_dir" && as_dir=.
6089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006091 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6093 break 2
6094 fi
6095done
6096 done
6097IFS=$as_save_IFS
6098
6099fi
6100fi
6101READELF=$ac_cv_prog_READELF
6102if test -n "$READELF"; then
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6104$as_echo "$READELF" >&6; }
6105else
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
6108fi
6109
6110
6111 test -n "$READELF" && break
6112 done
6113fi
6114if test -z "$READELF"; then
6115 ac_ct_READELF=$READELF
6116 for ac_prog in readelf
6117do
6118 # Extract the first word of "$ac_prog", so it can be a program name with args.
6119set dummy $ac_prog; ac_word=$2
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
6122if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6123 $as_echo_n "(cached) " >&6
6124else
6125 if test -n "$ac_ct_READELF"; then
6126 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6127else
6128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131 IFS=$as_save_IFS
6132 test -z "$as_dir" && as_dir=.
6133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006135 ac_cv_prog_ac_ct_READELF="$ac_prog"
6136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6137 break 2
6138 fi
6139done
6140 done
6141IFS=$as_save_IFS
6142
6143fi
6144fi
6145ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6146if test -n "$ac_ct_READELF"; then
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6148$as_echo "$ac_ct_READELF" >&6; }
6149else
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155 test -n "$ac_ct_READELF" && break
6156done
6157
6158 if test "x$ac_ct_READELF" = x; then
6159 READELF=":"
6160 else
6161 case $cross_compiling:$ac_tool_warned in
6162yes:)
6163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6165ac_tool_warned=yes ;;
6166esac
6167 READELF=$ac_ct_READELF
6168 fi
6169fi
6170
6171if test "$cross_compiling" = yes; then
6172 case "$READELF" in
6173 readelf|:)
6174 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6175 ;;
6176 esac
6177fi
6178
6179
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006182hp*|HP*)
6183 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184 if test -z "$INSTALL"
6185 then
6186 INSTALL="${srcdir}/install-sh -c"
6187 fi
6188esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189# Find a good install program. We prefer a C program (faster),
6190# so one script is as good as another. But avoid the broken or
6191# incompatible versions:
6192# SysV /etc/install, /usr/sbin/install
6193# SunOS /usr/etc/install
6194# IRIX /sbin/install
6195# AIX /bin/install
6196# AmigaOS /C/install, which installs bootblocks on floppy discs
6197# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6198# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6199# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6200# OS/2's system install, which has a completely different semantic
6201# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006202# Reject install programs that cannot install multiple files.
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6204$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006206if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208else
6209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 # Account for people who put trailing slashes in PATH elements.
6215case $as_dir/ in #((
6216 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 /usr/ucb/* ) ;;
6220 *)
6221 # OSF1 and SCO ODT 3.0 have their own names for install.
6222 # Don't use installbsd from OSF since it installs stuff as root
6223 # by default.
6224 for ac_prog in ginstall scoinst install; do
6225 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006226 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227 if test $ac_prog = install &&
6228 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6229 # AIX install. It has an incompatible calling convention.
6230 :
6231 elif test $ac_prog = install &&
6232 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6233 # program-specific install script used by HP pwplus--don't use.
6234 :
6235 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 rm -rf conftest.one conftest.two conftest.dir
6237 echo one > conftest.one
6238 echo two > conftest.two
6239 mkdir conftest.dir
6240 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6241 test -s conftest.one && test -s conftest.two &&
6242 test -s conftest.dir/conftest.one &&
6243 test -s conftest.dir/conftest.two
6244 then
6245 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6246 break 3
6247 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248 fi
6249 fi
6250 done
6251 done
6252 ;;
6253esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006254
6255 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256IFS=$as_save_IFS
6257
Matthias Kloseb9621712010-04-24 17:59:49 +00006258rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259
6260fi
6261 if test "${ac_cv_path_install+set}" = set; then
6262 INSTALL=$ac_cv_path_install
6263 else
6264 # As a last resort, use the slow shell script. Don't cache a
6265 # value for INSTALL within a source directory, because that will
6266 # break other packages using the cache if that directory is
6267 # removed, or if the value is a relative name.
6268 INSTALL=$ac_install_sh
6269 fi
6270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6272$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273
6274# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6275# It thinks the first close brace ends the variable substitution.
6276test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6277
6278test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6279
6280test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6281
Matthias Klose93a0ef12012-03-15 18:08:34 +01006282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6283$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6284if test -z "$MKDIR_P"; then
6285 if ${ac_cv_path_mkdir+:} false; then :
6286 $as_echo_n "(cached) " >&6
6287else
6288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6290do
6291 IFS=$as_save_IFS
6292 test -z "$as_dir" && as_dir=.
6293 for ac_prog in mkdir gmkdir; do
6294 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006295 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006296 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6297 'mkdir (GNU coreutils) '* | \
6298 'mkdir (coreutils) '* | \
6299 'mkdir (fileutils) '4.1*)
6300 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6301 break 3;;
6302 esac
6303 done
6304 done
6305 done
6306IFS=$as_save_IFS
6307
6308fi
6309
6310 test -d ./--version && rmdir ./--version
6311 if test "${ac_cv_path_mkdir+set}" = set; then
6312 MKDIR_P="$ac_cv_path_mkdir -p"
6313 else
6314 # As a last resort, use the slow shell script. Don't cache a
6315 # value for MKDIR_P within a source directory, because that will
6316 # break other packages using the cache if that directory is
6317 # removed, or if the value is a relative name.
6318 MKDIR_P="$ac_install_sh -d"
6319 fi
6320fi
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6322$as_echo "$MKDIR_P" >&6; }
6323
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
6325# Not every filesystem supports hard links
6326
6327if test -z "$LN" ; then
6328 case $ac_sys_system in
6329 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 *) LN=ln;;
6331 esac
6332fi
6333
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006334# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006335
6336ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6340$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341
6342# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006343if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344 withval=$with_pydebug;
6345if test "$withval" != no
6346then
6347
Matthias Kloseb9621712010-04-24 17:59:49 +00006348$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6351$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006353 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006354else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356fi
6357else
Matthias Kloseb9621712010-04-24 17:59:49 +00006358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360fi
6361
6362
Victor Stinnerf4e47032019-04-25 00:56:28 +02006363# Check for --with-trace-refs
6364# --with-trace-refs
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6366$as_echo_n "checking for --with-trace-refs... " >&6; }
6367
6368# Check whether --with-trace-refs was given.
6369if test "${with_trace_refs+set}" = set; then :
6370 withval=$with_trace_refs;
6371else
6372 with_trace_refs=no
6373fi
6374
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6376$as_echo "$with_trace_refs" >&6; }
6377
6378if test "$with_trace_refs" = "yes"
6379then
6380
6381$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6382
6383fi
6384
6385# Check for --with-assertions.
6386# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006387assertions='false'
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6389$as_echo_n "checking for --with-assertions... " >&6; }
6390
6391# Check whether --with-assertions was given.
6392if test "${with_assertions+set}" = set; then :
6393 withval=$with_assertions;
6394if test "$withval" != no
6395then
6396 assertions='true'
6397fi
6398fi
6399
6400if test "$assertions" = 'true'; then
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; }
6403elif test "$Py_DEBUG" = 'true'; then
6404 assertions='true'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6406$as_echo "implied by --with-pydebug" >&6; }
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412# Enable optimization flags
6413
6414
6415Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6417$as_echo_n "checking for --enable-optimizations... " >&6; }
6418# Check whether --enable-optimizations was given.
6419if test "${enable_optimizations+set}" = set; then :
6420 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006421if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006422then
6423 Py_OPT='true'
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6425$as_echo "yes" >&6; };
6426else
6427 Py_OPT='false'
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; };
6430fi
6431else
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; }
6434fi
6435
6436if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006437 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6438 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006439 # 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 +00006440 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006441 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006442 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006443 DEF_MAKE_RULE="build_all"
6444else
6445 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006446 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006447 DEF_MAKE_RULE="all"
6448fi
6449
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006450
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6452$as_echo_n "checking PROFILE_TASK... " >&6; }
6453if test -z "$PROFILE_TASK"
6454then
6455 PROFILE_TASK='-m test --pgo'
6456fi
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6458$as_echo "$PROFILE_TASK" >&6; }
6459
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006460# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6461# normal names in the default $PATH (ie: Ubuntu). They exist under the
6462# non-suffixed name in their versioned llvm directory.
6463
6464llvm_bin_dir=''
6465llvm_path="${PATH}"
6466if test "${CC}" = "clang"
6467then
6468 clang_bin=`which clang`
6469 # Some systems install clang elsewhere as a symlink to the real path
6470 # which is where the related llvm tools are located.
6471 if test -L "${clang_bin}"
6472 then
6473 clang_dir=`dirname "${clang_bin}"`
6474 clang_bin=`readlink "${clang_bin}"`
6475 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6476 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6477 fi
6478fi
6479
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006480# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6482$as_echo_n "checking for --with-lto... " >&6; }
6483
6484# Check whether --with-lto was given.
6485if test "${with_lto+set}" = set; then :
6486 withval=$with_lto;
6487if test "$withval" != no
6488then
6489 Py_LTO='true'
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6491$as_echo "yes" >&6; };
6492else
6493 Py_LTO='false'
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6495$as_echo "no" >&6; };
6496fi
6497else
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502if test "$Py_LTO" = 'true' ; then
6503 case $CC in
6504 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006505
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006506 if test -n "$ac_tool_prefix"; then
6507 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6508set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if ${ac_cv_path_LLVM_AR+:} false; then :
6512 $as_echo_n "(cached) " >&6
6513else
6514 case $LLVM_AR in
6515 [\\/]* | ?:[\\/]*)
6516 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6517 ;;
6518 *)
6519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520for as_dir in ${llvm_path}
6521do
6522 IFS=$as_save_IFS
6523 test -z "$as_dir" && as_dir=.
6524 for ac_exec_ext in '' $ac_executable_extensions; do
6525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528 break 2
6529 fi
6530done
6531 done
6532IFS=$as_save_IFS
6533
6534 ;;
6535esac
6536fi
6537LLVM_AR=$ac_cv_path_LLVM_AR
6538if test -n "$LLVM_AR"; then
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6540$as_echo "$LLVM_AR" >&6; }
6541else
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543$as_echo "no" >&6; }
6544fi
6545
6546
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006547fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006548if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006549 ac_pt_LLVM_AR=$LLVM_AR
6550 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006551set dummy llvm-ar; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6555 $as_echo_n "(cached) " >&6
6556else
6557 case $ac_pt_LLVM_AR in
6558 [\\/]* | ?:[\\/]*)
6559 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6560 ;;
6561 *)
6562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in ${llvm_path}
6564do
6565 IFS=$as_save_IFS
6566 test -z "$as_dir" && as_dir=.
6567 for ac_exec_ext in '' $ac_executable_extensions; do
6568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6569 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571 break 2
6572 fi
6573done
6574 done
6575IFS=$as_save_IFS
6576
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006577 ;;
6578esac
6579fi
6580ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6581if test -n "$ac_pt_LLVM_AR"; then
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6583$as_echo "$ac_pt_LLVM_AR" >&6; }
6584else
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006589 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006590 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006591 else
6592 case $cross_compiling:$ac_tool_warned in
6593yes:)
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6595$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6596ac_tool_warned=yes ;;
6597esac
6598 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006599 fi
6600else
6601 LLVM_AR="$ac_cv_path_LLVM_AR"
6602fi
6603
6604
6605 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6606 then
6607 LLVM_AR_FOUND="found"
6608 else
6609 LLVM_AR_FOUND="not-found"
6610 fi
6611 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6612 then
6613 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6614 if test -n "${found_llvm_ar}"
6615 then
6616 LLVM_AR='/usr/bin/xcrun llvm-ar'
6617 LLVM_AR_FOUND=found
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6619$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6620 fi
6621 fi
6622 if test $LLVM_AR_FOUND = not-found
6623 then
6624 LLVM_PROFR_ERR=yes
6625 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6626 else
6627 LLVM_AR_ERR=no
6628 fi
6629 AR="${LLVM_AR}"
6630 case $ac_sys_system in
6631 Darwin*)
6632 # Any changes made here should be reflected in the GCC+Darwin case below
6633 LTOFLAGS="-flto -Wl,-export_dynamic"
6634 ;;
6635 *)
6636 LTOFLAGS="-flto"
6637 ;;
6638 esac
6639 ;;
6640 *gcc*)
6641 case $ac_sys_system in
6642 Darwin*)
6643 LTOFLAGS="-flto -Wl,-export_dynamic"
6644 ;;
6645 *)
6646 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6647 ;;
6648 esac
6649 ;;
6650 esac
6651
6652 if test "$ac_cv_prog_cc_g" = "yes"
6653 then
6654 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6655 # to get debug symbols.
6656 LTOFLAGS="$LTOFLAGS -g"
6657 fi
6658
stratakisf92c7aa2018-12-04 15:54:01 +01006659 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006660 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006661fi
6662
6663# Enable PGO flags.
6664
6665
6666
6667
6668
6669
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006670if test -n "$ac_tool_prefix"; then
6671 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6672set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674$as_echo_n "checking for $ac_word... " >&6; }
6675if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6676 $as_echo_n "(cached) " >&6
6677else
6678 case $LLVM_PROFDATA in
6679 [\\/]* | ?:[\\/]*)
6680 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6681 ;;
6682 *)
6683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006685do
6686 IFS=$as_save_IFS
6687 test -z "$as_dir" && as_dir=.
6688 for ac_exec_ext in '' $ac_executable_extensions; do
6689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006690 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692 break 2
6693 fi
6694done
6695 done
6696IFS=$as_save_IFS
6697
Gregory P. Smith799520c2016-09-07 16:10:00 -07006698 ;;
6699esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6702if test -n "$LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6704$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006711fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006713 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6714 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715set dummy llvm-profdata; ac_word=$2
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717$as_echo_n "checking for $ac_word... " >&6; }
6718if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6719 $as_echo_n "(cached) " >&6
6720else
6721 case $ac_pt_LLVM_PROFDATA in
6722 [\\/]* | ?:[\\/]*)
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6724 ;;
6725 *)
6726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in ${llvm_path}
6728do
6729 IFS=$as_save_IFS
6730 test -z "$as_dir" && as_dir=.
6731 for ac_exec_ext in '' $ac_executable_extensions; do
6732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735 break 2
6736 fi
6737done
6738 done
6739IFS=$as_save_IFS
6740
Gregory P. Smith799520c2016-09-07 16:10:00 -07006741 ;;
6742esac
6743fi
6744ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6745if test -n "$ac_pt_LLVM_PROFDATA"; then
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6747$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6748else
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750$as_echo "no" >&6; }
6751fi
6752
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006753 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006754 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006755 else
6756 case $cross_compiling:$ac_tool_warned in
6757yes:)
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6760ac_tool_warned=yes ;;
6761esac
6762 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 fi
6764else
6765 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6766fi
6767
6768
6769if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6770then
6771 LLVM_PROF_FOUND="found"
6772else
6773 LLVM_PROF_FOUND="not-found"
6774fi
6775if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6776then
6777 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6778 if test -n "${found_llvm_profdata}"
6779 then
6780 # llvm-profdata isn't directly in $PATH in some cases.
6781 # https://apple.stackexchange.com/questions/197053/
6782 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6783 LLVM_PROF_FOUND=found
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6785$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6786 fi
6787fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788LLVM_PROF_ERR=no
6789case $CC in
6790 *clang*)
6791 # Any changes made here should be reflected in the GCC+Darwin case below
6792 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6793 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006794 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6796 if test $LLVM_PROF_FOUND = not-found
6797 then
6798 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 if test "${REQUIRE_PGO}" = "yes"
6800 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006801 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 -07006802 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 fi
6804 ;;
6805 *gcc*)
6806 case $ac_sys_system in
6807 Darwin*)
6808 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6809 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006810 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 then
6814 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006815 if test "${REQUIRE_PGO}" = "yes"
6816 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006817 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 -07006818 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 fi
6820 ;;
6821 *)
6822 PGO_PROF_GEN_FLAG="-fprofile-generate"
6823 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6824 LLVM_PROF_MERGER="true"
6825 LLVM_PROF_FILE=""
6826 ;;
6827 esac
6828 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006829 *icc*)
6830 PGO_PROF_GEN_FLAG="-prof-gen"
6831 PGO_PROF_USE_FLAG="-prof-use"
6832 LLVM_PROF_MERGER="true"
6833 LLVM_PROF_FILE=""
6834 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006835esac
6836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6838# merged with this chunk of code?
6839
6840# Optimizer/debugger flags
6841# ------------------------
6842# (The following bit of code is complicated enough - please keep things
6843# indented properly. Just pretend you're editing Python code. ;-)
6844
6845# There are two parallel sets of case statements below, one that checks to
6846# see if OPT was set and one that does BASECFLAGS setting based upon
6847# compiler and platform. BASECFLAGS tweaks need to be made even if the
6848# user set OPT.
6849
Victor Stinner23a683a2019-04-12 21:27:37 +02006850case $CC in
6851 *clang*)
6852 cc_is_clang=1
6853 ;;
6854 *)
6855 if $CC --version 2>&1 | grep -q clang
6856 then
6857 cc_is_clang=1
6858 else
6859 cc_is_clang=
6860 fi
6861esac
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863# tweak OPT based on compiler and platform, only if the user didn't set
6864# it on the command line
6865
Victor Stinner9ed34a82017-05-02 22:35:58 +02006866
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006867if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868then
6869 case $GCC in
6870 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6872 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6873 WRAP="-fwrapv"
6874 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006875
Victor Stinner35f3d242017-04-21 12:35:24 +02006876 if test -n "${cc_is_clang}"
6877 then
6878 # Clang also needs -fwrapv
6879 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006880 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6881 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006882 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006883 fi
6884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 case $ac_cv_prog_cc_g in
6886 yes)
6887 if test "$Py_DEBUG" = 'true' ; then
6888 # Optimization messes up debuggers, so turn it off for
6889 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006890 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006891 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006892 else
Victor Stinner28205b22017-04-21 11:24:34 +02006893 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006894 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895 else
Victor Stinner28205b22017-04-21 11:24:34 +02006896 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 fi
6898 ;;
6899 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006900 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901 ;;
6902 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006903
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904 case $ac_sys_system in
6905 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6906 ;;
6907 esac
6908 ;;
6909
6910 *)
6911 OPT="-O"
6912 ;;
6913 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914fi
6915
6916
6917
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006918
stratakiscf10a752018-12-19 18:19:01 +01006919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920# The -arch flags for universal builds on OSX
6921UNIVERSAL_ARCH_FLAGS=
6922
6923
6924# tweak BASECFLAGS based on compiler and platform
6925case $GCC in
6926yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006927 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006928
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6930$as_echo_n "checking for -Wextra... " >&6; }
6931 ac_save_cc="$CC"
6932 CC="$CC -Wextra -Werror"
6933 if ${ac_cv_extra_warnings+:} false; then :
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938
6939
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
6947
6948_ACEOF
6949if ac_fn_c_try_compile "$LINENO"; then :
6950
6951 ac_cv_extra_warnings=yes
6952
6953else
6954
6955 ac_cv_extra_warnings=no
6956
6957fi
6958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6959fi
6960
6961 CC="$ac_save_cc"
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6963$as_echo "$ac_cv_extra_warnings" >&6; }
6964
6965 if test $ac_cv_extra_warnings = yes
6966 then
6967 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6968 fi
6969
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970 # Python doesn't violate C99 aliasing rules, but older versions of
6971 # GCC produce warnings for legal Python code. Enable
6972 # -fno-strict-aliasing on versions of GCC that support but produce
6973 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6975$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 ac_save_cc="$CC"
6977 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006979 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006981else
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006984
Matthias Kloseb159a552010-04-25 21:00:44 +00006985
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006986int
6987main ()
6988{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006989
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006990 ;
6991 return 0;
6992}
Matthias Kloseb159a552010-04-25 21:00:44 +00006993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006995if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006996
6997 CC="$ac_save_cc -fstrict-aliasing"
6998 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007000/* end confdefs.h. */
7001
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007002 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007003int
7004main ()
7005{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007006double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007007 ;
7008 return 0;
7009}
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007012if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007013
7014 ac_cv_no_strict_aliasing=no
7015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007016else
Matthias Kloseb159a552010-04-25 21:00:44 +00007017
7018 ac_cv_no_strict_aliasing=yes
7019
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007020fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023else
Matthias Kloseb159a552010-04-25 21:00:44 +00007024
7025 ac_cv_no_strict_aliasing=no
7026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007027fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007029fi
7030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7034$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007036 then
7037 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7038 fi
7039
Zachary Ware5af85642015-12-21 12:09:17 -06007040 # ICC doesn't recognize the option, but only emits a warning
7041 ## XXX does it emit an unused result warning and can it be disabled?
7042 case "$CC" in
7043 *icc*)
7044 ac_cv_disable_unused_result_warning=no
7045 ;;
7046 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7048$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7049 ac_save_cc="$CC"
7050 CC="$CC -Wunused-result -Werror"
7051 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007052 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007053 $as_echo_n "(cached) " >&6
7054else
7055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7056/* end confdefs.h. */
7057
7058
7059int
7060main ()
7061{
7062
7063 ;
7064 return 0;
7065}
7066
7067_ACEOF
7068if ac_fn_c_try_compile "$LINENO"; then :
7069
7070 ac_cv_disable_unused_result_warning=yes
7071
7072else
7073
7074 ac_cv_disable_unused_result_warning=no
7075
7076fi
7077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7078fi
7079
7080 CFLAGS="$save_CFLAGS"
7081 CC="$ac_save_cc"
7082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7083$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007084 ;;
7085 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007086
7087 if test $ac_cv_disable_unused_result_warning = yes
7088 then
7089 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007090 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7091 fi
7092
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7094$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7095 ac_save_cc="$CC"
7096 CC="$CC -Wunused-parameter -Werror"
7097 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7101/* end confdefs.h. */
7102
7103
7104int
7105main ()
7106{
7107
7108 ;
7109 return 0;
7110}
7111
7112_ACEOF
7113if ac_fn_c_try_compile "$LINENO"; then :
7114
7115 ac_cv_disable_unused_parameter_warning=yes
7116
7117else
7118
7119 ac_cv_disable_unused_parameter_warning=no
7120
7121fi
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7123fi
7124
7125 CC="$ac_save_cc"
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7127$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7128
7129 if test $ac_cv_disable_unused_parameter_warning = yes
7130 then
7131 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7132 fi
7133
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7135$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7136 ac_save_cc="$CC"
7137 CC="$CC -Wmissing-field-initializers -Werror"
7138 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7139 $as_echo_n "(cached) " >&6
7140else
7141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7142/* end confdefs.h. */
7143
7144
7145int
7146main ()
7147{
7148
7149 ;
7150 return 0;
7151}
7152
7153_ACEOF
7154if ac_fn_c_try_compile "$LINENO"; then :
7155
7156 ac_cv_disable_missing_field_initializers=yes
7157
7158else
7159
7160 ac_cv_disable_missing_field_initializers=no
7161
7162fi
7163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164fi
7165
7166 CC="$ac_save_cc"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7168$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7169
7170 if test $ac_cv_disable_missing_field_initializers = yes
7171 then
7172 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007173 fi
7174
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7176$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7177 ac_save_cc="$CC"
7178 CC="$CC -Wsign-compare"
7179 save_CFLAGS="$CFLAGS"
7180 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184/* end confdefs.h. */
7185
7186
7187int
7188main ()
7189{
7190
7191 ;
7192 return 0;
7193}
7194
7195_ACEOF
7196if ac_fn_c_try_compile "$LINENO"; then :
7197
7198 ac_cv_enable_sign_compare_warning=yes
7199
7200else
7201
7202 ac_cv_enable_sign_compare_warning=no
7203
7204fi
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206fi
7207
7208 CFLAGS="$save_CFLAGS"
7209 CC="$ac_save_cc"
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7211$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7212
7213 if test $ac_cv_enable_sign_compare_warning = yes
7214 then
7215 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7216 fi
7217
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7219$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7220 ac_save_cc="$CC"
7221 CC="$CC -Wunreachable-code"
7222 save_CFLAGS="$CFLAGS"
7223 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7224 $as_echo_n "(cached) " >&6
7225else
7226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7227/* end confdefs.h. */
7228
7229
7230int
7231main ()
7232{
7233
7234 ;
7235 return 0;
7236}
7237
7238_ACEOF
7239if ac_fn_c_try_compile "$LINENO"; then :
7240
7241 ac_cv_enable_unreachable_code_warning=yes
7242
7243else
7244
7245 ac_cv_enable_unreachable_code_warning=no
7246
7247fi
7248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7249fi
7250
7251 CFLAGS="$save_CFLAGS"
7252 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007253
7254 # Don't enable unreachable code warning in debug mode, since it usually
7255 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007256 # Issue #24324: Unfortunately, the unreachable code warning does not work
7257 # correctly on gcc and has been silently removed from the compiler.
7258 # It is supported on clang but on OS X systems gcc may be an alias
7259 # for clang. Try to determine if the compiler is not really gcc and,
7260 # if so, only then enable the warning.
7261 if test $ac_cv_enable_unreachable_code_warning = yes && \
7262 test "$Py_DEBUG" != "true" && \
7263 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007264 then
7265 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007266 else
7267 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007268 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7270$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007271
INADA Naokie3364842018-06-05 20:40:53 +09007272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7273$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7274 ac_save_cc="$CC"
7275 CC="$CC -Werror -Wstrict-prototypes"
7276 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7277 $as_echo_n "(cached) " >&6
7278else
7279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280/* end confdefs.h. */
7281
7282
7283int
7284main ()
7285{
7286
7287 ;
7288 return 0;
7289}
7290
7291_ACEOF
7292if ac_fn_c_try_compile "$LINENO"; then :
7293
7294 ac_cv_enable_strict_prototypes_warning=yes
7295
7296else
7297
7298 ac_cv_enable_strict_prototypes_warning=no
7299
7300fi
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7302fi
7303
7304 CC="$ac_save_cc"
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7306$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7307
7308 if test $ac_cv_enable_strict_prototypes_warning = yes
7309 then
7310 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7311 fi
7312
Victor Stinner193ee0a2017-02-06 14:24:00 +01007313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7314$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7315 ac_save_cc="$CC"
7316 CC="$CC -Werror=implicit-function-declaration"
7317 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7318 $as_echo_n "(cached) " >&6
7319else
7320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7321/* end confdefs.h. */
7322
7323
7324int
7325main ()
7326{
7327
7328 ;
7329 return 0;
7330}
7331
7332_ACEOF
7333if ac_fn_c_try_compile "$LINENO"; then :
7334
7335 ac_cv_enable_implicit_function_declaration_error=yes
7336
7337else
7338
7339 ac_cv_enable_implicit_function_declaration_error=no
7340
7341fi
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7343fi
7344
7345 CC="$ac_save_cc"
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7347$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7348
7349 if test $ac_cv_enable_implicit_function_declaration_error = yes
7350 then
7351 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7352 fi
7353
Vinay Sajip0b60f642019-10-15 08:26:12 +01007354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7355$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7356 ac_save_cc="$CC"
7357 CC="$CC -fvisibility=hidden"
7358 if ${ac_cv_enable_visibility+:} false; then :
7359 $as_echo_n "(cached) " >&6
7360else
7361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7362/* end confdefs.h. */
7363
7364
7365int
7366main ()
7367{
7368
7369 ;
7370 return 0;
7371}
7372
7373_ACEOF
7374if ac_fn_c_try_compile "$LINENO"; then :
7375
7376 ac_cv_enable_visibility=yes
7377
7378else
7379
7380 ac_cv_enable_visibility=no
7381
7382fi
7383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7384fi
7385
7386 CC="$ac_save_cc"
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7388$as_echo "$ac_cv_enable_visibility" >&6; }
7389
7390 if test $ac_cv_enable_visibility = yes
7391 then
7392 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7393 fi
7394
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7396 # support. Without this, treatment of subnormals doesn't follow
7397 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007398 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399 alpha*)
7400 BASECFLAGS="$BASECFLAGS -mieee"
7401 ;;
7402 esac
7403
7404 case $ac_sys_system in
7405 SCO_SV*)
7406 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7407 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007408
Ned Deily87adb6e2013-10-18 21:09:56 -07007409 Darwin*)
7410 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7411 # used to be here, but non-Apple gcc doesn't accept them.
7412 if test "${CC}" = gcc
7413 then
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007415$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007416 case "${UNIVERSALSDK}" in
7417 */MacOSX10.4u.sdk)
7418 # Build using 10.4 SDK, force usage of gcc when the
7419 # compiler is gcc, otherwise the user will get very
7420 # confusing error messages when building on OSX 10.6
7421 CC=gcc-4.0
7422 CPP=cpp-4.0
7423 ;;
7424 esac
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007426$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 if test "${enable_universalsdk}"
7430 then
7431 case "$UNIVERSAL_ARCHS" in
7432 32-bit)
7433 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7434 LIPO_32BIT_FLAGS=""
7435 ARCH_RUN_32BIT=""
7436 ;;
7437 64-bit)
7438 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7439 LIPO_32BIT_FLAGS=""
7440 ARCH_RUN_32BIT="true"
7441 ;;
7442 all)
7443 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7444 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7445 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7446 ;;
7447 intel)
7448 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7449 LIPO_32BIT_FLAGS="-extract i386"
7450 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7451 ;;
7452 intel-32)
7453 UNIVERSAL_ARCH_FLAGS="-arch i386"
7454 LIPO_32BIT_FLAGS=""
7455 ARCH_RUN_32BIT=""
7456 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007457 intel-64)
7458 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7459 LIPO_32BIT_FLAGS=""
7460 ARCH_RUN_32BIT="true"
7461 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007462 3-way)
7463 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7464 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7465 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7466 ;;
7467 *)
7468 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7469 ;;
7470 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471
Ned Deily87adb6e2013-10-18 21:09:56 -07007472 if test "${UNIVERSALSDK}" != "/"
7473 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007474 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7475 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007477 else
7478 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7479 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007480 fi
7481 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482
Ned Deily87adb6e2013-10-18 21:09:56 -07007483 # Calculate an appropriate deployment target for this build:
7484 # The deployment target value is used explicitly to enable certain
7485 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007486 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007487 # component of the string returned by distutils.get_platform().
7488 #
7489 # Use the value from:
7490 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7491 # 2. the operating system version of the build machine if >= 10.6
7492 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7493 # below to pick either 10.3, 10.4, or 10.5 as the target.
7494 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7497$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007498 cur_target_major=`sw_vers -productVersion | \
7499 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7500 cur_target_minor=`sw_vers -productVersion | \
7501 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7502 cur_target="${cur_target_major}.${cur_target_minor}"
7503 if test ${cur_target_major} -eq 10 && \
7504 test ${cur_target_minor} -ge 3 && \
7505 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007506 then
Ned Deily36820b62014-06-25 13:44:22 -07007507 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 cur_target=10.3
7509 if test ${enable_universalsdk}
7510 then
7511 case "$UNIVERSAL_ARCHS" in
7512 all|3-way|intel|64-bit)
7513 # These configurations were first supported in 10.5
7514 cur_target='10.5'
7515 ;;
7516 esac
7517 else
7518 if test `/usr/bin/arch` = "i386"
7519 then
7520 # 10.4 was the first release to support Intel archs
7521 cur_target="10.4"
7522 fi
7523 fi
7524 fi
7525 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007526
Ned Deily87adb6e2013-10-18 21:09:56 -07007527 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7528 # environment with a value that is the same as what we'll use
7529 # in the Makefile to ensure that we'll get the same compiler
7530 # environment during configure and build time.
7531 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7532 export MACOSX_DEPLOYMENT_TARGET
7533 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7535$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007536
Ned Deily87adb6e2013-10-18 21:09:56 -07007537 # end of Darwin* tests
7538 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539 esac
7540 ;;
7541
7542*)
7543 case $ac_sys_system in
7544 OpenUNIX*|UnixWare*)
7545 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7546 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547 SCO_SV*)
7548 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7549 ;;
7550 esac
7551 ;;
7552esac
7553
Zachary Ware5af85642015-12-21 12:09:17 -06007554# ICC needs -fp-model strict or floats behave badly
7555case "$CC" in
7556*icc*)
7557 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7558 ;;
7559esac
7560
T. Woutersddbfa2c2017-05-23 01:30:49 +02007561if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562 :
7563else
7564 OPT="-DNDEBUG $OPT"
7565fi
7566
7567if test "$ac_arch_flags"
7568then
7569 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7570fi
7571
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572# On some compilers, pthreads are available without further options
7573# (e.g. MacOS X). On some of these systems, the compiler will not
7574# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7575# So we have to see first whether pthreads are available without
7576# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7578$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007579if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581else
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583 ac_cv_pthread_is_default=no
7584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586/* end confdefs.h. */
7587
Stefan Krah7dba5942012-11-22 22:49:11 +01007588#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589#include <pthread.h>
7590
7591void* routine(void* p){return NULL;}
7592
7593int main(){
7594 pthread_t p;
7595 if(pthread_create(&p,NULL,routine,NULL)!=0)
7596 return 1;
7597 (void)pthread_detach(p);
7598 return 0;
7599}
7600
7601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007602if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603
7604 ac_cv_pthread_is_default=yes
7605 ac_cv_kthread=no
7606 ac_cv_pthread=no
7607
7608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613fi
7614
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616fi
7617
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7619$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620
7621
7622if test $ac_cv_pthread_is_default = yes
7623then
7624 ac_cv_kpthread=no
7625else
7626# -Kpthread, if available, provides the right #defines
7627# and linker options to make pthread_create available
7628# Some compilers won't report that they do not support -Kpthread,
7629# so we need to run a program to see whether it really made the
7630# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7632$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007633if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635else
7636 ac_save_cc="$CC"
7637CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007638if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639 ac_cv_kpthread=no
7640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642/* end confdefs.h. */
7643
Stefan Krah7dba5942012-11-22 22:49:11 +01007644#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645#include <pthread.h>
7646
7647void* routine(void* p){return NULL;}
7648
7649int main(){
7650 pthread_t p;
7651 if(pthread_create(&p,NULL,routine,NULL)!=0)
7652 return 1;
7653 (void)pthread_detach(p);
7654 return 0;
7655}
7656
7657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007658if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659 ac_cv_kpthread=yes
7660else
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665fi
7666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667CC="$ac_save_cc"
7668fi
7669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7671$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672fi
7673
7674if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7675then
7676# -Kthread, if available, provides the right #defines
7677# and linker options to make pthread_create available
7678# Some compilers won't report that they do not support -Kthread,
7679# so we need to run a program to see whether it really made the
7680# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7682$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685else
7686 ac_save_cc="$CC"
7687CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007688if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689 ac_cv_kthread=no
7690else
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692/* end confdefs.h. */
7693
Stefan Krah7dba5942012-11-22 22:49:11 +01007694#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695#include <pthread.h>
7696
7697void* routine(void* p){return NULL;}
7698
7699int main(){
7700 pthread_t p;
7701 if(pthread_create(&p,NULL,routine,NULL)!=0)
7702 return 1;
7703 (void)pthread_detach(p);
7704 return 0;
7705}
7706
7707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007708if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709 ac_cv_kthread=yes
7710else
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715fi
7716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717CC="$ac_save_cc"
7718fi
7719
Matthias Kloseb9621712010-04-24 17:59:49 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7721$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722fi
7723
7724if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7725then
7726# -pthread, if available, provides the right #defines
7727# and linker options to make pthread_create available
7728# Some compilers won't report that they do not support -pthread,
7729# so we need to run a program to see whether it really made the
7730# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7732$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007733if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735else
7736 ac_save_cc="$CC"
7737CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007738if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739 ac_cv_pthread=no
7740else
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742/* end confdefs.h. */
7743
Stefan Krah7dba5942012-11-22 22:49:11 +01007744#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745#include <pthread.h>
7746
7747void* routine(void* p){return NULL;}
7748
7749int main(){
7750 pthread_t p;
7751 if(pthread_create(&p,NULL,routine,NULL)!=0)
7752 return 1;
7753 (void)pthread_detach(p);
7754 return 0;
7755}
7756
7757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759 ac_cv_pthread=yes
7760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765fi
7766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767CC="$ac_save_cc"
7768fi
7769
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7771$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772fi
7773
7774# If we have set a CC compiler flag for thread support then
7775# check if it works for CXX, too.
7776ac_cv_cxx_thread=no
7777if test ! -z "$CXX"
7778then
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7780$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781ac_save_cxx="$CXX"
7782
7783if test "$ac_cv_kpthread" = "yes"
7784then
7785 CXX="$CXX -Kpthread"
7786 ac_cv_cxx_thread=yes
7787elif test "$ac_cv_kthread" = "yes"
7788then
7789 CXX="$CXX -Kthread"
7790 ac_cv_cxx_thread=yes
7791elif test "$ac_cv_pthread" = "yes"
7792then
7793 CXX="$CXX -pthread"
7794 ac_cv_cxx_thread=yes
7795fi
7796
7797if test $ac_cv_cxx_thread = yes
7798then
7799 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7800 $CXX -c conftest.$ac_ext 2>&5
7801 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7802 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7803 then
7804 ac_cv_cxx_thread=yes
7805 else
7806 ac_cv_cxx_thread=no
7807 fi
7808 rm -fr conftest*
7809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7811$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812fi
7813CXX="$ac_save_cxx"
7814
7815
7816# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7818$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823/* end confdefs.h. */
7824#include <stdlib.h>
7825#include <stdarg.h>
7826#include <string.h>
7827#include <float.h>
7828
7829int
7830main ()
7831{
7832
7833 ;
7834 return 0;
7835}
7836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007837if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838 ac_cv_header_stdc=yes
7839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7843
7844if test $ac_cv_header_stdc = yes; then
7845 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847/* end confdefs.h. */
7848#include <string.h>
7849
7850_ACEOF
7851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 $EGREP "memchr" >/dev/null 2>&1; then :
7853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854else
7855 ac_cv_header_stdc=no
7856fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007857rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007858
7859fi
7860
7861if test $ac_cv_header_stdc = yes; then
7862 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007864/* end confdefs.h. */
7865#include <stdlib.h>
7866
7867_ACEOF
7868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 $EGREP "free" >/dev/null 2>&1; then :
7870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871else
7872 ac_cv_header_stdc=no
7873fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007874rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875
7876fi
7877
7878if test $ac_cv_header_stdc = yes; then
7879 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881 :
7882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884/* end confdefs.h. */
7885#include <ctype.h>
7886#include <stdlib.h>
7887#if ((' ' & 0x0FF) == 0x020)
7888# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7889# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7890#else
7891# define ISLOWER(c) \
7892 (('a' <= (c) && (c) <= 'i') \
7893 || ('j' <= (c) && (c) <= 'r') \
7894 || ('s' <= (c) && (c) <= 'z'))
7895# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7896#endif
7897
7898#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7899int
7900main ()
7901{
7902 int i;
7903 for (i = 0; i < 256; i++)
7904 if (XOR (islower (i), ISLOWER (i))
7905 || toupper (i) != TOUPPER (i))
7906 return 2;
7907 return 0;
7908}
7909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007910if ac_fn_c_try_run "$LINENO"; then :
7911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007917fi
7918
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007919fi
7920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7922$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007923if test $ac_cv_header_stdc = yes; then
7924
Matthias Kloseb9621712010-04-24 17:59:49 +00007925$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007926
7927fi
7928
stratakise768c862018-01-23 16:11:24 +01007929for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007930fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007931ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007932sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007933utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007934poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007935sys/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 +01007936sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007937sys/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 +01007938sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007939sys/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 -07007940libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007941linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007942sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007943do :
7944 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7945ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007946if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007949_ACEOF
7950
7951fi
7952
Guido van Rossum627b2d71993-12-24 10:39:16 +00007953done
7954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007956for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7959$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007960if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007962else
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007964/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965#include <sys/types.h>
7966#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
7971if ((DIR *) 0)
7972return 0;
7973 ;
7974 return 0;
7975}
7976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007977if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007979else
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984eval ac_res=\$$as_ac_Header
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7986$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007987if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007990_ACEOF
7991
7992ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007993fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995done
7996# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7997if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7999$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008000if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008002else
Martin v. Löwis11437992002-04-12 09:54:03 +00008003 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007/* Override any GCC internal prototype to avoid an error.
8008 Use char because int might match the return type of a GCC
8009 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008010#ifdef __cplusplus
8011extern "C"
8012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008013char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008014int
8015main ()
8016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ;
8019 return 0;
8020}
8021_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022for ac_lib in '' dir; do
8023 if test -z "$ac_lib"; then
8024 ac_res="none required"
8025 else
8026 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008027 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032rm -f core conftest.err conftest.$ac_objext \
8033 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008034 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037done
Victor Stinnere0be4232011-10-25 13:06:09 +02008038if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040else
8041 ac_cv_search_opendir=no
8042fi
8043rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008044LIBS=$ac_func_search_save_LIBS
8045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8047$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008049if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008052fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
Michael W. Hudson54241132001-12-07 15:38:26 +00008054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8056$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008057if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008059else
8060 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067#ifdef __cplusplus
8068extern "C"
8069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008070char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008071int
8072main ()
8073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ;
8076 return 0;
8077}
8078_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079for ac_lib in '' x; do
8080 if test -z "$ac_lib"; then
8081 ac_res="none required"
8082 else
8083 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008084 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008089rm -f core conftest.err conftest.$ac_objext \
8090 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008091 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094done
Victor Stinnere0be4232011-10-25 13:06:09 +02008095if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097else
8098 ac_cv_search_opendir=no
8099fi
8100rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008101LIBS=$ac_func_search_save_LIBS
8102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8104$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008106if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008109fi
8110
8111fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008112
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8114$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008115if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008117else
Matthias Kloseb9621712010-04-24 17:59:49 +00008118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008120#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008121int
8122main ()
8123{
8124return makedev(0, 0);
8125 ;
8126 return 0;
8127}
8128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008130 ac_cv_header_sys_types_h_makedev=yes
8131else
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008134rm -f core conftest.err conftest.$ac_objext \
8135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008136
8137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8139$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008140
8141if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008142ac_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 +02008143if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008146
8147fi
8148
8149
8150
8151 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 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 +02008153if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008154
Matthias Kloseb9621712010-04-24 17:59:49 +00008155$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008156
8157fi
8158
8159
8160 fi
8161fi
8162
Michael W. Hudson54241132001-12-07 15:38:26 +00008163
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008164# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8165# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8166SAVE_CFLAGS=$CFLAGS
8167CFLAGS="-std=c99 $CFLAGS"
8168for ac_header in bluetooth/bluetooth.h
8169do :
8170 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8171if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8172 cat >>confdefs.h <<_ACEOF
8173#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8174_ACEOF
8175
8176fi
8177
8178done
8179
8180CFLAGS=$SAVE_CFLAGS
8181
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008182# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8183for ac_header in net/if.h
8184do :
8185 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8186#ifdef STDC_HEADERS
8187# include <stdlib.h>
8188# include <stddef.h>
8189#else
8190# ifdef HAVE_STDLIB_H
8191# include <stdlib.h>
8192# endif
8193#endif
8194#ifdef HAVE_SYS_SOCKET_H
8195# include <sys/socket.h>
8196#endif
8197
8198"
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008200 cat >>confdefs.h <<_ACEOF
8201#define HAVE_NET_IF_H 1
8202_ACEOF
8203
8204fi
8205
8206done
8207
8208
Martin v. Löwis11017b12006-01-14 18:12:57 +00008209# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008210for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008211do :
8212 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 +00008213#ifdef HAVE_ASM_TYPES_H
8214#include <asm/types.h>
8215#endif
8216#ifdef HAVE_SYS_SOCKET_H
8217#include <sys/socket.h>
8218#endif
8219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220"
Victor Stinnere0be4232011-10-25 13:06:09 +02008221if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008223#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008224_ACEOF
8225
8226fi
8227
8228done
8229
8230
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008231# On Linux, qrtr.h requires asm/types.h
8232for ac_header in linux/qrtr.h
8233do :
8234 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8235#ifdef HAVE_ASM_TYPES_H
8236#include <asm/types.h>
8237#endif
8238#ifdef HAVE_SYS_SOCKET_H
8239#include <sys/socket.h>
8240#endif
8241
8242"
8243if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8244 cat >>confdefs.h <<_ACEOF
8245#define HAVE_LINUX_QRTR_H 1
8246_ACEOF
8247
8248fi
8249
8250done
8251
8252
caaveryeffc12f2017-09-06 18:18:10 -04008253for ac_header in linux/vm_sockets.h
8254do :
8255 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8256#ifdef HAVE_SYS_SOCKET_H
8257#include <sys/socket.h>
8258#endif
8259
8260"
8261if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8262 cat >>confdefs.h <<_ACEOF
8263#define HAVE_LINUX_VM_SOCKETS_H 1
8264_ACEOF
8265
8266fi
8267
8268done
8269
8270
Charles-François Natali47413c12011-10-06 19:47:44 +02008271# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008272for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008273do :
8274 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8275ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8276#ifdef HAVE_SYS_SOCKET_H
8277#include <sys/socket.h>
8278#endif
8279
8280"
8281if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8282 cat >>confdefs.h <<_ACEOF
8283#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8284_ACEOF
8285
8286fi
8287
8288done
8289
8290
Guido van Rossum627b2d71993-12-24 10:39:16 +00008291# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008292was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8294$as_echo_n "checking for clock_t in time.h... " >&6; }
8295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008297#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008298
8299_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008302 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008303else
Martin v. Löwis11437992002-04-12 09:54:03 +00008304
8305
Matthias Kloseb9621712010-04-24 17:59:49 +00008306$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008307
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008308
Guido van Rossum627b2d71993-12-24 10:39:16 +00008309fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008310rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008311
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8313$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008314
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8316$as_echo_n "checking for makedev... " >&6; }
8317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008319
Jesus Cea740f53a2010-04-28 11:35:30 +00008320#if defined(MAJOR_IN_MKDEV)
8321#include <sys/mkdev.h>
8322#elif defined(MAJOR_IN_SYSMACROS)
8323#include <sys/sysmacros.h>
8324#else
8325#include <sys/types.h>
8326#endif
8327
Neal Norwitz11690112002-07-30 01:08:28 +00008328int
8329main ()
8330{
Jesus Cea740f53a2010-04-28 11:35:30 +00008331
8332 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008333 ;
8334 return 0;
8335}
Matthias Kloseb159a552010-04-25 21:00:44 +00008336
Neal Norwitz11690112002-07-30 01:08:28 +00008337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008338if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008339 ac_cv_has_makedev=yes
8340else
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008343rm -f core conftest.err conftest.$ac_objext \
8344 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8346$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008347if test "$ac_cv_has_makedev" = "yes"; then
8348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008350
8351fi
8352
Christian Heimes985ecdc2013-11-20 11:46:18 +01008353# byte swapping
8354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8355$as_echo_n "checking for le64toh... " >&6; }
8356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8357/* end confdefs.h. */
8358
8359#ifdef HAVE_ENDIAN_H
8360#include <endian.h>
8361#elif defined(HAVE_SYS_ENDIAN_H)
8362#include <sys/endian.h>
8363#endif
8364
8365int
8366main ()
8367{
8368
8369 le64toh(1)
8370 ;
8371 return 0;
8372}
8373
8374_ACEOF
8375if ac_fn_c_try_link "$LINENO"; then :
8376 ac_cv_has_le64toh=yes
8377else
8378 ac_cv_has_le64toh=no
8379fi
8380rm -f core conftest.err conftest.$ac_objext \
8381 conftest$ac_exeext conftest.$ac_ext
8382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8383$as_echo "$ac_cv_has_le64toh" >&6; }
8384if test "$ac_cv_has_le64toh" = "yes"; then
8385
8386$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8387
8388fi
8389
Martin v. Löwis399a6892002-10-04 10:22:02 +00008390use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008391# Don't use largefile support for GNU/Hurd
8392case $ac_sys_system in GNU*)
8393 use_lfs=no
8394esac
8395
Martin v. Löwis399a6892002-10-04 10:22:02 +00008396if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008397# Two defines needed to enable largefile support on various platforms
8398# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008399case $ac_sys_system/$ac_sys_release in
8400AIX*)
8401
8402$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8403
8404 ;;
8405esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
8409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008411
Martin v. Löwis399a6892002-10-04 10:22:02 +00008412fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008413
Guido van Rossum84e7b241996-08-19 21:59:00 +00008414# Add some code to confdefs.h so that the test for off_t works on SCO
8415cat >> confdefs.h <<\EOF
8416#if defined(SCO_DS)
8417#undef _OFF_T
8418#endif
8419EOF
8420
Guido van Rossumef2255b2000-03-10 22:30:29 +00008421# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008422ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008425else
Martin v. Löwis11437992002-04-12 09:54:03 +00008426
8427cat >>confdefs.h <<_ACEOF
8428#define mode_t int
8429_ACEOF
8430
8431fi
8432
Matthias Kloseb9621712010-04-24 17:59:49 +00008433ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008434if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008435
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008436else
Martin v. Löwis11437992002-04-12 09:54:03 +00008437
8438cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008440_ACEOF
8441
8442fi
8443
Matthias Kloseb9621712010-04-24 17:59:49 +00008444ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008445if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008447else
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449cat >>confdefs.h <<_ACEOF
8450#define pid_t int
8451_ACEOF
8452
8453fi
8454
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008457#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463else
Martin v. Löwis11437992002-04-12 09:54:03 +00008464
8465cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
8468
8469fi
8470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8472$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008473if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008478#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
8480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008483 ac_cv_type_uid_t=yes
8484else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008485 ac_cv_type_uid_t=no
8486fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008487rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8491$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008492if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008495
8496
Matthias Kloseb9621712010-04-24 17:59:49 +00008497$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008498
8499fi
8500
Mark Dickinson983bc162012-12-02 12:11:38 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008503if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008506
8507fi
8508
Stefan Krah1919b7e2012-03-21 18:25:23 +01008509ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8510if test "x$ac_cv_type___uint128_t" = xyes; then :
8511
8512$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8513
8514fi
8515
Jack Jansendd19cf82001-12-06 22:36:17 +00008516
Michael W. Hudson54241132001-12-07 15:38:26 +00008517# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008518# ANSI C requires sizeof(char) == 1, so no need to check it
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 int" >&5
8524$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if ${ac_cv_sizeof_int+:} 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 (int))" "ac_cv_sizeof_int" "$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_int" = 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 (int)
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_int=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_int" >&5
8543$as_echo "$ac_cv_sizeof_int" >&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_INT $ac_cv_sizeof_int
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.
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8557$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008558if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 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 +00008562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563else
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 if test "$ac_cv_type_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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008567as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008568See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 else
8570 ac_cv_sizeof_long=0
8571 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8576$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577
8578
8579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008581#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008582_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008583
8584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585# 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.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8590$as_echo_n "checking size of long long... " >&6; }
8591if ${ac_cv_sizeof_long_long+:} false; then :
8592 $as_echo_n "(cached) " >&6
8593else
8594 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8595
8596else
8597 if test "$ac_cv_type_long_long" = 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;}
8600as_fn_error 77 "cannot compute sizeof (long long)
8601See \`config.log' for more details" "$LINENO" 5; }
8602 else
8603 ac_cv_sizeof_long_long=0
8604 fi
8605fi
8606
8607fi
8608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8609$as_echo "$ac_cv_sizeof_long_long" >&6; }
8610
8611
8612
8613cat >>confdefs.h <<_ACEOF
8614#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8615_ACEOF
8616
8617
8618# 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 void *" >&5
8623$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008624if ${ac_cv_sizeof_void_p+:} 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 (void *))" "ac_cv_sizeof_void_p" "$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_void_p" = 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 (void *)
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_void_p=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_void_p" >&5
8642$as_echo "$ac_cv_sizeof_void_p" >&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 Rossumad678af1998-10-02 14:42:15 +00008647#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008648_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +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 short" >&5
8656$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008657if ${ac_cv_sizeof_short+:} 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 (short))" "ac_cv_sizeof_short" "$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_short" = 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 (short)
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_short=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_short" >&5
8675$as_echo "$ac_cv_sizeof_short" >&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_SHORT $ac_cv_sizeof_short
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 float" >&5
8689$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_sizeof_float+:} 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 (float))" "ac_cv_sizeof_float" "$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_float" = 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 (float)
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_float=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_float" >&5
8708$as_echo "$ac_cv_sizeof_float" >&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_FLOAT $ac_cv_sizeof_float
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 double" >&5
8722$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008723if ${ac_cv_sizeof_double+:} 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 (double))" "ac_cv_sizeof_double" "$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_double" = 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 (double)
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_double=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_double" >&5
8741$as_echo "$ac_cv_sizeof_double" >&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 Rossumef2255b2000-03-10 22:30:29 +00008746#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008747_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008748
8749
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 fpos_t" >&5
8755$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008756if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 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 +00008760
Martin v. Löwis11437992002-04-12 09:54:03 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 if test "$ac_cv_type_fpos_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 (fpos_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_fpos_t=0
8769 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771
Martin v. Löwis11437992002-04-12 09:54:03 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8774$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775
8776
8777
Martin v. Löwis11437992002-04-12 09:54:03 +00008778cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008779#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008780_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008781
Michael W. Hudson54241132001-12-07 15:38:26 +00008782
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 size_t" >&5
8788$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 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 +00008793
Martin v. Löwis18e16552006-02-15 17:27:45 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type_size_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 (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 else
8801 ac_cv_sizeof_size_t=0
8802 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Martin v. Löwis18e16552006-02-15 17:27:45 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8807$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809
8810
Martin v. Löwis18e16552006-02-15 17:27:45 +00008811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8813_ACEOF
8814
8815
Christian Heimes400adb02008-02-01 08:12:03 +00008816# 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.
Matthias Kloseb9621712010-04-24 17:59:49 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8821$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008822if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 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 +00008826
Christian Heimes400adb02008-02-01 08:12:03 +00008827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 if test "$ac_cv_type_pid_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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008831as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008832See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008833 else
8834 ac_cv_sizeof_pid_t=0
8835 fi
8836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837
Christian Heimes400adb02008-02-01 08:12:03 +00008838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8840$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008841
8842
8843
8844cat >>confdefs.h <<_ACEOF
8845#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8846_ACEOF
8847
8848
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008849# The cast to long int works around a bug in the HP C Compiler
8850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8852# This bug is HP SR number 8606223364.
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8854$as_echo_n "checking size of uintptr_t... " >&6; }
8855if ${ac_cv_sizeof_uintptr_t+:} false; then :
8856 $as_echo_n "(cached) " >&6
8857else
8858 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8859
8860else
8861 if test "$ac_cv_type_uintptr_t" = yes; then
8862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8864as_fn_error 77 "cannot compute sizeof (uintptr_t)
8865See \`config.log' for more details" "$LINENO" 5; }
8866 else
8867 ac_cv_sizeof_uintptr_t=0
8868 fi
8869fi
8870
8871fi
8872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8873$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8874
8875
8876
8877cat >>confdefs.h <<_ACEOF
8878#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8879_ACEOF
8880
8881
Michael W. Hudson54241132001-12-07 15:38:26 +00008882
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008883
Eitan Adler3055c942018-05-15 22:58:09 -07008884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8885$as_echo_n "checking for long double... " >&6; }
8886if ${ac_cv_type_long_double+:} false; then :
8887 $as_echo_n "(cached) " >&6
8888else
8889 if test "$GCC" = yes; then
8890 ac_cv_type_long_double=yes
8891 else
8892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8893/* end confdefs.h. */
8894/* The Stardent Vistra knows sizeof (long double), but does
8895 not support it. */
8896 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008897int
8898main ()
8899{
Eitan Adler3055c942018-05-15 22:58:09 -07008900static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8901 sizeof (double) <= sizeof (long double))];
8902test_array [0] = 0;
8903return test_array [0];
8904
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008905 ;
8906 return 0;
8907}
8908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008909if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008910 ac_cv_type_long_double=yes
8911else
8912 ac_cv_type_long_double=no
8913fi
8914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8915 fi
8916fi
8917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8918$as_echo "$ac_cv_type_long_double" >&6; }
8919 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008922
Eitan Adler3055c942018-05-15 22:58:09 -07008923 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008925# The cast to long int works around a bug in the HP C Compiler
8926# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8927# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8928# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8930$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008931if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008933else
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 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 +00008935
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008936else
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 if test "$ac_cv_type_long_double" = yes; then
8938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008940as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008941See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008942 else
8943 ac_cv_sizeof_long_double=0
8944 fi
8945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008946
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8949$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008950
8951
8952
8953cat >>confdefs.h <<_ACEOF
8954#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8955_ACEOF
8956
8957
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959# The cast to long int works around a bug in the HP C Compiler
8960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8964$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008965if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008967else
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 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 +00008969
Thomas Woutersb2137042007-02-01 18:02:27 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 if test "$ac_cv_type__Bool" = yes; then
8972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008974as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008975See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 else
8977 ac_cv_sizeof__Bool=0
8978 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980
Thomas Woutersb2137042007-02-01 18:02:27 +00008981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8983$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984
8985
8986
Thomas Woutersb2137042007-02-01 18:02:27 +00008987cat >>confdefs.h <<_ACEOF
8988#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8989_ACEOF
8990
8991
Thomas Woutersb2137042007-02-01 18:02:27 +00008992
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993# The cast to long int works around a bug in the HP C Compiler
8994# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8995# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8996# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8998$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008999if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001else
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003#ifdef HAVE_SYS_TYPES_H
9004#include <sys/types.h>
9005#endif
9006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009008
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009else
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 if test "$ac_cv_type_off_t" = yes; then
9011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009013as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009014See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015 else
9016 ac_cv_sizeof_off_t=0
9017 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9022$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009023
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009024
9025
Martin v. Löwis11437992002-04-12 09:54:03 +00009026cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009027#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009029
Michael W. Hudson54241132001-12-07 15:38:26 +00009030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031
Matthias Kloseb9621712010-04-24 17:59:49 +00009032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9033$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009034if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009035 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009036
Matthias Kloseb9621712010-04-24 17:59:49 +00009037$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9040$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009041else
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9043$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009044fi
9045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046# The cast to long int works around a bug in the HP C Compiler
9047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9049# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9051$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009052if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009054else
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009056#ifdef HAVE_SYS_TYPES_H
9057#include <sys/types.h>
9058#endif
9059#ifdef HAVE_TIME_H
9060#include <time.h>
9061#endif
9062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009065else
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 if test "$ac_cv_type_time_t" = yes; then
9067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009069as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009070See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009071 else
9072 ac_cv_sizeof_time_t=0
9073 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009075
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9078$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009079
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009080
9081
Martin v. Löwis11437992002-04-12 09:54:03 +00009082cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009083#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085
Michael W. Hudson54241132001-12-07 15:38:26 +00009086
9087
Trent Mick635f6fb2000-08-23 21:33:05 +00009088# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009089ac_save_cc="$CC"
9090if test "$ac_cv_kpthread" = "yes"
9091then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009092elif test "$ac_cv_kthread" = "yes"
9093then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009094elif test "$ac_cv_pthread" = "yes"
9095then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009096fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009097
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9099$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009100have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009102/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009103
9104 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009105int
9106main ()
9107{
Guido van Rossum12580492000-09-24 16:47:19 +00009108pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 ;
9110 return 0;
9111}
Matthias Kloseb159a552010-04-25 21:00:44 +00009112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009114if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009115 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9119$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009120if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009122# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9123# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9124# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9126$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009127if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009129else
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009131#ifdef HAVE_PTHREAD_H
9132#include <pthread.h>
9133#endif
9134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009136
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009137else
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 if test "$ac_cv_type_pthread_t" = yes; then
9139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009141as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009142See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009143 else
9144 ac_cv_sizeof_pthread_t=0
9145 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009147
Trent Mick635f6fb2000-08-23 21:33:05 +00009148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9150$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009152
9153
Martin v. Löwis11437992002-04-12 09:54:03 +00009154cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009155#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009156_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009158
Trent Mick635f6fb2000-08-23 21:33:05 +00009159fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009160
9161# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9162# This checking will be unnecessary after removing deprecated TLS API.
9163# The cast to long int works around a bug in the HP C Compiler
9164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9166# This bug is HP SR number 8606223364.
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9168$as_echo_n "checking size of pthread_key_t... " >&6; }
9169if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9170 $as_echo_n "(cached) " >&6
9171else
9172 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9173"; then :
9174
9175else
9176 if test "$ac_cv_type_pthread_key_t" = yes; then
9177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9179as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9180See \`config.log' for more details" "$LINENO" 5; }
9181 else
9182 ac_cv_sizeof_pthread_key_t=0
9183 fi
9184fi
9185
9186fi
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9188$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9189
9190
9191
9192cat >>confdefs.h <<_ACEOF
9193#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9194_ACEOF
9195
9196
9197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9198$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9199if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201/* end confdefs.h. */
9202#include <pthread.h>
9203int
9204main ()
9205{
9206pthread_key_t k; k * 1;
9207 ;
9208 return 0;
9209}
9210_ACEOF
9211if ac_fn_c_try_compile "$LINENO"; then :
9212 ac_pthread_key_t_is_arithmetic_type=yes
9213else
9214 ac_pthread_key_t_is_arithmetic_type=no
9215
9216fi
9217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9219$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9220 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9221
9222$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9223
9224 fi
9225else
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
9228fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009229CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009230
Michael W. Hudson54241132001-12-07 15:38:26 +00009231
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009232case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009233 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009234 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9235 ;;
9236 Darwin/*)
9237 OTHER_LIBTOOL_OPT=""
9238 ;;
9239esac
9240
9241
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009242
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009243case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009244 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009245 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9246 if test "${enable_universalsdk}"; then
9247 :
9248 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009249 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009250 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009251 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009252 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009253 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009254 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009255 if test ${gcc_version} '<' 4.0
9256 then
9257 LIBTOOL_CRUFT="-lcc_dynamic"
9258 else
9259 LIBTOOL_CRUFT=""
9260 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009262 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009263else
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009265/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009266
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267 #include <unistd.h>
9268 int main(int argc, char*argv[])
9269 {
9270 if (sizeof(long) == 4) {
9271 return 0;
9272 } else {
9273 return 1;
9274 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009275 }
9276
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009278if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009279 ac_osx_32bit=yes
9280else
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9284 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009285fi
9286
9287
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009288 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009289 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009290 i386)
9291 MACOSX_DEFAULT_ARCH="i386"
9292 ;;
9293 ppc)
9294 MACOSX_DEFAULT_ARCH="ppc"
9295 ;;
9296 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009297 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009298 ;;
9299 esac
9300 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009301 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009302 i386)
9303 MACOSX_DEFAULT_ARCH="x86_64"
9304 ;;
9305 ppc)
9306 MACOSX_DEFAULT_ARCH="ppc64"
9307 ;;
9308 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009309 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009310 ;;
9311 esac
9312
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009313 fi
9314
9315 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009316 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009317 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009318esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9320$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009321if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009323 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009325 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009326
Matthias Kloseb9621712010-04-24 17:59:49 +00009327$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009328
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9330$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009331 if test $enable_shared = "yes"
9332 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009333 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 +00009334 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335else
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9337$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009338fi
9339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9341$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009342case $ac_sys_system/$ac_sys_release in
9343 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9348$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009349 ;;
9350 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009353 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009354esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009355
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009357
Michael W. Hudson54241132001-12-07 15:38:26 +00009358
9359
9360
9361
Benjamin Peterson99f03762010-04-11 22:15:28 +00009362
Thomas Wouters477c8d52006-05-27 19:21:47 +00009363
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009364# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9365# -- usually .so, .sl on HP-UX, .dll on Cygwin
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9367$as_echo_n "checking the extension of shared libraries... " >&6; }
9368if test -z "$SHLIB_SUFFIX"; then
9369 case $ac_sys_system in
9370 hp*|HP*)
9371 case `uname -m` in
9372 ia64) SHLIB_SUFFIX=.so;;
9373 *) SHLIB_SUFFIX=.sl;;
9374 esac
9375 ;;
9376 CYGWIN*) SHLIB_SUFFIX=.dll;;
9377 *) SHLIB_SUFFIX=.so;;
9378 esac
9379fi
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9381$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009382
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009384# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009385# (Shared libraries in this instance are shared modules to be loaded into
9386# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9388$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389if test -z "$LDSHARED"
9390then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009391 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009392 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009393 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009394 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009395 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009397 if test "$GCC" = "yes" ; then
9398 LDSHARED='$(CC) -shared'
9399 LDCXXSHARED='$(CXX) -shared'
9400 else
9401 LDSHARED='$(CC) -G'
9402 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009403 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009404 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009405 if test "$GCC" = "yes" ; then
9406 LDSHARED='$(CC) -shared'
9407 LDCXXSHARED='$(CXX) -shared'
9408 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009409 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009410 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009411 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009412 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009413 LDSHARED='$(CC) -bundle'
9414 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009415 if test "$enable_framework" ; then
9416 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009417 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9418 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009419 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009420 else
9421 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009422 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009423 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009424 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009425 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009426 LDSHARED='$(CC) -bundle'
9427 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009428 if test "$enable_framework" ; then
9429 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009430 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9431 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009432 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009433 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009434 # No framework, use the Python app as bundle-loader
9435 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009436 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009437 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009438 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009439 Darwin/*)
9440 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9441 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009442
Ned Deily36820b62014-06-25 13:44:22 -07009443 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9444 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9445 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9446 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9447 if test ${dep_target_major} -eq 10 && \
9448 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009449 then
Ned Deily36820b62014-06-25 13:44:22 -07009450 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009451 LDSHARED='$(CC) -bundle'
9452 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 if test "$enable_framework" ; then
9454 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009455 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9456 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009457 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009458 else
9459 # No framework, use the Python app as bundle-loader
9460 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9461 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009462 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009463 fi
Ned Deily36820b62014-06-25 13:44:22 -07009464 else
9465 # building for OS X 10.3 and later
9466 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9467 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9468 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009469 fi
9470 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009471 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009472 LDSHARED='$(CC) -shared'
9473 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009474 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009475 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009476 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009477 LDSHARED='$(CC) -shared'
9478 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009479 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009480 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009481 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009482 OpenBSD*)
9483 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9484 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009485 LDSHARED='$(CC) -shared $(CCSHARED)'
9486 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009487 else
9488 case `uname -r` in
9489 [01].* | 2.[0-7] | 2.[0-7].*)
9490 LDSHARED="ld -Bshareable ${LDFLAGS}"
9491 ;;
9492 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009493 LDSHARED='$(CC) -shared $(CCSHARED)'
9494 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009495 ;;
9496 esac
9497 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009498 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009499 LDSHARED='$(CC) -shared'
9500 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009501 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009502 if test "$GCC" = "yes" ; then
9503 LDSHARED='$(CC) -shared'
9504 LDCXXSHARED='$(CXX) -shared'
9505 else
9506 LDSHARED='$(CC) -G'
9507 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009508 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009509 SCO_SV*)
9510 LDSHARED='$(CC) -Wl,-G,-Bexport'
9511 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9512 CYGWIN*)
9513 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9514 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009515 *) LDSHARED="ld";;
9516 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9519$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009520LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009521BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009522# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009523# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9525$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526if test -z "$CCSHARED"
9527then
Guido van Rossum07397971997-04-29 21:49:50 +00009528 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009529 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009530 then CCSHARED="-fPIC";
9531 elif test `uname -p` = sparc;
9532 then CCSHARED="-xcode=pic32";
9533 else CCSHARED="-Kpic";
9534 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009535 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009536 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009537 else CCSHARED="+z";
9538 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009539 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009540 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009541 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009542 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009543 if test "$GCC" = "yes"
9544 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009545 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009546 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009547 SCO_SV*)
9548 if test "$GCC" = "yes"
9549 then CCSHARED="-fPIC"
9550 else CCSHARED="-Kpic -belf"
9551 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009552 VxWorks*)
9553 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9557$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009558# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009559# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9561$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009562if test -z "$LINKFORSHARED"
9563then
Guido van Rossum07397971997-04-29 21:49:50 +00009564 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009565 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009566 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009567 LINKFORSHARED="-Wl,-E -Wl,+s";;
9568# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009569 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009570 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009571 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009573 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009574
9575 # Issue #18075: the default maximum stack size (8MBytes) is too
9576 # small for the default recursion limit. Increase the stack size
9577 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009578 # Note: This matches the value of THREAD_STACK_SIZE in
9579 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009580 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9581
Jack Jansene578a632001-08-15 01:27:14 +00009582 if test "$enable_framework"
9583 then
Jack Jansenda49e192005-01-07 13:08:22 +00009584 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009585 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009586 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009587 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009588 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009589 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009590 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009591 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9592 then
9593 LINKFORSHARED="-Wl,--export-dynamic"
9594 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009595 SunOS/5*) case $CC in
9596 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009597 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009598 then
9599 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009600 fi;;
9601 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009602 CYGWIN*)
9603 if test $enable_shared = "no"
9604 then
9605 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9606 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009607 QNX*)
9608 # -Wl,-E causes the symbols to be added to the dynamic
9609 # symbol table so that they can be found when a module
9610 # is loaded. -N 2048K causes the stack size to be set
9611 # to 2048 kilobytes so that the stack doesn't overflow
9612 # when running test_compile.py.
9613 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009614 VxWorks*)
9615 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9619$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009620
Michael W. Hudson54241132001-12-07 15:38:26 +00009621
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9624$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009625if test ! "$LIBRARY" = "$LDLIBRARY"
9626then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009627 case $ac_sys_system in
9628 CYGWIN*)
9629 # Cygwin needs CCSHARED when building extension DLLs
9630 # but not when building the interpreter DLL.
9631 CFLAGSFORSHARED='';;
9632 *)
9633 CFLAGSFORSHARED='$(CCSHARED)'
9634 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9637$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009638
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009639# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9640# library (with --enable-shared).
9641# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009642# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9643# if it is not required, since it creates a dependency of the shared library
9644# to LIBS. This, in turn, means that applications linking the shared libpython
9645# don't need to link LIBS explicitly. The default should be only changed
9646# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009647
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9649$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009650case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009651 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009652 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009653esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9655$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009656
9657
Guido van Rossum627b2d71993-12-24 10:39:16 +00009658# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9660$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009661if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009662 $as_echo_n "(cached) " >&6
9663else
9664 ac_check_lib_save_LIBS=$LIBS
9665LIBS="-lsendfile $LIBS"
9666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9667/* end confdefs.h. */
9668
9669/* Override any GCC internal prototype to avoid an error.
9670 Use char because int might match the return type of a GCC
9671 builtin and then its argument prototype would still apply. */
9672#ifdef __cplusplus
9673extern "C"
9674#endif
9675char sendfile ();
9676int
9677main ()
9678{
9679return sendfile ();
9680 ;
9681 return 0;
9682}
9683_ACEOF
9684if ac_fn_c_try_link "$LINENO"; then :
9685 ac_cv_lib_sendfile_sendfile=yes
9686else
9687 ac_cv_lib_sendfile_sendfile=no
9688fi
9689rm -f core conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext
9691LIBS=$ac_check_lib_save_LIBS
9692fi
9693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9694$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009695if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009696 cat >>confdefs.h <<_ACEOF
9697#define HAVE_LIBSENDFILE 1
9698_ACEOF
9699
9700 LIBS="-lsendfile $LIBS"
9701
9702fi
9703
Matthias Kloseb9621712010-04-24 17:59:49 +00009704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9705$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009706if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009708else
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009710LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714/* Override any GCC internal prototype to avoid an error.
9715 Use char because int might match the return type of a GCC
9716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717#ifdef __cplusplus
9718extern "C"
9719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009720char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009721int
9722main ()
9723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 ;
9726 return 0;
9727}
9728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009731else
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009734rm -f core conftest.err conftest.$ac_objext \
9735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9739$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009740if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 cat >>confdefs.h <<_ACEOF
9742#define HAVE_LIBDL 1
9743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009745 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009747fi
9748 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9750$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009751if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009753else
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009755LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759/* Override any GCC internal prototype to avoid an error.
9760 Use char because int might match the return type of a GCC
9761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762#ifdef __cplusplus
9763extern "C"
9764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009765char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009766int
9767main ()
9768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ;
9771 return 0;
9772}
9773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779rm -f core conftest.err conftest.$ac_objext \
9780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9784$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009785if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 cat >>confdefs.h <<_ACEOF
9787#define HAVE_LIBDLD 1
9788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009790 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009791
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009792fi
9793 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009794
Michael Felt0d3ccb42017-12-30 22:39:20 +01009795# checks for uuid.h location
9796for ac_header in uuid/uuid.h uuid.h
9797do :
9798 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9799ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9800if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9801 cat >>confdefs.h <<_ACEOF
9802#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9803_ACEOF
9804
9805fi
9806
9807done
9808
9809
Berker Peksag9a10ff42017-11-08 23:09:16 +03009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9811$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9813/* end confdefs.h. */
9814#include <uuid/uuid.h>
9815int
9816main ()
9817{
9818
9819#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009820void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009821#endif
9822
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827if ac_fn_c_try_compile "$LINENO"; then :
9828
9829$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9830
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9832$as_echo "yes" >&6; }
9833else
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835$as_echo "no" >&6; }
9836
9837fi
9838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9839
Michael Felt0d3ccb42017-12-30 22:39:20 +01009840# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009841# FreeBSD and OpenBSD provides support as well
9842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9843$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9845/* end confdefs.h. */
9846#include <uuid.h>
9847int
9848main ()
9849{
9850
9851#ifndef uuid_create
9852void *x = uuid_create
9853#endif
9854
9855 ;
9856 return 0;
9857}
9858_ACEOF
9859if ac_fn_c_try_compile "$LINENO"; then :
9860
9861$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9862
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9864$as_echo "yes" >&6; }
9865else
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
9868
9869fi
9870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9871
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009872# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9873# stream in big-endian byte-order
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9875$as_echo_n "checking for uuid_enc_be... " >&6; }
9876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9877/* end confdefs.h. */
9878#include <uuid.h>
9879int
9880main ()
9881{
9882
9883#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009884void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009885#endif
9886
9887 ;
9888 return 0;
9889}
9890_ACEOF
9891if ac_fn_c_try_compile "$LINENO"; then :
9892
9893$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9894
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9896$as_echo "yes" >&6; }
9897else
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
9900
9901fi
9902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9903
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009904# 'Real Time' functions on Solaris
9905# posix4 on Solaris 2.6
9906# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009908$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009909if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009911else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009912 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916/* Override any GCC internal prototype to avoid an error.
9917 Use char because int might match the return type of a GCC
9918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919#ifdef __cplusplus
9920extern "C"
9921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009922char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009923int
9924main ()
9925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 ;
9928 return 0;
9929}
9930_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931for ac_lib in '' pthread rt posix4; do
9932 if test -z "$ac_lib"; then
9933 ac_res="none required"
9934 else
9935 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941rm -f core conftest.err conftest.$ac_objext \
9942 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009943 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009946done
Victor Stinnere0be4232011-10-25 13:06:09 +02009947if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949else
9950 ac_cv_search_sem_init=no
9951fi
9952rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009953LIBS=$ac_func_search_save_LIBS
9954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9956$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009958if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009960
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009961fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009962
Martin v. Löwis519adae2003-09-20 10:47:47 +00009963
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9966$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009967if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969else
9970 ac_check_lib_save_LIBS=$LIBS
9971LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009973/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975/* Override any GCC internal prototype to avoid an error.
9976 Use char because int might match the return type of a GCC
9977 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009978#ifdef __cplusplus
9979extern "C"
9980#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009981char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009982int
9983main ()
9984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009986 ;
9987 return 0;
9988}
9989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009991 ac_cv_lib_intl_textdomain=yes
9992else
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009995rm -f core conftest.err conftest.$ac_objext \
9996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009997LIBS=$ac_check_lib_save_LIBS
9998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10000$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010001if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010002
Matthias Kloseb9621712010-04-24 17:59:49 +000010003$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010004
Brett Cannonc6d936e2009-06-07 20:09:53 +000010005 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010006fi
10007
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010008
10009# checks for system dependent C++ extensions support
10010case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10012$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010014/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010015
Georg Brandl59e87bd2011-02-15 19:48:59 +000010016 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010017int
10018main ()
10019{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010020loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 ;
10022 return 0;
10023}
Matthias Kloseb159a552010-04-25 21:00:44 +000010024
Martin v. Löwis11437992002-04-12 09:54:03 +000010025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010027
Matthias Kloseb159a552010-04-25 21:00:44 +000010028
Matthias Kloseb9621712010-04-24 17:59:49 +000010029$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010030
Matthias Kloseb159a552010-04-25 21:00:44 +000010031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010032$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010033
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010034else
Matthias Kloseb159a552010-04-25 21:00:44 +000010035
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010037$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010038
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010040rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010041 conftest$ac_exeext conftest.$ac_ext
10042# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10043# of the AIX system used to build/package Python executable. This tag serves
10044# as a baseline for bdist module packages
10045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10046$as_echo_n "checking for the system builddate... " >&6; }
10047 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10048
10049cat >>confdefs.h <<_ACEOF
10050#define AIX_BUILDDATE $AIX_BUILDDATE
10051_ACEOF
10052
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10054$as_echo "$AIX_BUILDDATE" >&6; }
10055 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010056 *) ;;
10057esac
10058
Christian Heimes985ecdc2013-11-20 11:46:18 +010010059# check for systems that require aligned memory access
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10061$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010062if ${ac_cv_aligned_required+:} false; then :
10063 $as_echo_n "(cached) " >&6
10064else
10065 if test "$cross_compiling" = yes; then :
10066 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010067else
10068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10069/* end confdefs.h. */
10070
10071int main()
10072{
10073 char s[16];
10074 int i, *p1, *p2;
10075 for (i=0; i < 16; i++)
10076 s[i] = i;
10077 p1 = (int*)(s+1);
10078 p2 = (int*)(s+2);
10079 if (*p1 == *p2)
10080 return 1;
10081 return 0;
10082}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010083_ACEOF
10084if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010085 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010086else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010087 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010088fi
10089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10090 conftest.$ac_objext conftest.beam conftest.$ac_ext
10091fi
10092
10093
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010094fi
10095
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10097$as_echo "$ac_cv_aligned_required" >&6; }
10098if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010099
10100$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10101
10102fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010103
10104# str, bytes and memoryview hash algorithm
10105
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10108$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10109
10110# Check whether --with-hash_algorithm was given.
10111if test "${with_hash_algorithm+set}" = set; then :
10112 withval=$with_hash_algorithm;
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10114$as_echo "$withval" >&6; }
10115case "$withval" in
10116 siphash24)
10117 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10118
10119 ;;
10120 fnv)
10121 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10122
10123 ;;
10124 *)
10125 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10126 ;;
10127esac
10128
10129else
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10131$as_echo "default" >&6; }
10132fi
10133
10134
Charles-François Natalid30b0222014-05-08 23:08:51 +010010135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10136$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10137
10138# Check whether --with-address_sanitizer was given.
10139if test "${with_address_sanitizer+set}" = set; then :
10140 withval=$with_address_sanitizer;
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10142$as_echo "$withval" >&6; }
10143BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10144LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010145# ASan works by controlling memory allocation, our own malloc interferes.
10146with_pymalloc="no"
10147
10148else
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150$as_echo "no" >&6; }
10151fi
10152
10153
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10155$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10156
10157# Check whether --with-memory_sanitizer was given.
10158if test "${with_memory_sanitizer+set}" = set; then :
10159 withval=$with_memory_sanitizer;
10160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10161$as_echo "$withval" >&6; }
10162BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10163LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10164# MSan works by controlling memory allocation, our own malloc interferes.
10165with_pymalloc="no"
10166
10167else
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10169$as_echo "no" >&6; }
10170fi
10171
10172
10173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10174$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10175
10176# Check whether --with-undefined_behavior_sanitizer was given.
10177if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10178 withval=$with_undefined_behavior_sanitizer;
10179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10180$as_echo "$withval" >&6; }
10181BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10182LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010183
10184else
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
Guido van Rossum70c7f481998-03-26 18:44:10 +000010190# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10192$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010193if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010195else
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010197LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201/* Override any GCC internal prototype to avoid an error.
10202 Use char because int might match the return type of a GCC
10203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204#ifdef __cplusplus
10205extern "C"
10206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010207char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010208int
10209main ()
10210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ;
10213 return 0;
10214}
10215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010218else
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010221rm -f core conftest.err conftest.$ac_objext \
10222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010223LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10226$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010227if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010228 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010229fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010230 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10232$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010233if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010235else
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010237LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241/* Override any GCC internal prototype to avoid an error.
10242 Use char because int might match the return type of a GCC
10243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010244#ifdef __cplusplus
10245extern "C"
10246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010247char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010248int
10249main ()
10250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ;
10253 return 0;
10254}
10255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010258else
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010261rm -f core conftest.err conftest.$ac_objext \
10262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010263LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10266$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010267if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010268 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010269fi
10270 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010271
Matthias Kloseb9621712010-04-24 17:59:49 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10273$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10279$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010280LIBS="$withval $LIBS"
10281
10282else
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285fi
10286
Guido van Rossum7f43da71994-08-01 12:15:30 +000010287
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010288
10289
10290
10291
10292
10293
Victor Stinnerb477d192020-01-22 22:48:16 +010010294
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010295if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10296 if test -n "$ac_tool_prefix"; then
10297 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10298set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10300$as_echo_n "checking for $ac_word... " >&6; }
10301if ${ac_cv_path_PKG_CONFIG+:} false; then :
10302 $as_echo_n "(cached) " >&6
10303else
10304 case $PKG_CONFIG in
10305 [\\/]* | ?:[\\/]*)
10306 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10307 ;;
10308 *)
10309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10310for as_dir in $PATH
10311do
10312 IFS=$as_save_IFS
10313 test -z "$as_dir" && as_dir=.
10314 for ac_exec_ext in '' $ac_executable_extensions; do
10315 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10316 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10317 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10318 break 2
10319 fi
10320done
10321 done
10322IFS=$as_save_IFS
10323
10324 ;;
10325esac
10326fi
10327PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10328if test -n "$PKG_CONFIG"; then
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10330$as_echo "$PKG_CONFIG" >&6; }
10331else
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334fi
10335
10336
10337fi
10338if test -z "$ac_cv_path_PKG_CONFIG"; then
10339 ac_pt_PKG_CONFIG=$PKG_CONFIG
10340 # Extract the first word of "pkg-config", so it can be a program name with args.
10341set dummy pkg-config; ac_word=$2
10342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10343$as_echo_n "checking for $ac_word... " >&6; }
10344if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10345 $as_echo_n "(cached) " >&6
10346else
10347 case $ac_pt_PKG_CONFIG in
10348 [\\/]* | ?:[\\/]*)
10349 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10350 ;;
10351 *)
10352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10353for as_dir in $PATH
10354do
10355 IFS=$as_save_IFS
10356 test -z "$as_dir" && as_dir=.
10357 for ac_exec_ext in '' $ac_executable_extensions; do
10358 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10359 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10360 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10361 break 2
10362 fi
10363done
10364 done
10365IFS=$as_save_IFS
10366
10367 ;;
10368esac
10369fi
10370ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10371if test -n "$ac_pt_PKG_CONFIG"; then
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10373$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10374else
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
10377fi
10378
10379 if test "x$ac_pt_PKG_CONFIG" = x; then
10380 PKG_CONFIG=""
10381 else
10382 case $cross_compiling:$ac_tool_warned in
10383yes:)
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10386ac_tool_warned=yes ;;
10387esac
10388 PKG_CONFIG=$ac_pt_PKG_CONFIG
10389 fi
10390else
10391 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10392fi
10393
10394fi
10395if test -n "$PKG_CONFIG"; then
10396 _pkg_min_version=0.9.0
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10398$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10399 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10401$as_echo "yes" >&6; }
10402 else
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
10405 PKG_CONFIG=""
10406 fi
10407fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010408
10409# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10411$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010412
10413# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010415 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010416else
10417 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010418fi
10419
10420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10422$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010423
10424# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10426$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010427
10428# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010429if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010430 withval=$with_system_ffi;
10431fi
10432
10433
Zachary Waref40d4dd2016-09-17 01:25:24 -050010434if test "$ac_sys_system" = "Darwin"
10435then
10436 case "$with_system_ffi" in
10437 "")
10438 with_system_ffi="no"
10439 ;;
10440 yes|no)
10441 ;;
10442 *)
10443 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10444 ;;
10445 esac
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10447$as_echo "$with_system_ffi" >&6; }
10448else
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10450$as_echo "yes" >&6; }
10451 if test "$with_system_ffi" != ""
10452 then
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10454$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10455 fi
10456 with_system_ffi="yes"
10457fi
Zachary Ware935043d2016-09-09 17:01:21 -070010458
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010459if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010460 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10461else
10462 LIBFFI_INCLUDEDIR=""
10463fi
10464
10465
Stefan Krah60187b52012-03-23 19:06:27 +010010466# Check for use of the system libmpdec library
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10468$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10469
10470# Check whether --with-system_libmpdec was given.
10471if test "${with_system_libmpdec+set}" = set; then :
10472 withval=$with_system_libmpdec;
10473else
10474 with_system_libmpdec="no"
10475fi
10476
10477
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10479$as_echo "$with_system_libmpdec" >&6; }
10480
Benjamin Peterson076ed002010-10-31 17:11:02 +000010481# Check for support for loadable sqlite extensions
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10483$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10484# Check whether --enable-loadable-sqlite-extensions was given.
10485if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10486 enableval=$enable_loadable_sqlite_extensions;
10487else
10488 enable_loadable_sqlite_extensions="no"
10489fi
10490
10491
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10493$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10494
Ned Deilyd819b932013-09-06 01:07:05 -070010495# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10496
10497
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10499$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10500
10501# Check whether --with-tcltk-includes was given.
10502if test "${with_tcltk_includes+set}" = set; then :
10503 withval=$with_tcltk_includes;
10504else
10505 with_tcltk_includes="default"
10506fi
10507
10508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10509$as_echo "$with_tcltk_includes" >&6; }
10510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10511$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10512
10513# Check whether --with-tcltk-libs was given.
10514if test "${with_tcltk_libs+set}" = set; then :
10515 withval=$with_tcltk_libs;
10516else
10517 with_tcltk_libs="default"
10518fi
10519
10520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10521$as_echo "$with_tcltk_libs" >&6; }
10522if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10523then
10524 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10525 then
10526 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10527 fi
10528 TCLTK_INCLUDES=""
10529 TCLTK_LIBS=""
10530else
10531 TCLTK_INCLUDES="$with_tcltk_includes"
10532 TCLTK_LIBS="$with_tcltk_libs"
10533fi
10534
Matthias Klose55708cc2009-04-30 08:06:49 +000010535# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10537$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010538
10539# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010540if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010541 withval=$with_dbmliborder;
10542if test x$with_dbmliborder = xyes
10543then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010544as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010545else
10546 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10547 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10548 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010549 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010550 fi
10551 done
10552fi
10553fi
10554
Matthias Kloseb9621712010-04-24 17:59:49 +000010555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10556$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010557
Martin v. Löwis11437992002-04-12 09:54:03 +000010558# Templates for things AC_DEFINEd more than once.
10559# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010560
10561
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010562if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010563then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010564 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010566
10567 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010568 if test "$ac_sys_system" = "SunOS"; then
10569 CFLAGS="$CFLAGS -D_REENTRANT"
10570 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010571elif test "$ac_cv_kpthread" = "yes"
10572then
10573 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010574 if test "$ac_cv_cxx_thread" = "yes"; then
10575 CXX="$CXX -Kpthread"
10576 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010577 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010578elif test "$ac_cv_kthread" = "yes"
10579then
10580 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010581 if test "$ac_cv_cxx_thread" = "yes"; then
10582 CXX="$CXX -Kthread"
10583 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010584 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585elif test "$ac_cv_pthread" = "yes"
10586then
10587 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010588 if test "$ac_cv_cxx_thread" = "yes"; then
10589 CXX="$CXX -pthread"
10590 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010592else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010593 if test ! -z "$withval" -a -d "$withval"
10594 then LDFLAGS="$LDFLAGS -L$withval"
10595 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010596
10597 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010598 # define _POSIX_THREADS in unistd.h. Some apparently don't
10599 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10601$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010603/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010604
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010605#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010606#ifdef _POSIX_THREADS
10607yes
10608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010609
10610_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010613 unistd_defines_pthreads=yes
10614else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010615 unistd_defines_pthreads=no
10616fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010617rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10620$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010623
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010624 # Just looking for pthread_create in libpthread is not enough:
10625 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10626 # So we really have to include pthread.h, and then link.
10627 _libs=$LIBS
10628 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10630$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010632/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010633
10634#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010635#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010636
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010637void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010638int
10639main ()
10640{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010641
10642pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 ;
10644 return 0;
10645}
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10650$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010651 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010652
Guido van Rossum02a1c402000-02-25 19:26:31 +000010653else
Martin v. Löwis11437992002-04-12 09:54:03 +000010654
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010655 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010657if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010658
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010659 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010660
Guido van Rossumad678af1998-10-02 14:42:15 +000010661else
Guido van Rossumad678af1998-10-02 14:42:15 +000010662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10664$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010665if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667else
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010669LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010673/* Override any GCC internal prototype to avoid an error.
10674 Use char because int might match the return type of a GCC
10675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010676#ifdef __cplusplus
10677extern "C"
10678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010679char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010680int
10681main ()
10682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ;
10685 return 0;
10686}
10687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010690else
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010693rm -f core conftest.err conftest.$ac_objext \
10694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010695LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10698$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010699if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010700
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010701 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010702 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010703
Greg Steinadf63d62000-07-05 10:38:09 +000010704else
Greg Steinadf63d62000-07-05 10:38:09 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10707$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010708if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010710else
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010712LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716/* Override any GCC internal prototype to avoid an error.
10717 Use char because int might match the return type of a GCC
10718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010719#ifdef __cplusplus
10720extern "C"
10721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010722char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010723int
10724main ()
10725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 ;
10728 return 0;
10729}
10730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010733else
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010736rm -f core conftest.err conftest.$ac_objext \
10737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10741$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010742if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010743
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010744 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010745 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010746
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010747else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10750$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010751if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010753else
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010755LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759/* Override any GCC internal prototype to avoid an error.
10760 Use char because int might match the return type of a GCC
10761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010762#ifdef __cplusplus
10763extern "C"
10764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010765char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010766int
10767main ()
10768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 ;
10771 return 0;
10772}
10773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010776else
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010779rm -f core conftest.err conftest.$ac_objext \
10780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10784$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010785if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010786
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010787 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010788 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010789
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010790else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10793$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010794if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010796else
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010798LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010802/* Override any GCC internal prototype to avoid an error.
10803 Use char because int might match the return type of a GCC
10804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010805#ifdef __cplusplus
10806extern "C"
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010809int
10810main ()
10811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ;
10814 return 0;
10815}
10816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010817if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010819else
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010822rm -f core conftest.err conftest.$ac_objext \
10823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010824LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10827$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010828if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010829
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010830 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010831 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010832
Guido van Rossumb93a8621998-05-07 13:27:32 +000010833else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010834
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010835 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10836
Guido van Rossum2d38f911996-06-26 19:47:01 +000010837fi
10838
Guido van Rossum627b2d71993-12-24 10:39:16 +000010839
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010840fi
10841
Guido van Rossum0be3e491997-05-22 20:33:33 +000010842fi
10843
Guido van Rossum49545951997-12-02 19:28:29 +000010844fi
10845
Guido van Rossumb93a8621998-05-07 13:27:32 +000010846fi
10847
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010849rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10853$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010854if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010856else
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010858LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862/* Override any GCC internal prototype to avoid an error.
10863 Use char because int might match the return type of a GCC
10864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010865#ifdef __cplusplus
10866extern "C"
10867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010868char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010869int
10870main ()
10871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 ;
10874 return 0;
10875}
10876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010882rm -f core conftest.err conftest.$ac_objext \
10883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010884LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10887$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010888if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010889
Martin v. Löwis130fb172001-07-19 11:00:41 +000010890 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010891
Guido van Rossum627b2d71993-12-24 10:39:16 +000010892fi
10893
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010894
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010895fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010896
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897if test "$posix_threads" = "yes"; then
10898 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010901
10902 fi
10903
10904 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10905 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010906 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010907$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010908
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010909 ;;
10910 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010912
10913 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010914 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010915$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010916
10917 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918 esac
10919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10921$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010922 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010924else
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010926 ac_cv_pthread_system_supported=no
10927else
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010930
10931 #include <stdio.h>
10932 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010933 void *foo(void *parm) {
10934 return NULL;
10935 }
10936 main() {
10937 pthread_attr_t attr;
10938 pthread_t id;
10939 if (pthread_attr_init(&attr)) exit(-1);
10940 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10941 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10942 exit(0);
10943 }
10944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010945if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010946 ac_cv_pthread_system_supported=yes
10947else
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010952fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954
Guido van Rossum627b2d71993-12-24 10:39:16 +000010955fi
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10958$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010959 if test "$ac_cv_pthread_system_supported" = "yes"; then
10960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962
10963 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 for ac_func in pthread_sigmask
10965do :
10966 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010967if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010968 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010969#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010971 case $ac_sys_system in
10972 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010975
10976 ;;
10977 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010978fi
10979done
10980
pdoxe14679c2017-10-05 00:01:56 -070010981 for ac_func in pthread_getcpuclockid
10982do :
10983 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10984if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10985 cat >>confdefs.h <<_ACEOF
10986#define HAVE_PTHREAD_GETCPUCLOCKID 1
10987_ACEOF
10988
10989fi
10990done
10991
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010992fi
10993
10994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10998$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011002 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005 ipv6=no
11006 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11008$as_echo "yes" >&6; }
11009 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011010
11011 ipv6=yes
11012 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011014else
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011017/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011018 /* AF_INET6 available check */
11019#include <sys/types.h>
11020#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011021int
11022main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011024int domain = AF_INET6;
11025 ;
11026 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027}
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011029if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11032$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035else
Matthias Kloseb159a552010-04-25 21:00:44 +000011036
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011040
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011044if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11046$as_echo_n "checking if RFC2553 API is available... " >&6; }
11047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011049
11050 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011051#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011052int
11053main ()
11054{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011055struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011056 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ;
11058 return 0;
11059}
Matthias Kloseb159a552010-04-25 21:00:44 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011063
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011066 ipv6=yes
11067
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011068else
Matthias Kloseb159a552010-04-25 21:00:44 +000011069
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011071$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011072 ipv6=no
11073
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011076fi
11077
11078if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011080
11081fi
11082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083fi
11084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085
11086ipv6type=unknown
11087ipv6lib=none
11088ipv6trylibc=no
11089
11090if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11092$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011093 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11094 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095 case $i in
11096 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011099
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011100#include <netinet/in.h>
11101#ifdef IPV6_INRIA_VERSION
11102yes
11103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011104_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011107 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011109rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110
11111 ;;
11112 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116#include <netinet/in.h>
11117#ifdef __KAME__
11118yes
11119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123 ipv6type=$i;
11124 ipv6lib=inet6
11125 ipv6libdir=/usr/local/v6/lib
11126 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011128rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129
11130 ;;
11131 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135#include <features.h>
11136#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11137yes
11138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142 ipv6type=$i;
11143 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146
11147 ;;
11148 linux-inet6)
11149 if test -d /usr/inet6; then
11150 ipv6type=$i
11151 ipv6lib=inet6
11152 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011153 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154 fi
11155 ;;
11156 solaris)
11157 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011158 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011159 ipv6type=$i
11160 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161 fi
11162 fi
11163 ;;
11164 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011168#include <sys/param.h>
11169#ifdef _TOSHIBA_INET6
11170yes
11171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175 ipv6type=$i;
11176 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011177 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180
11181 ;;
11182 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186#include </usr/local/v6/include/sys/v6config.h>
11187#ifdef __V6D__
11188yes
11189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011193 ipv6type=$i;
11194 ipv6lib=v6;
11195 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011196 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011197fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011198rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199
11200 ;;
11201 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011203/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011204
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011205#include <sys/param.h>
11206#ifdef _ZETA_MINAMI_INET6
11207yes
11208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212 ipv6type=$i;
11213 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011214 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217
11218 ;;
11219 esac
11220 if test "$ipv6type" != "unknown"; then
11221 break
11222 fi
11223 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11225$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011226fi
11227
11228if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11229 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11230 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11231 echo "using lib$ipv6lib"
11232 else
11233 if test $ipv6trylibc = "yes"; then
11234 echo "using libc"
11235 else
11236 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11237 echo "You need to fetch lib$ipv6lib.a from appropriate"
11238 echo 'ipv6 kit and compile beforehand.'
11239 exit 1
11240 fi
11241 fi
11242fi
11243
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11245$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11247/* end confdefs.h. */
11248 /* CAN_RAW_FD_FRAMES available check */
11249#include <linux/can/raw.h>
11250int
11251main ()
11252{
11253int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11254 ;
11255 return 0;
11256}
11257_ACEOF
11258if ac_fn_c_try_compile "$LINENO"; then :
11259
11260
11261$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11262
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11264$as_echo "yes" >&6; }
11265
11266else
11267
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269$as_echo "no" >&6; }
11270
11271fi
11272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11273
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011274# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11276$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011279if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280 withval=$with_doc_strings;
11281fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011282
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011283
11284if test -z "$with_doc_strings"
11285then with_doc_strings="yes"
11286fi
11287if test "$with_doc_strings" != "no"
11288then
11289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011291
11292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11294$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011295
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011296# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11298$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011301if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302 withval=$with_pymalloc;
11303fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011304
Neil Schemenauera35c6882001-02-27 04:45:05 +000011305
Neil Schemenauer16c22972002-03-22 15:34:49 +000011306if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011307then
11308 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011309fi
11310if test "$with_pymalloc" != "no"
11311then
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011314
11315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11317$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011318
Nick Coghlan6ea41862017-06-11 13:16:15 +100011319# Check for --with-c-locale-coercion
11320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11321$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11322
11323# Check whether --with-c-locale-coercion was given.
11324if test "${with_c_locale_coercion+set}" = set; then :
11325 withval=$with_c_locale_coercion;
11326fi
11327
11328
11329if test -z "$with_c_locale_coercion"
11330then
11331 with_c_locale_coercion="yes"
11332fi
11333if test "$with_c_locale_coercion" != "no"
11334then
11335
11336$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11337
11338fi
11339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11340$as_echo "$with_c_locale_coercion" >&6; }
11341
Benjamin Peterson05159c42009-12-03 03:01:27 +000011342# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11344$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011345
11346# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011348 withval=$with_valgrind;
11349else
11350 with_valgrind=no
11351fi
11352
Matthias Kloseb9621712010-04-24 17:59:49 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11354$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011355if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 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 +020011357if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011360
11361else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011362 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011363
11364fi
11365
11366
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011367 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011368fi
11369
Łukasz Langaa785c872016-09-09 17:37:37 -070011370# Check for DTrace support
11371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11372$as_echo_n "checking for --with-dtrace... " >&6; }
11373
11374# Check whether --with-dtrace was given.
11375if test "${with_dtrace+set}" = set; then :
11376 withval=$with_dtrace;
11377else
11378 with_dtrace=no
11379fi
11380
11381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11382$as_echo "$with_dtrace" >&6; }
11383
11384
11385
11386
11387
11388DTRACE=
11389DFLAGS=
11390DTRACE_HEADERS=
11391DTRACE_OBJS=
11392
11393if test "$with_dtrace" = "yes"
11394then
11395 # Extract the first word of "dtrace", so it can be a program name with args.
11396set dummy dtrace; ac_word=$2
11397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11398$as_echo_n "checking for $ac_word... " >&6; }
11399if ${ac_cv_path_DTRACE+:} false; then :
11400 $as_echo_n "(cached) " >&6
11401else
11402 case $DTRACE in
11403 [\\/]* | ?:[\\/]*)
11404 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11405 ;;
11406 *)
11407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11408for as_dir in $PATH
11409do
11410 IFS=$as_save_IFS
11411 test -z "$as_dir" && as_dir=.
11412 for ac_exec_ext in '' $ac_executable_extensions; do
11413 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11414 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11416 break 2
11417 fi
11418done
11419 done
11420IFS=$as_save_IFS
11421
11422 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11423 ;;
11424esac
11425fi
11426DTRACE=$ac_cv_path_DTRACE
11427if test -n "$DTRACE"; then
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11429$as_echo "$DTRACE" >&6; }
11430else
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
11433fi
11434
11435
11436 if test "$DTRACE" = "not found"; then
11437 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11438 fi
11439
11440$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11441
11442 DTRACE_HEADERS="Include/pydtrace_probes.h"
11443
11444 # On OS X, DTrace providers do not need to be explicitly compiled and
11445 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11446 # generation flag '-G'. We check for presence of this flag, rather than
11447 # hardcoding support by OS, in the interest of robustness.
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11449$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11450if ${ac_cv_dtrace_link+:} false; then :
11451 $as_echo_n "(cached) " >&6
11452else
11453 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011454 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011455 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11456 ac_cv_dtrace_link=yes
11457
11458fi
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11460$as_echo "$ac_cv_dtrace_link" >&6; }
11461 if test "$ac_cv_dtrace_link" = "yes"; then
11462 DTRACE_OBJS="Python/pydtrace.o"
11463 fi
11464fi
11465
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011466# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011467
Guido van Rossum98935bf2001-09-05 19:13:16 +000011468DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011469
Guido van Rossume97ee181999-12-20 21:27:22 +000011470# the dlopen() function means we might want to use dynload_shlib.o. some
11471# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011472for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011473do :
11474 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011475if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011477#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011478_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011479
Guido van Rossume97ee181999-12-20 21:27:22 +000011480fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011481done
Guido van Rossume97ee181999-12-20 21:27:22 +000011482
Michael W. Hudson54241132001-12-07 15:38:26 +000011483
Guido van Rossume97ee181999-12-20 21:27:22 +000011484# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11485# loading of modules.
11486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11488$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011489if test -z "$DYNLOADFILE"
11490then
11491 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011492 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11493 if test "$ac_cv_func_dlopen" = yes
11494 then DYNLOADFILE="dynload_shlib.o"
11495 else DYNLOADFILE="dynload_aix.o"
11496 fi
11497 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011498 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011499 *)
11500 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11501 # out any dynamic loading
11502 if test "$ac_cv_func_dlopen" = yes
11503 then DYNLOADFILE="dynload_shlib.o"
11504 else DYNLOADFILE="dynload_stub.o"
11505 fi
11506 ;;
11507 esac
11508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11510$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011511if test "$DYNLOADFILE" != "dynload_stub.o"
11512then
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011515
11516fi
11517
Neil Schemenauer4e425612001-06-19 15:44:15 +000011518# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11519
Michael W. Hudson54241132001-12-07 15:38:26 +000011520
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11522$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011523if test -z "$MACHDEP_OBJS"
11524then
Jack Jansene578a632001-08-15 01:27:14 +000011525 MACHDEP_OBJS=$extra_machdep_objs
11526else
11527 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011528fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011529if test -z "$MACHDEP_OBJS"; then
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11531$as_echo "none" >&6; }
11532else
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11534$as_echo "$MACHDEP_OBJS" >&6; }
11535fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011536
Guido van Rossum627b2d71993-12-24 10:39:16 +000011537# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011538for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011539 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11540 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011541 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011542 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011543 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011544 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011545 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011546 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011547 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011548 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011549 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011550 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011551 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11552 readlink readlinkat readv realpath renameat \
Victor Stinnerb477d192020-01-22 22:48:16 +010011553 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid setenv seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011554 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011555 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011556 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11557 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011558 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011559 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011560 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011561 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011562 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011563do :
11564 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11565ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011566if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011568#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011571fi
11572done
11573
Michael W. Hudson54241132001-12-07 15:38:26 +000011574
Benjamin Peterson40caa052018-09-12 15:52:40 -070011575# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11576# links. Some libc implementations have a stub lchmod implementation that always
11577# returns an error.
11578if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011579 for ac_func in lchmod
11580do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011581 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11582if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011583 cat >>confdefs.h <<_ACEOF
11584#define HAVE_LCHMOD 1
11585_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011586
11587fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011588done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011589
11590fi
11591
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011592ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11593 #include <dirent.h>
11594"
11595if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11596
11597$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11598
11599fi
11600
11601
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011602# For some functions, having a definition is not sufficient, since
11603# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11605$as_echo_n "checking for chroot... " >&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=chroot
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_CHROOT 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 link" >&5
11630$as_echo_n "checking for link... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011633#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011634int
11635main ()
11636{
11637void *x=link
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öwisc8ad7cc2002-11-11 13:23:45 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 symlink" >&5
11655$as_echo_n "checking for symlink... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011658#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011659int
11660main ()
11661{
11662void *x=symlink
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öwisc8ad7cc2002-11-11 13:23:45 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 fchdir" >&5
11680$as_echo_n "checking for fchdir... " >&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=fchdir
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_FCHDIR 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 fsync" >&5
11705$as_echo_n "checking for fsync... " >&6; }
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011707/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011708#include <unistd.h>
11709int
11710main ()
11711{
11712void *x=fsync
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öwisa64988c2003-09-20 15:30:20 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011726
11727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11730$as_echo_n "checking for fdatasync... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011733#include <unistd.h>
11734int
11735main ()
11736{
11737void *x=fdatasync
11738 ;
11739 return 0;
11740}
11741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011745
Matthias Kloseb159a552010-04-25 21:00:44 +000011746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011747$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011751
11752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011753rm -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 epoll" >&5
11755$as_echo_n "checking for epoll... " >&6; }
11756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011757/* end confdefs.h. */
11758#include <sys/epoll.h>
11759int
11760main ()
11761{
11762void *x=epoll_create
11763 ;
11764 return 0;
11765}
11766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011768
Matthias Kloseb9621712010-04-24 17:59:49 +000011769$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011770
Matthias Kloseb159a552010-04-25 21:00:44 +000011771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011772$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11775$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011776
11777fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11780$as_echo_n "checking for epoll_create1... " >&6; }
11781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782/* end confdefs.h. */
11783#include <sys/epoll.h>
11784int
11785main ()
11786{
11787void *x=epoll_create1
11788 ;
11789 return 0;
11790}
11791_ACEOF
11792if ac_fn_c_try_compile "$LINENO"; then :
11793
11794$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11795
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11797$as_echo "yes" >&6; }
11798else
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11800$as_echo "no" >&6; }
11801
11802fi
11803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11805$as_echo_n "checking for kqueue... " >&6; }
11806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011807/* end confdefs.h. */
11808
11809#include <sys/types.h>
11810#include <sys/event.h>
11811
11812int
11813main ()
11814{
11815int x=kqueue()
11816 ;
11817 return 0;
11818}
11819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011823
Matthias Kloseb159a552010-04-25 21:00:44 +000011824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11828$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011829
11830fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11833$as_echo_n "checking for prlimit... " >&6; }
11834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11835/* end confdefs.h. */
11836
11837#include <sys/time.h>
11838#include <sys/resource.h>
11839
11840int
11841main ()
11842{
11843void *x=prlimit
11844 ;
11845 return 0;
11846}
11847_ACEOF
11848if ac_fn_c_try_compile "$LINENO"; then :
11849
11850$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11851
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11853$as_echo "yes" >&6; }
11854else
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11856$as_echo "no" >&6; }
11857
11858fi
11859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11862$as_echo_n "checking for memfd_create... " >&6; }
11863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864/* end confdefs.h. */
11865
11866#ifdef HAVE_SYS_MMAN_H
11867#include <sys/mman.h>
11868#endif
11869#ifdef HAVE_SYS_MEMFD_H
11870#include <sys/memfd.h>
11871#endif
11872
11873int
11874main ()
11875{
11876void *x=memfd_create
11877 ;
11878 return 0;
11879}
11880_ACEOF
11881if ac_fn_c_try_compile "$LINENO"; then :
11882
11883$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11884
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11886$as_echo "yes" >&6; }
11887else
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11889$as_echo "no" >&6; }
11890
11891fi
11892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11893
Martin v. Löwisd5843682002-11-21 20:41:28 +000011894# On some systems (eg. FreeBSD 5), we would find a definition of the
11895# functions ctermid_r, setgroups in the library, but no prototype
11896# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11897# address to avoid compiler warnings and potential miscompilations
11898# because of the missing prototypes.
11899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11901$as_echo_n "checking for ctermid_r... " >&6; }
11902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011903/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011904
Martin v. Löwisd5843682002-11-21 20:41:28 +000011905#include <stdio.h>
11906
Martin v. Löwisd5843682002-11-21 20:41:28 +000011907int
11908main ()
11909{
11910void* p = ctermid_r
11911 ;
11912 return 0;
11913}
11914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011918
Matthias Kloseb159a552010-04-25 21:00:44 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011924
11925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11927
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11929$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011931 $as_echo_n "(cached) " >&6
11932else
11933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011934/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011935#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011936int
11937main ()
11938{
11939void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011940
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011941 ;
11942 return 0;
11943}
11944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011946 ac_cv_flock_decl=yes
11947else
11948 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011949
11950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011952
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011953fi
11954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11955$as_echo "$ac_cv_flock_decl" >&6; }
11956if test "x${ac_cv_flock_decl}" = xyes; then
11957 for ac_func in flock
11958do :
11959 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011960if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011961 cat >>confdefs.h <<_ACEOF
11962#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011963_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011964
Antoine Pitroua3000072010-09-07 14:52:42 +000011965else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011967$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011968if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011969 $as_echo_n "(cached) " >&6
11970else
11971 ac_check_lib_save_LIBS=$LIBS
11972LIBS="-lbsd $LIBS"
11973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11974/* end confdefs.h. */
11975
11976/* Override any GCC internal prototype to avoid an error.
11977 Use char because int might match the return type of a GCC
11978 builtin and then its argument prototype would still apply. */
11979#ifdef __cplusplus
11980extern "C"
11981#endif
11982char flock ();
11983int
11984main ()
11985{
11986return flock ();
11987 ;
11988 return 0;
11989}
11990_ACEOF
11991if ac_fn_c_try_link "$LINENO"; then :
11992 ac_cv_lib_bsd_flock=yes
11993else
11994 ac_cv_lib_bsd_flock=no
11995fi
11996rm -f core conftest.err conftest.$ac_objext \
11997 conftest$ac_exeext conftest.$ac_ext
11998LIBS=$ac_check_lib_save_LIBS
11999fi
12000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12001$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012003 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012004
12005
12006$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12007
12008
12009fi
12010
12011
12012fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012013done
12014
Antoine Pitroua3000072010-09-07 14:52:42 +000012015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016
Matthias Kloseb9621712010-04-24 17:59:49 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12018$as_echo_n "checking for getpagesize... " >&6; }
12019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012020/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012021
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012022#include <unistd.h>
12023
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012024int
12025main ()
12026{
12027void* p = getpagesize
12028 ;
12029 return 0;
12030}
12031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012035
Matthias Kloseb159a552010-04-25 21:00:44 +000012036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012037$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12040$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012041
12042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012044
Victor Stinner984890f2011-11-24 13:53:38 +010012045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12046$as_echo_n "checking for broken unsetenv... " >&6; }
12047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048/* end confdefs.h. */
12049
12050#include <stdlib.h>
12051
12052int
12053main ()
12054{
12055int res = unsetenv("DUMMY")
12056 ;
12057 return 0;
12058}
12059_ACEOF
12060if ac_fn_c_try_compile "$LINENO"; then :
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
12063else
12064
12065$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12066
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12068$as_echo "yes" >&6; }
12069
12070fi
12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12072
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012073for ac_prog in true
12074do
12075 # Extract the first word of "$ac_prog", so it can be a program name with args.
12076set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012079if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012081else
12082 if test -n "$TRUE"; then
12083 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12084else
12085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12086for as_dir in $PATH
12087do
12088 IFS=$as_save_IFS
12089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012092 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 $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 +000012094 break 2
12095 fi
12096done
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012098IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012099
12100fi
12101fi
12102TRUE=$ac_cv_prog_TRUE
12103if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12105$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12108$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012109fi
12110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012112 test -n "$TRUE" && break
12113done
12114test -n "$TRUE" || TRUE="/bin/true"
12115
12116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12118$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012119if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012121else
12122 ac_check_lib_save_LIBS=$LIBS
12123LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012125/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127/* Override any GCC internal prototype to avoid an error.
12128 Use char because int might match the return type of a GCC
12129 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012130#ifdef __cplusplus
12131extern "C"
12132#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012133char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012134int
12135main ()
12136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012138 ;
12139 return 0;
12140}
12141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012143 ac_cv_lib_c_inet_aton=yes
12144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012147rm -f core conftest.err conftest.$ac_objext \
12148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149LIBS=$ac_check_lib_save_LIBS
12150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12152$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012153if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012154 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12157$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012160else
12161 ac_check_lib_save_LIBS=$LIBS
12162LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012164/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166/* Override any GCC internal prototype to avoid an error.
12167 Use char because int might match the return type of a GCC
12168 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012169#ifdef __cplusplus
12170extern "C"
12171#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012172char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012173int
12174main ()
12175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012177 ;
12178 return 0;
12179}
12180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012182 ac_cv_lib_resolv_inet_aton=yes
12183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186rm -f core conftest.err conftest.$ac_objext \
12187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012188LIBS=$ac_check_lib_save_LIBS
12189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12191$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012193 cat >>confdefs.h <<_ACEOF
12194#define HAVE_LIBRESOLV 1
12195_ACEOF
12196
12197 LIBS="-lresolv $LIBS"
12198
12199fi
12200
12201
12202fi
12203
12204
Christian Heimesd0764e22007-12-04 15:00:33 +000012205# On Tru64, chflags seems to be present, but calling it will
12206# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12208$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012213 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012214else
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012216/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012217
Christian Heimesd0764e22007-12-04 15:00:33 +000012218#include <sys/stat.h>
12219#include <unistd.h>
12220int main(int argc, char*argv[])
12221{
12222 if(chflags(argv[0], 0) != 0)
12223 return 1;
12224 return 0;
12225}
Ned Deily3eb67d52011-06-28 00:00:28 -070012226
Christian Heimesd0764e22007-12-04 15:00:33 +000012227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012228if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012229 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012235fi
12236
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12240$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012241if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012244 ac_cv_have_chflags="yes"
12245else
12246 ac_cv_have_chflags="no"
12247fi
12248
12249fi
12250if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012253
12254fi
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12257$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012258if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012262 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012265/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012266
Christian Heimesd0764e22007-12-04 15:00:33 +000012267#include <sys/stat.h>
12268#include <unistd.h>
12269int main(int argc, char*argv[])
12270{
12271 if(lchflags(argv[0], 0) != 0)
12272 return 1;
12273 return 0;
12274}
Ned Deily3eb67d52011-06-28 00:00:28 -070012275
Christian Heimesd0764e22007-12-04 15:00:33 +000012276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012278 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012284fi
12285
12286
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12289$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012290if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012292if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012293 ac_cv_have_lchflags="yes"
12294else
12295 ac_cv_have_lchflags="no"
12296fi
12297
12298fi
12299if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012302
12303fi
12304
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012305case $ac_sys_system/$ac_sys_release in
12306Darwin/*)
12307 _CUR_CFLAGS="${CFLAGS}"
12308 _CUR_LDFLAGS="${LDFLAGS}"
12309 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12310 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12311 ;;
12312esac
12313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12315$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012316if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012318else
12319 ac_check_lib_save_LIBS=$LIBS
12320LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012322/* end confdefs.h. */
12323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324/* Override any GCC internal prototype to avoid an error.
12325 Use char because int might match the return type of a GCC
12326 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012327#ifdef __cplusplus
12328extern "C"
12329#endif
12330char inflateCopy ();
12331int
12332main ()
12333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012340 ac_cv_lib_z_inflateCopy=yes
12341else
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012344rm -f core conftest.err conftest.$ac_objext \
12345 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012346LIBS=$ac_check_lib_save_LIBS
12347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12349$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012350if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012353
12354fi
12355
12356
12357case $ac_sys_system/$ac_sys_release in
12358Darwin/*)
12359 CFLAGS="${_CUR_CFLAGS}"
12360 LDFLAGS="${_CUR_LDFLAGS}"
12361 ;;
12362esac
12363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12365$as_echo_n "checking for hstrerror... " >&6; }
12366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012367/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012368
Martin v. Löwise9416172003-05-03 10:12:45 +000012369#include <netdb.h>
12370
Martin v. Löwise9416172003-05-03 10:12:45 +000012371int
12372main ()
12373{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012374void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012375 ;
12376 return 0;
12377}
12378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012379if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012382
Matthias Kloseb159a552010-04-25 21:00:44 +000012383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012384$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012385else
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012388
12389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390rm -f core conftest.err conftest.$ac_objext \
12391 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12394$as_echo_n "checking for inet_aton... " >&6; }
12395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012397
Martin v. Löwis86d66262006-02-17 08:40:11 +000012398#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012399#include <sys/socket.h>
12400#include <netinet/in.h>
12401#include <arpa/inet.h>
12402
Martin v. Löwise9416172003-05-03 10:12:45 +000012403int
12404main ()
12405{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012406void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012407 ;
12408 return 0;
12409}
12410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012414
Matthias Kloseb159a552010-04-25 21:00:44 +000012415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012416$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012417else
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12419$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012420
12421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012422rm -f core conftest.err conftest.$ac_objext \
12423 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12426$as_echo_n "checking for inet_pton... " >&6; }
12427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012429
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012430#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012431#include <sys/socket.h>
12432#include <netinet/in.h>
12433#include <arpa/inet.h>
12434
Martin v. Löwise9416172003-05-03 10:12:45 +000012435int
12436main ()
12437{
12438void* p = inet_pton
12439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012446
Matthias Kloseb159a552010-04-25 21:00:44 +000012447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012448$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012449else
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12451$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012452
12453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012455
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012456# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12458$as_echo_n "checking for setgroups... " >&6; }
12459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012461
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012462#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012463#ifdef HAVE_GRP_H
12464#include <grp.h>
12465#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012466
Martin v. Löwisd5843682002-11-21 20:41:28 +000012467int
12468main ()
12469{
12470void* p = setgroups
12471 ;
12472 return 0;
12473}
12474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012478
Matthias Kloseb159a552010-04-25 21:00:44 +000012479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012480$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012481else
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12483$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012484
12485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012488# check for openpty and forkpty
12489
12490for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012491do :
12492 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012493if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012495#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012496_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012497
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12500$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012501if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012503else
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012505LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509/* Override any GCC internal prototype to avoid an error.
12510 Use char because int might match the return type of a GCC
12511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012512#ifdef __cplusplus
12513extern "C"
12514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012515char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012516int
12517main ()
12518{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ;
12521 return 0;
12522}
12523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012526else
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012529rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012531LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12534$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012535if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012537 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012538else
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12540$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012541if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012543else
12544 ac_check_lib_save_LIBS=$LIBS
12545LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012547/* end confdefs.h. */
12548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549/* Override any GCC internal prototype to avoid an error.
12550 Use char because int might match the return type of a GCC
12551 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012552#ifdef __cplusplus
12553extern "C"
12554#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012555char openpty ();
12556int
12557main ()
12558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012560 ;
12561 return 0;
12562}
12563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012565 ac_cv_lib_bsd_openpty=yes
12566else
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012569rm -f core conftest.err conftest.$ac_objext \
12570 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012571LIBS=$ac_check_lib_save_LIBS
12572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12574$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012575if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012577 LIBS="$LIBS -lbsd"
12578fi
12579
12580
12581fi
12582
Fred Drake8cef4cf2000-06-28 16:40:38 +000012583
12584fi
12585done
12586
12587for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012588do :
12589 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012590if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012593_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012594
Fred Drake8cef4cf2000-06-28 16:40:38 +000012595else
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12597$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012598if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012600else
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012602LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606/* Override any GCC internal prototype to avoid an error.
12607 Use char because int might match the return type of a GCC
12608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012609#ifdef __cplusplus
12610extern "C"
12611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012612char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012613int
12614main ()
12615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 ;
12618 return 0;
12619}
12620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012623else
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012626rm -f core conftest.err conftest.$ac_objext \
12627 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012628LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12631$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012632if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012634 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12637$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012638if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012640else
12641 ac_check_lib_save_LIBS=$LIBS
12642LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012644/* end confdefs.h. */
12645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646/* Override any GCC internal prototype to avoid an error.
12647 Use char because int might match the return type of a GCC
12648 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012649#ifdef __cplusplus
12650extern "C"
12651#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012652char forkpty ();
12653int
12654main ()
12655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012657 ;
12658 return 0;
12659}
12660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012662 ac_cv_lib_bsd_forkpty=yes
12663else
Matthias Kloseb9621712010-04-24 17:59:49 +000012664 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012666rm -f core conftest.err conftest.$ac_objext \
12667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012668LIBS=$ac_check_lib_save_LIBS
12669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12671$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012672if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012674 LIBS="$LIBS -lbsd"
12675fi
12676
12677
12678fi
12679
Fred Drake8cef4cf2000-06-28 16:40:38 +000012680
12681fi
12682done
12683
Jack Jansendd19cf82001-12-06 22:36:17 +000012684
Michael W. Hudson54241132001-12-07 15:38:26 +000012685# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012686for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012687do :
12688 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12689ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012690if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012693_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012696done
12697
Michael W. Hudson54241132001-12-07 15:38:26 +000012698
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012699ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012700if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012701 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012702
Martin v. Löwis1142de32002-03-29 16:28:31 +000012703else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012705 *" dup2.$ac_objext "* ) ;;
12706 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012708esac
12709
Martin v. Löwis1142de32002-03-29 16:28:31 +000012710fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012711
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012712ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012714 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12715
12716else
12717 case " $LIBOBJS " in
12718 *" strdup.$ac_objext "* ) ;;
12719 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12720 ;;
12721esac
12722
12723fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012724
12725
12726for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012727do :
12728 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012729if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012731#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012734/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012735#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012736int
12737main ()
12738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012739getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ;
12741 return 0;
12742}
12743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012747
Guido van Rossum627b2d71993-12-24 10:39:16 +000012748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012750
Guido van Rossum627b2d71993-12-24 10:39:16 +000012751fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012752done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012753
Jack Jansen150753c2003-03-29 22:07:47 +000012754for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012755do :
12756 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012757if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012758 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012762/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012763#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012764int
12765main ()
12766{
12767setpgrp(0,0);
12768 ;
12769 return 0;
12770}
12771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012775
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012778
12779fi
12780done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012781
Michael W. Hudson54241132001-12-07 15:38:26 +000012782
Gregory P. Smith387512c2018-12-30 15:42:32 -080012783# We search for both crypt and crypt_r as one or the other may be defined
12784# This gets us our -lcrypt in LIBS when required on the target platform.
12785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12786$as_echo_n "checking for library containing crypt... " >&6; }
12787if ${ac_cv_search_crypt+:} false; then :
12788 $as_echo_n "(cached) " >&6
12789else
12790 ac_func_search_save_LIBS=$LIBS
12791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12792/* end confdefs.h. */
12793
12794/* Override any GCC internal prototype to avoid an error.
12795 Use char because int might match the return type of a GCC
12796 builtin and then its argument prototype would still apply. */
12797#ifdef __cplusplus
12798extern "C"
12799#endif
12800char crypt ();
12801int
12802main ()
12803{
12804return crypt ();
12805 ;
12806 return 0;
12807}
12808_ACEOF
12809for ac_lib in '' crypt; do
12810 if test -z "$ac_lib"; then
12811 ac_res="none required"
12812 else
12813 ac_res=-l$ac_lib
12814 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12815 fi
12816 if ac_fn_c_try_link "$LINENO"; then :
12817 ac_cv_search_crypt=$ac_res
12818fi
12819rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext
12821 if ${ac_cv_search_crypt+:} false; then :
12822 break
12823fi
12824done
12825if ${ac_cv_search_crypt+:} false; then :
12826
12827else
12828 ac_cv_search_crypt=no
12829fi
12830rm conftest.$ac_ext
12831LIBS=$ac_func_search_save_LIBS
12832fi
12833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12834$as_echo "$ac_cv_search_crypt" >&6; }
12835ac_res=$ac_cv_search_crypt
12836if test "$ac_res" != no; then :
12837 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12838
12839fi
12840
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12842$as_echo_n "checking for library containing crypt_r... " >&6; }
12843if ${ac_cv_search_crypt_r+:} false; then :
12844 $as_echo_n "(cached) " >&6
12845else
12846 ac_func_search_save_LIBS=$LIBS
12847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12848/* end confdefs.h. */
12849
12850/* Override any GCC internal prototype to avoid an error.
12851 Use char because int might match the return type of a GCC
12852 builtin and then its argument prototype would still apply. */
12853#ifdef __cplusplus
12854extern "C"
12855#endif
12856char crypt_r ();
12857int
12858main ()
12859{
12860return crypt_r ();
12861 ;
12862 return 0;
12863}
12864_ACEOF
12865for ac_lib in '' crypt; do
12866 if test -z "$ac_lib"; then
12867 ac_res="none required"
12868 else
12869 ac_res=-l$ac_lib
12870 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12871 fi
12872 if ac_fn_c_try_link "$LINENO"; then :
12873 ac_cv_search_crypt_r=$ac_res
12874fi
12875rm -f core conftest.err conftest.$ac_objext \
12876 conftest$ac_exeext
12877 if ${ac_cv_search_crypt_r+:} false; then :
12878 break
12879fi
12880done
12881if ${ac_cv_search_crypt_r+:} false; then :
12882
12883else
12884 ac_cv_search_crypt_r=no
12885fi
12886rm conftest.$ac_ext
12887LIBS=$ac_func_search_save_LIBS
12888fi
12889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12890$as_echo "$ac_cv_search_crypt_r" >&6; }
12891ac_res=$ac_cv_search_crypt_r
12892if test "$ac_res" != no; then :
12893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12894
12895fi
12896
12897
12898ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12899if test "x$ac_cv_func_crypt_r" = xyes; then :
12900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12901/* end confdefs.h. */
12902
12903#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12904#include <crypt.h>
12905
12906int
12907main ()
12908{
12909
12910struct crypt_data d;
12911char *r = crypt_r("", "", &d);
12912
12913 ;
12914 return 0;
12915}
12916_ACEOF
12917if ac_fn_c_try_compile "$LINENO"; then :
12918
12919$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12920
12921fi
12922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12923
12924fi
12925
12926
Victor Stinnere0be4232011-10-25 13:06:09 +020012927for ac_func in clock_gettime
12928do :
12929 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12930if test "x$ac_cv_func_clock_gettime" = xyes; then :
12931 cat >>confdefs.h <<_ACEOF
12932#define HAVE_CLOCK_GETTIME 1
12933_ACEOF
12934
12935else
12936
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12938$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12939if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12940 $as_echo_n "(cached) " >&6
12941else
12942 ac_check_lib_save_LIBS=$LIBS
12943LIBS="-lrt $LIBS"
12944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12945/* end confdefs.h. */
12946
12947/* Override any GCC internal prototype to avoid an error.
12948 Use char because int might match the return type of a GCC
12949 builtin and then its argument prototype would still apply. */
12950#ifdef __cplusplus
12951extern "C"
12952#endif
12953char clock_gettime ();
12954int
12955main ()
12956{
12957return clock_gettime ();
12958 ;
12959 return 0;
12960}
12961_ACEOF
12962if ac_fn_c_try_link "$LINENO"; then :
12963 ac_cv_lib_rt_clock_gettime=yes
12964else
12965 ac_cv_lib_rt_clock_gettime=no
12966fi
12967rm -f core conftest.err conftest.$ac_objext \
12968 conftest$ac_exeext conftest.$ac_ext
12969LIBS=$ac_check_lib_save_LIBS
12970fi
12971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12972$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12973if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12974
Victor Stinner7efb8332014-08-29 15:41:08 +020012975 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012976 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12977
12978
12979$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12980
12981
12982fi
12983
12984
12985fi
12986done
12987
12988
12989for ac_func in clock_getres
12990do :
12991 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12992if test "x$ac_cv_func_clock_getres" = xyes; then :
12993 cat >>confdefs.h <<_ACEOF
12994#define HAVE_CLOCK_GETRES 1
12995_ACEOF
12996
12997else
12998
12999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13000$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13001if ${ac_cv_lib_rt_clock_getres+:} false; then :
13002 $as_echo_n "(cached) " >&6
13003else
13004 ac_check_lib_save_LIBS=$LIBS
13005LIBS="-lrt $LIBS"
13006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13007/* end confdefs.h. */
13008
13009/* Override any GCC internal prototype to avoid an error.
13010 Use char because int might match the return type of a GCC
13011 builtin and then its argument prototype would still apply. */
13012#ifdef __cplusplus
13013extern "C"
13014#endif
13015char clock_getres ();
13016int
13017main ()
13018{
13019return clock_getres ();
13020 ;
13021 return 0;
13022}
13023_ACEOF
13024if ac_fn_c_try_link "$LINENO"; then :
13025 ac_cv_lib_rt_clock_getres=yes
13026else
13027 ac_cv_lib_rt_clock_getres=no
13028fi
13029rm -f core conftest.err conftest.$ac_objext \
13030 conftest$ac_exeext conftest.$ac_ext
13031LIBS=$ac_check_lib_save_LIBS
13032fi
13033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13034$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13035if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13036
13037 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13038
13039
13040fi
13041
13042
13043fi
13044done
13045
13046
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013047for ac_func in clock_settime
13048do :
13049 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13050if test "x$ac_cv_func_clock_settime" = xyes; then :
13051 cat >>confdefs.h <<_ACEOF
13052#define HAVE_CLOCK_SETTIME 1
13053_ACEOF
13054
13055else
13056
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13058$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13059if ${ac_cv_lib_rt_clock_settime+:} false; then :
13060 $as_echo_n "(cached) " >&6
13061else
13062 ac_check_lib_save_LIBS=$LIBS
13063LIBS="-lrt $LIBS"
13064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13065/* end confdefs.h. */
13066
13067/* Override any GCC internal prototype to avoid an error.
13068 Use char because int might match the return type of a GCC
13069 builtin and then its argument prototype would still apply. */
13070#ifdef __cplusplus
13071extern "C"
13072#endif
13073char clock_settime ();
13074int
13075main ()
13076{
13077return clock_settime ();
13078 ;
13079 return 0;
13080}
13081_ACEOF
13082if ac_fn_c_try_link "$LINENO"; then :
13083 ac_cv_lib_rt_clock_settime=yes
13084else
13085 ac_cv_lib_rt_clock_settime=no
13086fi
13087rm -f core conftest.err conftest.$ac_objext \
13088 conftest$ac_exeext conftest.$ac_ext
13089LIBS=$ac_check_lib_save_LIBS
13090fi
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13092$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13093if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13094
13095 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13096
13097
13098fi
13099
13100
13101fi
13102done
13103
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13106$as_echo_n "checking for major... " >&6; }
13107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013108/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013109
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013110#if defined(MAJOR_IN_MKDEV)
13111#include <sys/mkdev.h>
13112#elif defined(MAJOR_IN_SYSMACROS)
13113#include <sys/sysmacros.h>
13114#else
13115#include <sys/types.h>
13116#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013117
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013118int
13119main ()
13120{
13121
13122 makedev(major(0),minor(0));
13123
13124 ;
13125 return 0;
13126}
13127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013129
13130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13134$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013135
13136else
Skip Montanaro6dead952003-09-25 14:50:04 +000013137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13139$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013140
13141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013142rm -f core conftest.err conftest.$ac_objext \
13143 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013144
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013145# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013146# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13148$as_echo_n "checking for getaddrinfo... " >&6; }
13149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013151
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013152#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013153#include <sys/socket.h>
13154#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013155#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013160getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013166 have_getaddrinfo=yes
13167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013170rm -f core conftest.err conftest.$ac_objext \
13171 conftest$ac_exeext conftest.$ac_ext
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13173$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013174if test $have_getaddrinfo = yes
13175then
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13177$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013178 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013182
13183if test "${enable_ipv6+set}" = set; then
13184 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13185else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013186 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013187fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013190/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191
Stefan Krah19c21392012-11-22 23:47:32 +010013192#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193#include <sys/types.h>
13194#include <netdb.h>
13195#include <string.h>
13196#include <sys/socket.h>
13197#include <netinet/in.h>
13198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013199int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200{
13201 int passive, gaierr, inet4 = 0, inet6 = 0;
13202 struct addrinfo hints, *ai, *aitop;
13203 char straddr[INET6_ADDRSTRLEN], strport[16];
13204
13205 for (passive = 0; passive <= 1; passive++) {
13206 memset(&hints, 0, sizeof(hints));
13207 hints.ai_family = AF_UNSPEC;
13208 hints.ai_flags = passive ? AI_PASSIVE : 0;
13209 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013210 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13212 (void)gai_strerror(gaierr);
13213 goto bad;
13214 }
13215 for (ai = aitop; ai; ai = ai->ai_next) {
13216 if (ai->ai_addr == NULL ||
13217 ai->ai_addrlen == 0 ||
13218 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13219 straddr, sizeof(straddr), strport, sizeof(strport),
13220 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13221 goto bad;
13222 }
13223 switch (ai->ai_family) {
13224 case AF_INET:
13225 if (strcmp(strport, "54321") != 0) {
13226 goto bad;
13227 }
13228 if (passive) {
13229 if (strcmp(straddr, "0.0.0.0") != 0) {
13230 goto bad;
13231 }
13232 } else {
13233 if (strcmp(straddr, "127.0.0.1") != 0) {
13234 goto bad;
13235 }
13236 }
13237 inet4++;
13238 break;
13239 case AF_INET6:
13240 if (strcmp(strport, "54321") != 0) {
13241 goto bad;
13242 }
13243 if (passive) {
13244 if (strcmp(straddr, "::") != 0) {
13245 goto bad;
13246 }
13247 } else {
13248 if (strcmp(straddr, "::1") != 0) {
13249 goto bad;
13250 }
13251 }
13252 inet6++;
13253 break;
13254 case AF_UNSPEC:
13255 goto bad;
13256 break;
13257 default:
13258 /* another family support? */
13259 break;
13260 }
13261 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013262 freeaddrinfo(aitop);
13263 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264 }
13265
13266 if (!(inet4 == 0 || inet4 == 2))
13267 goto bad;
13268 if (!(inet6 == 0 || inet6 == 2))
13269 goto bad;
13270
13271 if (aitop)
13272 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013273 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274
13275 bad:
13276 if (aitop)
13277 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279}
13280
Martin v. Löwis11437992002-04-12 09:54:03 +000013281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013282if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013283 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13296$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13297
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013298if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299then
13300 if test $ipv6 = yes
13301 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013302 echo 'Fatal: You must get working getaddrinfo() function.'
13303 echo ' or you can specify "--disable-ipv6"'.
13304 exit 1
13305 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013309
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013311
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013312for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013313do :
13314 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013315if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013317#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013318_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013320fi
13321done
13322
Michael W. Hudson54241132001-12-07 15:38:26 +000013323
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13326$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013327if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329else
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013331/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332#include <sys/types.h>
13333#include <sys/time.h>
13334#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336int
13337main ()
13338{
13339if ((struct tm *) 0)
13340return 0;
13341 ;
13342 return 0;
13343}
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13353$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013354if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13361$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367#include <sys/types.h>
13368#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373struct tm tm;
13374 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381 ac_cv_struct_tm=time.h
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13388$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013389if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392
13393fi
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395ac_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 +000013396#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398"
Victor Stinnere0be4232011-10-25 13:06:09 +020013399if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
13401cat >>confdefs.h <<_ACEOF
13402#define HAVE_STRUCT_TM_TM_ZONE 1
13403_ACEOF
13404
13405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13414"
Victor Stinnere0be4232011-10-25 13:06:09 +020013415if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419fi
13420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013422#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423_ACEOF
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13426$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013427if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013431/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013432#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433#if !HAVE_DECL_TZNAME
13434extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437int
13438main ()
13439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ;
13442 return 0;
13443}
13444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446 ac_cv_var_tzname=yes
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013450rm -f core conftest.err conftest.$ac_objext \
13451 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13454$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013455 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013458
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459 fi
13460fi
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462ac_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 +020013463if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
13465cat >>confdefs.h <<_ACEOF
13466#define HAVE_STRUCT_STAT_ST_RDEV 1
13467_ACEOF
13468
13469
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013470fi
13471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472ac_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 +020013473if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475cat >>confdefs.h <<_ACEOF
13476#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13477_ACEOF
13478
13479
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013480fi
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482ac_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 +020013483if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013484
13485cat >>confdefs.h <<_ACEOF
13486#define HAVE_STRUCT_STAT_ST_FLAGS 1
13487_ACEOF
13488
13489
13490fi
13491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492ac_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 +020013493if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013494
13495cat >>confdefs.h <<_ACEOF
13496#define HAVE_STRUCT_STAT_ST_GEN 1
13497_ACEOF
13498
13499
13500fi
13501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502ac_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 +020013503if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013504
13505cat >>confdefs.h <<_ACEOF
13506#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13507_ACEOF
13508
13509
13510fi
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512ac_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 +020013513if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013514
Martin v. Löwis11437992002-04-12 09:54:03 +000013515cat >>confdefs.h <<_ACEOF
13516#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13517_ACEOF
13518
13519
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013520fi
13521
Stefan Krah267b6392016-04-26 01:09:18 +020013522ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13523 #include <sys/types.h>
13524 #include <pwd.h>
13525
13526"
13527if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13528
13529cat >>confdefs.h <<_ACEOF
13530#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13531_ACEOF
13532
13533
13534fi
13535ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13536 #include <sys/types.h>
13537 #include <pwd.h>
13538
13539"
13540if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13541
13542cat >>confdefs.h <<_ACEOF
13543#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13544_ACEOF
13545
13546
13547fi
13548
Zachary Ware6a6967e2016-10-01 00:47:27 -050013549# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13550ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13551"
13552if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13553
13554cat >>confdefs.h <<_ACEOF
13555#define HAVE_SIGINFO_T_SI_BAND 1
13556_ACEOF
13557
13558
13559fi
13560
Michael W. Hudson54241132001-12-07 15:38:26 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13563$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013564if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013566else
Matthias Kloseb159a552010-04-25 21:00:44 +000013567
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013569/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013570#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013571int
13572main ()
13573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ;
13576 return 0;
13577}
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580 ac_cv_header_time_altzone=yes
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586fi
13587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13589$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593
13594fi
13595
Guido van Rossumda88dad1995-01-26 00:46:29 +000013596was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13598$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013600/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013601
13602#include <sys/types.h>
13603#include <sys/select.h>
13604#include <sys/time.h>
13605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606int
13607main ()
13608{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609;
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 ;
13611 return 0;
13612}
13613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013619 was_it_defined=yes
13620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13624$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13627$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013628if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013633#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ;
13639 return 0;
13640}
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013643 ac_cv_struct_addrinfo=yes
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13648fi
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13651$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013652if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013655
13656fi
13657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13659$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013660if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013664/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013665
13666# include <sys/types.h>
13667# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013668int
13669main ()
13670{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013671struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 ;
13673 return 0;
13674}
13675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013677 ac_cv_struct_sockaddr_storage=yes
13678else
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682fi
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13685$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013686if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013689
13690fi
13691
Christian Heimesdffa3942016-09-05 23:54:41 +020013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13693$as_echo_n "checking for sockaddr_alg... " >&6; }
13694if ${ac_cv_struct_sockaddr_alg+:} false; then :
13695 $as_echo_n "(cached) " >&6
13696else
13697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13698/* end confdefs.h. */
13699
13700# include <sys/types.h>
13701# include <sys/socket.h>
13702# include <linux/if_alg.h>
13703int
13704main ()
13705{
13706struct sockaddr_alg s
13707 ;
13708 return 0;
13709}
13710_ACEOF
13711if ac_fn_c_try_compile "$LINENO"; then :
13712 ac_cv_struct_sockaddr_alg=yes
13713else
13714 ac_cv_struct_sockaddr_alg=no
13715fi
13716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13717fi
13718
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13720$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13721if test $ac_cv_struct_sockaddr_alg = yes; then
13722
13723$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13724
13725fi
13726
Guido van Rossum627b2d71993-12-24 10:39:16 +000013727# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13730$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013731if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013733else
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013736$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013737int
13738main ()
13739{
13740static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013741test_array [0] = 0;
13742return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013743
13744 ;
13745 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013746}
Martin v. Löwis11437992002-04-12 09:54:03 +000013747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013749 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13756$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759
13760fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13763$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013764if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013768/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769
Martin v. Löwis11437992002-04-12 09:54:03 +000013770int
13771main ()
13772{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013775 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013777 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013779 char const *const *pcpcc;
13780 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 /* NEC SVR4.0.2 mips cc rejects this. */
13782 struct point {int x, y;};
13783 static struct point const zero = {0,0};
13784 /* AIX XL C 1.02.0.0 rejects this.
13785 It does not let you subtract one const X* pointer from another in
13786 an arm of an if-expression whose if-part is not a constant
13787 expression */
13788 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791 ++pcpcc;
13792 ppc = (char**) pcpcc;
13793 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013794 { /* SCO 3.2v4 cc rejects this sort of thing. */
13795 char tx;
13796 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 }
13802 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13803 int x[] = {25, 17};
13804 const int *foo = &x[0];
13805 ++foo;
13806 }
13807 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13808 typedef const int *iptr;
13809 iptr p = 0;
13810 ++p;
13811 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013812 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013814 struct s { int j; const int *ap[3]; } bx;
13815 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 }
13817 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13818 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013822#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 ;
13825 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013826}
Martin v. Löwis11437992002-04-12 09:54:03 +000013827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013829 ac_cv_c_const=yes
13830else
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13836$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
Matthias Kloseb9621712010-04-24 17:59:49 +000013839$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840
13841fi
13842
Michael W. Hudson54241132001-12-07 15:38:26 +000013843
Guido van Rossumda88dad1995-01-26 00:46:29 +000013844works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13846$as_echo_n "checking for working signed char... " >&6; }
13847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850int
13851main ()
13852{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 ;
13855 return 0;
13856}
13857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013858if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013859 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013860else
Skip Montanaro6dead952003-09-25 14:50:04 +000013861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013864
Guido van Rossum7f43da71994-08-01 12:15:30 +000013865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13868$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013869
Guido van Rossumda88dad1995-01-26 00:46:29 +000013870have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13872$as_echo_n "checking for prototypes... " >&6; }
13873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013874/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013875int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013876int
13877main ()
13878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013879return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ;
13881 return 0;
13882}
13883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
Matthias Kloseb159a552010-04-25 21:00:44 +000013888 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13892$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013893
Guido van Rossumda88dad1995-01-26 00:46:29 +000013894works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13896$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013898/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013899
13900#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013901int foo(int x, ...) {
13902 va_list va;
13903 va_start(va, x);
13904 va_arg(va, int);
13905 va_arg(va, char *);
13906 va_arg(va, double);
13907 return 0;
13908}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910int
13911main ()
13912{
Guido van Rossum90eea071996-08-30 20:58:57 +000013913return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013918if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013919
13920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013923 works=yes
13924
Guido van Rossum627b2d71993-12-24 10:39:16 +000013925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13928$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013929
Martin v. Löwisd6320502004-08-12 13:45:08 +000013930# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13932$as_echo_n "checking for socketpair... " >&6; }
13933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013934/* end confdefs.h. */
13935
13936#include <sys/types.h>
13937#include <sys/socket.h>
13938
13939int
13940main ()
13941{
13942void *x=socketpair
13943 ;
13944 return 0;
13945}
13946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013950
Matthias Kloseb159a552010-04-25 21:00:44 +000013951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013952$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013956
13957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013959
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013960# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13962$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013964/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013965#include <sys/types.h>
13966#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013967int
13968main ()
13969{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013970struct sockaddr x;
13971x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 ;
13973 return 0;
13974}
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_compile "$LINENO"; then :
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13978$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013981
13982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13984$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013985
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013988
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
13991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013993if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13998$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999 OLD_CFLAGS=$CFLAGS
14000 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014002/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014003
14004# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006int
14007main ()
14008{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014009
14010 char *name;
14011 struct hostent *he, *res;
14012 char buffer[2048];
14013 int buflen = 2048;
14014 int h_errnop;
14015
14016 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
14018 ;
14019 return 0;
14020}
14021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014022if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014023
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014025
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14030$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014031
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032else
Skip Montanaro6dead952003-09-25 14:50:04 +000014033
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14035$as_echo "no" >&6; }
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14037$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014039/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014040
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014041# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Martin v. Löwis11437992002-04-12 09:54:03 +000014043int
14044main ()
14045{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046
14047 char *name;
14048 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014049 char buffer[2048];
14050 int buflen = 2048;
14051 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052
Matthias Kloseb159a552010-04-25 21:00:44 +000014053 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014054
14055 ;
14056 return 0;
14057}
14058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014062
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Matthias Kloseb159a552010-04-25 21:00:44 +000014064$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14067$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014068
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069else
Skip Montanaro6dead952003-09-25 14:50:04 +000014070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14072$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14074$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14076/* end confdefs.h. */
14077
14078# include <netdb.h>
14079
14080int
14081main ()
14082{
14083
14084 char *name;
14085 struct hostent *he;
14086 struct hostent_data data;
14087
14088 (void) gethostbyname_r(name, he, &data);
14089
14090 ;
14091 return 0;
14092}
14093_ACEOF
14094if ac_fn_c_try_compile "$LINENO"; then :
14095
14096 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14097
14098
14099$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14100
14101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14102$as_echo "yes" >&6; }
14103
14104else
14105
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14107$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014111
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014117 CFLAGS=$OLD_CFLAGS
14118
14119else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 for ac_func in gethostbyname
14122do :
14123 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014126#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014127_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014128
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014129fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014130done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014131
Michael W. Hudson54241132001-12-07 15:38:26 +000014132
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014133fi
14134
Michael W. Hudson54241132001-12-07 15:38:26 +000014135
14136
14137
14138
14139
14140
Guido van Rossum627b2d71993-12-24 10:39:16 +000014141# checks for system services
14142# (none yet)
14143
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014144# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014145ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014146if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014147
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014148else
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14150$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014151if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014155LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159/* Override any GCC internal prototype to avoid an error.
14160 Use char because int might match the return type of a GCC
14161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014162#ifdef __cplusplus
14163extern "C"
14164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014165char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014166int
14167main ()
14168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 ;
14171 return 0;
14172}
14173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014174if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014176else
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014179rm -f core conftest.err conftest.$ac_objext \
14180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014181LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14184$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014185if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 cat >>confdefs.h <<_ACEOF
14187#define HAVE_LIBIEEE 1
14188_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014190 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014191
Guido van Rossum627b2d71993-12-24 10:39:16 +000014192fi
14193
Michael W. Hudson54241132001-12-07 15:38:26 +000014194
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014195fi
14196
Michael W. Hudson54241132001-12-07 15:38:26 +000014197
Guido van Rossum7f43da71994-08-01 12:15:30 +000014198# check for --with-libm=...
14199
Guido van Rossum563e7081996-09-10 18:20:48 +000014200case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014201Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014202*) LIBM=-lm
14203esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14205$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014208if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014210if test "$withval" = no
14211then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14213$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014214elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014215then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14217$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014218else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014219fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14222$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223fi
14224
Guido van Rossum7f43da71994-08-01 12:15:30 +000014225
14226# check for --with-libc=...
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14229$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014232if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014234if test "$withval" = no
14235then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14237$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014238elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014239then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14241$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014242else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014243fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14246$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247fi
14248
Guido van Rossum7f43da71994-08-01 12:15:30 +000014249
Stefan Krah1919b7e2012-03-21 18:25:23 +010014250# **************************************
14251# * Check for gcc x64 inline assembler *
14252# **************************************
14253
14254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14255$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14257/* end confdefs.h. */
14258
14259int
14260main ()
14261{
14262
14263 __asm__ __volatile__ ("movq %rcx, %rax");
14264
14265 ;
14266 return 0;
14267}
14268_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014269if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014270 have_gcc_asm_for_x64=yes
14271else
14272 have_gcc_asm_for_x64=no
14273fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014274rm -f core conftest.err conftest.$ac_objext \
14275 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14277$as_echo "$have_gcc_asm_for_x64" >&6; }
14278if test "$have_gcc_asm_for_x64" = yes
14279then
14280
14281$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14282
14283fi
14284
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014285# **************************************************
14286# * Check for various properties of floating point *
14287# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014288
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14290$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14291if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014293else
14294
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014295
14296ax_cv_c_float_words_bigendian=unknown
14297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298/* end confdefs.h. */
14299
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014300
14301double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14302
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014303
14304_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014305if ac_fn_c_try_compile "$LINENO"; then :
14306
14307
14308if grep noonsees conftest.$ac_objext >/dev/null ; then
14309 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014310fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014311if grep seesnoon conftest.$ac_objext >/dev/null ; then
14312 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14313 ax_cv_c_float_words_bigendian=no
14314 else
14315 ax_cv_c_float_words_bigendian=unknown
14316 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014317fi
14318
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014319
14320fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014322fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14324$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014326case $ax_cv_c_float_words_bigendian in
14327 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014329$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14330 ;;
14331 no)
14332 ;;
14333 *)
14334 as_fn_error $? "
14335
14336Unknown float word ordering. You need to manually preset
14337ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14338
14339 " "$LINENO" 5 ;;
14340esac
14341
14342
14343if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014344then
14345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014347
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014348elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014349then
14350
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014351$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14352
14353else
14354 # Some ARM platforms use a mixed-endian representation for doubles.
14355 # While Python doesn't currently have full support for these platforms
14356 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14357 # conversions work.
14358 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14359 # or little, then it must be this?
14360
Matthias Kloseb9621712010-04-24 17:59:49 +000014361$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014362
14363fi
14364
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014365# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014366# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014367# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014368# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014369# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014370# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014371
14372# This inline assembler syntax may also work for suncc and icc,
14373# so we try it on all platforms.
14374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14376$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014378/* end confdefs.h. */
14379
14380int
14381main ()
14382{
14383
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014384 unsigned short cw;
14385 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14386 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014387
14388 ;
14389 return 0;
14390}
14391_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014392if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014393 have_gcc_asm_for_x87=yes
14394else
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014396fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014397rm -f core conftest.err conftest.$ac_objext \
14398 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14400$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014401if test "$have_gcc_asm_for_x87" = yes
14402then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014405
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14409$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14411/* end confdefs.h. */
14412
14413int
14414main ()
14415{
14416
14417 unsigned int fpcr;
14418 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14419 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14420
14421 ;
14422 return 0;
14423}
14424_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014425if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014426 have_gcc_asm_for_mc68881=yes
14427else
14428 have_gcc_asm_for_mc68881=no
14429fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014430rm -f core conftest.err conftest.$ac_objext \
14431 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14433$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14434if test "$have_gcc_asm_for_mc68881" = yes
14435then
14436
14437$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14438
14439fi
14440
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014441# Detect whether system arithmetic is subject to x87-style double
14442# rounding issues. The result of this test has little meaning on non
14443# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14444# mode is round-to-nearest and double rounding issues are present, and
14445# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14447$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014448# $BASECFLAGS may affect the result
14449ac_save_cc="$CC"
14450CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014451if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014452 ac_cv_x87_double_rounding=no
14453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014455/* end confdefs.h. */
14456
14457#include <stdlib.h>
14458#include <math.h>
14459int main() {
14460 volatile double x, y, z;
14461 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14462 x = 0.99999999999999989; /* 1-2**-53 */
14463 y = 1./x;
14464 if (y != 1.)
14465 exit(0);
14466 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14467 x = 1e16;
14468 y = 2.99999;
14469 z = x + y;
14470 if (z != 1e16+4.)
14471 exit(0);
14472 /* both tests show evidence of double rounding */
14473 exit(1);
14474}
14475
14476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014477if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014478 ac_cv_x87_double_rounding=no
14479else
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14483 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014484fi
14485
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014486CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14488$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014489if test "$ac_cv_x87_double_rounding" = yes
14490then
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014493
14494fi
14495
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014496# ************************************
14497# * Check for mathematical functions *
14498# ************************************
14499
14500LIBS_SAVE=$LIBS
14501LIBS="$LIBS $LIBM"
14502
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014503for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14504do :
14505 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14506ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014507if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014508 cat >>confdefs.h <<_ACEOF
14509#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14510_ACEOF
14511
14512fi
14513done
14514
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014515for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014516do :
14517 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14518ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014519if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014520 cat >>confdefs.h <<_ACEOF
14521#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14522_ACEOF
14523
14524fi
14525done
14526
14527ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14528"
Victor Stinnere0be4232011-10-25 13:06:09 +020014529if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014530 ac_have_decl=1
14531else
14532 ac_have_decl=0
14533fi
14534
14535cat >>confdefs.h <<_ACEOF
14536#define HAVE_DECL_ISINF $ac_have_decl
14537_ACEOF
14538ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14539"
Victor Stinnere0be4232011-10-25 13:06:09 +020014540if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014541 ac_have_decl=1
14542else
14543 ac_have_decl=0
14544fi
14545
14546cat >>confdefs.h <<_ACEOF
14547#define HAVE_DECL_ISNAN $ac_have_decl
14548_ACEOF
14549ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14550"
Victor Stinnere0be4232011-10-25 13:06:09 +020014551if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014552 ac_have_decl=1
14553else
14554 ac_have_decl=0
14555fi
14556
14557cat >>confdefs.h <<_ACEOF
14558#define HAVE_DECL_ISFINITE $ac_have_decl
14559_ACEOF
14560
14561
Mark Dickinsona614f042009-11-28 12:48:43 +000014562# For multiprocessing module, check that sem_open
14563# actually works. For FreeBSD versions <= 7.2,
14564# the kernel module that provides POSIX semaphores
14565# isn't loaded by default, so an attempt to call
14566# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14568$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014569if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014573 ac_cv_posix_semaphores_enabled=yes
14574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014576/* end confdefs.h. */
14577
14578#include <unistd.h>
14579#include <fcntl.h>
14580#include <stdio.h>
14581#include <semaphore.h>
14582#include <sys/stat.h>
14583
14584int main(void) {
14585 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14586 if (a == SEM_FAILED) {
14587 perror("sem_open");
14588 return 1;
14589 }
14590 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014591 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014592 return 0;
14593}
14594
14595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014596if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014597 ac_cv_posix_semaphores_enabled=yes
14598else
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014603fi
14604
14605
Mark Dickinsona614f042009-11-28 12:48:43 +000014606fi
14607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14609$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014610if test $ac_cv_posix_semaphores_enabled = no
14611then
14612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014614
14615fi
14616
Mark Dickinson10683072009-04-18 21:18:19 +000014617# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14619$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014620if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014622else
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014624 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014625else
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014627/* end confdefs.h. */
14628
14629#include <unistd.h>
14630#include <fcntl.h>
14631#include <stdio.h>
14632#include <semaphore.h>
14633#include <sys/stat.h>
14634
14635int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014636 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014637 int count;
14638 int res;
14639 if(a==SEM_FAILED){
14640 perror("sem_open");
14641 return 1;
14642
14643 }
14644 res = sem_getvalue(a, &count);
14645 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014646 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014647 return res==-1 ? 1 : 0;
14648}
14649
Mark Dickinson10683072009-04-18 21:18:19 +000014650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014651if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014652 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014653else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014658fi
14659
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014661fi
14662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14664$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014665if test $ac_cv_broken_sem_getvalue = yes
14666then
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014669
14670fi
14671
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014672ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14673"
14674if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14675 ac_have_decl=1
14676else
14677 ac_have_decl=0
14678fi
14679
14680cat >>confdefs.h <<_ACEOF
14681#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14682_ACEOF
14683ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14684"
14685if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14686 ac_have_decl=1
14687else
14688 ac_have_decl=0
14689fi
14690
14691cat >>confdefs.h <<_ACEOF
14692#define HAVE_DECL_RTLD_NOW $ac_have_decl
14693_ACEOF
14694ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14695"
14696if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14697 ac_have_decl=1
14698else
14699 ac_have_decl=0
14700fi
14701
14702cat >>confdefs.h <<_ACEOF
14703#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14704_ACEOF
14705ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14706"
14707if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14708 ac_have_decl=1
14709else
14710 ac_have_decl=0
14711fi
14712
14713cat >>confdefs.h <<_ACEOF
14714#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14715_ACEOF
14716ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14717"
14718if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14719 ac_have_decl=1
14720else
14721 ac_have_decl=0
14722fi
14723
14724cat >>confdefs.h <<_ACEOF
14725#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14726_ACEOF
14727ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14728"
14729if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14730 ac_have_decl=1
14731else
14732 ac_have_decl=0
14733fi
14734
14735cat >>confdefs.h <<_ACEOF
14736#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14737_ACEOF
14738ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14739"
14740if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14741 ac_have_decl=1
14742else
14743 ac_have_decl=0
14744fi
14745
14746cat >>confdefs.h <<_ACEOF
14747#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14748_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014749ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14750"
14751if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14752 ac_have_decl=1
14753else
14754 ac_have_decl=0
14755fi
14756
14757cat >>confdefs.h <<_ACEOF
14758#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14759_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014760
14761
Mark Dickinsonbd792642009-03-18 20:06:12 +000014762# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14764$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014765# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014766if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014767 enableval=$enable_big_digits; case $enable_big_digits in
14768yes)
14769 enable_big_digits=30 ;;
14770no)
14771 enable_big_digits=15 ;;
1477215|30)
14773 ;;
14774*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014775 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 +000014776esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14778$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014779
14780cat >>confdefs.h <<_ACEOF
14781#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14782_ACEOF
14783
14784
14785else
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14787$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014788fi
14789
14790
Guido van Rossumef2255b2000-03-10 22:30:29 +000014791# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014792ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014793if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
14795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014798 wchar_h="yes"
14799
Guido van Rossumef2255b2000-03-10 22:30:29 +000014800else
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014802
14803fi
14804
Michael W. Hudson54241132001-12-07 15:38:26 +000014805
Martin v. Löwis11437992002-04-12 09:54:03 +000014806
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014807# determine wchar_t size
14808if test "$wchar_h" = yes
14809then
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14815$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014816if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014818else
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14820"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
Martin v. Löwis11437992002-04-12 09:54:03 +000014822else
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 if test "$ac_cv_type_wchar_t" = yes; then
14824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014826as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014827See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828 else
14829 ac_cv_sizeof_wchar_t=0
14830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832
Martin v. Löwis11437992002-04-12 09:54:03 +000014833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14835$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836
14837
14838
Martin v. Löwis11437992002-04-12 09:54:03 +000014839cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014840#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014841_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014842
Michael W. Hudson54241132001-12-07 15:38:26 +000014843
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014844fi
14845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14847$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014848have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014850/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014851
14852#include <tcl.h>
14853#if TCL_UTF_MAX != 6
14854# error "NOT UCS4_TCL"
14855#endif
14856int
14857main ()
14858{
14859
14860 ;
14861 return 0;
14862}
14863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014865
14866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014868
14869 have_ucs4_tcl=yes
14870
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14874$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014875
Skip Montanaro6dead952003-09-25 14:50:04 +000014876# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014877if test "$wchar_h" = yes
14878then
14879 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14881$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014882 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014884else
14885
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014887 ac_cv_wchar_t_signed=yes
14888else
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014890/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014891
14892 #include <wchar.h>
14893 int main()
14894 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014895 /* Success: exit code 0 */
14896 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014897 }
14898
14899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014900if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014901 ac_cv_wchar_t_signed=yes
14902else
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014907fi
14908
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014909fi
14910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14912$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913fi
14914
Michael Osipov3738fad2018-08-24 18:17:19 +020014915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14916$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014917# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014918if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014919 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014920then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
Michael Osipov3738fad2018-08-24 18:17:19 +020014924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14925$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014926else
Michael Osipov3738fad2018-08-24 18:17:19 +020014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14928$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014929fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014930
14931# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14933$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014934if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014936else
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 ac_cv_c_bigendian=unknown
14938 # See if we're dealing with a universal compiler.
14939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14940/* end confdefs.h. */
14941#ifndef __APPLE_CC__
14942 not a universal capable compiler
14943 #endif
14944 typedef int dummy;
14945
Skip Montanaro6dead952003-09-25 14:50:04 +000014946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014947if ac_fn_c_try_compile "$LINENO"; then :
14948
14949 # Check for potential -arch flags. It is not universal unless
14950 # there are at least two -arch flags with different values.
14951 ac_arch=
14952 ac_prev=
14953 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14954 if test -n "$ac_prev"; then
14955 case $ac_word in
14956 i?86 | x86_64 | ppc | ppc64)
14957 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14958 ac_arch=$ac_word
14959 else
14960 ac_cv_c_bigendian=universal
14961 break
14962 fi
14963 ;;
14964 esac
14965 ac_prev=
14966 elif test "x$ac_word" = "x-arch"; then
14967 ac_prev=arch
14968 fi
14969 done
14970fi
14971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14972 if test $ac_cv_c_bigendian = unknown; then
14973 # See if sys/param.h defines the BYTE_ORDER macro.
14974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014975/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014976#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014978
Martin v. Löwis11437992002-04-12 09:54:03 +000014979int
14980main ()
14981{
Matthias Kloseb9621712010-04-24 17:59:49 +000014982#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14983 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14984 && LITTLE_ENDIAN)
14985 bogus endian macros
14986 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
14988 ;
14989 return 0;
14990}
14991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014992if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014993 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014995/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014996#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014998
Martin v. Löwis11437992002-04-12 09:54:03 +000014999int
15000main ()
15001{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015002#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 not big endian
15004 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
15006 ;
15007 return 0;
15008}
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015011 ac_cv_c_bigendian=yes
15012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015016fi
15017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15018 fi
15019 if test $ac_cv_c_bigendian = unknown; then
15020 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015022/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015023#include <limits.h>
15024
Martin v. Löwis11437992002-04-12 09:54:03 +000015025int
15026main ()
15027{
Matthias Kloseb9621712010-04-24 17:59:49 +000015028#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15029 bogus endian macros
15030 #endif
15031
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ;
15033 return 0;
15034}
15035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015036if ac_fn_c_try_compile "$LINENO"; then :
15037 # It does; now see whether it defined to _BIG_ENDIAN or not.
15038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15039/* end confdefs.h. */
15040#include <limits.h>
15041
15042int
15043main ()
15044{
15045#ifndef _BIG_ENDIAN
15046 not big endian
15047 #endif
15048
15049 ;
15050 return 0;
15051}
15052_ACEOF
15053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15059fi
15060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15061 fi
15062 if test $ac_cv_c_bigendian = unknown; then
15063 # Compile a test program.
15064 if test "$cross_compiling" = yes; then :
15065 # Try to guess by grepping values from an object file.
15066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15067/* end confdefs.h. */
15068short int ascii_mm[] =
15069 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15070 short int ascii_ii[] =
15071 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15072 int use_ascii (int i) {
15073 return ascii_mm[i] + ascii_ii[i];
15074 }
15075 short int ebcdic_ii[] =
15076 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15077 short int ebcdic_mm[] =
15078 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15079 int use_ebcdic (int i) {
15080 return ebcdic_mm[i] + ebcdic_ii[i];
15081 }
15082 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084int
15085main ()
15086{
15087return use_ascii (foo) == use_ebcdic (foo);
15088 ;
15089 return 0;
15090}
15091_ACEOF
15092if ac_fn_c_try_compile "$LINENO"; then :
15093 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15094 ac_cv_c_bigendian=yes
15095 fi
15096 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15097 if test "$ac_cv_c_bigendian" = unknown; then
15098 ac_cv_c_bigendian=no
15099 else
15100 # finding both strings is unlikely to happen, but who knows?
15101 ac_cv_c_bigendian=unknown
15102 fi
15103 fi
15104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015106else
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015108/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015110int
15111main ()
15112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 /* Are we little or big endian? From Harbison&Steele. */
15115 union
15116 {
15117 long int l;
15118 char c[sizeof (long int)];
15119 } u;
15120 u.l = 1;
15121 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122
15123 ;
15124 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125}
Martin v. Löwis11437992002-04-12 09:54:03 +000015126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015127if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015128 ac_cv_c_bigendian=no
15129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15133 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15139$as_echo "$ac_cv_c_bigendian" >&6; }
15140 case $ac_cv_c_bigendian in #(
15141 yes)
15142 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15143;; #(
15144 no)
15145 ;; #(
15146 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 ;; #(
15151 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015152 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015153 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015155
Michael W. Hudson54241132001-12-07 15:38:26 +000015156
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015157# ABI version string for Python extension modules. This appears between the
15158# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15159# from the following attributes which affect the ABI of this Python build (in
15160# this order):
15161#
15162# * The Python implementation (always 'cpython-' for us)
15163# * The major and minor version numbers
15164# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015165#
15166# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015167# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15168# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015169#
15170# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15171# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015172
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15174$as_echo_n "checking ABIFLAGS... " >&6; }
15175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15176$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15178$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015179SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15181$as_echo "$SOABI" >&6; }
15182
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015183# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15184if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015185 # Similar to SOABI but remove "d" flag from ABIFLAGS
15186
15187 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15188
15189cat >>confdefs.h <<_ACEOF
15190#define ALT_SOABI "${ALT_SOABI}"
15191_ACEOF
15192
15193fi
15194
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015195
15196case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015197 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015198 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15199 *)
15200 EXT_SUFFIX=${SHLIB_SUFFIX};;
15201esac
15202
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15204$as_echo_n "checking LDVERSION... " >&6; }
15205LDVERSION='$(VERSION)$(ABIFLAGS)'
15206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15207$as_echo "$LDVERSION" >&6; }
15208
E. M. Brayc994c8f2019-05-24 17:33:47 +020015209# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015210
E. M. Brayb1fc4172019-05-24 18:39:39 +020015211if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015212 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015213else
15214 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015215fi
15216
doko@python.org87421192013-01-26 11:39:31 +010015217
doko@ubuntu.com55532312016-06-14 08:55:19 +020015218if test x$PLATFORM_TRIPLET = x; then
15219 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15220else
15221 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15222fi
doko@python.org87421192013-01-26 11:39:31 +010015223
15224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015225# Check whether right shifting a negative integer extends the sign bit
15226# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15228$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015229if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015231else
Martin v. Löwis11437992002-04-12 09:54:03 +000015232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015234 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015235else
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015237/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015238
15239int main()
15240{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015241 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015242}
15243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015245if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015246 ac_cv_rshift_extends_sign=yes
15247else
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015252fi
15253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254fi
15255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15257$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015258if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015259then
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015262
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015263fi
15264
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015265# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15267$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015268if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015270else
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015273/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015274#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015275int
15276main ()
15277{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015278
15279 FILE *f = fopen("/dev/null", "r");
15280 flockfile(f);
15281 getc_unlocked(f);
15282 funlockfile(f);
15283
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ;
15285 return 0;
15286}
15287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015288if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015289 ac_cv_have_getc_unlocked=yes
15290else
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 ac_cv_have_getc_unlocked=no
15292fi
15293rm -f core conftest.err conftest.$ac_objext \
15294 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296
Matthias Kloseb9621712010-04-24 17:59:49 +000015297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15298$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015299if test "$ac_cv_have_getc_unlocked" = yes
15300then
Martin v. Löwis11437992002-04-12 09:54:03 +000015301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015303
15304fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015305
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015306# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015307# save the value of LIBS so we don't actually link Python with readline
15308LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015309
Gregory P. Smith18820942008-09-07 06:24:49 +000015310# On some systems we need to link readline to a termcap compatible
15311# library. NOTE: Keep the precedence of listed libraries synchronised
15312# with setup.py.
15313py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15315$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015316for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015317 if test -z "$py_libtermcap"; then
15318 READLINE_LIBS="-lreadline"
15319 else
15320 READLINE_LIBS="-lreadline -l$py_libtermcap"
15321 fi
15322 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015324/* end confdefs.h. */
15325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015326/* Override any GCC internal prototype to avoid an error.
15327 Use char because int might match the return type of a GCC
15328 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015329#ifdef __cplusplus
15330extern "C"
15331#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015332char readline ();
15333int
15334main ()
15335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015337 ;
15338 return 0;
15339}
15340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015341if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015342 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015344rm -f core conftest.err conftest.$ac_objext \
15345 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015346 if test $py_cv_lib_readline = yes; then
15347 break
15348 fi
15349done
15350# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15351#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015352if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15354$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015355else
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15357$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015360
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015361fi
15362
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015363# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015365/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015366#include <readline/readline.h>
15367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015368if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015369 have_readline=yes
15370else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015371 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015372
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015373fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015374rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015375if test $have_readline = yes
15376then
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015378/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015379#include <readline/readline.h>
15380
15381_ACEOF
15382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015386
15387fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015388rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015391/* end confdefs.h. */
15392#include <readline/readline.h>
15393
15394_ACEOF
15395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015399
15400fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015401rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015402
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015403fi
15404
Martin v. Löwis0daad592001-09-30 21:09:59 +000015405# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15407$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015408if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015410else
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015412LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015416/* Override any GCC internal prototype to avoid an error.
15417 Use char because int might match the return type of a GCC
15418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015419#ifdef __cplusplus
15420extern "C"
15421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015422char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015423int
15424main ()
15425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015426return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ;
15428 return 0;
15429}
15430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015433else
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015436rm -f core conftest.err conftest.$ac_objext \
15437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015438LIBS=$ac_check_lib_save_LIBS
15439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15441$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015442if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015443
Matthias Kloseb9621712010-04-24 17:59:49 +000015444$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015445
Martin v. Löwis0daad592001-09-30 21:09:59 +000015446fi
15447
Michael W. Hudson54241132001-12-07 15:38:26 +000015448
Thomas Wouters89d996e2007-09-08 17:39:28 +000015449# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15451$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015452if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015454else
15455 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015456LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015458/* end confdefs.h. */
15459
15460/* Override any GCC internal prototype to avoid an error.
15461 Use char because int might match the return type of a GCC
15462 builtin and then its argument prototype would still apply. */
15463#ifdef __cplusplus
15464extern "C"
15465#endif
15466char rl_completion_display_matches_hook ();
15467int
15468main ()
15469{
15470return rl_completion_display_matches_hook ();
15471 ;
15472 return 0;
15473}
15474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015475if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015476 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015480rm -f core conftest.err conftest.$ac_objext \
15481 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015482LIBS=$ac_check_lib_save_LIBS
15483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15485$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015486if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015489
15490fi
15491
15492
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015493# also in 4.0, but not in editline
15494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15495$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15496if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15497 $as_echo_n "(cached) " >&6
15498else
15499 ac_check_lib_save_LIBS=$LIBS
15500LIBS="-lreadline $READLINE_LIBS $LIBS"
15501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15502/* end confdefs.h. */
15503
15504/* Override any GCC internal prototype to avoid an error.
15505 Use char because int might match the return type of a GCC
15506 builtin and then its argument prototype would still apply. */
15507#ifdef __cplusplus
15508extern "C"
15509#endif
15510char rl_resize_terminal ();
15511int
15512main ()
15513{
15514return rl_resize_terminal ();
15515 ;
15516 return 0;
15517}
15518_ACEOF
15519if ac_fn_c_try_link "$LINENO"; then :
15520 ac_cv_lib_readline_rl_resize_terminal=yes
15521else
15522 ac_cv_lib_readline_rl_resize_terminal=no
15523fi
15524rm -f core conftest.err conftest.$ac_objext \
15525 conftest$ac_exeext conftest.$ac_ext
15526LIBS=$ac_check_lib_save_LIBS
15527fi
15528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15529$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15530if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15531
15532$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15533
15534fi
15535
15536
Martin v. Löwis0daad592001-09-30 21:09:59 +000015537# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15539$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015540if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015542else
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015544LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548/* Override any GCC internal prototype to avoid an error.
15549 Use char because int might match the return type of a GCC
15550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015551#ifdef __cplusplus
15552extern "C"
15553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015554char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015555int
15556main ()
15557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 ;
15560 return 0;
15561}
15562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015565else
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015568rm -f core conftest.err conftest.$ac_objext \
15569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015570LIBS=$ac_check_lib_save_LIBS
15571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15573$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015574if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015577
Guido van Rossum353ae582001-07-10 16:45:32 +000015578fi
15579
Jack Jansendd19cf82001-12-06 22:36:17 +000015580
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015581# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015583/* end confdefs.h. */
15584#include <readline/readline.h>
15585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015586if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015587 have_readline=yes
15588else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015589 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015590
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015591fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015592rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015593if test $have_readline = yes
15594then
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015596/* end confdefs.h. */
15597#include <readline/readline.h>
15598
15599_ACEOF
15600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015604
15605fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015606rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015607
15608fi
15609
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15611$as_echo_n "checking for append_history in -lreadline... " >&6; }
15612if ${ac_cv_lib_readline_append_history+:} false; then :
15613 $as_echo_n "(cached) " >&6
15614else
15615 ac_check_lib_save_LIBS=$LIBS
15616LIBS="-lreadline $READLINE_LIBS $LIBS"
15617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15618/* end confdefs.h. */
15619
15620/* Override any GCC internal prototype to avoid an error.
15621 Use char because int might match the return type of a GCC
15622 builtin and then its argument prototype would still apply. */
15623#ifdef __cplusplus
15624extern "C"
15625#endif
15626char append_history ();
15627int
15628main ()
15629{
15630return append_history ();
15631 ;
15632 return 0;
15633}
15634_ACEOF
15635if ac_fn_c_try_link "$LINENO"; then :
15636 ac_cv_lib_readline_append_history=yes
15637else
15638 ac_cv_lib_readline_append_history=no
15639fi
15640rm -f core conftest.err conftest.$ac_objext \
15641 conftest$ac_exeext conftest.$ac_ext
15642LIBS=$ac_check_lib_save_LIBS
15643fi
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15645$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15646if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15647
15648$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15649
15650fi
15651
15652
Martin v. Löwis82bca632006-02-10 20:49:30 +000015653# End of readline checks: restore LIBS
15654LIBS=$LIBS_no_readline
15655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15657$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015658if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015660else
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015663 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015664else
Matthias Kloseb9621712010-04-24 17:59:49 +000015665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015666/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015667
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015668#include <stdlib.h>
15669#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015670int main()
15671{
15672 int val1 = nice(1);
15673 if (val1 != -1 && val1 == nice(2))
15674 exit(0);
15675 exit(1);
15676}
15677
Martin v. Löwis11437992002-04-12 09:54:03 +000015678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015680 ac_cv_broken_nice=yes
15681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015686fi
15687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688fi
15689
Matthias Kloseb9621712010-04-24 17:59:49 +000015690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15691$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015692if test "$ac_cv_broken_nice" = yes
15693then
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Matthias Kloseb9621712010-04-24 17:59:49 +000015695$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015696
15697fi
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15700$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015701if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015705 ac_cv_broken_poll=no
15706else
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015708/* end confdefs.h. */
15709
15710#include <poll.h>
15711
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015712int main()
15713{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015714 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015715 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015716
15717 close (42);
15718
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015719 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015720 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015721 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015722 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015723 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015724 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015725 return 1;
15726}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015727
15728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015729if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015730 ac_cv_broken_poll=yes
15731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015738fi
15739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15741$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015742if test "$ac_cv_broken_poll" = yes
15743then
15744
Matthias Kloseb9621712010-04-24 17:59:49 +000015745$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015746
15747fi
15748
Martin v. Löwis1d459062005-03-14 21:23:33 +000015749# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15751$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015752if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754else
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015757 ac_cv_working_tzset=no
15758else
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015760/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015761
15762#include <stdlib.h>
15763#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015764#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015765
15766#if HAVE_TZNAME
15767extern char *tzname[];
15768#endif
15769
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015770int main()
15771{
Brett Cannon18367812003-09-19 00:59:16 +000015772 /* Note that we need to ensure that not only does tzset(3)
15773 do 'something' with localtime, but it works as documented
15774 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015775 This includes making sure that tzname is set properly if
15776 tm->tm_zone does not exist since it is the alternative way
15777 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015778
15779 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015780 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015781 */
15782
Martin v. Löwis1d459062005-03-14 21:23:33 +000015783 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015784 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15785
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015786 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015787 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015788 if (localtime(&groundhogday)->tm_hour != 0)
15789 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015790#if HAVE_TZNAME
15791 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15792 if (strcmp(tzname[0], "UTC") ||
15793 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15794 exit(1);
15795#endif
Brett Cannon18367812003-09-19 00:59:16 +000015796
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015797 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015798 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015799 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015800 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015801#if HAVE_TZNAME
15802 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15803 exit(1);
15804#endif
Brett Cannon18367812003-09-19 00:59:16 +000015805
15806 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15807 tzset();
15808 if (localtime(&groundhogday)->tm_hour != 11)
15809 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015810#if HAVE_TZNAME
15811 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15812 exit(1);
15813#endif
15814
15815#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015816 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15817 exit(1);
15818 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15819 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015820#endif
Brett Cannon18367812003-09-19 00:59:16 +000015821
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015822 exit(0);
15823}
15824
15825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015826if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015827 ac_cv_working_tzset=yes
15828else
Matthias Kloseb9621712010-04-24 17:59:49 +000015829 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015833fi
15834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835fi
15836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15838$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015839if test "$ac_cv_working_tzset" = yes
15840then
15841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015843
15844fi
15845
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015846# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15848$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015849if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015851else
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015853/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015854#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015855int
15856main ()
15857{
15858
15859struct stat st;
15860st.st_mtim.tv_nsec = 1;
15861
15862 ;
15863 return 0;
15864}
15865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015867 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015868else
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15872fi
15873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15875$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015876if test "$ac_cv_stat_tv_nsec" = yes
15877then
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015880
15881fi
15882
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015883# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15885$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015886if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015888else
Matthias Kloseb9621712010-04-24 17:59:49 +000015889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015890/* end confdefs.h. */
15891#include <sys/stat.h>
15892int
15893main ()
15894{
15895
15896struct stat st;
15897st.st_mtimespec.tv_nsec = 1;
15898
15899 ;
15900 return 0;
15901}
15902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015904 ac_cv_stat_tv_nsec2=yes
15905else
Matthias Kloseb9621712010-04-24 17:59:49 +000015906 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15909fi
15910
Matthias Kloseb9621712010-04-24 17:59:49 +000015911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15912$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015913if test "$ac_cv_stat_tv_nsec2" = yes
15914then
15915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015917
15918fi
15919
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015920# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015921ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015922if test "$cross_compiling" = no; then
15923 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15924fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015925
15926for ac_header in curses.h ncurses.h
15927do :
15928 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15929ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15930if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15931 cat >>confdefs.h <<_ACEOF
15932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15933_ACEOF
15934
15935fi
15936
15937done
15938
15939
15940# On Solaris, term.h requires curses.h
15941for ac_header in term.h
15942do :
15943 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15944#ifdef HAVE_CURSES_H
15945#include <curses.h>
15946#endif
15947
15948"
15949if test "x$ac_cv_header_term_h" = xyes; then :
15950 cat >>confdefs.h <<_ACEOF
15951#define HAVE_TERM_H 1
15952_ACEOF
15953
15954fi
15955
15956done
15957
15958
Jack Jansen666b1e72001-10-31 12:11:48 +000015959# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15961$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015962if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015964else
Matthias Kloseb9621712010-04-24 17:59:49 +000015965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015966/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015967#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015968int
15969main ()
15970{
Jack Jansen666b1e72001-10-31 12:11:48 +000015971
15972 int rtn;
15973 rtn = mvwdelch(0,0,0);
15974
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 ;
15976 return 0;
15977}
15978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015979if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015980 ac_cv_mvwdelch_is_expression=yes
15981else
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985fi
15986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15988$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015989
15990if test "$ac_cv_mvwdelch_is_expression" = yes
15991then
Martin v. Löwis11437992002-04-12 09:54:03 +000015992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015994
15995fi
15996
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015997# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15998# structs since version 5.7. If the macro is defined as zero before including
15999# [n]curses.h, ncurses will expose fields of the structs regardless of the
16000# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16002$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016003if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016004 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016005else
Matthias Kloseb9621712010-04-24 17:59:49 +000016006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016007/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016008
16009 #define NCURSES_OPAQUE 0
16010 #include <curses.h>
16011
Martin v. Löwis11437992002-04-12 09:54:03 +000016012int
16013main ()
16014{
Jack Jansen666b1e72001-10-31 12:11:48 +000016015
16016 WINDOW *w;
16017 w->_flags = 0;
16018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 ;
16020 return 0;
16021}
16022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016023if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016024 ac_cv_window_has_flags=yes
16025else
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16029fi
16030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16032$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016033
Jack Jansen666b1e72001-10-31 12:11:48 +000016034
16035if test "$ac_cv_window_has_flags" = yes
16036then
Martin v. Löwis11437992002-04-12 09:54:03 +000016037
Matthias Kloseb9621712010-04-24 17:59:49 +000016038$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016039
16040fi
16041
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16043$as_echo_n "checking for is_pad... " >&6; }
16044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16045/* end confdefs.h. */
16046#include <curses.h>
16047int
16048main ()
16049{
16050
16051#ifndef is_pad
16052void *x=is_pad
16053#endif
16054
16055 ;
16056 return 0;
16057}
16058_ACEOF
16059if ac_fn_c_try_compile "$LINENO"; then :
16060
16061$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16062
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16064$as_echo "yes" >&6; }
16065else
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16067$as_echo "no" >&6; }
16068
16069fi
16070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16073$as_echo_n "checking for is_term_resized... " >&6; }
16074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016075/* end confdefs.h. */
16076#include <curses.h>
16077int
16078main ()
16079{
16080void *x=is_term_resized
16081 ;
16082 return 0;
16083}
16084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016086
Matthias Kloseb9621712010-04-24 17:59:49 +000016087$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016088
Matthias Kloseb159a552010-04-25 21:00:44 +000016089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016090$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016091else
Matthias Kloseb9621712010-04-24 17:59:49 +000016092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16093$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016094
16095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16099$as_echo_n "checking for resize_term... " >&6; }
16100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016101/* end confdefs.h. */
16102#include <curses.h>
16103int
16104main ()
16105{
16106void *x=resize_term
16107 ;
16108 return 0;
16109}
16110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016111if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016112
Matthias Kloseb9621712010-04-24 17:59:49 +000016113$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016114
Matthias Kloseb159a552010-04-25 21:00:44 +000016115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016116$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016117else
Matthias Kloseb9621712010-04-24 17:59:49 +000016118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16119$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016120
16121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16123
Matthias Kloseb9621712010-04-24 17:59:49 +000016124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16125$as_echo_n "checking for resizeterm... " >&6; }
16126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016127/* end confdefs.h. */
16128#include <curses.h>
16129int
16130main ()
16131{
16132void *x=resizeterm
16133 ;
16134 return 0;
16135}
16136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016137if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016140
Matthias Kloseb159a552010-04-25 21:00:44 +000016141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016142$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016143else
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16145$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016146
16147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016149
16150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16151$as_echo_n "checking for immedok... " >&6; }
16152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16153/* end confdefs.h. */
16154#include <curses.h>
16155int
16156main ()
16157{
16158
16159#ifndef immedok
16160void *x=immedok
16161#endif
16162
16163 ;
16164 return 0;
16165}
16166_ACEOF
16167if ac_fn_c_try_compile "$LINENO"; then :
16168
16169$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16170
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16172$as_echo "yes" >&6; }
16173else
16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16175$as_echo "no" >&6; }
16176
16177fi
16178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16179
16180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16181$as_echo_n "checking for syncok... " >&6; }
16182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16183/* end confdefs.h. */
16184#include <curses.h>
16185int
16186main ()
16187{
16188
16189#ifndef syncok
16190void *x=syncok
16191#endif
16192
16193 ;
16194 return 0;
16195}
16196_ACEOF
16197if ac_fn_c_try_compile "$LINENO"; then :
16198
16199$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16200
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16202$as_echo "yes" >&6; }
16203else
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16205$as_echo "no" >&6; }
16206
16207fi
16208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16209
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16211$as_echo_n "checking for wchgat... " >&6; }
16212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16213/* end confdefs.h. */
16214#include <curses.h>
16215int
16216main ()
16217{
16218
16219#ifndef wchgat
16220void *x=wchgat
16221#endif
16222
16223 ;
16224 return 0;
16225}
16226_ACEOF
16227if ac_fn_c_try_compile "$LINENO"; then :
16228
16229$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16230
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16232$as_echo "yes" >&6; }
16233else
16234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16235$as_echo "no" >&6; }
16236
16237fi
16238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16239
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16241$as_echo_n "checking for filter... " >&6; }
16242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16243/* end confdefs.h. */
16244#include <curses.h>
16245int
16246main ()
16247{
16248
16249#ifndef filter
16250void *x=filter
16251#endif
16252
16253 ;
16254 return 0;
16255}
16256_ACEOF
16257if ac_fn_c_try_compile "$LINENO"; then :
16258
16259$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16260
16261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16262$as_echo "yes" >&6; }
16263else
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16265$as_echo "no" >&6; }
16266
16267fi
16268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16269
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16271$as_echo_n "checking for has_key... " >&6; }
16272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273/* end confdefs.h. */
16274#include <curses.h>
16275int
16276main ()
16277{
16278
16279#ifndef has_key
16280void *x=has_key
16281#endif
16282
16283 ;
16284 return 0;
16285}
16286_ACEOF
16287if ac_fn_c_try_compile "$LINENO"; then :
16288
16289$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16290
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16292$as_echo "yes" >&6; }
16293else
16294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16295$as_echo "no" >&6; }
16296
16297fi
16298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16299
16300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16301$as_echo_n "checking for typeahead... " >&6; }
16302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303/* end confdefs.h. */
16304#include <curses.h>
16305int
16306main ()
16307{
16308
16309#ifndef typeahead
16310void *x=typeahead
16311#endif
16312
16313 ;
16314 return 0;
16315}
16316_ACEOF
16317if ac_fn_c_try_compile "$LINENO"; then :
16318
16319$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16320
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16322$as_echo "yes" >&6; }
16323else
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16325$as_echo "no" >&6; }
16326
16327fi
16328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16329
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16331$as_echo_n "checking for use_env... " >&6; }
16332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333/* end confdefs.h. */
16334#include <curses.h>
16335int
16336main ()
16337{
16338
16339#ifndef use_env
16340void *x=use_env
16341#endif
16342
16343 ;
16344 return 0;
16345}
16346_ACEOF
16347if ac_fn_c_try_compile "$LINENO"; then :
16348
16349$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16350
16351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16352$as_echo "yes" >&6; }
16353else
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16355$as_echo "no" >&6; }
16356
16357fi
16358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016359# last curses configure check
16360CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16363$as_echo "$as_me: checking for device files" >&6;}
16364
16365if test "x$cross_compiling" = xyes; then
16366 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16368$as_echo_n "checking for /dev/ptmx... " >&6; }
16369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16370$as_echo "not set" >&6; }
16371 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16372 fi
16373 if test "${ac_cv_file__dev_ptc+set}" != set; then
16374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16375$as_echo_n "checking for /dev/ptc... " >&6; }
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16377$as_echo "not set" >&6; }
16378 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16379 fi
16380fi
16381
Matthias Kloseb9621712010-04-24 17:59:49 +000016382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16383$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016384if ${ac_cv_file__dev_ptmx+:} false; then :
16385 $as_echo_n "(cached) " >&6
16386else
16387 test "$cross_compiling" = yes &&
16388 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16389if test -r "/dev/ptmx"; then
16390 ac_cv_file__dev_ptmx=yes
16391else
16392 ac_cv_file__dev_ptmx=no
16393fi
16394fi
16395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16396$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16397if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016398
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016399fi
16400
16401if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016402
Matthias Kloseb9621712010-04-24 17:59:49 +000016403$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016404
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16407$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016408if ${ac_cv_file__dev_ptc+:} false; then :
16409 $as_echo_n "(cached) " >&6
16410else
16411 test "$cross_compiling" = yes &&
16412 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16413if test -r "/dev/ptc"; then
16414 ac_cv_file__dev_ptc=yes
16415else
16416 ac_cv_file__dev_ptc=no
16417fi
16418fi
16419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16420$as_echo "$ac_cv_file__dev_ptc" >&6; }
16421if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016422
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016423fi
16424
16425if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016426
Matthias Kloseb9621712010-04-24 17:59:49 +000016427$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016428
Neal Norwitz865400f2003-03-21 01:42:58 +000016429fi
16430
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016431if test $ac_sys_system = Darwin
16432then
16433 LIBS="$LIBS -framework CoreFoundation"
16434fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016435
Matthias Kloseb9621712010-04-24 17:59:49 +000016436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16437$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016438if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016440else
Matthias Kloseb9621712010-04-24 17:59:49 +000016441 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016442 ac_cv_have_size_t_format="cross -- assuming yes"
16443
Thomas Wouters477c8d52006-05-27 19:21:47 +000016444else
Matthias Kloseb9621712010-04-24 17:59:49 +000016445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016446/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016447
Thomas Wouters477c8d52006-05-27 19:21:47 +000016448#include <stdio.h>
16449#include <stddef.h>
16450#include <string.h>
16451
Christian Heimes2c181612007-12-17 20:04:13 +000016452#ifdef HAVE_SYS_TYPES_H
16453#include <sys/types.h>
16454#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016455
16456#ifdef HAVE_SSIZE_T
16457typedef ssize_t Py_ssize_t;
16458#elif SIZEOF_VOID_P == SIZEOF_LONG
16459typedef long Py_ssize_t;
16460#else
16461typedef int Py_ssize_t;
16462#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016463
Christian Heimes2c181612007-12-17 20:04:13 +000016464int main()
16465{
16466 char buffer[256];
16467
Thomas Wouters477c8d52006-05-27 19:21:47 +000016468 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16469 return 1;
16470
Thomas Wouters89f507f2006-12-13 04:49:30 +000016471 if (strcmp(buffer, "123"))
16472 return 1;
16473
16474 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16475 return 1;
16476
16477 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016478 return 1;
16479
16480 return 0;
16481}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016482
Thomas Wouters477c8d52006-05-27 19:21:47 +000016483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016484if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016485 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016486else
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016491fi
16492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16495$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016496if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016497
Matthias Kloseb9621712010-04-24 17:59:49 +000016498$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016499
16500fi
16501
Matthias Kloseb9621712010-04-24 17:59:49 +000016502ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016503#ifdef HAVE_SYS_TYPES_H
16504#include <sys/types.h>
16505#endif
16506#ifdef HAVE_SYS_SOCKET_H
16507#include <sys/socket.h>
16508#endif
16509
Matthias Kloseb9621712010-04-24 17:59:49 +000016510"
Victor Stinnere0be4232011-10-25 13:06:09 +020016511if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016512
Martin v. Löwis11437992002-04-12 09:54:03 +000016513else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016514
Matthias Kloseb9621712010-04-24 17:59:49 +000016515$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016516
16517fi
16518
Michael W. Hudson54241132001-12-07 15:38:26 +000016519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16521$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016522if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016523 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016524else
Matthias Kloseb9621712010-04-24 17:59:49 +000016525 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016526 ac_cv_broken_mbstowcs=no
16527else
Matthias Kloseb9621712010-04-24 17:59:49 +000016528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016529/* end confdefs.h. */
16530
Stefan Krah19c21392012-11-22 23:47:32 +010016531#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016532#include<stdlib.h>
16533int main() {
16534 size_t len = -1;
16535 const char *str = "text";
16536 len = mbstowcs(NULL, str, 0);
16537 return (len != 4);
16538}
16539
16540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016541if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016542 ac_cv_broken_mbstowcs=no
16543else
Matthias Kloseb9621712010-04-24 17:59:49 +000016544 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016548fi
16549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016550fi
16551
Matthias Kloseb9621712010-04-24 17:59:49 +000016552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16553$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016554if test "$ac_cv_broken_mbstowcs" = yes
16555then
16556
Matthias Kloseb9621712010-04-24 17:59:49 +000016557$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016558
16559fi
16560
Antoine Pitroub52ec782009-01-25 16:34:23 +000016561# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16563$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016564
16565# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016566if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016567 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016568if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016569then
16570
Matthias Kloseb9621712010-04-24 17:59:49 +000016571$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016572
Matthias Kloseb9621712010-04-24 17:59:49 +000016573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16574$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016575fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016576if test "$withval" = no
16577then
16578
16579$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16580
Matthias Kloseb9621712010-04-24 17:59:49 +000016581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16582$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016583fi
16584
Antoine Pitrou042b1282010-08-13 21:15:58 +000016585else
16586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16587$as_echo "no value specified" >&6; }
16588fi
16589
Antoine Pitroub52ec782009-01-25 16:34:23 +000016590
Matthias Kloseb17289e2012-03-15 19:51:34 +010016591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16592$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16593if ${ac_cv_computed_gotos+:} false; then :
16594 $as_echo_n "(cached) " >&6
16595else
16596 if test "$cross_compiling" = yes; then :
16597 if test "${with_computed_gotos+set}" = set; then
16598 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16599 else
16600 ac_cv_computed_gotos=no
16601 fi
16602else
16603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16604/* end confdefs.h. */
16605
16606int main(int argc, char **argv)
16607{
16608 static void *targets[1] = { &&LABEL1 };
16609 goto LABEL2;
16610LABEL1:
16611 return 0;
16612LABEL2:
16613 goto *targets[0];
16614 return 1;
16615}
16616
16617_ACEOF
16618if ac_fn_c_try_run "$LINENO"; then :
16619 ac_cv_computed_gotos=yes
16620else
16621 ac_cv_computed_gotos=no
16622fi
16623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16624 conftest.$ac_objext conftest.beam conftest.$ac_ext
16625fi
16626
16627fi
16628
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16630$as_echo "$ac_cv_computed_gotos" >&6; }
16631case "$ac_cv_computed_gotos" in yes*)
16632
16633$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16634
16635esac
16636
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016637case $ac_sys_system in
16638AIX*)
16639
16640$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16641 ;;
16642esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016643
Michael W. Hudson54241132001-12-07 15:38:26 +000016644
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016645
16646
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016647for h in `(cd $srcdir;echo Python/thread_*.h)`
16648do
16649 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16650done
16651
Michael W. Hudson54241132001-12-07 15:38:26 +000016652
Victor Stinner21a74a92019-04-11 22:28:12 +020016653SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16655$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016656for dir in $SRCDIRS; do
16657 if test ! -d $dir; then
16658 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016659 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016660done
Matthias Kloseb9621712010-04-24 17:59:49 +000016661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16662$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016663
Stefan Krah1919b7e2012-03-21 18:25:23 +010016664# Availability of -O2:
16665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16666$as_echo_n "checking for -O2... " >&6; }
16667saved_cflags="$CFLAGS"
16668CFLAGS="-O2"
16669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16670/* end confdefs.h. */
16671
16672int
16673main ()
16674{
16675
16676
16677 ;
16678 return 0;
16679}
16680_ACEOF
16681if ac_fn_c_try_compile "$LINENO"; then :
16682 have_O2=yes
16683else
16684 have_O2=no
16685fi
16686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16688$as_echo "$have_O2" >&6; }
16689CFLAGS="$saved_cflags"
16690
16691# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16692# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16694$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16695saved_cflags="$CFLAGS"
16696CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16697if test "$have_O2" = no; then
16698 CFLAGS=""
16699fi
16700if test "$cross_compiling" = yes; then :
16701 have_glibc_memmove_bug=undefined
16702else
16703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16704/* end confdefs.h. */
16705
16706#include <stdio.h>
16707#include <stdlib.h>
16708#include <string.h>
16709void foo(void *p, void *q) { memmove(p, q, 19); }
16710int main() {
16711 char a[32] = "123456789000000000";
16712 foo(&a[9], a);
16713 if (strcmp(a, "123456789123456789000000000") != 0)
16714 return 1;
16715 foo(a, &a[9]);
16716 if (strcmp(a, "123456789000000000") != 0)
16717 return 1;
16718 return 0;
16719}
16720
16721_ACEOF
16722if ac_fn_c_try_run "$LINENO"; then :
16723 have_glibc_memmove_bug=no
16724else
16725 have_glibc_memmove_bug=yes
16726fi
16727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16728 conftest.$ac_objext conftest.beam conftest.$ac_ext
16729fi
16730
16731CFLAGS="$saved_cflags"
16732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16733$as_echo "$have_glibc_memmove_bug" >&6; }
16734if test "$have_glibc_memmove_bug" = yes; then
16735
16736$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16737
16738fi
16739
16740if test "$have_gcc_asm_for_x87" = yes; then
16741 # Some versions of gcc miscompile inline asm:
16742 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16743 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16744 case $CC in
16745 *gcc*)
16746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16747$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16748 saved_cflags="$CFLAGS"
16749 CFLAGS="-O2"
16750 if test "$cross_compiling" = yes; then :
16751 have_ipa_pure_const_bug=undefined
16752else
16753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16754/* end confdefs.h. */
16755
16756 __attribute__((noinline)) int
16757 foo(int *p) {
16758 int r;
16759 asm ( "movl \$6, (%1)\n\t"
16760 "xorl %0, %0\n\t"
16761 : "=r" (r) : "r" (p) : "memory"
16762 );
16763 return r;
16764 }
16765 int main() {
16766 int p = 8;
16767 if ((foo(&p) ? : p) != 6)
16768 return 1;
16769 return 0;
16770 }
16771
16772_ACEOF
16773if ac_fn_c_try_run "$LINENO"; then :
16774 have_ipa_pure_const_bug=no
16775else
16776 have_ipa_pure_const_bug=yes
16777fi
16778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16779 conftest.$ac_objext conftest.beam conftest.$ac_ext
16780fi
16781
16782 CFLAGS="$saved_cflags"
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16784$as_echo "$have_ipa_pure_const_bug" >&6; }
16785 if test "$have_ipa_pure_const_bug" = yes; then
16786
16787$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16788
16789 fi
16790 ;;
16791 esac
16792fi
16793
Victor Stinner4f5366e2015-01-09 02:13:19 +010016794# Check for stdatomic.h
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16796$as_echo_n "checking for stdatomic.h... " >&6; }
16797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16798/* end confdefs.h. */
16799
16800
16801 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016802 atomic_int int_var;
16803 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016804 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016805 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16806 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16807 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016808 return 0;
16809 }
16810
16811
16812_ACEOF
16813if ac_fn_c_try_link "$LINENO"; then :
16814 have_stdatomic_h=yes
16815else
16816 have_stdatomic_h=no
16817fi
16818rm -f core conftest.err conftest.$ac_objext \
16819 conftest$ac_exeext conftest.$ac_ext
16820
16821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16822$as_echo "$have_stdatomic_h" >&6; }
16823
16824if test "$have_stdatomic_h" = yes; then
16825
16826$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16827
16828fi
16829
16830# Check for GCC >= 4.7 __atomic builtins
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16832$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16834/* end confdefs.h. */
16835
16836
16837 volatile int val = 1;
16838 int main() {
16839 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16840 return 0;
16841 }
16842
16843
16844_ACEOF
16845if ac_fn_c_try_link "$LINENO"; then :
16846 have_builtin_atomic=yes
16847else
16848 have_builtin_atomic=no
16849fi
16850rm -f core conftest.err conftest.$ac_objext \
16851 conftest$ac_exeext conftest.$ac_ext
16852
16853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16854$as_echo "$have_builtin_atomic" >&6; }
16855
16856if test "$have_builtin_atomic" = yes; then
16857
16858$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16859
16860fi
16861
Ned Deily322f5ba2013-11-21 23:01:59 -080016862# ensurepip option
16863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16864$as_echo_n "checking for ensurepip... " >&6; }
16865
16866# Check whether --with-ensurepip was given.
16867if test "${with_ensurepip+set}" = set; then :
16868 withval=$with_ensurepip;
16869else
16870 with_ensurepip=upgrade
16871fi
16872
16873case $with_ensurepip in #(
16874 yes|upgrade) :
16875 ENSUREPIP=upgrade ;; #(
16876 install) :
16877 ENSUREPIP=install ;; #(
16878 no) :
16879 ENSUREPIP=no ;; #(
16880 *) :
16881 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16882esac
16883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16884$as_echo "$ENSUREPIP" >&6; }
16885
16886
Victor Stinner35a97c02015-03-08 02:59:09 +010016887# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16889$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16891/* end confdefs.h. */
16892
16893
16894 #include <dirent.h>
16895
16896 int main() {
16897 struct dirent entry;
16898 return entry.d_type == DT_UNKNOWN;
16899 }
16900
16901
16902_ACEOF
16903if ac_fn_c_try_link "$LINENO"; then :
16904 have_dirent_d_type=yes
16905else
16906 have_dirent_d_type=no
16907fi
16908rm -f core conftest.err conftest.$ac_objext \
16909 conftest$ac_exeext conftest.$ac_ext
16910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16911$as_echo "$have_dirent_d_type" >&6; }
16912
16913if test "$have_dirent_d_type" = yes; then
16914
16915$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16916
16917fi
16918
Victor Stinner9eb57c52015-03-19 22:21:49 +010016919# check if the Linux getrandom() syscall is available
16920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16921$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16923/* end confdefs.h. */
16924
16925
Victor Stinner1b80b242016-04-12 22:34:58 +020016926 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016927 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016928 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016929
16930 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016931 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016932 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016933 const int flags = GRND_NONBLOCK;
16934 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016935 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016936 return 0;
16937 }
16938
16939
16940_ACEOF
16941if ac_fn_c_try_link "$LINENO"; then :
16942 have_getrandom_syscall=yes
16943else
16944 have_getrandom_syscall=no
16945fi
16946rm -f core conftest.err conftest.$ac_objext \
16947 conftest$ac_exeext conftest.$ac_ext
16948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16949$as_echo "$have_getrandom_syscall" >&6; }
16950
16951if test "$have_getrandom_syscall" = yes; then
16952
16953$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16954
16955fi
16956
Victor Stinner3abf44e2015-09-18 15:38:37 +020016957# check if the getrandom() function is available
16958# the test was written for the Solaris function of <sys/random.h>
16959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16960$as_echo_n "checking for the getrandom() function... " >&6; }
16961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16962/* end confdefs.h. */
16963
16964
16965 #include <sys/random.h>
16966
16967 int main() {
16968 char buffer[1];
16969 const size_t buflen = sizeof(buffer);
16970 const int flags = 0;
16971 /* ignore the result, Python checks for ENOSYS at runtime */
16972 (void)getrandom(buffer, buflen, flags);
16973 return 0;
16974 }
16975
16976
16977_ACEOF
16978if ac_fn_c_try_link "$LINENO"; then :
16979 have_getrandom=yes
16980else
16981 have_getrandom=no
16982fi
16983rm -f core conftest.err conftest.$ac_objext \
16984 conftest$ac_exeext conftest.$ac_ext
16985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16986$as_echo "$have_getrandom" >&6; }
16987
16988if test "$have_getrandom" = yes; then
16989
16990$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16991
16992fi
16993
Neil Schemenauer5741c452019-02-08 10:48:46 -080016994# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16995# shm_* may only be available if linking against librt
16996save_LIBS="$LIBS"
16997save_includes_default="$ac_includes_default"
16998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16999$as_echo_n "checking for library containing shm_open... " >&6; }
17000if ${ac_cv_search_shm_open+:} false; then :
17001 $as_echo_n "(cached) " >&6
17002else
17003 ac_func_search_save_LIBS=$LIBS
17004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17005/* end confdefs.h. */
17006
17007/* Override any GCC internal prototype to avoid an error.
17008 Use char because int might match the return type of a GCC
17009 builtin and then its argument prototype would still apply. */
17010#ifdef __cplusplus
17011extern "C"
17012#endif
17013char shm_open ();
17014int
17015main ()
17016{
17017return shm_open ();
17018 ;
17019 return 0;
17020}
17021_ACEOF
17022for ac_lib in '' rt; do
17023 if test -z "$ac_lib"; then
17024 ac_res="none required"
17025 else
17026 ac_res=-l$ac_lib
17027 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17028 fi
17029 if ac_fn_c_try_link "$LINENO"; then :
17030 ac_cv_search_shm_open=$ac_res
17031fi
17032rm -f core conftest.err conftest.$ac_objext \
17033 conftest$ac_exeext
17034 if ${ac_cv_search_shm_open+:} false; then :
17035 break
17036fi
17037done
17038if ${ac_cv_search_shm_open+:} false; then :
17039
17040else
17041 ac_cv_search_shm_open=no
17042fi
17043rm conftest.$ac_ext
17044LIBS=$ac_func_search_save_LIBS
17045fi
17046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17047$as_echo "$ac_cv_search_shm_open" >&6; }
17048ac_res=$ac_cv_search_shm_open
17049if test "$ac_res" != no; then :
17050 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17051
17052fi
17053
17054if test "$ac_cv_search_shm_open" = "-lrt"; then
17055
17056$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17057
17058fi
17059for ac_header in sys/mman.h
17060do :
17061 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17062if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17063 cat >>confdefs.h <<_ACEOF
17064#define HAVE_SYS_MMAN_H 1
17065_ACEOF
17066
17067fi
17068
17069done
17070
17071# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17072ac_includes_default="\
17073${ac_includes_default}
17074#ifndef __cplusplus
17075# ifdef HAVE_SYS_MMAN_H
17076# include <sys/mman.h>
17077# endif
17078#endif
17079"
17080for ac_func in shm_open shm_unlink
17081do :
17082 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17083ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17084if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17085 cat >>confdefs.h <<_ACEOF
17086#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17087_ACEOF
17088
17089fi
17090done
17091
17092# we don't want to link with librt always, restore LIBS
17093LIBS="$save_LIBS"
17094ac_includes_default="$save_includes_default"
17095
Christian Heimesff5be6e2018-01-20 13:19:21 +010017096# Check for usable OpenSSL
17097
17098 found=false
17099
17100# Check whether --with-openssl was given.
17101if test "${with_openssl+set}" = set; then :
17102 withval=$with_openssl;
17103 case "$withval" in
17104 "" | y | ye | yes | n | no)
17105 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17106 ;;
17107 *) ssldirs="$withval"
17108 ;;
17109 esac
17110
17111else
17112
17113 # if pkg-config is installed and openssl has installed a .pc file,
17114 # then use that information and don't search ssldirs
17115 if test -n "$ac_tool_prefix"; then
17116 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17117set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17119$as_echo_n "checking for $ac_word... " >&6; }
17120if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17121 $as_echo_n "(cached) " >&6
17122else
17123 if test -n "$PKG_CONFIG"; then
17124 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17125else
17126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17127for as_dir in $PATH
17128do
17129 IFS=$as_save_IFS
17130 test -z "$as_dir" && as_dir=.
17131 for ac_exec_ext in '' $ac_executable_extensions; do
17132 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17133 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17135 break 2
17136 fi
17137done
17138 done
17139IFS=$as_save_IFS
17140
17141fi
17142fi
17143PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17144if test -n "$PKG_CONFIG"; then
17145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17146$as_echo "$PKG_CONFIG" >&6; }
17147else
17148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17149$as_echo "no" >&6; }
17150fi
17151
17152
17153fi
17154if test -z "$ac_cv_prog_PKG_CONFIG"; then
17155 ac_ct_PKG_CONFIG=$PKG_CONFIG
17156 # Extract the first word of "pkg-config", so it can be a program name with args.
17157set dummy pkg-config; ac_word=$2
17158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17159$as_echo_n "checking for $ac_word... " >&6; }
17160if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17161 $as_echo_n "(cached) " >&6
17162else
17163 if test -n "$ac_ct_PKG_CONFIG"; then
17164 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17165else
17166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17167for as_dir in $PATH
17168do
17169 IFS=$as_save_IFS
17170 test -z "$as_dir" && as_dir=.
17171 for ac_exec_ext in '' $ac_executable_extensions; do
17172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17173 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17175 break 2
17176 fi
17177done
17178 done
17179IFS=$as_save_IFS
17180
17181fi
17182fi
17183ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17184if test -n "$ac_ct_PKG_CONFIG"; then
17185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17186$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17187else
17188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17189$as_echo "no" >&6; }
17190fi
17191
17192 if test "x$ac_ct_PKG_CONFIG" = x; then
17193 PKG_CONFIG=""
17194 else
17195 case $cross_compiling:$ac_tool_warned in
17196yes:)
17197{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17198$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17199ac_tool_warned=yes ;;
17200esac
17201 PKG_CONFIG=$ac_ct_PKG_CONFIG
17202 fi
17203else
17204 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17205fi
17206
17207 if test x"$PKG_CONFIG" != x""; then
17208 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17209 if test $? = 0; then
17210 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17211 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17212 found=true
17213 fi
17214 fi
17215
17216 # no such luck; use some default ssldirs
17217 if ! $found; then
17218 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17219 fi
17220
17221
17222fi
17223
17224
17225
17226 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17227 # an 'openssl' subdirectory
17228
17229 if ! $found; then
17230 OPENSSL_INCLUDES=
17231 for ssldir in $ssldirs; do
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17233$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17234 if test -f "$ssldir/include/openssl/ssl.h"; then
17235 OPENSSL_INCLUDES="-I$ssldir/include"
17236 OPENSSL_LDFLAGS="-L$ssldir/lib"
17237 OPENSSL_LIBS="-lssl -lcrypto"
17238 found=true
17239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17240$as_echo "yes" >&6; }
17241 break
17242 else
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17244$as_echo "no" >&6; }
17245 fi
17246 done
17247
17248 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17249 # it will just work!
17250 fi
17251
17252 # try the preprocessor and linker with our new flags,
17253 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17254
17255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17256$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17257 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17258 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17259
17260 save_LIBS="$LIBS"
17261 save_LDFLAGS="$LDFLAGS"
17262 save_CPPFLAGS="$CPPFLAGS"
17263 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17264 LIBS="$OPENSSL_LIBS $LIBS"
17265 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17267/* end confdefs.h. */
17268#include <openssl/ssl.h>
17269int
17270main ()
17271{
17272SSL_new(NULL)
17273 ;
17274 return 0;
17275}
17276_ACEOF
17277if ac_fn_c_try_link "$LINENO"; then :
17278
17279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17280$as_echo "yes" >&6; }
17281 have_openssl=yes
17282
17283else
17284
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17286$as_echo "no" >&6; }
17287 have_openssl=no
17288
17289fi
17290rm -f core conftest.err conftest.$ac_objext \
17291 conftest$ac_exeext conftest.$ac_ext
17292 CPPFLAGS="$save_CPPFLAGS"
17293 LDFLAGS="$save_LDFLAGS"
17294 LIBS="$save_LIBS"
17295
17296
17297
17298
17299
17300
17301if test "$have_openssl" = yes; then
17302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17303$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17304
17305 save_LIBS="$LIBS"
17306 save_LDFLAGS="$LDFLAGS"
17307 save_CPPFLAGS="$CPPFLAGS"
17308 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17309 LIBS="$OPENSSL_LIBS $LIBS"
17310 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17311
17312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313/* end confdefs.h. */
17314
17315 #include <openssl/x509_vfy.h>
17316
17317int
17318main ()
17319{
17320
17321 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17322 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17323 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17324 X509_VERIFY_PARAM_set_hostflags(p, 0);
17325
17326 ;
17327 return 0;
17328}
17329
17330_ACEOF
17331if ac_fn_c_try_link "$LINENO"; then :
17332
17333 ac_cv_has_x509_verify_param_set1_host=yes
17334
17335else
17336
17337 ac_cv_has_x509_verify_param_set1_host=no
17338
17339fi
17340rm -f core conftest.err conftest.$ac_objext \
17341 conftest$ac_exeext conftest.$ac_ext
17342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17343$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17344 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17345
17346$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17347
17348 fi
17349
17350 CPPFLAGS="$save_CPPFLAGS"
17351 LDFLAGS="$save_LDFLAGS"
17352 LIBS="$save_LIBS"
17353fi
17354
Christian Heimes892d66e2018-01-29 14:10:18 +010017355# ssl module default cipher suite string
17356
17357
17358
17359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17360$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17361
17362# Check whether --with-ssl-default-suites was given.
17363if test "${with_ssl_default_suites+set}" = set; then :
17364 withval=$with_ssl_default_suites;
17365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17366$as_echo "$withval" >&6; }
17367case "$withval" in
17368 python)
17369 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17370
17371 ;;
17372 openssl)
17373 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17374
17375 ;;
17376 *)
17377 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17378
17379 cat >>confdefs.h <<_ACEOF
17380#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17381_ACEOF
17382
17383 ;;
17384esac
17385
17386else
17387
17388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17389$as_echo "python" >&6; }
17390$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17391
17392
17393fi
17394
17395
17396
Guido van Rossum627b2d71993-12-24 10:39:16 +000017397# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017398ac_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 +000017399
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017400ac_config_files="$ac_config_files Modules/ld_so_aix"
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017403# This file is a shell script that caches the results of configure
17404# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017405# scripts and configure runs, see configure's option --config-cache.
17406# It is not useful on other systems. If it contains results you don't
17407# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017408#
Martin v. Löwis11437992002-04-12 09:54:03 +000017409# config.status only pays attention to the cache file if you give it
17410# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017411#
Skip Montanaro6dead952003-09-25 14:50:04 +000017412# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017413# loading this file, other *unset* `ac_cv_foo' will be assigned the
17414# following values.
17415
17416_ACEOF
17417
Guido van Rossumf78abae1997-01-21 22:02:36 +000017418# The following way of writing the cache mishandles newlines in values,
17419# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017421# Ultrix sh set writes to stderr and can't be redirected directly,
17422# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423(
17424 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17425 eval ac_val=\$$ac_var
17426 case $ac_val in #(
17427 *${as_nl}*)
17428 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17430$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 esac
17432 case $ac_var in #(
17433 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017434 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17435 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436 esac ;;
17437 esac
17438 done
17439
Martin v. Löwis11437992002-04-12 09:54:03 +000017440 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17442 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 # `set' does not quote correctly, so add quotes: double-quote
17444 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017446 "s/'/'\\\\''/g;
17447 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 *)
17450 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017452 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453 esac |
17454 sort
17455) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017458 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017460 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17461 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17463 :end' >>confcache
17464if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17465 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017466 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17468$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017469 if test ! -f "$cache_file" || test -h "$cache_file"; then
17470 cat confcache >"$cache_file"
17471 else
17472 case $cache_file in #(
17473 */* | ?:*)
17474 mv -f confcache "$cache_file"$$ &&
17475 mv -f "$cache_file"$$ "$cache_file" ;; #(
17476 *)
17477 mv -f confcache "$cache_file" ;;
17478 esac
17479 fi
17480 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017481 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17483$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017484 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017485fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017486rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017488test "x$prefix" = xNONE && prefix=$ac_default_prefix
17489# Let make expand exec_prefix.
17490test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017491
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017492DEFS=-DHAVE_CONFIG_H
17493
Skip Montanaro6dead952003-09-25 14:50:04 +000017494ac_libobjs=
17495ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017496U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017497for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17498 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17502 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17504 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017505done
17506LIBOBJS=$ac_libobjs
17507
17508LTLIBOBJS=$ac_ltlibobjs
17509
17510
Martin v. Löwis11437992002-04-12 09:54:03 +000017511
Matthias Kloseb9621712010-04-24 17:59:49 +000017512
Victor Stinnere0be4232011-10-25 13:06:09 +020017513: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017514ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017515ac_clean_files_save=$ac_clean_files
17516ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017517{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17518$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17519as_write_fail=0
17520cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017521#! $SHELL
17522# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017523# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017524# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017525# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017526
Martin v. Löwis11437992002-04-12 09:54:03 +000017527debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017528ac_cs_recheck=false
17529ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017530
Matthias Kloseb9621712010-04-24 17:59:49 +000017531SHELL=\${CONFIG_SHELL-$SHELL}
17532export SHELL
17533_ASEOF
17534cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17535## -------------------- ##
17536## M4sh Initialization. ##
17537## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539# Be more Bourne compatible
17540DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017541if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017542 emulate sh
17543 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017544 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017545 # is contrary to our usage. Disable this feature.
17546 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017548else
Matthias Kloseb9621712010-04-24 17:59:49 +000017549 case `(set -o) 2>/dev/null` in #(
17550 *posix*) :
17551 set -o posix ;; #(
17552 *) :
17553 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017555fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017556
17557
Matthias Kloseb9621712010-04-24 17:59:49 +000017558as_nl='
17559'
17560export as_nl
17561# Printing a long string crashes Solaris 7 /usr/bin/printf.
17562as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17563as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17564as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17565# Prefer a ksh shell builtin over an external printf program on Solaris,
17566# but without wasting forks for bash or zsh.
17567if test -z "$BASH_VERSION$ZSH_VERSION" \
17568 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17569 as_echo='print -r --'
17570 as_echo_n='print -rn --'
17571elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17572 as_echo='printf %s\n'
17573 as_echo_n='printf %s'
17574else
17575 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17576 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17577 as_echo_n='/usr/ucb/echo -n'
17578 else
17579 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17580 as_echo_n_body='eval
17581 arg=$1;
17582 case $arg in #(
17583 *"$as_nl"*)
17584 expr "X$arg" : "X\\(.*\\)$as_nl";
17585 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17586 esac;
17587 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17588 '
17589 export as_echo_n_body
17590 as_echo_n='sh -c $as_echo_n_body as_echo'
17591 fi
17592 export as_echo_body
17593 as_echo='sh -c $as_echo_body as_echo'
17594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017595
17596# The user is always right.
17597if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017598 PATH_SEPARATOR=:
17599 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17600 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17601 PATH_SEPARATOR=';'
17602 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605
17606# IFS
17607# We need space, tab and new line, in precisely that order. Quoting is
17608# there to prevent editors from complaining about space-tab.
17609# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17610# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611IFS=" "" $as_nl"
17612
17613# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017614as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017615case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616 *[\\/]* ) as_myself=$0 ;;
17617 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017618for as_dir in $PATH
17619do
17620 IFS=$as_save_IFS
17621 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017622 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17623 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626 ;;
17627esac
17628# We did not find ourselves, most probably we were run as `sh COMMAND'
17629# in which case we are not to be found in the path.
17630if test "x$as_myself" = x; then
17631 as_myself=$0
17632fi
17633if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17635 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017636fi
17637
Matthias Kloseb9621712010-04-24 17:59:49 +000017638# Unset variables that we do not need and which cause bugs (e.g. in
17639# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17640# suppresses any "Segmentation fault" message there. '((' could
17641# trigger a bug in pdksh 5.2.14.
17642for as_var in BASH_ENV ENV MAIL MAILPATH
17643do eval test x\${$as_var+set} = xset \
17644 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645done
17646PS1='$ '
17647PS2='> '
17648PS4='+ '
17649
17650# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017651LC_ALL=C
17652export LC_ALL
17653LANGUAGE=C
17654export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655
Matthias Kloseb9621712010-04-24 17:59:49 +000017656# CDPATH.
17657(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17658
17659
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017660# as_fn_error STATUS ERROR [LINENO LOG_FD]
17661# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017662# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17663# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017664# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017665as_fn_error ()
17666{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017667 as_status=$1; test $as_status -eq 0 && as_status=1
17668 if test "$4"; then
17669 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17670 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017671 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017672 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017673 as_fn_exit $as_status
17674} # as_fn_error
17675
17676
17677# as_fn_set_status STATUS
17678# -----------------------
17679# Set $? to STATUS, without forking.
17680as_fn_set_status ()
17681{
17682 return $1
17683} # as_fn_set_status
17684
17685# as_fn_exit STATUS
17686# -----------------
17687# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17688as_fn_exit ()
17689{
17690 set +e
17691 as_fn_set_status $1
17692 exit $1
17693} # as_fn_exit
17694
17695# as_fn_unset VAR
17696# ---------------
17697# Portably unset VAR.
17698as_fn_unset ()
17699{
17700 { eval $1=; unset $1;}
17701}
17702as_unset=as_fn_unset
17703# as_fn_append VAR VALUE
17704# ----------------------
17705# Append the text in VALUE to the end of the definition contained in VAR. Take
17706# advantage of any shell optimizations that allow amortized linear growth over
17707# repeated appends, instead of the typical quadratic growth present in naive
17708# implementations.
17709if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17710 eval 'as_fn_append ()
17711 {
17712 eval $1+=\$2
17713 }'
17714else
17715 as_fn_append ()
17716 {
17717 eval $1=\$$1\$2
17718 }
17719fi # as_fn_append
17720
17721# as_fn_arith ARG...
17722# ------------------
17723# Perform arithmetic evaluation on the ARGs, and store the result in the
17724# global $as_val. Take advantage of shells that can avoid forks. The arguments
17725# must be portable across $(()) and expr.
17726if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17727 eval 'as_fn_arith ()
17728 {
17729 as_val=$(( $* ))
17730 }'
17731else
17732 as_fn_arith ()
17733 {
17734 as_val=`expr "$@" || test $? -eq 1`
17735 }
17736fi # as_fn_arith
17737
17738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739if expr a : '\(a\)' >/dev/null 2>&1 &&
17740 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17741 as_expr=expr
17742else
17743 as_expr=false
17744fi
17745
17746if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17747 as_basename=basename
17748else
17749 as_basename=false
17750fi
17751
Matthias Kloseb9621712010-04-24 17:59:49 +000017752if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17753 as_dirname=dirname
17754else
17755 as_dirname=false
17756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758as_me=`$as_basename -- "$0" ||
17759$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17760 X"$0" : 'X\(//\)$' \| \
17761 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017762$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763 sed '/^.*\/\([^/][^/]*\)\/*$/{
17764 s//\1/
17765 q
17766 }
17767 /^X\/\(\/\/\)$/{
17768 s//\1/
17769 q
17770 }
17771 /^X\/\(\/\).*/{
17772 s//\1/
17773 q
17774 }
17775 s/.*/./; q'`
17776
Matthias Kloseb9621712010-04-24 17:59:49 +000017777# Avoid depending upon Character Ranges.
17778as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17779as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17780as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17781as_cr_digits='0123456789'
17782as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783
17784ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017785case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017787 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017789 xy) ECHO_C='\c';;
17790 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17791 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 esac;;
17793*)
17794 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017795esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017796
Martin v. Löwis11437992002-04-12 09:54:03 +000017797rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798if test -d conf$$.dir; then
17799 rm -f conf$$.dir/conf$$.file
17800else
17801 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017802 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017804if (echo >conf$$.file) 2>/dev/null; then
17805 if ln -s conf$$.file conf$$ 2>/dev/null; then
17806 as_ln_s='ln -s'
17807 # ... but there are two gotchas:
17808 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17809 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017810 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017811 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017812 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017813 elif ln conf$$.file conf$$ 2>/dev/null; then
17814 as_ln_s=ln
17815 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017816 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017818else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017819 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17822rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017823
Matthias Kloseb9621712010-04-24 17:59:49 +000017824
17825# as_fn_mkdir_p
17826# -------------
17827# Create "$as_dir" as a directory, including parents if necessary.
17828as_fn_mkdir_p ()
17829{
17830
17831 case $as_dir in #(
17832 -*) as_dir=./$as_dir;;
17833 esac
17834 test -d "$as_dir" || eval $as_mkdir_p || {
17835 as_dirs=
17836 while :; do
17837 case $as_dir in #(
17838 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17839 *) as_qdir=$as_dir;;
17840 esac
17841 as_dirs="'$as_qdir' $as_dirs"
17842 as_dir=`$as_dirname -- "$as_dir" ||
17843$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17844 X"$as_dir" : 'X\(//\)[^/]' \| \
17845 X"$as_dir" : 'X\(//\)$' \| \
17846 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17847$as_echo X"$as_dir" |
17848 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17849 s//\1/
17850 q
17851 }
17852 /^X\(\/\/\)[^/].*/{
17853 s//\1/
17854 q
17855 }
17856 /^X\(\/\/\)$/{
17857 s//\1/
17858 q
17859 }
17860 /^X\(\/\).*/{
17861 s//\1/
17862 q
17863 }
17864 s/.*/./; q'`
17865 test -d "$as_dir" && break
17866 done
17867 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017868 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017869
17870
17871} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017872if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017873 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017874else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017875 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017876 as_mkdir_p=false
17877fi
17878
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017879
17880# as_fn_executable_p FILE
17881# -----------------------
17882# Test if FILE is an executable regular file.
17883as_fn_executable_p ()
17884{
17885 test -f "$1" && test -x "$1"
17886} # as_fn_executable_p
17887as_test_x='test -x'
17888as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017889
17890# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017891as_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 +000017892
17893# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017894as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017895
17896
Martin v. Löwis11437992002-04-12 09:54:03 +000017897exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017898## ----------------------------------- ##
17899## Main body of $CONFIG_STATUS script. ##
17900## ----------------------------------- ##
17901_ASEOF
17902test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017903
Matthias Kloseb9621712010-04-24 17:59:49 +000017904cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17905# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017906# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907# values after options handling.
17908ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017909This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017910generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017911
17912 CONFIG_FILES = $CONFIG_FILES
17913 CONFIG_HEADERS = $CONFIG_HEADERS
17914 CONFIG_LINKS = $CONFIG_LINKS
17915 CONFIG_COMMANDS = $CONFIG_COMMANDS
17916 $ $0 $@
17917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918on `(hostname || uname -n) 2>/dev/null | sed 1q`
17919"
17920
Martin v. Löwis11437992002-04-12 09:54:03 +000017921_ACEOF
17922
Matthias Kloseb9621712010-04-24 17:59:49 +000017923case $ac_config_files in *"
17924"*) set x $ac_config_files; shift; ac_config_files=$*;;
17925esac
17926
17927case $ac_config_headers in *"
17928"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17929esac
17930
17931
17932cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017933# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017934config_files="$ac_config_files"
17935config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017938
Matthias Kloseb9621712010-04-24 17:59:49 +000017939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017940ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017941\`$as_me' instantiates files and other configuration actions
17942from templates according to the current configuration. Unless the files
17943and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017944
Matthias Kloseb9621712010-04-24 17:59:49 +000017945Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017946
17947 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017949 --config print configuration, then exit
17950 -q, --quiet, --silent
17951 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017952 -d, --debug don't remove temporary files
17953 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017954 --file=FILE[:TEMPLATE]
17955 instantiate the configuration file FILE
17956 --header=FILE[:TEMPLATE]
17957 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017958
17959Configuration files:
17960$config_files
17961
17962Configuration headers:
17963$config_headers
17964
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017965Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17969ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017970ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017971python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017972configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017973 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017974
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017975Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017976This config.status script is free software; the Free Software Foundation
17977gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978
17979ac_pwd='$ac_pwd'
17980srcdir='$srcdir'
17981INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017982MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017983test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017984_ACEOF
17985
Matthias Kloseb9621712010-04-24 17:59:49 +000017986cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17987# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017988ac_need_defaults=:
17989while test $# != 0
17990do
17991 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017992 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017993 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17994 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017995 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017997 --*=)
17998 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17999 ac_optarg=
18000 ac_shift=:
18001 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018003 ac_option=$1
18004 ac_optarg=$2
18005 ac_shift=shift
18006 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 esac
18008
Skip Montanaro6dead952003-09-25 14:50:04 +000018009 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018011 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18012 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018014 $as_echo "$ac_cs_version"; exit ;;
18015 --config | --confi | --conf | --con | --co | --c )
18016 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 debug=: ;;
18019 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018020 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018021 case $ac_optarg in
18022 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018023 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018024 esac
18025 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018026 ac_need_defaults=false;;
18027 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018028 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018029 case $ac_optarg in
18030 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18031 esac
18032 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034 --he | --h)
18035 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018036 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018037Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018039 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018040 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18041 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18042 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018043
18044 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018045 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018046Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018047
Matthias Kloseb9621712010-04-24 17:59:49 +000018048 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018050
18051 esac
18052 shift
18053done
18054
Skip Montanaro6dead952003-09-25 14:50:04 +000018055ac_configure_extra_args=
18056
18057if $ac_cs_silent; then
18058 exec 6>/dev/null
18059 ac_configure_extra_args="$ac_configure_extra_args --silent"
18060fi
18061
18062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018064if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018065 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018066 shift
18067 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18068 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018070 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018071fi
18072
Martin v. Löwis11437992002-04-12 09:54:03 +000018073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075exec 5>>config.log
18076{
18077 echo
18078 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18079## Running $as_me. ##
18080_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018081 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018087
Matthias Kloseb9621712010-04-24 17:59:49 +000018088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089
18090# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018091for ac_config_target in $ac_config_targets
18092do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093 case $ac_config_target in
18094 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18095 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18096 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018097 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18098 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018100 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018101 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018102 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018103 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104
Victor Stinnere0be4232011-10-25 13:06:09 +020018105 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 esac
18107done
18108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109
Martin v. Löwis11437992002-04-12 09:54:03 +000018110# If the user did not use the arguments to specify the items to instantiate,
18111# then the envvar interface is used. Set only those that are not.
18112# We use the long form for the default assignment because of an extremely
18113# bizarre bug on SunOS 4.1.3.
18114if $ac_need_defaults; then
18115 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18116 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18117fi
18118
Skip Montanaro6dead952003-09-25 14:50:04 +000018119# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018121# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122# Hook for its removal unless debugging.
18123# Note that there is a small window in which the directory will not be cleaned:
18124# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018125$debug ||
18126{
Victor Stinnere0be4232011-10-25 13:06:09 +020018127 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018129 : "${ac_tmp:=$tmp}"
18130 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018132 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018133}
Martin v. Löwis11437992002-04-12 09:54:03 +000018134# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018135
Martin v. Löwis11437992002-04-12 09:54:03 +000018136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018138 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018139} ||
18140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 tmp=./conf$$-$RANDOM
18142 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018143} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018144ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018145
Matthias Kloseb9621712010-04-24 17:59:49 +000018146# Set up the scripts for CONFIG_FILES section.
18147# No need to generate them if there are no CONFIG_FILES.
18148# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018150
Matthias Kloseb9621712010-04-24 17:59:49 +000018151
18152ac_cr=`echo X | tr X '\015'`
18153# On cygwin, bash can eat \r inside `` if the user requested igncr.
18154# But we know of no other shell where ac_cr would be empty at this
18155# point, so we can use a bashism as a fallback.
18156if test "x$ac_cr" = x; then
18157 eval ac_cr=\$\'\\r\'
18158fi
18159ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18160if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018161 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018162else
18163 ac_cs_awk_cr=$ac_cr
18164fi
18165
Victor Stinnere0be4232011-10-25 13:06:09 +020018166echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018167_ACEOF
18168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169
Matthias Kloseb9621712010-04-24 17:59:49 +000018170{
18171 echo "cat >conf$$subs.awk <<_ACEOF" &&
18172 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18173 echo "_ACEOF"
18174} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018175 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18176ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018177ac_delim='%!_!# '
18178for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018179 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018180 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181
Matthias Kloseb9621712010-04-24 17:59:49 +000018182 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18183 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184 break
18185 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018186 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018187 else
18188 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018189 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190done
Matthias Kloseb9621712010-04-24 17:59:49 +000018191rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192
Matthias Kloseb9621712010-04-24 17:59:49 +000018193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018194cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018196sed -n '
18197h
18198s/^/S["/; s/!.*/"]=/
18199p
18200g
18201s/^[^!]*!//
18202:repl
18203t repl
18204s/'"$ac_delim"'$//
18205t delim
18206:nl
18207h
18208s/\(.\{148\}\)..*/\1/
18209t more1
18210s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18211p
18212n
18213b repl
18214:more1
18215s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18216p
18217g
18218s/.\{148\}//
18219t nl
18220:delim
18221h
18222s/\(.\{148\}\)..*/\1/
18223t more2
18224s/["\\]/\\&/g; s/^/"/; s/$/"/
18225p
18226b
18227:more2
18228s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18229p
18230g
18231s/.\{148\}//
18232t delim
18233' <conf$$subs.awk | sed '
18234/^[^""]/{
18235 N
18236 s/\n//
18237}
18238' >>$CONFIG_STATUS || ac_write_fail=1
18239rm -f conf$$subs.awk
18240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18241_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018242cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018243 for (key in S) S_is_set[key] = 1
18244 FS = ""
18245
18246}
18247{
18248 line = $ 0
18249 nfields = split(line, field, "@")
18250 substed = 0
18251 len = length(field[1])
18252 for (i = 2; i < nfields; i++) {
18253 key = field[i]
18254 keylen = length(key)
18255 if (S_is_set[key]) {
18256 value = S[key]
18257 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18258 len += length(value) + length(field[++i])
18259 substed = 1
18260 } else
18261 len += 1 + keylen
18262 }
18263
18264 print line
18265}
18266
18267_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018269cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18270if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18271 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18272else
18273 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018274fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018275 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018276_ACEOF
18277
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018278# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18279# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280# trailing colons and then remove the whole line if VPATH becomes empty
18281# (actually we leave an empty line to preserve line numbers).
18282if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018283 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18284h
18285s///
18286s/^/:/
18287s/[ ]*$/:/
18288s/:\$(srcdir):/:/g
18289s/:\${srcdir}:/:/g
18290s/:@srcdir@:/:/g
18291s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018292s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018293x
18294s/\(=[ ]*\).*/\1/
18295G
18296s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297s/^[^=]*=[ ]*$//
18298}'
18299fi
18300
Matthias Kloseb9621712010-04-24 17:59:49 +000018301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018302fi # test -n "$CONFIG_FILES"
18303
Matthias Kloseb9621712010-04-24 17:59:49 +000018304# Set up the scripts for CONFIG_HEADERS section.
18305# No need to generate them if there are no CONFIG_HEADERS.
18306# This happens for instance with `./config.status Makefile'.
18307if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018308cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018309BEGIN {
18310_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311
Matthias Kloseb9621712010-04-24 17:59:49 +000018312# Transform confdefs.h into an awk script `defines.awk', embedded as
18313# here-document in config.status, that substitutes the proper values into
18314# config.h.in to produce config.h.
18315
18316# Create a delimiter string that does not exist in confdefs.h, to ease
18317# handling of long lines.
18318ac_delim='%!_!# '
18319for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018320 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18321 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018322 break
18323 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018324 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018325 else
18326 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18327 fi
18328done
18329
18330# For the awk script, D is an array of macro values keyed by name,
18331# likewise P contains macro parameters if any. Preserve backslash
18332# newline sequences.
18333
18334ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18335sed -n '
18336s/.\{148\}/&'"$ac_delim"'/g
18337t rset
18338:rset
18339s/^[ ]*#[ ]*define[ ][ ]*/ /
18340t def
18341d
18342:def
18343s/\\$//
18344t bsnl
18345s/["\\]/\\&/g
18346s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18347D["\1"]=" \3"/p
18348s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18349d
18350:bsnl
18351s/["\\]/\\&/g
18352s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18353D["\1"]=" \3\\\\\\n"\\/p
18354t cont
18355s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18356t cont
18357d
18358:cont
18359n
18360s/.\{148\}/&'"$ac_delim"'/g
18361t clear
18362:clear
18363s/\\$//
18364t bsnlc
18365s/["\\]/\\&/g; s/^/"/; s/$/"/p
18366d
18367:bsnlc
18368s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18369b cont
18370' <confdefs.h | sed '
18371s/'"$ac_delim"'/"\\\
18372"/g' >>$CONFIG_STATUS || ac_write_fail=1
18373
18374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18375 for (key in D) D_is_set[key] = 1
18376 FS = ""
18377}
18378/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18379 line = \$ 0
18380 split(line, arg, " ")
18381 if (arg[1] == "#") {
18382 defundef = arg[2]
18383 mac1 = arg[3]
18384 } else {
18385 defundef = substr(arg[1], 2)
18386 mac1 = arg[2]
18387 }
18388 split(mac1, mac2, "(") #)
18389 macro = mac2[1]
18390 prefix = substr(line, 1, index(line, defundef) - 1)
18391 if (D_is_set[macro]) {
18392 # Preserve the white space surrounding the "#".
18393 print prefix "define", macro P[macro] D[macro]
18394 next
18395 } else {
18396 # Replace #undef with comments. This is necessary, for example,
18397 # in the case of _POSIX_SOURCE, which is predefined and required
18398 # on some systems where configure will not decide to define it.
18399 if (defundef == "undef") {
18400 print "/*", prefix defundef, macro, "*/"
18401 next
18402 }
18403 }
18404}
18405{ print }
18406_ACAWK
18407_ACEOF
18408cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018409 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018410fi # test -n "$CONFIG_HEADERS"
18411
18412
18413eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18414shift
18415for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416do
18417 case $ac_tag in
18418 :[FHLC]) ac_mode=$ac_tag; continue;;
18419 esac
18420 case $ac_mode$ac_tag in
18421 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018422 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018423 :[FH]-) ac_tag=-:-;;
18424 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18425 esac
18426 ac_save_IFS=$IFS
18427 IFS=:
18428 set x $ac_tag
18429 IFS=$ac_save_IFS
18430 shift
18431 ac_file=$1
18432 shift
18433
18434 case $ac_mode in
18435 :L) ac_source=$1;;
18436 :[FH])
18437 ac_file_inputs=
18438 for ac_f
18439 do
18440 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018441 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 *) # Look for the file first in the build tree, then in the source tree
18443 # (if the path is not absolute). The absolute path cannot be DOS-style,
18444 # because $ac_f cannot contain `:'.
18445 test -f "$ac_f" ||
18446 case $ac_f in
18447 [\\/$]*) false;;
18448 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18449 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018450 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018452 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18453 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 done
18455
18456 # Let's still pretend it is `configure' which instantiates (i.e., don't
18457 # use $as_me), people would be surprised to read:
18458 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018459 configure_input='Generated from '`
18460 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18461 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462 if test x"$ac_file" != x-; then
18463 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18465$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018467 # Neutralize special characters interpreted by sed in replacement strings.
18468 case $configure_input in #(
18469 *\&* | *\|* | *\\* )
18470 ac_sed_conf_input=`$as_echo "$configure_input" |
18471 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18472 *) ac_sed_conf_input=$configure_input;;
18473 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018474
18475 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018476 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18477 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478 esac
18479 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018480 esac
18481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018483$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018484 X"$ac_file" : 'X\(//\)[^/]' \| \
18485 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018487$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18489 s//\1/
18490 q
18491 }
18492 /^X\(\/\/\)[^/].*/{
18493 s//\1/
18494 q
18495 }
18496 /^X\(\/\/\)$/{
18497 s//\1/
18498 q
18499 }
18500 /^X\(\/\).*/{
18501 s//\1/
18502 q
18503 }
18504 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018505 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 ac_builddir=.
18507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508case "$ac_dir" in
18509.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18510*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018511 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018513 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 case $ac_top_builddir_sub in
18515 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18516 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18517 esac ;;
18518esac
18519ac_abs_top_builddir=$ac_pwd
18520ac_abs_builddir=$ac_pwd$ac_dir_suffix
18521# for backward compatibility:
18522ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018523
18524case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527 ac_top_srcdir=$ac_top_builddir_sub
18528 ac_abs_top_srcdir=$ac_pwd ;;
18529 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531 ac_top_srcdir=$srcdir
18532 ac_abs_top_srcdir=$srcdir ;;
18533 *) # Relative name.
18534 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18535 ac_top_srcdir=$ac_top_build_prefix$srcdir
18536 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018537esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018538ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018539
Martin v. Löwis11437992002-04-12 09:54:03 +000018540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018541 case $ac_mode in
18542 :F)
18543 #
18544 # CONFIG_FILE
18545 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018546
18547 case $INSTALL in
18548 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018551 ac_MKDIR_P=$MKDIR_P
18552 case $MKDIR_P in
18553 [\\/$]* | ?:[\\/]* ) ;;
18554 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18555 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018556_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557
Matthias Kloseb9621712010-04-24 17:59:49 +000018558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559# If the template does not know about datarootdir, expand it.
18560# FIXME: This hack should be removed a few years after 2.60.
18561ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018562ac_sed_dataroot='
18563/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564 p
18565 q
18566}
18567/@datadir@/p
18568/@docdir@/p
18569/@infodir@/p
18570/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018571/@mandir@/p'
18572case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018573*datarootdir*) ac_datarootdir_seen=yes;;
18574*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18576$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018578cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018579 ac_datarootdir_hack='
18580 s&@datadir@&$datadir&g
18581 s&@docdir@&$docdir&g
18582 s&@infodir@&$infodir&g
18583 s&@localedir@&$localedir&g
18584 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018585 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586esac
18587_ACEOF
18588
18589# Neutralize VPATH when `$srcdir' = `.'.
18590# Shell code in configure.ac might set extrasub.
18591# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18593ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018594$extrasub
18595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018597:t
18598/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018599s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018601s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602s&@srcdir@&$ac_srcdir&;t t
18603s&@abs_srcdir@&$ac_abs_srcdir&;t t
18604s&@top_srcdir@&$ac_top_srcdir&;t t
18605s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18606s&@builddir@&$ac_builddir&;t t
18607s&@abs_builddir@&$ac_abs_builddir&;t t
18608s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18609s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018610s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018612"
Victor Stinnere0be4232011-10-25 13:06:09 +020018613eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18614 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018616test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018617 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18618 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18619 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018621which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018622$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018623which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018624
Victor Stinnere0be4232011-10-25 13:06:09 +020018625 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018627 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18628 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018629 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018630 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 ;;
18632 :H)
18633 #
18634 # CONFIG_HEADER
18635 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018637 {
18638 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018639 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18640 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018641 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018642 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018643 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18644$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018646 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018647 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018648 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018649 fi
18650 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018651 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018652 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018653 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018654 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018655 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018657
18658 esac
18659
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018660
18661 case $ac_file$ac_mode in
18662 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18663
18664 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665done # for ac_tag
18666
Guido van Rossum627b2d71993-12-24 10:39:16 +000018667
Matthias Kloseb9621712010-04-24 17:59:49 +000018668as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018669_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018670ac_clean_files=$ac_clean_files_save
18671
Matthias Kloseb9621712010-04-24 17:59:49 +000018672test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018673 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018674
Martin v. Löwis11437992002-04-12 09:54:03 +000018675
18676# configure is writing to config.log, and then calls config.status.
18677# config.status does its own redirection, appending to config.log.
18678# Unfortunately, on DOS this fails, as config.log is still kept open
18679# by configure, so config.status won't be able to write to it; its
18680# output is simply discarded. So we exec the FD to /dev/null,
18681# effectively closing config.log, so it can be properly (re)opened and
18682# appended to by config.status. When coming back to configure, we
18683# need to make the FD available again.
18684if test "$no_create" != yes; then
18685 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018686 ac_config_status_args=
18687 test "$silent" = yes &&
18688 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018690 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018691 exec 5>>config.log
18692 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18693 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018694 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018695fi
18696if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18698$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018699fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018700
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018701
Christian Heimes75ed8902013-11-20 01:11:18 +010018702echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018703if test ! -f Modules/Setup.local
18704then
18705 echo "# Edit this file for local setup changes" >Modules/Setup.local
18706fi
18707
Christian Heimes75ed8902013-11-20 01:11:18 +010018708echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018709$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018710 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018711 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018712mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018713
18714if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18715 echo "" >&6
18716 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018717 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 +000018718 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018719 echo "" >&6
18720 echo "" >&6
18721fi
18722