blob: 64bcde6bfdfb9d67784e5c6fef84ed45579713f4 [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
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
xdegaye254b3092019-04-29 09:27:40 +0200635LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700636EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200637ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000638SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000639LIBC
640LIBM
641HAVE_GETHOSTBYNAME
642HAVE_GETHOSTBYNAME_R
643HAVE_GETHOSTBYNAME_R_3_ARG
644HAVE_GETHOSTBYNAME_R_5_ARG
645HAVE_GETHOSTBYNAME_R_6_ARG
646LIBOBJS
647TRUE
648MACHDEP_OBJS
649DYNLOADFILE
650DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700651DTRACE_OBJS
652DTRACE_HEADERS
653DFLAGS
654DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700655TCLTK_LIBS
656TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000657LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800658PKG_CONFIG_LIBDIR
659PKG_CONFIG_PATH
660PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000661SHLIBS
662CFLAGSFORSHARED
663LINKFORSHARED
664CCSHARED
665BLDSHARED
666LDCXXSHARED
667LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700668SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LIBTOOL_CRUFT
670OTHER_LIBTOOL_OPT
671UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100672LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700673CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000674BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200675CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000676OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200685LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700686PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100829with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000830enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700831with_tcltk_includes
832with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_libm
841with_libc
842enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100843with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200848with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200849with_experimental_isolated_subinterpreters
Matthias Kloseb9621712010-04-24 17:59:49 +0000850'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 ac_precious_vars='build_alias
852host_alias
853target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100854MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855CC
856CFLAGS
857LDFLAGS
858LIBS
859CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800860CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700861PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800862PKG_CONFIG
863PKG_CONFIG_PATH
864PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865
Guido van Rossum627b2d71993-12-24 10:39:16 +0000866
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868ac_init_help=
869ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000870ac_unrecognized_opts=
871ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872# The variables have the same names as the options, with
873# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000874cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877no_recursion=
878prefix=NONE
879program_prefix=NONE
880program_suffix=NONE
881program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886x_includes=NONE
887x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000888
889# Installation directory options.
890# These are left unexpanded so users can "make install exec_prefix=/foo"
891# and all the variables that are supposed to be based on exec_prefix
892# by default will actually change.
893# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895bindir='${exec_prefix}/bin'
896sbindir='${exec_prefix}/sbin'
897libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898datarootdir='${prefix}/share'
899datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900sysconfdir='${prefix}/etc'
901sharedstatedir='${prefix}/com'
902localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000903includedir='${prefix}/include'
904oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
906infodir='${datarootdir}/info'
907htmldir='${docdir}'
908dvidir='${docdir}'
909pdfdir='${docdir}'
910psdir='${docdir}'
911libdir='${exec_prefix}/lib'
912localedir='${datarootdir}/locale'
913mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 # If the previous option needs an argument, assign it.
920 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922 ac_prev=
923 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000924 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200927 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
928 *=) ac_optarg= ;;
929 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 # Accept the important Cygnus configure options, so we can diagnose typos.
933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 case $ac_dashdash$ac_option in
935 --)
936 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -bindir | --bindir | --bindi | --bind | --bin | --bi)
939 ac_prev=bindir ;;
940 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
943 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 -cache-file | --cache-file | --cache-fil | --cache-fi \
949 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
950 ac_prev=cache_file ;;
951 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
952 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 cache_file=$ac_optarg ;;
954
955 --config-cache | -C)
956 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000963 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
964 | --dataroo | --dataro | --datar)
965 ac_prev=datarootdir ;;
966 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
967 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
968 datarootdir=$ac_optarg ;;
969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200974 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 ac_useropt_orig=$ac_useropt
976 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
977 case $ac_user_opts in
978 *"
979"enable_$ac_useropt"
980"*) ;;
981 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
982 ac_unrecognized_sep=', ';;
983 esac
984 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985
986 -docdir | --docdir | --docdi | --doc | --do)
987 ac_prev=docdir ;;
988 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
989 docdir=$ac_optarg ;;
990
991 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
992 ac_prev=dvidir ;;
993 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
994 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001000 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001001 ac_useropt_orig=$ac_useropt
1002 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1003 case $ac_user_opts in
1004 *"
1005"enable_$ac_useropt"
1006"*) ;;
1007 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1008 ac_unrecognized_sep=', ';;
1009 esac
1010 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1013 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1014 | --exec | --exe | --ex)
1015 ac_prev=exec_prefix ;;
1016 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1017 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1018 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 # Obsolete; use --with-gas.
1023 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 -help | --help | --hel | --he | -h)
1026 ac_init_help=long ;;
1027 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1028 ac_init_help=recursive ;;
1029 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1030 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001037 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1038 ac_prev=htmldir ;;
1039 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1040 | --ht=*)
1041 htmldir=$ac_optarg ;;
1042
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043 -includedir | --includedir | --includedi | --included | --include \
1044 | --includ | --inclu | --incl | --inc)
1045 ac_prev=includedir ;;
1046 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1047 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -infodir | --infodir | --infodi | --infod | --info | --inf)
1051 ac_prev=infodir ;;
1052 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libdir | --libdir | --libdi | --libd)
1056 ac_prev=libdir ;;
1057 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1061 | --libexe | --libex | --libe)
1062 ac_prev=libexecdir ;;
1063 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1064 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 -localedir | --localedir | --localedi | --localed | --locale)
1068 ac_prev=localedir ;;
1069 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1070 localedir=$ac_optarg ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074 ac_prev=localstatedir ;;
1075 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001076 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
1079 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1080 ac_prev=mandir ;;
1081 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 # Obsolete; use --without-fp.
1086 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 no_create=yes ;;
1091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1093 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1094 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1097 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1098 | --oldin | --oldi | --old | --ol | --o)
1099 ac_prev=oldincludedir ;;
1100 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1101 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1102 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1106 ac_prev=prefix ;;
1107 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1111 | --program-pre | --program-pr | --program-p)
1112 ac_prev=program_prefix ;;
1113 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1114 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1118 | --program-suf | --program-su | --program-s)
1119 ac_prev=program_suffix ;;
1120 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1121 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -program-transform-name | --program-transform-name \
1125 | --program-transform-nam | --program-transform-na \
1126 | --program-transform-n | --program-transform- \
1127 | --program-transform | --program-transfor \
1128 | --program-transfo | --program-transf \
1129 | --program-trans | --program-tran \
1130 | --progr-tra | --program-tr | --program-t)
1131 ac_prev=program_transform_name ;;
1132 -program-transform-name=* | --program-transform-name=* \
1133 | --program-transform-nam=* | --program-transform-na=* \
1134 | --program-transform-n=* | --program-transform-=* \
1135 | --program-transform=* | --program-transfor=* \
1136 | --program-transfo=* | --program-transf=* \
1137 | --program-trans=* | --program-tran=* \
1138 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1142 ac_prev=pdfdir ;;
1143 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1144 pdfdir=$ac_optarg ;;
1145
1146 -psdir | --psdir | --psdi | --psd | --ps)
1147 ac_prev=psdir ;;
1148 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1149 psdir=$ac_optarg ;;
1150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1152 | -silent | --silent | --silen | --sile | --sil)
1153 silent=yes ;;
1154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156 ac_prev=sbindir ;;
1157 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
1161 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163 | --sharedst | --shareds | --shared | --share | --shar \
1164 | --sha | --sh)
1165 ac_prev=sharedstatedir ;;
1166 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 -site | --site | --sit)
1173 ac_prev=site ;;
1174 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178 ac_prev=srcdir ;;
1179 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183 | --syscon | --sysco | --sysc | --sys | --sy)
1184 ac_prev=sysconfdir ;;
1185 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195 verbose=yes ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 -version | --version | --versio | --versi | --vers | -V)
1198 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 --x)
1233 # Obsolete; use --with-x.
1234 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237 | --x-incl | --x-inc | --x-in | --x-i)
1238 ac_prev=x_includes ;;
1239 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245 ac_prev=x_libraries ;;
1246 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 *=*)
1255 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 case $ac_envvar in #(
1258 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 export $ac_envvar ;;
1263
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001264 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001269 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 ;;
1271
1272 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273done
1274
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278fi
1279
Matthias Kloseb9621712010-04-24 17:59:49 +00001280if test -n "$ac_unrecognized_opts"; then
1281 case $enable_option_checking in
1282 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285 esac
1286fi
1287
1288# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290 datadir sysconfdir sharedstatedir localstatedir includedir \
1291 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001292 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001295 # Remove trailing slashes.
1296 case $ac_val in
1297 */ )
1298 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299 eval $ac_var=\$ac_val;;
1300 esac
1301 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 [\\/$]* | ?:[\\/]* ) continue;;
1304 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318 if test "x$build_alias" = x; then
1319 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 elif test "x$build_alias" != "x$host_alias"; then
1321 cross_compiling=yes
1322 fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$as_myself" : 'X\(//\)[^/]' \| \
1346 X"$as_myself" : 'X\(//\)$' \| \
1347 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001366 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368 srcdir=..
1369 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370else
1371 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383 srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_env_${ac_var}_value=\$${ac_var}
1394 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402 # Omit some internal or obsolete options to make the list less imposing.
1403 # This message is too long to be a string in the A/UX 3.1 sh.
1404 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001405\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE. See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415 -h, --help display this help and exit
1416 --help=short display options specific to this package
1417 --help=recursive display the short help of all the included packages
1418 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001419 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --cache-file=FILE cache test results in FILE [disabled]
1421 -C, --config-cache alias for \`--cache-file=config.cache'
1422 -n, --no-create do not create output files
1423 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425Installation directories:
1426 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --bindir=DIR user executables [EPREFIX/bin]
1440 --sbindir=DIR system admin executables [EPREFIX/sbin]
1441 --libexecdir=DIR program executables [EPREFIX/libexec]
1442 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1443 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1444 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1445 --libdir=DIR object code libraries [EPREFIX/lib]
1446 --includedir=DIR C header files [PREFIX/include]
1447 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1448 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1449 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1450 --infodir=DIR info documentation [DATAROOTDIR/info]
1451 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1452 --mandir=DIR man documentation [DATAROOTDIR/man]
1453 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1454 --htmldir=DIR html documentation [DOCDIR]
1455 --dvidir=DIR dvi documentation [DOCDIR]
1456 --pdfdir=DIR pdf documentation [DOCDIR]
1457 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459
1460 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001461
1462System types:
1463 --build=BUILD configure for building on BUILD [guessed]
1464 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001470 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 cat <<\_ACEOF
1473
1474Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1477 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001478 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001479 create a universal binary build. SDKDIR specifies
1480 which macOS SDK should be used to perform the build,
1481 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001483 create a Python.framework rather than a traditional
1484 Unix install. optional INSTALLDIR specifies the
1485 installation path. see Mac/README.rst (default is
1486 no)
1487 --enable-shared enable building a shared Python library (default is
1488 no)
1489 --enable-profiling enable C-level code profiling with gprof (default is
1490 no)
1491 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1492 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001494 support loadable extensions in _sqlite module, see
1495 Doc/library/sqlite3.rst (default is no)
1496 --enable-ipv6 enable ipv6 (with ipv4) support, see
1497 Doc/library/socket.rst (default is yes if supported)
1498 --enable-big-digits[=15|30]
1499 use big digits (30 or 15 bits) for Python longs
1500 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502Optional Packages:
1503 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1504 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001505 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001506 specify the kind of universal binary that should be
1507 created. this option is only valid when
1508 --enable-universalsdk is set; options are:
1509 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1510 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001511 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001512 specify the name for the python framework on macOS
1513 only valid when --enable-framework is set. see
1514 Mac/README.rst (default is 'Python')
1515 --with-cxx-main[=COMPILER]
1516 compile main() and link Python executable with C++
1517 compiler specified in COMPILER (default is $CXX)
1518 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1519 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001520 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001521 (default is no)
1522 --with-assertions build with C assertions enabled (default is no)
1523 --with-lto enable Link-Time-Optimization in any build (default
1524 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001525 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001526 select hash algorithm for use in Python/pyhash.c
1527 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001528 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001529 enable AddressSanitizer memory error detector,
1530 'asan' (default is no)
1531 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1532 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001533 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001534 enable UndefinedBehaviorSanitizer undefined
1535 behaviour detector, 'ubsan' (default is no)
1536 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001537 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001538 library, see Doc/library/pyexpat.rst (default is no)
1539 --with-system-ffi build _ctypes module using an installed ffi library,
1540 see Doc/library/ctypes.rst (default is
1541 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001542 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001543 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001544 --with-decimal-contextvar
1545 build _decimal module using a coroutine-local rather
1546 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001547 --with-tcltk-includes='-I...'
1548 override search for Tcl and Tk include files
1549 --with-tcltk-libs='-L...'
1550 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001551 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001552 override order to check db backends for dbm; a valid
1553 value is a colon separated string with the backend
1554 names `ndbm', `gdbm' and `bdb'.
1555 --with-doc-strings enable documentation strings (default is yes)
1556 --with-pymalloc enable specialized mallocs (default is yes)
1557 --with-c-locale-coercion
1558 enable C locale coercion to a UTF-8 based locale
1559 (default is yes)
1560 --with-valgrind enable Valgrind support (default is no)
1561 --with-dtrace enable DTrace support (default is no)
1562 --with-libm=STRING override libm math library to STRING (default is
1563 system-dependent)
1564 --with-libc=STRING override libc C library to STRING (default is
1565 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001566 --with-platlibdir=DIRNAME
1567 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001568 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001569 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001570 --with-ensurepip[=install|upgrade|no]
1571 "install" or "upgrade" using bundled pip (default is
1572 upgrade)
1573 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001574 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001575 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001576 Python's preferred selection (default), openssl:
1577 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001578 custom string, PROTOCOL_SSLv2 ignores the setting,
1579 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001580 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1581 builtin hash modules, md5, sha1, sha256, sha512,
1582 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001583 --with-experimental-isolated-subinterpreters
1584 better isolate subinterpreters, experimental build
1585 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
1587Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001588 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 CC C compiler command
1590 CFLAGS C compiler flags
1591 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1592 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001597 PROFILE_TASK
1598 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001599 PKG_CONFIG path to pkg-config utility
1600 PKG_CONFIG_PATH
1601 directories to add to pkg-config's search path
1602 PKG_CONFIG_LIBDIR
1603 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001604
1605Use these variables to override the choices made by `configure' or to help
1606it to find libraries and programs with nonstandard names/locations.
1607
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001608Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001609_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001611fi
1612
1613if test "$ac_init_help" = "recursive"; then
1614 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 test -d "$ac_dir" ||
1617 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 ac_builddir=.
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621case "$ac_dir" in
1622.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 case $ac_top_builddir_sub in
1628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 esac ;;
1631esac
1632ac_abs_top_builddir=$ac_pwd
1633ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634# for backward compatibility:
1635ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
1637case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 ac_top_srcdir=$ac_top_builddir_sub
1641 ac_abs_top_srcdir=$ac_pwd ;;
1642 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 ac_top_srcdir=$srcdir
1645 ac_abs_top_srcdir=$srcdir ;;
1646 *) # Relative name.
1647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648 ac_top_srcdir=$ac_top_build_prefix$srcdir
1649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001650esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653 cd "$ac_dir" || { ac_status=$?; continue; }
1654 # Check for guested configure.
1655 if test -f "$ac_srcdir/configure.gnu"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658 elif test -f "$ac_srcdir/configure"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001662 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663 fi || ac_status=$?
1664 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 done
1666fi
1667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001668test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001669if $ac_init_version; then
1670 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001671python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001672generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001673
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001674Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001675This configure script is free software; the Free Software Foundation
1676gives unlimited permission to copy, distribute and modify it.
1677_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001678 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001680
1681## ------------------------ ##
1682## Autoconf initialization. ##
1683## ------------------------ ##
1684
1685# ac_fn_c_try_compile LINENO
1686# --------------------------
1687# Try to compile conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_compile ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 rm -f conftest.$ac_objext
1692 if { { ac_try="$ac_compile"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_compile") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && {
1708 test -z "$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 } && test -s conftest.$ac_objext; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_compile
1722
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001723# ac_fn_c_try_cpp LINENO
1724# ----------------------
1725# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_cpp ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 if { { ac_try="$ac_cpp conftest.$ac_ext"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } > conftest.i && {
1745 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1756 as_fn_set_status $ac_retval
1757
1758} # ac_fn_c_try_cpp
1759
Matthias Kloseb9621712010-04-24 17:59:49 +00001760# ac_fn_c_try_link LINENO
1761# -----------------------
1762# Try to link conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_link ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001787 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
1793
1794 ac_retval=1
1795fi
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001801 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_link
1805
Matthias Kloseb9621712010-04-24 17:59:49 +00001806# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1807# -------------------------------------------------------
1808# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1809# the include files in INCLUDES and setting the cache variable VAR
1810# accordingly.
1811ac_fn_c_check_header_mongrel ()
1812{
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001814 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001817if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 $as_echo_n "(cached) " >&6
1819fi
1820eval ac_res=\$$3
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1822$as_echo "$ac_res" >&6; }
1823else
1824 # Is the header compilable?
1825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1826$as_echo_n "checking $2 usability... " >&6; }
1827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828/* end confdefs.h. */
1829$4
1830#include <$2>
1831_ACEOF
1832if ac_fn_c_try_compile "$LINENO"; then :
1833 ac_header_compiler=yes
1834else
1835 ac_header_compiler=no
1836fi
1837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1839$as_echo "$ac_header_compiler" >&6; }
1840
1841# Is the header present?
1842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1843$as_echo_n "checking $2 presence... " >&6; }
1844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1845/* end confdefs.h. */
1846#include <$2>
1847_ACEOF
1848if ac_fn_c_try_cpp "$LINENO"; then :
1849 ac_header_preproc=yes
1850else
1851 ac_header_preproc=no
1852fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001853rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1855$as_echo "$ac_header_preproc" >&6; }
1856
1857# So? What about this header?
1858case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1859 yes:no: )
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1861$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1863$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1864 ;;
1865 no:yes:* )
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1867$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1869$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1871$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1873$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1875$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001876( $as_echo "## --------------------------------------- ##
1877## Report this to https://bugs.python.org/ ##
1878## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001879 ) | sed "s/^/$as_me: WARNING: /" >&2
1880 ;;
1881esac
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1883$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=\$ac_header_compiler"
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
1892fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894
1895} # ac_fn_c_check_header_mongrel
1896
1897# ac_fn_c_try_run LINENO
1898# ----------------------
1899# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1900# that executables *can* be run.
1901ac_fn_c_try_run ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 if { { ac_try="$ac_link"
1905case "(($ac_try" in
1906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907 *) ac_try_echo=$ac_try;;
1908esac
1909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910$as_echo "$ac_try_echo"; } >&5
1911 (eval "$ac_link") 2>&5
1912 ac_status=$?
1913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1914 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1915 { { case "(($ac_try" in
1916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1917 *) ac_try_echo=$ac_try;;
1918esac
1919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1920$as_echo "$ac_try_echo"; } >&5
1921 (eval "$ac_try") 2>&5
1922 ac_status=$?
1923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924 test $ac_status = 0; }; }; then :
1925 ac_retval=0
1926else
1927 $as_echo "$as_me: program exited with status $ac_status" >&5
1928 $as_echo "$as_me: failed program was:" >&5
1929sed 's/^/| /' conftest.$ac_ext >&5
1930
1931 ac_retval=$ac_status
1932fi
1933 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001934 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 as_fn_set_status $ac_retval
1936
1937} # ac_fn_c_try_run
1938
1939# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1940# -------------------------------------------------------
1941# Tests whether HEADER exists and can be compiled using the include files in
1942# INCLUDES, setting the cache variable VAR accordingly.
1943ac_fn_c_check_header_compile ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1947$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001948if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001949 $as_echo_n "(cached) " >&6
1950else
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$4
1954#include <$2>
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 eval "$3=yes"
1958else
1959 eval "$3=no"
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962fi
1963eval ac_res=\$$3
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001966 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968} # ac_fn_c_check_header_compile
1969
Matthias Kloseb9621712010-04-24 17:59:49 +00001970# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1971# -------------------------------------------
1972# Tests whether TYPE exists after having included INCLUDES, setting cache
1973# variable VAR accordingly.
1974ac_fn_c_check_type ()
1975{
1976 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001979if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001980 $as_echo_n "(cached) " >&6
1981else
1982 eval "$3=no"
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986int
1987main ()
1988{
1989if (sizeof ($2))
1990 return 0;
1991 ;
1992 return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"; then :
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002if (sizeof (($2)))
2003 return 0;
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009
2010else
2011 eval "$3=yes"
2012fi
2013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002020 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022} # ac_fn_c_check_type
2023
Matthias Kloseb9621712010-04-24 17:59:49 +00002024# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2025# --------------------------------------------
2026# Tries to find the compile-time value of EXPR in a program that includes
2027# INCLUDES, setting VAR accordingly. Returns whether the value could be
2028# computed
2029ac_fn_c_compute_int ()
2030{
2031 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032 if test "$cross_compiling" = yes; then
2033 # Depending upon the size, compute the lo and hi bounds.
2034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002041test_array [0] = 0;
2042return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 ac_lo=0 ac_mid=0
2050 while :; do
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=$ac_mid; break
2067else
2068 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2069 if test $ac_lo -le $ac_mid; then
2070 ac_lo= ac_hi=
2071 break
2072 fi
2073 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 done
2077else
2078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079/* end confdefs.h. */
2080$4
2081int
2082main ()
2083{
2084static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002085test_array [0] = 0;
2086return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002087
2088 ;
2089 return 0;
2090}
2091_ACEOF
2092if ac_fn_c_try_compile "$LINENO"; then :
2093 ac_hi=-1 ac_mid=-1
2094 while :; do
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002102test_array [0] = 0;
2103return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_lo=$ac_mid; break
2111else
2112 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2113 if test $ac_mid -le $ac_hi; then
2114 ac_lo= ac_hi=
2115 break
2116 fi
2117 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 done
2121else
2122 ac_lo= ac_hi=
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127# Binary search between lo and hi bounds.
2128while test "x$ac_lo" != "x$ac_hi"; do
2129 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002137test_array [0] = 0;
2138return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_hi=$ac_mid
2146else
2147 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150done
2151case $ac_lo in #((
2152?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2153'') ac_retval=1 ;;
2154esac
2155 else
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159static long int longval () { return $2; }
2160static unsigned long int ulongval () { return $2; }
2161#include <stdio.h>
2162#include <stdlib.h>
2163int
2164main ()
2165{
2166
2167 FILE *f = fopen ("conftest.val", "w");
2168 if (! f)
2169 return 1;
2170 if (($2) < 0)
2171 {
2172 long int i = longval ();
2173 if (i != ($2))
2174 return 1;
2175 fprintf (f, "%ld", i);
2176 }
2177 else
2178 {
2179 unsigned long int i = ulongval ();
2180 if (i != ($2))
2181 return 1;
2182 fprintf (f, "%lu", i);
2183 }
2184 /* Do not output a trailing newline, as this causes \r\n confusion
2185 on some platforms. */
2186 return ferror (f) || fclose (f) != 0;
2187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_run "$LINENO"; then :
2193 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2194else
2195 ac_retval=1
2196fi
2197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2198 conftest.$ac_objext conftest.beam conftest.$ac_ext
2199rm -f conftest.val
2200
2201 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002202 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002203 as_fn_set_status $ac_retval
2204
2205} # ac_fn_c_compute_int
2206
2207# ac_fn_c_check_func LINENO FUNC VAR
2208# ----------------------------------
2209# Tests whether FUNC exists, setting the cache variable VAR accordingly
2210ac_fn_c_check_func ()
2211{
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2214$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002215if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002216 $as_echo_n "(cached) " >&6
2217else
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2222#define $2 innocuous_$2
2223
2224/* System header to define __stub macros and hopefully few prototypes,
2225 which can conflict with char $2 (); below.
2226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2227 <limits.h> exists even on freestanding compilers. */
2228
2229#ifdef __STDC__
2230# include <limits.h>
2231#else
2232# include <assert.h>
2233#endif
2234
2235#undef $2
2236
2237/* Override any GCC internal prototype to avoid an error.
2238 Use char because int might match the return type of a GCC
2239 builtin and then its argument prototype would still apply. */
2240#ifdef __cplusplus
2241extern "C"
2242#endif
2243char $2 ();
2244/* The GNU C library defines this for functions which it implements
2245 to always fail with ENOSYS. Some functions are actually named
2246 something starting with __ and the normal name is an alias. */
2247#if defined __stub_$2 || defined __stub___$2
2248choke me
2249#endif
2250
2251int
2252main ()
2253{
2254return $2 ();
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_link "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext \
2265 conftest$ac_exeext conftest.$ac_ext
2266fi
2267eval ac_res=\$$3
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002271
2272} # ac_fn_c_check_func
2273
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002274# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2275# ---------------------------------------------
2276# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2277# accordingly.
2278ac_fn_c_check_decl ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 as_decl_name=`echo $2|sed 's/ *(.*//'`
2282 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2284$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2285if eval \${$3+:} false; then :
2286 $as_echo_n "(cached) " >&6
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290$4
2291int
2292main ()
2293{
2294#ifndef $as_decl_name
2295#ifdef __cplusplus
2296 (void) $as_decl_use;
2297#else
2298 (void) $as_decl_name;
2299#endif
2300#endif
2301
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_compile "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312fi
2313eval ac_res=\$$3
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
2316 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317
2318} # ac_fn_c_check_decl
2319
Matthias Kloseb9621712010-04-24 17:59:49 +00002320# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2321# ----------------------------------------------------
2322# Tries to find if the field MEMBER exists in type AGGR, after including
2323# INCLUDES, setting cache variable VAR accordingly.
2324ac_fn_c_check_member ()
2325{
2326 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2328$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002330 $as_echo_n "(cached) " >&6
2331else
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h. */
2334$5
2335int
2336main ()
2337{
2338static $2 ac_aggr;
2339if (ac_aggr.$3)
2340return 0;
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"; then :
2346 eval "$4=yes"
2347else
2348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h. */
2350$5
2351int
2352main ()
2353{
2354static $2 ac_aggr;
2355if (sizeof ac_aggr.$3)
2356return 0;
2357 ;
2358 return 0;
2359}
2360_ACEOF
2361if ac_fn_c_try_compile "$LINENO"; then :
2362 eval "$4=yes"
2363else
2364 eval "$4=no"
2365fi
2366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369fi
2370eval ac_res=\$$4
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002374
2375} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002377This file contains any messages produced by compilers while
2378running configure, to aid debugging if configure makes a mistake.
2379
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002380It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002381generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383 $ $0 $@
2384
2385_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002387{
2388cat <<_ASUNAME
2389## --------- ##
2390## Platform. ##
2391## --------- ##
2392
2393hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2394uname -m = `(uname -m) 2>/dev/null || echo unknown`
2395uname -r = `(uname -r) 2>/dev/null || echo unknown`
2396uname -s = `(uname -s) 2>/dev/null || echo unknown`
2397uname -v = `(uname -v) 2>/dev/null || echo unknown`
2398
2399/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2400/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2401
2402/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2403/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2404/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002406/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2407/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2408/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2409
2410_ASUNAME
2411
2412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2413for as_dir in $PATH
2414do
2415 IFS=$as_save_IFS
2416 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 $as_echo "PATH: $as_dir"
2418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002420
2421} >&5
2422
2423cat >&5 <<_ACEOF
2424
2425
2426## ----------- ##
2427## Core tests. ##
2428## ----------- ##
2429
2430_ACEOF
2431
2432
2433# Keep a trace of the command line.
2434# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002435# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002436# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002437# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002439ac_configure_args0=
2440ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002441ac_must_keep_next=false
2442for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002443do
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 for ac_arg
2445 do
2446 case $ac_arg in
2447 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2448 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2449 | -silent | --silent | --silen | --sile | --sil)
2450 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 esac
2454 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002459 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002461 case $ac_arg in
2462 *=* | --config-cache | -C | -disable-* | --disable-* \
2463 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2464 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2465 | -with-* | --with-* | -without-* | --without-* | --x)
2466 case "$ac_configure_args0 " in
2467 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2468 esac
2469 ;;
2470 -* ) ac_must_keep_next=true ;;
2471 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002472 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477done
Matthias Kloseb9621712010-04-24 17:59:49 +00002478{ ac_configure_args0=; unset ac_configure_args0;}
2479{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002480
2481# When interrupted or exit'd, cleanup temporary files, and complete
2482# config.log. We remove comments because anyway the quotes in there
2483# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484# WARNING: Use '\'' to represent an apostrophe within the trap.
2485# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002486trap 'exit_status=$?
2487 # Save into config.log some information that might help in debugging.
2488 {
2489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002492## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 echo
2495 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496(
2497 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2498 eval ac_val=\$$ac_var
2499 case $ac_val in #(
2500 *${as_nl}*)
2501 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2503$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
2505 case $ac_var in #(
2506 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2508 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac ;;
2510 esac
2511 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2514 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 "s/'\''/'\''\\\\'\'''\''/g;
2517 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2518 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002519 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002521 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac |
2523 sort
2524)
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002526
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002528## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 echo
2531 for ac_var in $ac_subst_vars
2532 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 eval ac_val=\$$ac_var
2534 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 done | sort
2539 echo
2540
2541 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002542 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 echo
2546 for ac_var in $ac_subst_files
2547 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 eval ac_val=\$$ac_var
2549 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002552 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 done | sort
2554 echo
2555 fi
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002558 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002560## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 echo
2564 fi
2565 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 $as_echo "$as_me: caught signal $ac_signal"
2567 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 rm -f core *.core core.conftest.* &&
2570 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002573for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002575done
2576ac_signal=0
2577
2578# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
Matthias Kloseb9621712010-04-24 17:59:49 +00002581$as_echo "/* confdefs.h */" > confdefs.h
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583# Predefined preprocessor variables.
2584
2585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_NAME "$PACKAGE_NAME"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_VERSION "$PACKAGE_VERSION"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_STRING "$PACKAGE_STRING"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2603_ACEOF
2604
Matthias Kloseb9621712010-04-24 17:59:49 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_URL "$PACKAGE_URL"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609
2610# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002611# Prefer an explicitly selected file to automatically selected ones.
2612ac_site_file1=NONE
2613ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615 # We do not want a PATH search for config.site.
2616 case $CONFIG_SITE in #((
2617 -*) ac_site_file1=./$CONFIG_SITE;;
2618 */*) ac_site_file1=$CONFIG_SITE;;
2619 *) ac_site_file1=./$CONFIG_SITE;;
2620 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 ac_site_file1=$prefix/share/config.site
2623 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624else
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 ac_site_file1=$ac_default_prefix/share/config.site
2626 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002628for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629do
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 test "x$ac_site_file" = xNONE && continue
2631 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2633$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 . "$ac_site_file" \
2636 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2638as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002639See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002640 fi
2641done
2642
2643if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # Some versions of bash will fail to source /dev/null (special files
2645 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2646 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2648$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2651 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 esac
2653 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002654else
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2656$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 >$cache_file
2658fi
2659
2660# Check that the precious variables saved in the cache have kept the same
2661# value.
2662ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2665 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2667 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 case $ac_old_set,$ac_new_set in
2669 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2671$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 ac_cache_corrupted=: ;;
2673 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2675$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 ac_cache_corrupted=: ;;
2677 ,);;
2678 *)
2679 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 # differences in whitespace do not lead to failure.
2681 ac_old_val_w=`echo x $ac_old_val`
2682 ac_new_val_w=`echo x $ac_new_val`
2683 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2685$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2686 ac_cache_corrupted=:
2687 else
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2689$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2690 eval $ac_var=\$ac_old_val
2691 fi
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2693$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2695$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 fi;;
2697 esac
2698 # Pass precious variables to config.status.
2699 if test "$ac_new_set" = set; then
2700 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 *) ac_arg=$ac_var=$ac_new_val ;;
2703 esac
2704 case " $ac_configure_args " in
2705 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 esac
2708 fi
2709done
2710if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2714$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002715 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002717## -------------------- ##
2718## Main body of script. ##
2719## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720
Guido van Rossum7f43da71994-08-01 12:15:30 +00002721ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
Guido van Rossum627b2d71993-12-24 10:39:16 +00002727
Michael W. Hudson54241132001-12-07 15:38:26 +00002728
Trent Nelson4d4ec652012-10-16 08:51:24 -04002729
Christian Heimesff5be6e2018-01-20 13:19:21 +01002730
2731
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002732if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002733 # If we're building out-of-tree, we need to make sure the following
2734 # resources get picked up before their $srcdir counterparts.
2735 # Objects/ -> typeslots.inc
2736 # Include/ -> Python-ast.h, graminit.h
2737 # Python/ -> importlib.h
2738 # (A side effect of this is that these resources will automatically be
2739 # regenerated when building out-of-tree, regardless of whether or not
2740 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2741 # off.)
2742 BASECPPFLAGS="-IObjects -IInclude -IPython"
2743else
2744 BASECPPFLAGS=""
2745fi
2746
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747
2748
2749
2750
Victor Stinner9ed34a82017-05-02 22:35:58 +02002751if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753# Extract the first word of "git", so it can be a program name with args.
2754set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2756$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758 $as_echo_n "(cached) " >&6
2759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 if test -n "$HAS_GIT"; then
2761 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
2763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2764for as_dir in $PATH
2765do
2766 IFS=$as_save_IFS
2767 test -z "$as_dir" && as_dir=.
2768 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2772 break 2
2773 fi
2774done
2775 done
2776IFS=$as_save_IFS
2777
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779fi
2780fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002781HAS_GIT=$ac_cv_prog_HAS_GIT
2782if test -n "$HAS_GIT"; then
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2784$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002785else
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2787$as_echo "no" >&6; }
2788fi
2789
2790
2791else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002794if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795then
Xiang Zhang4c855572018-08-20 22:36:19 +08002796 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2797 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2798 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002800 GITVERSION=""
2801 GITTAG=""
2802 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803fi
2804
2805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002807
2808
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002809ac_aux_dir=
2810for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2811 if test -f "$ac_dir/install-sh"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/install-sh -c"
2814 break
2815 elif test -f "$ac_dir/install.sh"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/install.sh -c"
2818 break
2819 elif test -f "$ac_dir/shtool"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/shtool install -c"
2822 break
2823 fi
2824done
2825if test -z "$ac_aux_dir"; then
2826 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2827fi
2828
2829# These three variables are undocumented and unsupported,
2830# and are intended to be withdrawn in a future Autoconf release.
2831# They can cause serious problems if a builder's source tree is in a directory
2832# whose full name contains unusual characters.
2833ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2834ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2835ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2836
2837
2838# Make sure we can run config.sub.
2839$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2840 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2841
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2843$as_echo_n "checking build system type... " >&6; }
2844if ${ac_cv_build+:} false; then :
2845 $as_echo_n "(cached) " >&6
2846else
2847 ac_build_alias=$build_alias
2848test "x$ac_build_alias" = x &&
2849 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2850test "x$ac_build_alias" = x &&
2851 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2852ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2853 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2854
2855fi
2856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2857$as_echo "$ac_cv_build" >&6; }
2858case $ac_cv_build in
2859*-*-*) ;;
2860*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2861esac
2862build=$ac_cv_build
2863ac_save_IFS=$IFS; IFS='-'
2864set x $ac_cv_build
2865shift
2866build_cpu=$1
2867build_vendor=$2
2868shift; shift
2869# Remember, the first character of IFS is used to create $*,
2870# except with old shells:
2871build_os=$*
2872IFS=$ac_save_IFS
2873case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2874
2875
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2877$as_echo_n "checking host system type... " >&6; }
2878if ${ac_cv_host+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880else
2881 if test "x$host_alias" = x; then
2882 ac_cv_host=$ac_cv_build
2883else
2884 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2886fi
2887
2888fi
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2890$as_echo "$ac_cv_host" >&6; }
2891case $ac_cv_host in
2892*-*-*) ;;
2893*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2894esac
2895host=$ac_cv_host
2896ac_save_IFS=$IFS; IFS='-'
2897set x $ac_cv_host
2898shift
2899host_cpu=$1
2900host_vendor=$2
2901shift; shift
2902# Remember, the first character of IFS is used to create $*,
2903# except with old shells:
2904host_os=$*
2905IFS=$ac_save_IFS
2906case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2907
2908
2909
doko@python.orga10e4a92013-01-25 18:45:12 +01002910
2911
Ned Deilyfcbc2462014-08-22 13:32:49 -07002912# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2913rm -f pybuilddir.txt
2914
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915for ac_prog in python$PACKAGE_VERSION python3 python
2916do
2917 # Extract the first word of "$ac_prog", so it can be a program name with args.
2918set dummy $ac_prog; ac_word=$2
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2920$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002921if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922 $as_echo_n "(cached) " >&6
2923else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002924 if test -n "$PYTHON_FOR_REGEN"; then
2925 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926else
2927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928for as_dir in $PATH
2929do
2930 IFS=$as_save_IFS
2931 test -z "$as_dir" && as_dir=.
2932 for ac_exec_ext in '' $ac_executable_extensions; do
2933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002934 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2936 break 2
2937 fi
2938done
2939 done
2940IFS=$as_save_IFS
2941
2942fi
2943fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002944PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2945if test -n "$PYTHON_FOR_REGEN"; then
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2947$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002948else
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2950$as_echo "no" >&6; }
2951fi
2952
2953
Victor Stinnera5c62a82017-05-03 18:21:48 +02002954 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002955done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002956test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002957
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002958
2959
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002960if test "$cross_compiling" = yes; then
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2962$as_echo_n "checking for python interpreter for cross build... " >&6; }
2963 if test -z "$PYTHON_FOR_BUILD"; then
2964 for interp in python$PACKAGE_VERSION python3 python; do
2965 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002966 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002967 break
2968 fi
2969 interp=
2970 done
2971 if test x$interp = x; then
2972 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2973 fi
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2975$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002976 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002977 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002978elif test "$cross_compiling" = maybe; then
2979 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002980else
2981 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2982fi
2983
2984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
Benjamin Petersond23f8222009-04-05 19:13:16 +00002986if test "$prefix" != "/"; then
2987 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
2992
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002993# We don't use PACKAGE_ variables, and they cause conflicts
2994# with other autoconf-based packages that include Python.h
2995grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2996rm confdefs.h
2997mv confdefs.h.new confdefs.h
2998
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002999
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003000VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003001
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003002# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003003
3004SOVERSION=1.0
3005
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006# The later defininition of _XOPEN_SOURCE disables certain features
3007# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
3011
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003017
3018
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003024
3025
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003027# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3028# them.
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003031
3032
3033
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003034define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003035
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003036# Arguments passed to configure.
3037
3038CONFIG_ARGS="$ac_configure_args"
3039
Matthias Kloseb9621712010-04-24 17:59:49 +00003040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3041$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003043if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 case $enableval in
3046 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003047 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003048 # information
3049 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003050 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3053 if test ! -d "${enableval}"
3054 then
3055 enableval=/
3056 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058 ;;
3059 esac
3060 case $enableval in
3061 no)
3062 UNIVERSALSDK=
3063 enable_universalsdk=
3064 ;;
3065 *)
3066 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067 if test ! -d "${UNIVERSALSDK}"
3068 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003069 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071 ;;
3072 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075else
3076
3077 UNIVERSALSDK=
3078 enable_universalsdk=
3079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082if test -n "${UNIVERSALSDK}"
3083then
Matthias Kloseb9621712010-04-24 17:59:49 +00003084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3085$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086else
Matthias Kloseb9621712010-04-24 17:59:49 +00003087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3088$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003089fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003092
Ned Deily87adb6e2013-10-18 21:09:56 -07003093ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deilycbfb9a52012-06-23 16:02:19 -07003095# For backward compatibility reasons we prefer to select '32-bit' if available,
3096# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003098if test "`uname -s`" = "Darwin"
3099then
3100 if test -n "${UNIVERSALSDK}"
3101 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003102 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103 then
3104 UNIVERSAL_ARCHS="intel"
3105 fi
3106 fi
3107fi
3108
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003109
Matthias Kloseb9621712010-04-24 17:59:49 +00003110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3111$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003112
3113# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003114if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116 UNIVERSAL_ARCHS="$withval"
3117
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118fi
3119
Ned Deily87adb6e2013-10-18 21:09:56 -07003120if test -n "${UNIVERSALSDK}"
3121then
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3123$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3124else
3125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3126$as_echo "no" >&6; }
3127fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003129
3130# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003131if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003132 withval=$with_framework_name;
3133 PYTHONFRAMEWORK=${withval}
3134 PYTHONFRAMEWORKDIR=${withval}.framework
3135 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3136
3137else
3138
3139 PYTHONFRAMEWORK=Python
3140 PYTHONFRAMEWORKDIR=Python.framework
3141 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3142
3143fi
3144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003146if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003148 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003149 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003150 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003151 esac
3152 case $enableval in
3153 no)
3154 PYTHONFRAMEWORK=
3155 PYTHONFRAMEWORKDIR=no-framework
3156 PYTHONFRAMEWORKPREFIX=
3157 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003158 FRAMEWORKINSTALLFIRST=
3159 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 FRAMEWORKALTINSTALLFIRST=
3161 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003162 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003163 if test "x${prefix}" = "xNONE"; then
3164 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3165 else
3166 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3167 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003169 ;;
3170 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003171 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003172 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003173 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003174 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003175 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3176 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003177 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003178 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003179
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003180 if test "x${prefix}" = "xNONE" ; then
3181 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003183 else
3184 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3185 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003186
3187 case "${enableval}" in
3188 /System*)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 if test "${prefix}" = "NONE" ; then
3191 # See below
3192 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3193 fi
3194 ;;
3195
3196 /Library*)
3197 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3198 ;;
3199
3200 */Library/Frameworks)
3201 MDIR="`dirname "${enableval}"`"
3202 MDIR="`dirname "${MDIR}"`"
3203 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3204
3205 if test "${prefix}" = "NONE"; then
3206 # User hasn't specified the
3207 # --prefix option, but wants to install
3208 # the framework in a non-default location,
3209 # ensure that the compatibility links get
3210 # installed relative to that prefix as well
3211 # instead of in /usr/local.
3212 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3213 fi
3214 ;;
3215
3216 *)
3217 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3218 ;;
3219 esac
3220
Jack Jansen127e56e2001-09-11 14:41:54 +00003221 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003223 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3230
3231 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003234
Guido van Rossum563e7081996-09-10 18:20:48 +00003235else
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Jack Jansene578a632001-08-15 01:27:14 +00003237 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003238 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORKPREFIX=
3240 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241 FRAMEWORKINSTALLFIRST=
3242 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003243 FRAMEWORKALTINSTALLFIRST=
3244 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003246 if test "x${prefix}" = "xNONE" ; then
3247 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3248 else
3249 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3250 fi
Jack Jansene578a632001-08-15 01:27:14 +00003251 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254fi
3255
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256
3257
Michael W. Hudson54241132001-12-07 15:38:26 +00003258
3259
3260
3261
Jack Jansene578a632001-08-15 01:27:14 +00003262
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003263
3264
3265
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003266
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267
Ned Deilyb8f944f2013-11-21 22:42:25 -08003268
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003269
3270cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003271#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003272_ACEOF
3273
3274
Jack Jansene578a632001-08-15 01:27:14 +00003275##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003276## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003277## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003278##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279# Set name for machine-dependent library files
3280
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3282$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283if test -z "$MACHDEP"
3284then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 # avoid using uname for cross builds
3286 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003287 # ac_sys_system and ac_sys_release are used for setting
3288 # a lot of different things including 'define_xopen_source'
3289 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003291 *-*-linux-android*)
3292 ac_sys_system=Linux-android
3293 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 *-*-linux*)
3295 ac_sys_system=Linux
3296 ;;
3297 *-*-cygwin*)
3298 ac_sys_system=Cygwin
3299 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003300 *-*-vxworks*)
3301 ac_sys_system=VxWorks
3302 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 *)
3304 # for now, limit cross builds to known configurations
3305 MACHDEP="unknown"
3306 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3307 esac
3308 ac_sys_release=
3309 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003310 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003311 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003312 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003313 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003316 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 fi
3318 ac_md_system=`echo $ac_sys_system |
3319 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3320 ac_md_release=`echo $ac_sys_release |
3321 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3322 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003323
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003325 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003326 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003327 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003328 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003329 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003331fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3333$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003334
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003335
3336if test "$cross_compiling" = yes; then
3337 case "$host" in
3338 *-*-linux*)
3339 case "$host_cpu" in
3340 arm*)
3341 _host_cpu=arm
3342 ;;
3343 *)
3344 _host_cpu=$host_cpu
3345 esac
3346 ;;
3347 *-*-cygwin*)
3348 _host_cpu=
3349 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003350 *-*-vxworks*)
3351 _host_cpu=$host_cpu
3352 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003353 *)
3354 # for now, limit cross builds to known configurations
3355 MACHDEP="unknown"
3356 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3357 esac
3358 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3359fi
3360
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003361# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3362# disable features if it is defined, without any means to access these
3363# features as extensions. For these systems, we skip the definition of
3364# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3365# some feature, make sure there is no alternative way to access this
3366# feature. Also, when using wildcards, make sure you have verified the
3367# need for not defining _XOPEN_SOURCE on all systems matching the
3368# wildcard, and that the wildcard does not include future systems
3369# (which may remove their limitations).
3370case $ac_sys_system/$ac_sys_release in
3371 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3372 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003373 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003374 # In addition, Stefan Krah confirms that issue #1244610 exists through
3375 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003376 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003377 define_xopen_source=no
3378 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3379 # also defined. This can be overridden by defining _BSD_SOURCE
3380 # As this has a different meaning on Linux, only define it on OpenBSD
3381
Matthias Kloseb9621712010-04-24 17:59:49 +00003382$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003383
3384 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003385 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003386 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3387 # also defined. This can be overridden by defining _BSD_SOURCE
3388 # As this has a different meaning on Linux, only define it on OpenBSD
3389
Matthias Kloseb9621712010-04-24 17:59:49 +00003390$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003391
3392 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003393 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3394 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3395 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003396 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003398 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3399 # request to enable features supported by the standard as a request
3400 # to disable features not supported by the standard. The best way
3401 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3402 # entirely and define __EXTENSIONS__ instead.
3403 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003404 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3406 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003407 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003408 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003409 define_xopen_source=no;;
3410 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003411 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003412 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003413 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003414 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3415 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3416 # identifies itself as Darwin/7.*
3417 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3418 # disables platform specific features beyond repair.
3419 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3420 # has no effect, don't bother defining them
3421 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003422 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003423 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003424 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003425 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3426 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3427 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003428 AIX/4)
3429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 AIX/5)
3431 if test `uname -r` -eq 1; then
3432 define_xopen_source=no
3433 fi
3434 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003435 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3436 # defining NI_NUMERICHOST.
3437 QNX/6.3.2)
3438 define_xopen_source=no
3439 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003440 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3441 # in network headers still using system V types.
3442 VxWorks/*)
3443 define_xopen_source=no
3444 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003445
Ian Nortona9edf442020-02-14 03:09:11 +00003446 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3447 # chroot() and other functions
3448 hp*|HP*)
3449 define_xopen_source=no
3450 ;;
3451
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003452esac
3453
3454if test $define_xopen_source = yes
3455then
Victor Stinner14d098d2011-09-07 22:29:43 +02003456 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Victor Stinner14d098d2011-09-07 22:29:43 +02003458$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003459
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003460
3461 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3462 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3463 # several APIs are not declared. Since this is also needed in some
3464 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Matthias Kloseb9621712010-04-24 17:59:49 +00003466$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
3468
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003469
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003470$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003472fi
3473
Christian Heimes647cd872013-12-07 23:39:33 +01003474# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3475case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003476 hp*|HP*)
3477 define_stdc_a1=yes;;
3478 *)
3479 define_stdc_a1=no;;
3480esac
3481
3482if test $define_stdc_a1 = yes
3483then
Christian Heimes647cd872013-12-07 23:39:33 +01003484
3485$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3486
Christian Heimesb02bcae2013-12-08 15:21:08 +01003487fi
Christian Heimes647cd872013-12-07 23:39:33 +01003488
Jack Jansen6b08a402004-06-03 12:41:45 +00003489# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3490# it may influence the way we can build extensions, so distutils
3491# needs to check it
3492
Thomas Wouters477c8d52006-05-27 19:21:47 +00003493
Jack Jansen6b08a402004-06-03 12:41:45 +00003494CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003495EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003496
Guido van Rossum627b2d71993-12-24 10:39:16 +00003497# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003498
3499# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3500# for debug/optimization stuff. BASECFLAGS is for flags that are required
3501# just to get things to compile and link. Users are free to override OPT
3502# when running configure or make. The build should not break if they do.
3503# BASECFLAGS should generally not be messed with, however.
3504
Guido van Rossum8b131c51995-03-09 14:10:13 +00003505# If the user switches compilers, we can't believe the cache
3506if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3507then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003508 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003509(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003510fi
3511
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003512# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3513# when the compiler supports them, but we don't always want -O2, and
3514# we set -g later.
3515if test -z "$CFLAGS"; then
3516 CFLAGS=
3517fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518
3519if test "$ac_sys_system" = "Darwin"
3520then
3521 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003522 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523 # information
3524 if test -z "${CC}"
3525 then
3526 found_gcc=
3527 found_clang=
3528 as_save_IFS=$IFS; IFS=:
3529 for as_dir in $PATH
3530 do
3531 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003532 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003534 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535 fi
3536 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003537 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003538 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003539 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540 fi
3541 fi
3542 done
3543 IFS=$as_save_IFS
3544
3545 if test -n "$found_gcc" -a -n "$found_clang"
3546 then
3547 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3548 then
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3550$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3551 CC="$found_clang"
3552 CXX="$found_clang++"
3553 fi
3554
3555
3556 elif test -z "$found_gcc" -a -n "$found_clang"
3557 then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3559$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3560 CC="$found_clang"
3561 CXX="$found_clang++"
3562
3563 elif test -z "$found_gcc" -a -z "$found_clang"
3564 then
3565 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3566 if test -n "${found_clang}"
3567 then
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3569$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3570 CC="${found_clang}"
3571 CXX="`/usr/bin/xcrun -find clang++`"
3572
3573 # else: use default behaviour
3574 fi
3575 fi
3576 fi
3577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578ac_ext=c
3579ac_cpp='$CPP $CPPFLAGS'
3580ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3581ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3582ac_compiler_gnu=$ac_cv_c_compiler_gnu
3583if test -n "$ac_tool_prefix"; then
3584 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3585set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3587$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003588if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 break 2
3604 fi
3605done
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003608
Jack Jansendd19cf82001-12-06 22:36:17 +00003609fi
3610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003611CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003612if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3614$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003615else
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3617$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621fi
3622if test -z "$ac_cv_prog_CC"; then
3623 ac_ct_CC=$CC
3624 # Extract the first word of "gcc", so it can be a program name with args.
3625set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003628if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003630else
3631 if test -n "$ac_ct_CC"; then
3632 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3633else
3634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3635for as_dir in $PATH
3636do
3637 IFS=$as_save_IFS
3638 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 break 2
3644 fi
3645done
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003648
3649fi
3650fi
3651ac_ct_CC=$ac_cv_prog_ac_ct_CC
3652if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3654$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3657$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658fi
3659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 if test "x$ac_ct_CC" = x; then
3661 CC=""
3662 else
3663 case $cross_compiling:$ac_tool_warned in
3664yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667ac_tool_warned=yes ;;
3668esac
3669 CC=$ac_ct_CC
3670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003673fi
3674
Jack Jansendd19cf82001-12-06 22:36:17 +00003675if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 if test -n "$ac_tool_prefix"; then
3677 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003678set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3680$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003681if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003683else
3684 if test -n "$CC"; then
3685 ac_cv_prog_CC="$CC" # Let the user override the test.
3686else
Martin v. Löwis11437992002-04-12 09:54:03 +00003687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688for as_dir in $PATH
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 break 2
3697 fi
3698done
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702fi
3703fi
3704CC=$ac_cv_prog_CC
3705if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3707$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003708else
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3710$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716if test -z "$CC"; then
3717 # Extract the first word of "cc", so it can be a program name with args.
3718set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3720$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003721if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
3724 if test -n "$CC"; then
3725 ac_cv_prog_CC="$CC" # Let the user override the test.
3726else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003727 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3736 ac_prog_rejected=yes
3737 continue
3738 fi
3739 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 break 2
3742 fi
3743done
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003746
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747if test $ac_prog_rejected = yes; then
3748 # We found a bogon in the path, so make sure we never use it.
3749 set dummy $ac_cv_prog_CC
3750 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 # We chose a different compiler from the bogus one.
3753 # However, it has the same basename, so the bogon will be chosen
3754 # first if we set CC to just the basename; use the full file name.
3755 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003756 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 fi
3758fi
3759fi
3760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003761CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3764$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765else
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3767$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768fi
3769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
3772if test -z "$CC"; then
3773 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 do
3776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003780if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003782else
3783 if test -n "$CC"; then
3784 ac_cv_prog_CC="$CC" # Let the user override the test.
3785else
Martin v. Löwis11437992002-04-12 09:54:03 +00003786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003797done
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003800
3801fi
3802fi
3803CC=$ac_cv_prog_CC
3804if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3806$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3809$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003810fi
3811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 test -n "$CC" && break
3814 done
3815fi
3816if test -z "$CC"; then
3817 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003819do
3820 # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003824if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003826else
3827 if test -n "$ac_ct_CC"; then
3828 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3829else
3830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3831for as_dir in $PATH
3832do
3833 IFS=$as_save_IFS
3834 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 break 2
3840 fi
3841done
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846fi
3847ac_ct_CC=$ac_cv_prog_ac_ct_CC
3848if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3850$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3853$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857 test -n "$ac_ct_CC" && break
3858done
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860 if test "x$ac_ct_CC" = x; then
3861 CC=""
3862 else
3863 case $cross_compiling:$ac_tool_warned in
3864yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867ac_tool_warned=yes ;;
3868esac
3869 CC=$ac_ct_CC
3870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
3872
3873fi
3874
3875
Matthias Kloseb9621712010-04-24 17:59:49 +00003876test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003878as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003879See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880
3881# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3883set X $ac_compile
3884ac_compiler=$2
3885for ac_option in --version -v -V -qversion; do
3886 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887case "(($ac_try" in
3888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3889 *) ac_try_echo=$ac_try;;
3890esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3892$as_echo "$ac_try_echo"; } >&5
3893 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 if test -s conftest.err; then
3896 sed '10a\
3897... rest of stderr output deleted ...
3898 10q' conftest.err >conftest.er1
3899 cat conftest.er1 >&5
3900 fi
3901 rm -f conftest.er1 conftest.err
3902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3903 test $ac_status = 0; }
3904done
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
Matthias Kloseb9621712010-04-24 17:59:49 +00003906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003907/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003908
Martin v. Löwis11437992002-04-12 09:54:03 +00003909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
3917ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003918ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003919# Try to create an executable without -o first, disregard a.out.
3920# It will help us diagnose broken compilers, and finding out an intuition
3921# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3923$as_echo_n "checking whether the C compiler works... " >&6; }
3924ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3925
3926# The possible output files:
3927ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929ac_rmfiles=
3930for ac_file in $ac_files
3931do
3932 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3935 esac
3936done
3937rm -f $ac_rmfiles
3938
Matthias Kloseb9621712010-04-24 17:59:49 +00003939if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940case "(($ac_try" in
3941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942 *) ac_try_echo=$ac_try;;
3943esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3951# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3952# in a Makefile. We should not override ac_cv_exeext if it was cached,
3953# so that the user can short-circuit this test for compilers unknown to
3954# Autoconf.
3955for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003956do
3957 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960 ;;
3961 [ab].out )
3962 # We found the default executable, but exeext='' is most
3963 # certainly right.
3964 break;;
3965 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 then :; else
3968 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3969 fi
3970 # We set ac_cv_exeext here because the later test for it is not
3971 # safe: cross compilers may not add the suffix if given an `-o'
3972 # argument, so we may need to know it at that point already.
3973 # Even if this section looks crufty: it has the advantage of
3974 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 break;;
3976 * )
3977 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 esac
3979done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980test "$ac_cv_exeext" = no && ac_cv_exeext=
3981
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983 ac_file=''
3984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003985if test -z "$ac_file"; then :
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3987$as_echo "no" >&6; }
3988$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003989sed 's/^/| /' conftest.$ac_ext >&5
3990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003993as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003994See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003995else
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3997$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4000$as_echo_n "checking for C compiler default output file name... " >&6; }
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4002$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4008$as_echo_n "checking for suffix of executables... " >&6; }
4009if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4021# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4022# work properly (i.e., refer to `conftest.exe'), while it won't with
4023# `rm'.
4024for ac_file in conftest.exe conftest conftest.*; do
4025 test -f "$ac_file" || continue
4026 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4029 break;;
4030 * ) break;;
4031 esac
4032done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033else
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004036as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004037See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004039rm -f conftest conftest$ac_cv_exeext
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4041$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042
4043rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004044EXEEXT=$ac_cv_exeext
4045ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4047/* end confdefs.h. */
4048#include <stdio.h>
4049int
4050main ()
4051{
4052FILE *f = fopen ("conftest.out", "w");
4053 return ferror (f) || fclose (f) != 0;
4054
4055 ;
4056 return 0;
4057}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004059ac_clean_files="$ac_clean_files conftest.out"
4060# Check that the compiler produces executables we can run. If not, either
4061# the compiler is broken, or we cross compile.
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4063$as_echo_n "checking whether we are cross compiling... " >&6; }
4064if test "$cross_compiling" != yes; then
4065 { { ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
4070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071$as_echo "$ac_try_echo"; } >&5
4072 (eval "$ac_link") 2>&5
4073 ac_status=$?
4074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075 test $ac_status = 0; }
4076 if { ac_try='./conftest$ac_cv_exeext'
4077 { { case "(($ac_try" in
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4080esac
4081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082$as_echo "$ac_try_echo"; } >&5
4083 (eval "$ac_try") 2>&5
4084 ac_status=$?
4085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }; }; then
4087 cross_compiling=no
4088 else
4089 if test "$cross_compiling" = maybe; then
4090 cross_compiling=yes
4091 else
4092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004094as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004095If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004096See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 fi
4098 fi
4099fi
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4101$as_echo "$cross_compiling" >&6; }
4102
4103rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4104ac_clean_files=$ac_clean_files_save
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4106$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004107if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 $as_echo_n "(cached) " >&6
4109else
4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111/* end confdefs.h. */
4112
4113int
4114main ()
4115{
4116
4117 ;
4118 return 0;
4119}
4120_ACEOF
4121rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004122if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123case "(($ac_try" in
4124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125 *) ac_try_echo=$ac_try;;
4126esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133 for ac_file in conftest.o conftest.obj conftest.*; do
4134 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4138 break;;
4139 esac
4140done
4141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004143sed 's/^/| /' conftest.$ac_ext >&5
4144
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004147as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004148See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4153$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154OBJEXT=$ac_cv_objext
4155ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4157$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004158if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004163
Martin v. Löwis11437992002-04-12 09:54:03 +00004164int
4165main ()
4166{
4167#ifndef __GNUC__
4168 choke me
4169#endif
4170
4171 ;
4172 return 0;
4173}
4174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 ac_compiler_gnu=yes
4177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004181ac_cv_c_compiler_gnu=$ac_compiler_gnu
4182
4183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4185$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4186if test $ac_compiler_gnu = yes; then
4187 GCC=yes
4188else
4189 GCC=
4190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191ac_test_CFLAGS=${CFLAGS+set}
4192ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4194$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004195if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004197else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198 ac_save_c_werror_flag=$ac_c_werror_flag
4199 ac_c_werror_flag=yes
4200 ac_cv_prog_cc_g=no
4201 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004215else
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 CFLAGS=""
4217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* end confdefs.h. */
4219
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229
Matthias Kloseb9621712010-04-24 17:59:49 +00004230else
4231 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234/* end confdefs.h. */
4235
4236int
4237main ()
4238{
4239
4240 ;
4241 return 0;
4242}
4243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004244if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252 ac_c_werror_flag=$ac_save_c_werror_flag
4253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4255$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258elif test $ac_cv_prog_cc_g = yes; then
4259 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004260 CFLAGS="-g -O2"
4261 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 fi
4264else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004265 if test "$GCC" = yes; then
4266 CFLAGS="-O2"
4267 else
4268 CFLAGS=
4269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4272$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004273if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004275else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004277ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
4280#include <stdarg.h>
4281#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004282struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4284struct buf { int x; };
4285FILE * (*rcsopen) (struct buf *, struct stat *, int);
4286static char *e (p, i)
4287 char **p;
4288 int i;
4289{
4290 return p[i];
4291}
4292static char *f (char * (*g) (char **, int), char **p, ...)
4293{
4294 char *s;
4295 va_list v;
4296 va_start (v,p);
4297 s = g (p, va_arg (v,int));
4298 va_end (v);
4299 return s;
4300}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301
4302/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4303 function prototypes and stuff, but not '\xHH' hex character constants.
4304 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4307 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004309int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4312 inside strings and character constants. */
4313#define FOO(x) 'x'
4314int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4315
Skip Montanaro6dead952003-09-25 14:50:04 +00004316int test (int i, double x);
4317struct s1 {int (*f) (int a);};
4318struct s2 {int (*f) (double a);};
4319int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4320int argc;
4321char **argv;
4322int
4323main ()
4324{
4325return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4326 ;
4327 return 0;
4328}
4329_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4331 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004332do
4333 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337rm -f core conftest.err conftest.$ac_objext
4338 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004339done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004341CC=$ac_save_CC
4342
4343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344# AC_CACHE_VAL
4345case "x$ac_cv_prog_cc_c89" in
4346 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4348$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4351$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4355$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004360
Martin v. Löwis11437992002-04-12 09:54:03 +00004361ac_ext=c
4362ac_cpp='$CPP $CPPFLAGS'
4363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4365ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
4372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4373$as_echo_n "checking how to run the C preprocessor... " >&6; }
4374# On Suns, sometimes $CPP names a directory.
4375if test -n "$CPP" && test -d "$CPP"; then
4376 CPP=
4377fi
4378if test -z "$CPP"; then
4379 if ${ac_cv_prog_CPP+:} false; then :
4380 $as_echo_n "(cached) " >&6
4381else
4382 # Double quotes because CPP needs to be expanded
4383 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4384 do
4385 ac_preproc_ok=false
4386for ac_c_preproc_warn_flag in '' yes
4387do
4388 # Use a header file that comes with gcc, so configuring glibc
4389 # with a fresh cross-compiler works.
4390 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4391 # <limits.h> exists even on freestanding compilers.
4392 # On the NeXT, cc -E runs the code through the compiler's parser,
4393 # not just through cpp. "Syntax error" is here to catch this case.
4394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395/* end confdefs.h. */
4396#ifdef __STDC__
4397# include <limits.h>
4398#else
4399# include <assert.h>
4400#endif
4401 Syntax error
4402_ACEOF
4403if ac_fn_c_try_cpp "$LINENO"; then :
4404
4405else
4406 # Broken: fails on valid input.
4407continue
4408fi
4409rm -f conftest.err conftest.i conftest.$ac_ext
4410
4411 # OK, works on sane cases. Now check whether nonexistent headers
4412 # can be detected and how.
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414/* end confdefs.h. */
4415#include <ac_nonexistent.h>
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418 # Broken: success on invalid input.
4419continue
4420else
4421 # Passes both tests.
4422ac_preproc_ok=:
4423break
4424fi
4425rm -f conftest.err conftest.i conftest.$ac_ext
4426
4427done
4428# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4429rm -f conftest.i conftest.err conftest.$ac_ext
4430if $ac_preproc_ok; then :
4431 break
4432fi
4433
4434 done
4435 ac_cv_prog_CPP=$CPP
4436
4437fi
4438 CPP=$ac_cv_prog_CPP
4439else
4440 ac_cv_prog_CPP=$CPP
4441fi
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4443$as_echo "$CPP" >&6; }
4444ac_preproc_ok=false
4445for ac_c_preproc_warn_flag in '' yes
4446do
4447 # Use a header file that comes with gcc, so configuring glibc
4448 # with a fresh cross-compiler works.
4449 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4450 # <limits.h> exists even on freestanding compilers.
4451 # On the NeXT, cc -E runs the code through the compiler's parser,
4452 # not just through cpp. "Syntax error" is here to catch this case.
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h. */
4455#ifdef __STDC__
4456# include <limits.h>
4457#else
4458# include <assert.h>
4459#endif
4460 Syntax error
4461_ACEOF
4462if ac_fn_c_try_cpp "$LINENO"; then :
4463
4464else
4465 # Broken: fails on valid input.
4466continue
4467fi
4468rm -f conftest.err conftest.i conftest.$ac_ext
4469
4470 # OK, works on sane cases. Now check whether nonexistent headers
4471 # can be detected and how.
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h. */
4474#include <ac_nonexistent.h>
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477 # Broken: success on invalid input.
4478continue
4479else
4480 # Passes both tests.
4481ac_preproc_ok=:
4482break
4483fi
4484rm -f conftest.err conftest.i conftest.$ac_ext
4485
4486done
4487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4488rm -f conftest.i conftest.err conftest.$ac_ext
4489if $ac_preproc_ok; then :
4490
4491else
4492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4494as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4495See \`config.log' for more details" "$LINENO" 5; }
4496fi
4497
4498ac_ext=c
4499ac_cpp='$CPP $CPPFLAGS'
4500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4502ac_compiler_gnu=$ac_cv_c_compiler_gnu
4503
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4505$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4506if ${ac_cv_path_GREP+:} false; then :
4507 $as_echo_n "(cached) " >&6
4508else
4509 if test -z "$GREP"; then
4510 ac_path_GREP_found=false
4511 # Loop through the user's path and test for each of PROGNAME-LIST
4512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4514do
4515 IFS=$as_save_IFS
4516 test -z "$as_dir" && as_dir=.
4517 for ac_prog in grep ggrep; do
4518 for ac_exec_ext in '' $ac_executable_extensions; do
4519 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4520 as_fn_executable_p "$ac_path_GREP" || continue
4521# Check for GNU ac_path_GREP and select it if it is found.
4522 # Check for GNU $ac_path_GREP
4523case `"$ac_path_GREP" --version 2>&1` in
4524*GNU*)
4525 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4526*)
4527 ac_count=0
4528 $as_echo_n 0123456789 >"conftest.in"
4529 while :
4530 do
4531 cat "conftest.in" "conftest.in" >"conftest.tmp"
4532 mv "conftest.tmp" "conftest.in"
4533 cp "conftest.in" "conftest.nl"
4534 $as_echo 'GREP' >> "conftest.nl"
4535 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4536 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4537 as_fn_arith $ac_count + 1 && ac_count=$as_val
4538 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4539 # Best one so far, save it but keep looking for a better one
4540 ac_cv_path_GREP="$ac_path_GREP"
4541 ac_path_GREP_max=$ac_count
4542 fi
4543 # 10*(2^10) chars as input seems more than enough
4544 test $ac_count -gt 10 && break
4545 done
4546 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4547esac
4548
4549 $ac_path_GREP_found && break 3
4550 done
4551 done
4552 done
4553IFS=$as_save_IFS
4554 if test -z "$ac_cv_path_GREP"; then
4555 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4556 fi
4557else
4558 ac_cv_path_GREP=$GREP
4559fi
4560
4561fi
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4563$as_echo "$ac_cv_path_GREP" >&6; }
4564 GREP="$ac_cv_path_GREP"
4565
4566
Łukasz Langaa785c872016-09-09 17:37:37 -07004567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4568$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4569if ${ac_cv_path_SED+:} false; then :
4570 $as_echo_n "(cached) " >&6
4571else
4572 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4573 for ac_i in 1 2 3 4 5 6 7; do
4574 ac_script="$ac_script$as_nl$ac_script"
4575 done
4576 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4577 { ac_script=; unset ac_script;}
4578 if test -z "$SED"; then
4579 ac_path_SED_found=false
4580 # Loop through the user's path and test for each of PROGNAME-LIST
4581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4582for as_dir in $PATH
4583do
4584 IFS=$as_save_IFS
4585 test -z "$as_dir" && as_dir=.
4586 for ac_prog in sed gsed; do
4587 for ac_exec_ext in '' $ac_executable_extensions; do
4588 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4589 as_fn_executable_p "$ac_path_SED" || continue
4590# Check for GNU ac_path_SED and select it if it is found.
4591 # Check for GNU $ac_path_SED
4592case `"$ac_path_SED" --version 2>&1` in
4593*GNU*)
4594 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4595*)
4596 ac_count=0
4597 $as_echo_n 0123456789 >"conftest.in"
4598 while :
4599 do
4600 cat "conftest.in" "conftest.in" >"conftest.tmp"
4601 mv "conftest.tmp" "conftest.in"
4602 cp "conftest.in" "conftest.nl"
4603 $as_echo '' >> "conftest.nl"
4604 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4605 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4606 as_fn_arith $ac_count + 1 && ac_count=$as_val
4607 if test $ac_count -gt ${ac_path_SED_max-0}; then
4608 # Best one so far, save it but keep looking for a better one
4609 ac_cv_path_SED="$ac_path_SED"
4610 ac_path_SED_max=$ac_count
4611 fi
4612 # 10*(2^10) chars as input seems more than enough
4613 test $ac_count -gt 10 && break
4614 done
4615 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4616esac
4617
4618 $ac_path_SED_found && break 3
4619 done
4620 done
4621 done
4622IFS=$as_save_IFS
4623 if test -z "$ac_cv_path_SED"; then
4624 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4625 fi
4626else
4627 ac_cv_path_SED=$SED
4628fi
4629
4630fi
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4632$as_echo "$ac_cv_path_SED" >&6; }
4633 SED="$ac_cv_path_SED"
4634 rm -f conftest.sed
4635
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004636
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4640$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004642# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004643if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004644 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646 case $withval in
4647 no) with_cxx_main=no
4648 MAINCC='$(CC)';;
4649 yes) with_cxx_main=yes
4650 MAINCC='$(CXX)';;
4651 *) with_cxx_main=yes
4652 MAINCC=$withval
4653 if test -z "$CXX"
4654 then
4655 CXX=$withval
4656 fi;;
4657 esac
4658else
4659
4660 with_cxx_main=no
4661 MAINCC='$(CC)'
4662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004663fi
4664
Matthias Kloseb9621712010-04-24 17:59:49 +00004665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4666$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668preset_cxx="$CXX"
4669if test -z "$CXX"
4670then
4671 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004672 gcc) if test -n "$ac_tool_prefix"; then
4673 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4674set dummy ${ac_tool_prefix}g++; ac_word=$2
4675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676$as_echo_n "checking for $ac_word... " >&6; }
4677if ${ac_cv_path_CXX+:} false; then :
4678 $as_echo_n "(cached) " >&6
4679else
4680 case $CXX in
4681 [\\/]* | ?:[\\/]*)
4682 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4683 ;;
4684 *)
4685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686for as_dir in notfound
4687do
4688 IFS=$as_save_IFS
4689 test -z "$as_dir" && as_dir=.
4690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694 break 2
4695 fi
4696done
4697 done
4698IFS=$as_save_IFS
4699
4700 ;;
4701esac
4702fi
4703CXX=$ac_cv_path_CXX
4704if test -n "$CXX"; then
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4706$as_echo "$CXX" >&6; }
4707else
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4709$as_echo "no" >&6; }
4710fi
4711
4712
4713fi
4714if test -z "$ac_cv_path_CXX"; then
4715 ac_pt_CXX=$CXX
4716 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004717set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004720if ${ac_cv_path_ac_pt_CXX+:} false; then :
4721 $as_echo_n "(cached) " >&6
4722else
4723 case $ac_pt_CXX in
4724 [\\/]* | ?:[\\/]*)
4725 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4726 ;;
4727 *)
4728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in notfound
4730do
4731 IFS=$as_save_IFS
4732 test -z "$as_dir" && as_dir=.
4733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004735 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737 break 2
4738 fi
4739done
4740 done
4741IFS=$as_save_IFS
4742
4743 ;;
4744esac
4745fi
4746ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4747if test -n "$ac_pt_CXX"; then
4748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4749$as_echo "$ac_pt_CXX" >&6; }
4750else
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755 if test "x$ac_pt_CXX" = x; then
4756 CXX="g++"
4757 else
4758 case $cross_compiling:$ac_tool_warned in
4759yes:)
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4762ac_tool_warned=yes ;;
4763esac
4764 CXX=$ac_pt_CXX
4765 fi
4766else
4767 CXX="$ac_cv_path_CXX"
4768fi
4769 ;;
4770 cc) if test -n "$ac_tool_prefix"; then
4771 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4772set dummy ${ac_tool_prefix}c++; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004775if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777else
4778 case $CXX in
4779 [\\/]* | ?:[\\/]*)
4780 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4781 ;;
4782 *)
4783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in notfound
4785do
4786 IFS=$as_save_IFS
4787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 break 2
4793 fi
4794done
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ;;
4799esac
4800fi
4801CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4804$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805else
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004809
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810
4811fi
4812if test -z "$ac_cv_path_CXX"; then
4813 ac_pt_CXX=$CXX
4814 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004819 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 ;;
4825 *)
4826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in notfound
4828do
4829 IFS=$as_save_IFS
4830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835 break 2
4836 fi
4837done
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004839IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841 ;;
4842esac
4843fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4845if test -n "$ac_pt_CXX"; then
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4847$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004848else
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004852
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853 if test "x$ac_pt_CXX" = x; then
4854 CXX="c++"
4855 else
4856 case $cross_compiling:$ac_tool_warned in
4857yes:)
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4860ac_tool_warned=yes ;;
4861esac
4862 CXX=$ac_pt_CXX
4863 fi
4864else
4865 CXX="$ac_cv_path_CXX"
4866fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004868 clang|*/clang) if test -n "$ac_tool_prefix"; then
4869 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4870set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872$as_echo_n "checking for $ac_word... " >&6; }
4873if ${ac_cv_path_CXX+:} false; then :
4874 $as_echo_n "(cached) " >&6
4875else
4876 case $CXX in
4877 [\\/]* | ?:[\\/]*)
4878 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4879 ;;
4880 *)
4881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in notfound
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004888 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893 done
4894IFS=$as_save_IFS
4895
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896 ;;
4897esac
4898fi
4899CXX=$ac_cv_path_CXX
4900if test -n "$CXX"; then
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4902$as_echo "$CXX" >&6; }
4903else
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
4906fi
4907
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004908
4909fi
4910if test -z "$ac_cv_path_CXX"; then
4911 ac_pt_CXX=$CXX
4912 # Extract the first word of "clang++", so it can be a program name with args.
4913set dummy clang++; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if ${ac_cv_path_ac_pt_CXX+:} false; then :
4917 $as_echo_n "(cached) " >&6
4918else
4919 case $ac_pt_CXX in
4920 [\\/]* | ?:[\\/]*)
4921 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4922 ;;
4923 *)
4924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in notfound
4926do
4927 IFS=$as_save_IFS
4928 test -z "$as_dir" && as_dir=.
4929 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004931 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933 break 2
4934 fi
4935done
4936 done
4937IFS=$as_save_IFS
4938
4939 ;;
4940esac
4941fi
4942ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4943if test -n "$ac_pt_CXX"; then
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4945$as_echo "$ac_pt_CXX" >&6; }
4946else
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4948$as_echo "no" >&6; }
4949fi
4950
4951 if test "x$ac_pt_CXX" = x; then
4952 CXX="clang++"
4953 else
4954 case $cross_compiling:$ac_tool_warned in
4955yes:)
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4958ac_tool_warned=yes ;;
4959esac
4960 CXX=$ac_pt_CXX
4961 fi
4962else
4963 CXX="$ac_cv_path_CXX"
4964fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004965 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004966 icc|*/icc) if test -n "$ac_tool_prefix"; then
4967 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4968set dummy ${ac_tool_prefix}icpc; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_CXX+:} false; then :
4972 $as_echo_n "(cached) " >&6
4973else
4974 case $CXX in
4975 [\\/]* | ?:[\\/]*)
4976 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4977 ;;
4978 *)
4979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in notfound
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
4984 for ac_exec_ext in '' $ac_executable_extensions; do
4985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988 break 2
4989 fi
4990done
4991 done
4992IFS=$as_save_IFS
4993
4994 ;;
4995esac
4996fi
4997CXX=$ac_cv_path_CXX
4998if test -n "$CXX"; then
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5000$as_echo "$CXX" >&6; }
5001else
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006
5007fi
5008if test -z "$ac_cv_path_CXX"; then
5009 ac_pt_CXX=$CXX
5010 # Extract the first word of "icpc", so it can be a program name with args.
5011set dummy icpc; ac_word=$2
5012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5013$as_echo_n "checking for $ac_word... " >&6; }
5014if ${ac_cv_path_ac_pt_CXX+:} false; then :
5015 $as_echo_n "(cached) " >&6
5016else
5017 case $ac_pt_CXX in
5018 [\\/]* | ?:[\\/]*)
5019 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5020 ;;
5021 *)
5022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023for as_dir in notfound
5024do
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
5027 for ac_exec_ext in '' $ac_executable_extensions; do
5028 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5029 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5031 break 2
5032 fi
5033done
5034 done
5035IFS=$as_save_IFS
5036
5037 ;;
5038esac
5039fi
5040ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5041if test -n "$ac_pt_CXX"; then
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5043$as_echo "$ac_pt_CXX" >&6; }
5044else
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
5047fi
5048
5049 if test "x$ac_pt_CXX" = x; then
5050 CXX="icpc"
5051 else
5052 case $cross_compiling:$ac_tool_warned in
5053yes:)
5054{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5055$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5056ac_tool_warned=yes ;;
5057esac
5058 CXX=$ac_pt_CXX
5059 fi
5060else
5061 CXX="$ac_cv_path_CXX"
5062fi
5063 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005064 esac
5065 if test "$CXX" = "notfound"
5066 then
5067 CXX=""
5068 fi
5069fi
5070if test -z "$CXX"
5071then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005072 if test -n "$ac_tool_prefix"; then
5073 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5074 do
5075 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005079if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005081else
5082 if test -n "$CXX"; then
5083 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5084else
5085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086for as_dir in $PATH
5087do
5088 IFS=$as_save_IFS
5089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005092 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094 break 2
5095 fi
5096done
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099
5100fi
5101fi
5102CXX=$ac_cv_prog_CXX
5103if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5105$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106else
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109fi
5110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005112 test -n "$CXX" && break
5113 done
5114fi
5115if test -z "$CXX"; then
5116 ac_ct_CXX=$CXX
5117 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5118do
5119 # Extract the first word of "$ac_prog", so it can be a program name with args.
5120set dummy $ac_prog; ac_word=$2
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5122$as_echo_n "checking for $ac_word... " >&6; }
5123if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5124 $as_echo_n "(cached) " >&6
5125else
5126 if test -n "$ac_ct_CXX"; then
5127 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5128else
5129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132 IFS=$as_save_IFS
5133 test -z "$as_dir" && as_dir=.
5134 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005136 ac_cv_prog_ac_ct_CXX="$ac_prog"
5137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138 break 2
5139 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005141 done
5142IFS=$as_save_IFS
5143
5144fi
5145fi
5146ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5147if test -n "$ac_ct_CXX"; then
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5149$as_echo "$ac_ct_CXX" >&6; }
5150else
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5152$as_echo "no" >&6; }
5153fi
5154
5155
5156 test -n "$ac_ct_CXX" && break
5157done
5158
5159 if test "x$ac_ct_CXX" = x; then
5160 CXX="notfound"
5161 else
5162 case $cross_compiling:$ac_tool_warned in
5163yes:)
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5166ac_tool_warned=yes ;;
5167esac
5168 CXX=$ac_ct_CXX
5169 fi
5170fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171
5172 if test "$CXX" = "notfound"
5173 then
5174 CXX=""
5175 fi
5176fi
5177if test "$preset_cxx" != "$CXX"
5178then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 By default, distutils will build C++ extension modules with \"$CXX\".
5182 If this is not intended, then set CXX on the configure command line.
5183 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 By default, distutils will build C++ extension modules with \"$CXX\".
5187 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005188 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189fi
5190
5191
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005192MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5193
5194
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5196$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5197cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef bfin
5199#undef cris
5200#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef hppa
5203#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005206#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005209#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005210 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005211#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212# if defined(__x86_64__) && defined(__LP64__)
5213 x86_64-linux-gnu
5214# elif defined(__x86_64__) && defined(__ILP32__)
5215 x86_64-linux-gnux32
5216# elif defined(__i386__)
5217 i386-linux-gnu
5218# elif defined(__aarch64__) && defined(__AARCH64EL__)
5219# if defined(__ILP32__)
5220 aarch64_ilp32-linux-gnu
5221# else
5222 aarch64-linux-gnu
5223# endif
5224# elif defined(__aarch64__) && defined(__AARCH64EB__)
5225# if defined(__ILP32__)
5226 aarch64_be_ilp32-linux-gnu
5227# else
5228 aarch64_be-linux-gnu
5229# endif
5230# elif defined(__alpha__)
5231 alpha-linux-gnu
5232# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5233# if defined(__ARMEL__)
5234 arm-linux-gnueabihf
5235# else
5236 armeb-linux-gnueabihf
5237# endif
5238# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5239# if defined(__ARMEL__)
5240 arm-linux-gnueabi
5241# else
5242 armeb-linux-gnueabi
5243# endif
5244# elif defined(__hppa__)
5245 hppa-linux-gnu
5246# elif defined(__ia64__)
5247 ia64-linux-gnu
5248# elif defined(__m68k__) && !defined(__mcoldfire__)
5249 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005250# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5251# if _MIPS_SIM == _ABIO32
5252 mipsisa32r6el-linux-gnu
5253# elif _MIPS_SIM == _ABIN32
5254 mipsisa64r6el-linux-gnuabin32
5255# elif _MIPS_SIM == _ABI64
5256 mipsisa64r6el-linux-gnuabi64
5257# else
5258# error unknown platform triplet
5259# endif
5260# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5261# if _MIPS_SIM == _ABIO32
5262 mipsisa32r6-linux-gnu
5263# elif _MIPS_SIM == _ABIN32
5264 mipsisa64r6-linux-gnuabin32
5265# elif _MIPS_SIM == _ABI64
5266 mipsisa64r6-linux-gnuabi64
5267# else
5268# error unknown platform triplet
5269# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005270# elif defined(__mips_hard_float) && defined(_MIPSEL)
5271# if _MIPS_SIM == _ABIO32
5272 mipsel-linux-gnu
5273# elif _MIPS_SIM == _ABIN32
5274 mips64el-linux-gnuabin32
5275# elif _MIPS_SIM == _ABI64
5276 mips64el-linux-gnuabi64
5277# else
5278# error unknown platform triplet
5279# endif
5280# elif defined(__mips_hard_float)
5281# if _MIPS_SIM == _ABIO32
5282 mips-linux-gnu
5283# elif _MIPS_SIM == _ABIN32
5284 mips64-linux-gnuabin32
5285# elif _MIPS_SIM == _ABI64
5286 mips64-linux-gnuabi64
5287# else
5288# error unknown platform triplet
5289# endif
5290# elif defined(__or1k__)
5291 or1k-linux-gnu
5292# elif defined(__powerpc__) && defined(__SPE__)
5293 powerpc-linux-gnuspe
5294# elif defined(__powerpc64__)
5295# if defined(__LITTLE_ENDIAN__)
5296 powerpc64le-linux-gnu
5297# else
5298 powerpc64-linux-gnu
5299# endif
5300# elif defined(__powerpc__)
5301 powerpc-linux-gnu
5302# elif defined(__s390x__)
5303 s390x-linux-gnu
5304# elif defined(__s390__)
5305 s390-linux-gnu
5306# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5307 sh4-linux-gnu
5308# elif defined(__sparc__) && defined(__arch64__)
5309 sparc64-linux-gnu
5310# elif defined(__sparc__)
5311 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005312# elif defined(__riscv)
5313# if __riscv_xlen == 32
5314 riscv32-linux-gnu
5315# elif __riscv_xlen == 64
5316 riscv64-linux-gnu
5317# else
5318# error unknown platform triplet
5319# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__FreeBSD_kernel__)
5324# if defined(__LP64__)
5325 x86_64-kfreebsd-gnu
5326# elif defined(__i386__)
5327 i386-kfreebsd-gnu
5328# else
5329# error unknown platform triplet
5330# endif
5331#elif defined(__gnu_hurd__)
5332 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005333#elif defined(__APPLE__)
5334 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005335#elif defined(__VXWORKS__)
5336 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005337#else
5338# error unknown platform triplet
5339#endif
5340
5341EOF
5342
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005343if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5346$as_echo "$PLATFORM_TRIPLET" >&6; }
5347else
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5349$as_echo "none" >&6; }
5350fi
5351rm -f conftest.c conftest.out
5352
5353if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5354 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5355 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5356 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005357elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5358 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
doko@ubuntu.com55532312016-06-14 08:55:19 +02005361if test x$MULTIARCH != x; then
5362 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5363fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364
5365
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5367$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5368save_LDFLAGS="$LDFLAGS"
5369LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005370
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373
5374int
5375main ()
5376{
5377
5378 ;
5379 return 0;
5380}
5381_ACEOF
5382if ac_fn_c_try_link "$LINENO"; then :
5383 NO_AS_NEEDED="-Wl,--no-as-needed"
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5385$as_echo "yes" >&6; }
5386else
5387 NO_AS_NEEDED=""
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391rm -f core conftest.err conftest.$ac_objext \
5392 conftest$ac_exeext conftest.$ac_ext
5393LDFLAGS="$save_LDFLAGS"
5394
5395
5396
5397# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398
Matthias Kloseb9621712010-04-24 17:59:49 +00005399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5400$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005401if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403else
5404 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5405 then ac_cv_path_EGREP="$GREP -E"
5406 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 # Loop through the user's path and test for each of PROGNAME-LIST
5410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5412do
5413 IFS=$as_save_IFS
5414 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 for ac_prog in egrep; do
5416 for ac_exec_ext in '' $ac_executable_extensions; do
5417 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005418 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005419# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 # Check for GNU $ac_path_EGREP
5421case `"$ac_path_EGREP" --version 2>&1` in
5422*GNU*)
5423 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5424*)
5425 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 while :
5428 do
5429 cat "conftest.in" "conftest.in" >"conftest.tmp"
5430 mv "conftest.tmp" "conftest.in"
5431 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5434 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5437 # Best one so far, save it but keep looking for a better one
5438 ac_cv_path_EGREP="$ac_path_EGREP"
5439 ac_path_EGREP_max=$ac_count
5440 fi
5441 # 10*(2^10) chars as input seems more than enough
5442 test $ac_count -gt 10 && break
5443 done
5444 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5445esac
5446
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $ac_path_EGREP_found && break 3
5448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005453 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455else
5456 ac_cv_path_EGREP=$EGREP
5457fi
5458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 fi
5460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5462$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005464
5465
Matthias Kloseb9621712010-04-24 17:59:49 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5467$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005468if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $as_echo_n "(cached) " >&6
5470else
5471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005472/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005473#include <stdlib.h>
5474#include <stdarg.h>
5475#include <string.h>
5476#include <float.h>
5477
5478int
5479main ()
5480{
5481
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486if ac_fn_c_try_compile "$LINENO"; then :
5487 ac_cv_header_stdc=yes
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5492
5493if test $ac_cv_header_stdc = yes; then
5494 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5496/* end confdefs.h. */
5497#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005498
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005499_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005501 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005503else
Matthias Kloseb9621712010-04-24 17:59:49 +00005504 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005506rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507
Matthias Kloseb9621712010-04-24 17:59:49 +00005508fi
5509
5510if test $ac_cv_header_stdc = yes; then
5511 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5513/* end confdefs.h. */
5514#include <stdlib.h>
5515
5516_ACEOF
5517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5518 $EGREP "free" >/dev/null 2>&1; then :
5519
5520else
5521 ac_cv_header_stdc=no
5522fi
5523rm -f conftest*
5524
5525fi
5526
5527if test $ac_cv_header_stdc = yes; then
5528 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5529 if test "$cross_compiling" = yes; then :
5530 :
5531else
5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533/* end confdefs.h. */
5534#include <ctype.h>
5535#include <stdlib.h>
5536#if ((' ' & 0x0FF) == 0x020)
5537# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5538# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5539#else
5540# define ISLOWER(c) \
5541 (('a' <= (c) && (c) <= 'i') \
5542 || ('j' <= (c) && (c) <= 'r') \
5543 || ('s' <= (c) && (c) <= 'z'))
5544# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5545#endif
5546
5547#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5548int
5549main ()
5550{
5551 int i;
5552 for (i = 0; i < 256; i++)
5553 if (XOR (islower (i), ISLOWER (i))
5554 || toupper (i) != TOUPPER (i))
5555 return 2;
5556 return 0;
5557}
5558_ACEOF
5559if ac_fn_c_try_run "$LINENO"; then :
5560
5561else
5562 ac_cv_header_stdc=no
5563fi
5564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5565 conftest.$ac_objext conftest.beam conftest.$ac_ext
5566fi
5567
5568fi
5569fi
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5571$as_echo "$ac_cv_header_stdc" >&6; }
5572if test $ac_cv_header_stdc = yes; then
5573
5574$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5575
5576fi
5577
5578# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5579for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5580 inttypes.h stdint.h unistd.h
5581do :
5582 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5583ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5584"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005585if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 cat >>confdefs.h <<_ACEOF
5587#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5588_ACEOF
5589
5590fi
5591
5592done
5593
5594
5595
5596 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005597if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005598 MINIX=yes
5599else
5600 MINIX=
5601fi
5602
5603
5604 if test "$MINIX" = yes; then
5605
5606$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5607
5608
5609$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5610
5611
5612$as_echo "#define _MINIX 1" >>confdefs.h
5613
5614 fi
5615
5616
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5618$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005619if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005620 $as_echo_n "(cached) " >&6
5621else
5622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5623/* end confdefs.h. */
5624
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005625# define __EXTENSIONS__ 1
5626 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005627int
5628main ()
5629{
5630
5631 ;
5632 return 0;
5633}
5634_ACEOF
5635if ac_fn_c_try_compile "$LINENO"; then :
5636 ac_cv_safe_to_define___extensions__=yes
5637else
5638 ac_cv_safe_to_define___extensions__=no
5639fi
5640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5641fi
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5643$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5644 test $ac_cv_safe_to_define___extensions__ = yes &&
5645 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5646
5647 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5648
5649 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5650
5651 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5652
5653 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5654
5655
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
Xavier de Gaye95750b12016-07-09 11:05:42 +02005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5658$as_echo_n "checking for the Android API level... " >&6; }
5659cat >> conftest.c <<EOF
5660#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005661android_api = __ANDROID_API__
5662arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663#else
5664#error not Android
5665#endif
5666EOF
5667
5668if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005669 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5670 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5672$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005673 if test -z "$ANDROID_API_LEVEL"; then
5674 echo 'Fatal: you must define __ANDROID_API__'
5675 exit 1
5676 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005677
5678cat >>confdefs.h <<_ACEOF
5679#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5680_ACEOF
5681
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005682
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5684$as_echo_n "checking for the Android arm ABI... " >&6; }
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5686$as_echo "$_arm_arch" >&6; }
5687 if test "$_arm_arch" = 7; then
5688 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5689 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5690 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005691else
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5693$as_echo "not Android" >&6; }
5694fi
5695rm -f conftest.c conftest.out
5696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697# Check for unsupported systems
5698case $ac_sys_system/$ac_sys_release in
5699atheos*|Linux*/1*)
5700 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5701 echo See README for details.
5702 exit 1;;
5703esac
5704
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5707$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 withval=$with_suffix;
5712 case $withval in
5713 no) EXEEXT=;;
5714 yes) EXEEXT=.exe;;
5715 *) EXEEXT=$withval;;
5716 esac
5717fi
5718
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5720$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721
5722# Test whether we're running on a non-case-sensitive system, in which
5723# case we give a warning if no ext is given
5724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5726$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727if test ! -d CaseSensitiveTestDir; then
5728mkdir CaseSensitiveTestDir
5729fi
5730
5731if test -d casesensitivetestdir
5732then
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5734$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 BUILDEXEEXT=.exe
5736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 BUILDEXEEXT=$EXEEXT
5740fi
5741rmdir CaseSensitiveTestDir
5742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743case $ac_sys_system in
5744hp*|HP*)
5745 case $CC in
5746 cc|*/cc) CC="$CC -Ae";;
5747 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748esac
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5752$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753if test -z "$LIBRARY"
5754then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005755 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5758$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LDLIBRARY is the name of the library to link against (as opposed to the
5761# name of the library into which to insert object files). BLDLIBRARY is also
5762# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5763# is blank as the main program is not linked directly against LDLIBRARY.
5764# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5765# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5766# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5767# DLLLIBRARY is the shared (i.e., DLL) library.
5768#
5769# RUNSHARED is used to run shared python without installed libraries
5770#
5771# INSTSONAME is the name of the shared library that will be use to install
5772# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005773#
5774# LDVERSION is the shared library version number, normally the Python version
5775# with the ABI build flags appended.
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778
5779
5780
5781
5782
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784LDLIBRARY="$LIBRARY"
5785BLDLIBRARY='$(LDLIBRARY)'
5786INSTSONAME='$(LDLIBRARY)'
5787DLLLIBRARY=''
5788LDLIBRARYDIR=''
5789RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005790LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
5792# LINKCC is the command that links the python executable -- default is $(CC).
5793# If CXX is set, and if it is needed to link a main function that was
5794# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5795# python might then depend on the C++ runtime
5796# This is altered for AIX in order to build the export list before
5797# linking.
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5800$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801if test -z "$LINKCC"
5802then
5803 LINKCC='$(PURIFY) $(MAINCC)'
5804 case $ac_sys_system in
5805 AIX*)
5806 exp_extra="\"\""
5807 if test $ac_sys_release -ge 5 -o \
5808 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5809 exp_extra="."
5810 fi
5811 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 QNX*)
5813 # qcc must be used because the other compilers do not
5814 # support -N.
5815 LINKCC=qcc;;
5816 esac
5817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5819$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
5821# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5822# make sure we default having it set to "no": this is used by
5823# distutils.unixccompiler to know if it should add --enable-new-dtags
5824# to linker command lines, and failing to detect GNU ld simply results
5825# in the same bahaviour as before.
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5828$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829ac_prog=ld
5830if test "$GCC" = yes; then
5831 ac_prog=`$CC -print-prog-name=ld`
5832fi
5833case `"$ac_prog" -V 2>&1 < /dev/null` in
5834 *GNU*)
5835 GNULD=yes;;
5836 *)
5837 GNULD=no;;
5838esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5840$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5843$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enableval=$enable_shared;
5847fi
5848
5849
5850if test -z "$enable_shared"
5851then
5852 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005853 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 enable_shared="yes";;
5855 *)
5856 enable_shared="no";;
5857 esac
5858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5860$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5863$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005865if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866 enableval=$enable_profiling;
5867fi
5868
5869if test "x$enable_profiling" = xyes; then
5870 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005871 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873/* end confdefs.h. */
5874int main() { return 0; }
5875_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876if ac_fn_c_try_link "$LINENO"; then :
5877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881rm -f core conftest.err conftest.$ac_objext \
5882 conftest$ac_exeext conftest.$ac_ext
5883 CC="$ac_save_cc"
5884else
5885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5888$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890if test "x$enable_profiling" = xyes; then
5891 BASECFLAGS="-pg $BASECFLAGS"
5892 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5896$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5899# library that we build, but we do not want to link against it (we
5900# will find it with a -framework option). For this reason there is an
5901# extra variable BLDLIBRARY against which Python and the extension
5902# modules are linked, BLDLIBRARY. This is normally the same as
5903# LDLIBRARY, but empty for MacOSX framework builds.
5904if test "$enable_framework"
5905then
5906 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 BLDLIBRARY=''
5909else
5910 BLDLIBRARY='$(LDLIBRARY)'
5911fi
5912
5913# Other platforms follow
5914if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005915 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
5919 case $ac_sys_system in
5920 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).dll.a'
5922 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005934 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).so'
5936 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005939 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005940 then
5941 PY3LIBRARY=libpython3.so
5942 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 hp*|HP*)
5945 case `uname -m` in
5946 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).dylib'
5958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005961 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005963 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965
5966 esac
5967else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005968 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 case $ac_sys_system in
5970 CYGWIN*)
5971 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 esac
5975fi
5976
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005977if test "$cross_compiling" = yes; then
5978 RUNSHARED=
5979fi
5980
Matthias Kloseb9621712010-04-24 17:59:49 +00005981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5982$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005985if test -n "$ac_tool_prefix"; then
5986 for ac_prog in ar aal
5987 do
5988 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5989set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005992if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
5995 if test -n "$AR"; then
5996 ac_cv_prog_AR="$AR" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001 IFS=$as_save_IFS
6002 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006005 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 break 2
6008 fi
6009done
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011IFS=$as_save_IFS
6012
6013fi
6014fi
6015AR=$ac_cv_prog_AR
6016if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6018$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019else
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022fi
6023
6024
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006025 test -n "$AR" && break
6026 done
6027fi
6028if test -z "$AR"; then
6029 ac_ct_AR=$AR
6030 for ac_prog in ar aal
6031do
6032 # Extract the first word of "$ac_prog", so it can be a program name with args.
6033set dummy $ac_prog; ac_word=$2
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
6036if ${ac_cv_prog_ac_ct_AR+:} false; then :
6037 $as_echo_n "(cached) " >&6
6038else
6039 if test -n "$ac_ct_AR"; then
6040 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6041else
6042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045 IFS=$as_save_IFS
6046 test -z "$as_dir" && as_dir=.
6047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006049 ac_cv_prog_ac_ct_AR="$ac_prog"
6050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051 break 2
6052 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006054 done
6055IFS=$as_save_IFS
6056
6057fi
6058fi
6059ac_ct_AR=$ac_cv_prog_ac_ct_AR
6060if test -n "$ac_ct_AR"; then
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6062$as_echo "$ac_ct_AR" >&6; }
6063else
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069 test -n "$ac_ct_AR" && break
6070done
6071
6072 if test "x$ac_ct_AR" = x; then
6073 AR="ar"
6074 else
6075 case $cross_compiling:$ac_tool_warned in
6076yes:)
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6079ac_tool_warned=yes ;;
6080esac
6081 AR=$ac_ct_AR
6082 fi
6083fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084
6085
6086# tweak ARFLAGS only if the user didn't set it on the command line
6087
6088if test -z "$ARFLAGS"
6089then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006090 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091fi
6092
doko@ubuntu.com58844492012-06-30 18:25:32 +02006093if test -n "$ac_tool_prefix"; then
6094 for ac_prog in readelf
6095 do
6096 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6097set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_prog_READELF+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102else
6103 if test -n "$READELF"; then
6104 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6105else
6106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006113 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115 break 2
6116 fi
6117done
6118 done
6119IFS=$as_save_IFS
6120
6121fi
6122fi
6123READELF=$ac_cv_prog_READELF
6124if test -n "$READELF"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6126$as_echo "$READELF" >&6; }
6127else
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133 test -n "$READELF" && break
6134 done
6135fi
6136if test -z "$READELF"; then
6137 ac_ct_READELF=$READELF
6138 for ac_prog in readelf
6139do
6140 # Extract the first word of "$ac_prog", so it can be a program name with args.
6141set dummy $ac_prog; ac_word=$2
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6143$as_echo_n "checking for $ac_word... " >&6; }
6144if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6145 $as_echo_n "(cached) " >&6
6146else
6147 if test -n "$ac_ct_READELF"; then
6148 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6149else
6150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6151for as_dir in $PATH
6152do
6153 IFS=$as_save_IFS
6154 test -z "$as_dir" && as_dir=.
6155 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006157 ac_cv_prog_ac_ct_READELF="$ac_prog"
6158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6159 break 2
6160 fi
6161done
6162 done
6163IFS=$as_save_IFS
6164
6165fi
6166fi
6167ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6168if test -n "$ac_ct_READELF"; then
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6170$as_echo "$ac_ct_READELF" >&6; }
6171else
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6173$as_echo "no" >&6; }
6174fi
6175
6176
6177 test -n "$ac_ct_READELF" && break
6178done
6179
6180 if test "x$ac_ct_READELF" = x; then
6181 READELF=":"
6182 else
6183 case $cross_compiling:$ac_tool_warned in
6184yes:)
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6186$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6187ac_tool_warned=yes ;;
6188esac
6189 READELF=$ac_ct_READELF
6190 fi
6191fi
6192
6193if test "$cross_compiling" = yes; then
6194 case "$READELF" in
6195 readelf|:)
6196 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6197 ;;
6198 esac
6199fi
6200
6201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006204hp*|HP*)
6205 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206 if test -z "$INSTALL"
6207 then
6208 INSTALL="${srcdir}/install-sh -c"
6209 fi
6210esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211# Find a good install program. We prefer a C program (faster),
6212# so one script is as good as another. But avoid the broken or
6213# incompatible versions:
6214# SysV /etc/install, /usr/sbin/install
6215# SunOS /usr/etc/install
6216# IRIX /sbin/install
6217# AIX /bin/install
6218# AmigaOS /C/install, which installs bootblocks on floppy discs
6219# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6220# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6221# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6222# OS/2's system install, which has a completely different semantic
6223# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006224# Reject install programs that cannot install multiple files.
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6226$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006228if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230else
6231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 # Account for people who put trailing slashes in PATH elements.
6237case $as_dir/ in #((
6238 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006240 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 /usr/ucb/* ) ;;
6242 *)
6243 # OSF1 and SCO ODT 3.0 have their own names for install.
6244 # Don't use installbsd from OSF since it installs stuff as root
6245 # by default.
6246 for ac_prog in ginstall scoinst install; do
6247 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006248 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249 if test $ac_prog = install &&
6250 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6251 # AIX install. It has an incompatible calling convention.
6252 :
6253 elif test $ac_prog = install &&
6254 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6255 # program-specific install script used by HP pwplus--don't use.
6256 :
6257 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006258 rm -rf conftest.one conftest.two conftest.dir
6259 echo one > conftest.one
6260 echo two > conftest.two
6261 mkdir conftest.dir
6262 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6263 test -s conftest.one && test -s conftest.two &&
6264 test -s conftest.dir/conftest.one &&
6265 test -s conftest.dir/conftest.two
6266 then
6267 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6268 break 3
6269 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270 fi
6271 fi
6272 done
6273 done
6274 ;;
6275esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006276
6277 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278IFS=$as_save_IFS
6279
Matthias Kloseb9621712010-04-24 17:59:49 +00006280rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281
6282fi
6283 if test "${ac_cv_path_install+set}" = set; then
6284 INSTALL=$ac_cv_path_install
6285 else
6286 # As a last resort, use the slow shell script. Don't cache a
6287 # value for INSTALL within a source directory, because that will
6288 # break other packages using the cache if that directory is
6289 # removed, or if the value is a relative name.
6290 INSTALL=$ac_install_sh
6291 fi
6292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6294$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295
6296# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6297# It thinks the first close brace ends the variable substitution.
6298test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6299
6300test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6301
6302test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6303
Matthias Klose93a0ef12012-03-15 18:08:34 +01006304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6305$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6306if test -z "$MKDIR_P"; then
6307 if ${ac_cv_path_mkdir+:} false; then :
6308 $as_echo_n "(cached) " >&6
6309else
6310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6312do
6313 IFS=$as_save_IFS
6314 test -z "$as_dir" && as_dir=.
6315 for ac_prog in mkdir gmkdir; do
6316 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006317 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006318 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6319 'mkdir (GNU coreutils) '* | \
6320 'mkdir (coreutils) '* | \
6321 'mkdir (fileutils) '4.1*)
6322 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6323 break 3;;
6324 esac
6325 done
6326 done
6327 done
6328IFS=$as_save_IFS
6329
6330fi
6331
6332 test -d ./--version && rmdir ./--version
6333 if test "${ac_cv_path_mkdir+set}" = set; then
6334 MKDIR_P="$ac_cv_path_mkdir -p"
6335 else
6336 # As a last resort, use the slow shell script. Don't cache a
6337 # value for MKDIR_P within a source directory, because that will
6338 # break other packages using the cache if that directory is
6339 # removed, or if the value is a relative name.
6340 MKDIR_P="$ac_install_sh -d"
6341 fi
6342fi
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6344$as_echo "$MKDIR_P" >&6; }
6345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346
6347# Not every filesystem supports hard links
6348
6349if test -z "$LN" ; then
6350 case $ac_sys_system in
6351 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352 *) LN=ln;;
6353 esac
6354fi
6355
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006356# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006357
6358ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6362$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
6364# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006365if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366 withval=$with_pydebug;
6367if test "$withval" != no
6368then
6369
Matthias Kloseb9621712010-04-24 17:59:49 +00006370$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6373$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006375 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006376else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378fi
6379else
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382fi
6383
6384
Victor Stinnerf4e47032019-04-25 00:56:28 +02006385# Check for --with-trace-refs
6386# --with-trace-refs
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6388$as_echo_n "checking for --with-trace-refs... " >&6; }
6389
6390# Check whether --with-trace-refs was given.
6391if test "${with_trace_refs+set}" = set; then :
6392 withval=$with_trace_refs;
6393else
6394 with_trace_refs=no
6395fi
6396
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6398$as_echo "$with_trace_refs" >&6; }
6399
6400if test "$with_trace_refs" = "yes"
6401then
6402
6403$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6404
6405fi
6406
6407# Check for --with-assertions.
6408# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006409assertions='false'
6410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6411$as_echo_n "checking for --with-assertions... " >&6; }
6412
6413# Check whether --with-assertions was given.
6414if test "${with_assertions+set}" = set; then :
6415 withval=$with_assertions;
6416if test "$withval" != no
6417then
6418 assertions='true'
6419fi
6420fi
6421
6422if test "$assertions" = 'true'; then
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; }
6425elif test "$Py_DEBUG" = 'true'; then
6426 assertions='true'
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6428$as_echo "implied by --with-pydebug" >&6; }
6429else
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
Brett Cannon63d98bc2016-09-06 17:12:40 -07006434# Enable optimization flags
6435
6436
6437Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6439$as_echo_n "checking for --enable-optimizations... " >&6; }
6440# Check whether --enable-optimizations was given.
6441if test "${enable_optimizations+set}" = set; then :
6442 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006443if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006444then
6445 Py_OPT='true'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6447$as_echo "yes" >&6; };
6448else
6449 Py_OPT='false'
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; };
6452fi
6453else
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }
6456fi
6457
6458if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006459 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6460 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006461 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006462 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006463 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006464 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006465 DEF_MAKE_RULE="build_all"
6466else
6467 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006468 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006469 DEF_MAKE_RULE="all"
6470fi
6471
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006472
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6474$as_echo_n "checking PROFILE_TASK... " >&6; }
6475if test -z "$PROFILE_TASK"
6476then
6477 PROFILE_TASK='-m test --pgo'
6478fi
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6480$as_echo "$PROFILE_TASK" >&6; }
6481
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006482# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6483# normal names in the default $PATH (ie: Ubuntu). They exist under the
6484# non-suffixed name in their versioned llvm directory.
6485
6486llvm_bin_dir=''
6487llvm_path="${PATH}"
6488if test "${CC}" = "clang"
6489then
6490 clang_bin=`which clang`
6491 # Some systems install clang elsewhere as a symlink to the real path
6492 # which is where the related llvm tools are located.
6493 if test -L "${clang_bin}"
6494 then
6495 clang_dir=`dirname "${clang_bin}"`
6496 clang_bin=`readlink "${clang_bin}"`
6497 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6498 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6499 fi
6500fi
6501
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006502# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6504$as_echo_n "checking for --with-lto... " >&6; }
6505
6506# Check whether --with-lto was given.
6507if test "${with_lto+set}" = set; then :
6508 withval=$with_lto;
6509if test "$withval" != no
6510then
6511 Py_LTO='true'
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6513$as_echo "yes" >&6; };
6514else
6515 Py_LTO='false'
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; };
6518fi
6519else
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524if test "$Py_LTO" = 'true' ; then
6525 case $CC in
6526 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006527
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006528 if test -n "$ac_tool_prefix"; then
6529 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6530set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_LLVM_AR+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535else
6536 case $LLVM_AR in
6537 [\\/]* | ?:[\\/]*)
6538 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6539 ;;
6540 *)
6541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in ${llvm_path}
6543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550 break 2
6551 fi
6552done
6553 done
6554IFS=$as_save_IFS
6555
6556 ;;
6557esac
6558fi
6559LLVM_AR=$ac_cv_path_LLVM_AR
6560if test -n "$LLVM_AR"; then
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6562$as_echo "$LLVM_AR" >&6; }
6563else
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567
6568
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006569fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006570if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006571 ac_pt_LLVM_AR=$LLVM_AR
6572 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006573set dummy llvm-ar; ac_word=$2
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575$as_echo_n "checking for $ac_word... " >&6; }
6576if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6577 $as_echo_n "(cached) " >&6
6578else
6579 case $ac_pt_LLVM_AR in
6580 [\\/]* | ?:[\\/]*)
6581 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6582 ;;
6583 *)
6584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585for as_dir in ${llvm_path}
6586do
6587 IFS=$as_save_IFS
6588 test -z "$as_dir" && as_dir=.
6589 for ac_exec_ext in '' $ac_executable_extensions; do
6590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593 break 2
6594 fi
6595done
6596 done
6597IFS=$as_save_IFS
6598
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006599 ;;
6600esac
6601fi
6602ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6603if test -n "$ac_pt_LLVM_AR"; then
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6605$as_echo "$ac_pt_LLVM_AR" >&6; }
6606else
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006611 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006612 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006613 else
6614 case $cross_compiling:$ac_tool_warned in
6615yes:)
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6618ac_tool_warned=yes ;;
6619esac
6620 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006621 fi
6622else
6623 LLVM_AR="$ac_cv_path_LLVM_AR"
6624fi
6625
6626
6627 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6628 then
6629 LLVM_AR_FOUND="found"
6630 else
6631 LLVM_AR_FOUND="not-found"
6632 fi
6633 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6634 then
6635 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6636 if test -n "${found_llvm_ar}"
6637 then
6638 LLVM_AR='/usr/bin/xcrun llvm-ar'
6639 LLVM_AR_FOUND=found
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6641$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6642 fi
6643 fi
6644 if test $LLVM_AR_FOUND = not-found
6645 then
6646 LLVM_PROFR_ERR=yes
6647 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6648 else
6649 LLVM_AR_ERR=no
6650 fi
6651 AR="${LLVM_AR}"
6652 case $ac_sys_system in
6653 Darwin*)
6654 # Any changes made here should be reflected in the GCC+Darwin case below
6655 LTOFLAGS="-flto -Wl,-export_dynamic"
6656 ;;
6657 *)
6658 LTOFLAGS="-flto"
6659 ;;
6660 esac
6661 ;;
6662 *gcc*)
6663 case $ac_sys_system in
6664 Darwin*)
6665 LTOFLAGS="-flto -Wl,-export_dynamic"
6666 ;;
6667 *)
6668 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6669 ;;
6670 esac
6671 ;;
6672 esac
6673
6674 if test "$ac_cv_prog_cc_g" = "yes"
6675 then
6676 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6677 # to get debug symbols.
6678 LTOFLAGS="$LTOFLAGS -g"
6679 fi
6680
stratakisf92c7aa2018-12-04 15:54:01 +01006681 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006682 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006683fi
6684
6685# Enable PGO flags.
6686
6687
6688
6689
6690
6691
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006692if test -n "$ac_tool_prefix"; then
6693 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6694set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6696$as_echo_n "checking for $ac_word... " >&6; }
6697if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6698 $as_echo_n "(cached) " >&6
6699else
6700 case $LLVM_PROFDATA in
6701 [\\/]* | ?:[\\/]*)
6702 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6703 ;;
6704 *)
6705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707do
6708 IFS=$as_save_IFS
6709 test -z "$as_dir" && as_dir=.
6710 for ac_exec_ext in '' $ac_executable_extensions; do
6711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6714 break 2
6715 fi
6716done
6717 done
6718IFS=$as_save_IFS
6719
Gregory P. Smith799520c2016-09-07 16:10:00 -07006720 ;;
6721esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006722fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006723LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6724if test -n "$LLVM_PROFDATA"; then
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6726$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006727else
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6729$as_echo "no" >&6; }
6730fi
6731
6732
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006733fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006734if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006735 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6736 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006737set dummy llvm-profdata; ac_word=$2
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739$as_echo_n "checking for $ac_word... " >&6; }
6740if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6741 $as_echo_n "(cached) " >&6
6742else
6743 case $ac_pt_LLVM_PROFDATA in
6744 [\\/]* | ?:[\\/]*)
6745 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6746 ;;
6747 *)
6748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749for as_dir in ${llvm_path}
6750do
6751 IFS=$as_save_IFS
6752 test -z "$as_dir" && as_dir=.
6753 for ac_exec_ext in '' $ac_executable_extensions; do
6754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757 break 2
6758 fi
6759done
6760 done
6761IFS=$as_save_IFS
6762
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 ;;
6764esac
6765fi
6766ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6767if test -n "$ac_pt_LLVM_PROFDATA"; then
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6769$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6770else
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006775 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006777 else
6778 case $cross_compiling:$ac_tool_warned in
6779yes:)
6780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6782ac_tool_warned=yes ;;
6783esac
6784 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006785 fi
6786else
6787 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6788fi
6789
6790
6791if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6792then
6793 LLVM_PROF_FOUND="found"
6794else
6795 LLVM_PROF_FOUND="not-found"
6796fi
6797if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6798then
6799 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6800 if test -n "${found_llvm_profdata}"
6801 then
6802 # llvm-profdata isn't directly in $PATH in some cases.
6803 # https://apple.stackexchange.com/questions/197053/
6804 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6805 LLVM_PROF_FOUND=found
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6807$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6808 fi
6809fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006810LLVM_PROF_ERR=no
6811case $CC in
6812 *clang*)
6813 # Any changes made here should be reflected in the GCC+Darwin case below
6814 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6815 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006817 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6818 if test $LLVM_PROF_FOUND = not-found
6819 then
6820 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006821 if test "${REQUIRE_PGO}" = "yes"
6822 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006823 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006824 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825 fi
6826 ;;
6827 *gcc*)
6828 case $ac_sys_system in
6829 Darwin*)
6830 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6831 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006832 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006834 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006835 then
6836 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006837 if test "${REQUIRE_PGO}" = "yes"
6838 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006839 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006840 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006841 fi
6842 ;;
6843 *)
6844 PGO_PROF_GEN_FLAG="-fprofile-generate"
6845 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6846 LLVM_PROF_MERGER="true"
6847 LLVM_PROF_FILE=""
6848 ;;
6849 esac
6850 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006851 *icc*)
6852 PGO_PROF_GEN_FLAG="-prof-gen"
6853 PGO_PROF_USE_FLAG="-prof-use"
6854 LLVM_PROF_MERGER="true"
6855 LLVM_PROF_FILE=""
6856 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006857esac
6858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6860# merged with this chunk of code?
6861
6862# Optimizer/debugger flags
6863# ------------------------
6864# (The following bit of code is complicated enough - please keep things
6865# indented properly. Just pretend you're editing Python code. ;-)
6866
6867# There are two parallel sets of case statements below, one that checks to
6868# see if OPT was set and one that does BASECFLAGS setting based upon
6869# compiler and platform. BASECFLAGS tweaks need to be made even if the
6870# user set OPT.
6871
Victor Stinner23a683a2019-04-12 21:27:37 +02006872case $CC in
6873 *clang*)
6874 cc_is_clang=1
6875 ;;
6876 *)
6877 if $CC --version 2>&1 | grep -q clang
6878 then
6879 cc_is_clang=1
6880 else
6881 cc_is_clang=
6882 fi
6883esac
6884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885# tweak OPT based on compiler and platform, only if the user didn't set
6886# it on the command line
6887
Victor Stinner9ed34a82017-05-02 22:35:58 +02006888
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006889if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890then
6891 case $GCC in
6892 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6894 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6895 WRAP="-fwrapv"
6896 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006897
Victor Stinner35f3d242017-04-21 12:35:24 +02006898 if test -n "${cc_is_clang}"
6899 then
6900 # Clang also needs -fwrapv
6901 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006902 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6903 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006904 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006905 fi
6906
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907 case $ac_cv_prog_cc_g in
6908 yes)
6909 if test "$Py_DEBUG" = 'true' ; then
6910 # Optimization messes up debuggers, so turn it off for
6911 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006912 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006913 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006914 else
Victor Stinner28205b22017-04-21 11:24:34 +02006915 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006916 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917 else
Victor Stinner28205b22017-04-21 11:24:34 +02006918 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 fi
6920 ;;
6921 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006922 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923 ;;
6924 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926 case $ac_sys_system in
6927 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6928 ;;
6929 esac
6930 ;;
6931
6932 *)
6933 OPT="-O"
6934 ;;
6935 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936fi
6937
6938
6939
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006940
stratakiscf10a752018-12-19 18:19:01 +01006941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942# The -arch flags for universal builds on OSX
6943UNIVERSAL_ARCH_FLAGS=
6944
6945
6946# tweak BASECFLAGS based on compiler and platform
6947case $GCC in
6948yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006949 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006950
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6952$as_echo_n "checking for -Wextra... " >&6; }
6953 ac_save_cc="$CC"
6954 CC="$CC -Wextra -Werror"
6955 if ${ac_cv_extra_warnings+:} false; then :
6956 $as_echo_n "(cached) " >&6
6957else
6958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6959/* end confdefs.h. */
6960
6961
6962int
6963main ()
6964{
6965
6966 ;
6967 return 0;
6968}
6969
6970_ACEOF
6971if ac_fn_c_try_compile "$LINENO"; then :
6972
6973 ac_cv_extra_warnings=yes
6974
6975else
6976
6977 ac_cv_extra_warnings=no
6978
6979fi
6980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6981fi
6982
6983 CC="$ac_save_cc"
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6985$as_echo "$ac_cv_extra_warnings" >&6; }
6986
6987 if test $ac_cv_extra_warnings = yes
6988 then
6989 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6990 fi
6991
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 # Python doesn't violate C99 aliasing rules, but older versions of
6993 # GCC produce warnings for legal Python code. Enable
6994 # -fno-strict-aliasing on versions of GCC that support but produce
6995 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6997$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998 ac_save_cc="$CC"
6999 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007000 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007001 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007006
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007008int
7009main ()
7010{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007011
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007012 ;
7013 return 0;
7014}
Matthias Kloseb159a552010-04-25 21:00:44 +00007015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007017if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
7019 CC="$ac_save_cc -fstrict-aliasing"
7020 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007022/* end confdefs.h. */
7023
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007024 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025int
7026main ()
7027{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007028double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029 ;
7030 return 0;
7031}
Matthias Kloseb159a552010-04-25 21:00:44 +00007032
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007035
7036 ac_cv_no_strict_aliasing=no
7037
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038else
Matthias Kloseb159a552010-04-25 21:00:44 +00007039
7040 ac_cv_no_strict_aliasing=yes
7041
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007042fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007044
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045else
Matthias Kloseb159a552010-04-25 21:00:44 +00007046
7047 ac_cv_no_strict_aliasing=no
7048
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007051fi
7052
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007053 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7056$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007057 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058 then
7059 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7060 fi
7061
Zachary Ware5af85642015-12-21 12:09:17 -06007062 # ICC doesn't recognize the option, but only emits a warning
7063 ## XXX does it emit an unused result warning and can it be disabled?
7064 case "$CC" in
7065 *icc*)
7066 ac_cv_disable_unused_result_warning=no
7067 ;;
7068 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7070$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7071 ac_save_cc="$CC"
7072 CC="$CC -Wunused-result -Werror"
7073 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007074 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007075 $as_echo_n "(cached) " >&6
7076else
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078/* end confdefs.h. */
7079
7080
7081int
7082main ()
7083{
7084
7085 ;
7086 return 0;
7087}
7088
7089_ACEOF
7090if ac_fn_c_try_compile "$LINENO"; then :
7091
7092 ac_cv_disable_unused_result_warning=yes
7093
7094else
7095
7096 ac_cv_disable_unused_result_warning=no
7097
7098fi
7099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7100fi
7101
7102 CFLAGS="$save_CFLAGS"
7103 CC="$ac_save_cc"
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7105$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007106 ;;
7107 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007108
7109 if test $ac_cv_disable_unused_result_warning = yes
7110 then
7111 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007112 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7113 fi
7114
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7116$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7117 ac_save_cc="$CC"
7118 CC="$CC -Wunused-parameter -Werror"
7119 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7120 $as_echo_n "(cached) " >&6
7121else
7122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7123/* end confdefs.h. */
7124
7125
7126int
7127main ()
7128{
7129
7130 ;
7131 return 0;
7132}
7133
7134_ACEOF
7135if ac_fn_c_try_compile "$LINENO"; then :
7136
7137 ac_cv_disable_unused_parameter_warning=yes
7138
7139else
7140
7141 ac_cv_disable_unused_parameter_warning=no
7142
7143fi
7144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7145fi
7146
7147 CC="$ac_save_cc"
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7149$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7150
7151 if test $ac_cv_disable_unused_parameter_warning = yes
7152 then
7153 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7154 fi
7155
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7157$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7158 ac_save_cc="$CC"
7159 CC="$CC -Wmissing-field-initializers -Werror"
7160 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7161 $as_echo_n "(cached) " >&6
7162else
7163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7164/* end confdefs.h. */
7165
7166
7167int
7168main ()
7169{
7170
7171 ;
7172 return 0;
7173}
7174
7175_ACEOF
7176if ac_fn_c_try_compile "$LINENO"; then :
7177
7178 ac_cv_disable_missing_field_initializers=yes
7179
7180else
7181
7182 ac_cv_disable_missing_field_initializers=no
7183
7184fi
7185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7186fi
7187
7188 CC="$ac_save_cc"
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7190$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7191
7192 if test $ac_cv_disable_missing_field_initializers = yes
7193 then
7194 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007195 fi
7196
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7198$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7199 ac_save_cc="$CC"
7200 CC="$CC -Wsign-compare"
7201 save_CFLAGS="$CFLAGS"
7202 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7203 $as_echo_n "(cached) " >&6
7204else
7205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7206/* end confdefs.h. */
7207
7208
7209int
7210main ()
7211{
7212
7213 ;
7214 return 0;
7215}
7216
7217_ACEOF
7218if ac_fn_c_try_compile "$LINENO"; then :
7219
7220 ac_cv_enable_sign_compare_warning=yes
7221
7222else
7223
7224 ac_cv_enable_sign_compare_warning=no
7225
7226fi
7227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7228fi
7229
7230 CFLAGS="$save_CFLAGS"
7231 CC="$ac_save_cc"
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7233$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7234
7235 if test $ac_cv_enable_sign_compare_warning = yes
7236 then
7237 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7238 fi
7239
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7241$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7242 ac_save_cc="$CC"
7243 CC="$CC -Wunreachable-code"
7244 save_CFLAGS="$CFLAGS"
7245 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7246 $as_echo_n "(cached) " >&6
7247else
7248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7249/* end confdefs.h. */
7250
7251
7252int
7253main ()
7254{
7255
7256 ;
7257 return 0;
7258}
7259
7260_ACEOF
7261if ac_fn_c_try_compile "$LINENO"; then :
7262
7263 ac_cv_enable_unreachable_code_warning=yes
7264
7265else
7266
7267 ac_cv_enable_unreachable_code_warning=no
7268
7269fi
7270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271fi
7272
7273 CFLAGS="$save_CFLAGS"
7274 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007275
7276 # Don't enable unreachable code warning in debug mode, since it usually
7277 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007278 # Issue #24324: Unfortunately, the unreachable code warning does not work
7279 # correctly on gcc and has been silently removed from the compiler.
7280 # It is supported on clang but on OS X systems gcc may be an alias
7281 # for clang. Try to determine if the compiler is not really gcc and,
7282 # if so, only then enable the warning.
7283 if test $ac_cv_enable_unreachable_code_warning = yes && \
7284 test "$Py_DEBUG" != "true" && \
7285 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007286 then
7287 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007288 else
7289 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007290 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7292$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007293
INADA Naokie3364842018-06-05 20:40:53 +09007294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7295$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7296 ac_save_cc="$CC"
7297 CC="$CC -Werror -Wstrict-prototypes"
7298 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7299 $as_echo_n "(cached) " >&6
7300else
7301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7302/* end confdefs.h. */
7303
7304
7305int
7306main ()
7307{
7308
7309 ;
7310 return 0;
7311}
7312
7313_ACEOF
7314if ac_fn_c_try_compile "$LINENO"; then :
7315
7316 ac_cv_enable_strict_prototypes_warning=yes
7317
7318else
7319
7320 ac_cv_enable_strict_prototypes_warning=no
7321
7322fi
7323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7324fi
7325
7326 CC="$ac_save_cc"
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7328$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7329
7330 if test $ac_cv_enable_strict_prototypes_warning = yes
7331 then
7332 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7333 fi
7334
Victor Stinner193ee0a2017-02-06 14:24:00 +01007335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7336$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7337 ac_save_cc="$CC"
7338 CC="$CC -Werror=implicit-function-declaration"
7339 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7340 $as_echo_n "(cached) " >&6
7341else
7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343/* end confdefs.h. */
7344
7345
7346int
7347main ()
7348{
7349
7350 ;
7351 return 0;
7352}
7353
7354_ACEOF
7355if ac_fn_c_try_compile "$LINENO"; then :
7356
7357 ac_cv_enable_implicit_function_declaration_error=yes
7358
7359else
7360
7361 ac_cv_enable_implicit_function_declaration_error=no
7362
7363fi
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365fi
7366
7367 CC="$ac_save_cc"
7368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7369$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7370
7371 if test $ac_cv_enable_implicit_function_declaration_error = yes
7372 then
7373 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7374 fi
7375
Vinay Sajip0b60f642019-10-15 08:26:12 +01007376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7377$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7378 ac_save_cc="$CC"
7379 CC="$CC -fvisibility=hidden"
7380 if ${ac_cv_enable_visibility+:} false; then :
7381 $as_echo_n "(cached) " >&6
7382else
7383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384/* end confdefs.h. */
7385
7386
7387int
7388main ()
7389{
7390
7391 ;
7392 return 0;
7393}
7394
7395_ACEOF
7396if ac_fn_c_try_compile "$LINENO"; then :
7397
7398 ac_cv_enable_visibility=yes
7399
7400else
7401
7402 ac_cv_enable_visibility=no
7403
7404fi
7405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7406fi
7407
7408 CC="$ac_save_cc"
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7410$as_echo "$ac_cv_enable_visibility" >&6; }
7411
7412 if test $ac_cv_enable_visibility = yes
7413 then
7414 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7415 fi
7416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7418 # support. Without this, treatment of subnormals doesn't follow
7419 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007420 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421 alpha*)
7422 BASECFLAGS="$BASECFLAGS -mieee"
7423 ;;
7424 esac
7425
7426 case $ac_sys_system in
7427 SCO_SV*)
7428 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7429 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007430
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 Darwin*)
7432 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7433 # used to be here, but non-Apple gcc doesn't accept them.
7434 if test "${CC}" = gcc
7435 then
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007438 case "${UNIVERSALSDK}" in
7439 */MacOSX10.4u.sdk)
7440 # Build using 10.4 SDK, force usage of gcc when the
7441 # compiler is gcc, otherwise the user will get very
7442 # confusing error messages when building on OSX 10.6
7443 CC=gcc-4.0
7444 CPP=cpp-4.0
7445 ;;
7446 esac
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007449 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 if test "${enable_universalsdk}"
7452 then
7453 case "$UNIVERSAL_ARCHS" in
7454 32-bit)
7455 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7456 LIPO_32BIT_FLAGS=""
7457 ARCH_RUN_32BIT=""
7458 ;;
7459 64-bit)
7460 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7461 LIPO_32BIT_FLAGS=""
7462 ARCH_RUN_32BIT="true"
7463 ;;
7464 all)
7465 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7466 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7467 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7468 ;;
7469 intel)
7470 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7471 LIPO_32BIT_FLAGS="-extract i386"
7472 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7473 ;;
7474 intel-32)
7475 UNIVERSAL_ARCH_FLAGS="-arch i386"
7476 LIPO_32BIT_FLAGS=""
7477 ARCH_RUN_32BIT=""
7478 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007479 intel-64)
7480 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7481 LIPO_32BIT_FLAGS=""
7482 ARCH_RUN_32BIT="true"
7483 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007484 3-way)
7485 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7486 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7487 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7488 ;;
7489 *)
7490 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7491 ;;
7492 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 if test "${UNIVERSALSDK}" != "/"
7495 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007496 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7497 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007499 else
7500 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7501 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007502 fi
7503 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 # Calculate an appropriate deployment target for this build:
7506 # The deployment target value is used explicitly to enable certain
7507 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007508 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007509 # component of the string returned by distutils.get_platform().
7510 #
7511 # Use the value from:
7512 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7513 # 2. the operating system version of the build machine if >= 10.6
7514 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7515 # below to pick either 10.3, 10.4, or 10.5 as the target.
7516 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517
Ned Deily87adb6e2013-10-18 21:09:56 -07007518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7519$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007520 cur_target_major=`sw_vers -productVersion | \
7521 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7522 cur_target_minor=`sw_vers -productVersion | \
7523 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7524 cur_target="${cur_target_major}.${cur_target_minor}"
7525 if test ${cur_target_major} -eq 10 && \
7526 test ${cur_target_minor} -ge 3 && \
7527 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007528 then
Ned Deily36820b62014-06-25 13:44:22 -07007529 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007530 cur_target=10.3
7531 if test ${enable_universalsdk}
7532 then
7533 case "$UNIVERSAL_ARCHS" in
7534 all|3-way|intel|64-bit)
7535 # These configurations were first supported in 10.5
7536 cur_target='10.5'
7537 ;;
7538 esac
7539 else
7540 if test `/usr/bin/arch` = "i386"
7541 then
7542 # 10.4 was the first release to support Intel archs
7543 cur_target="10.4"
7544 fi
7545 fi
7546 fi
7547 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007548
Ned Deily87adb6e2013-10-18 21:09:56 -07007549 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7550 # environment with a value that is the same as what we'll use
7551 # in the Makefile to ensure that we'll get the same compiler
7552 # environment during configure and build time.
7553 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7554 export MACOSX_DEPLOYMENT_TARGET
7555 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7557$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007558
Ned Deily87adb6e2013-10-18 21:09:56 -07007559 # end of Darwin* tests
7560 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 esac
7562 ;;
7563
7564*)
7565 case $ac_sys_system in
7566 OpenUNIX*|UnixWare*)
7567 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7568 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569 SCO_SV*)
7570 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7571 ;;
7572 esac
7573 ;;
7574esac
7575
Zachary Ware5af85642015-12-21 12:09:17 -06007576# ICC needs -fp-model strict or floats behave badly
7577case "$CC" in
7578*icc*)
7579 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7580 ;;
7581esac
7582
T. Woutersddbfa2c2017-05-23 01:30:49 +02007583if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584 :
7585else
7586 OPT="-DNDEBUG $OPT"
7587fi
7588
7589if test "$ac_arch_flags"
7590then
7591 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7592fi
7593
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594# On some compilers, pthreads are available without further options
7595# (e.g. MacOS X). On some of these systems, the compiler will not
7596# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7597# So we have to see first whether pthreads are available without
7598# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7600$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007601if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 ac_cv_pthread_is_default=no
7606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608/* end confdefs.h. */
7609
Stefan Krah7dba5942012-11-22 22:49:11 +01007610#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611#include <pthread.h>
7612
7613void* routine(void* p){return NULL;}
7614
7615int main(){
7616 pthread_t p;
7617 if(pthread_create(&p,NULL,routine,NULL)!=0)
7618 return 1;
7619 (void)pthread_detach(p);
7620 return 0;
7621}
7622
7623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625
7626 ac_cv_pthread_is_default=yes
7627 ac_cv_kthread=no
7628 ac_cv_pthread=no
7629
7630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
7636
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7641$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642
7643
7644if test $ac_cv_pthread_is_default = yes
7645then
7646 ac_cv_kpthread=no
7647else
7648# -Kpthread, if available, provides the right #defines
7649# and linker options to make pthread_create available
7650# Some compilers won't report that they do not support -Kpthread,
7651# so we need to run a program to see whether it really made the
7652# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7654$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007655if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657else
7658 ac_save_cc="$CC"
7659CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007660if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661 ac_cv_kpthread=no
7662else
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664/* end confdefs.h. */
7665
Stefan Krah7dba5942012-11-22 22:49:11 +01007666#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667#include <pthread.h>
7668
7669void* routine(void* p){return NULL;}
7670
7671int main(){
7672 pthread_t p;
7673 if(pthread_create(&p,NULL,routine,NULL)!=0)
7674 return 1;
7675 (void)pthread_detach(p);
7676 return 0;
7677}
7678
7679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007680if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681 ac_cv_kpthread=yes
7682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7686 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687fi
7688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689CC="$ac_save_cc"
7690fi
7691
Matthias Kloseb9621712010-04-24 17:59:49 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7693$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694fi
7695
7696if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7697then
7698# -Kthread, if available, provides the right #defines
7699# and linker options to make pthread_create available
7700# Some compilers won't report that they do not support -Kthread,
7701# so we need to run a program to see whether it really made the
7702# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7704$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007705if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707else
7708 ac_save_cc="$CC"
7709CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711 ac_cv_kthread=no
7712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714/* end confdefs.h. */
7715
Stefan Krah7dba5942012-11-22 22:49:11 +01007716#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717#include <pthread.h>
7718
7719void* routine(void* p){return NULL;}
7720
7721int main(){
7722 pthread_t p;
7723 if(pthread_create(&p,NULL,routine,NULL)!=0)
7724 return 1;
7725 (void)pthread_detach(p);
7726 return 0;
7727}
7728
7729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731 ac_cv_kthread=yes
7732else
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737fi
7738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739CC="$ac_save_cc"
7740fi
7741
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7743$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744fi
7745
7746if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7747then
7748# -pthread, if available, provides the right #defines
7749# and linker options to make pthread_create available
7750# Some compilers won't report that they do not support -pthread,
7751# so we need to run a program to see whether it really made the
7752# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7754$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007755if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757else
7758 ac_save_cc="$CC"
7759CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_pthread=no
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764/* end confdefs.h. */
7765
Stefan Krah7dba5942012-11-22 22:49:11 +01007766#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767#include <pthread.h>
7768
7769void* routine(void* p){return NULL;}
7770
7771int main(){
7772 pthread_t p;
7773 if(pthread_create(&p,NULL,routine,NULL)!=0)
7774 return 1;
7775 (void)pthread_detach(p);
7776 return 0;
7777}
7778
7779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781 ac_cv_pthread=yes
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787fi
7788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789CC="$ac_save_cc"
7790fi
7791
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7793$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
7795
7796# If we have set a CC compiler flag for thread support then
7797# check if it works for CXX, too.
7798ac_cv_cxx_thread=no
7799if test ! -z "$CXX"
7800then
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7802$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803ac_save_cxx="$CXX"
7804
7805if test "$ac_cv_kpthread" = "yes"
7806then
7807 CXX="$CXX -Kpthread"
7808 ac_cv_cxx_thread=yes
7809elif test "$ac_cv_kthread" = "yes"
7810then
7811 CXX="$CXX -Kthread"
7812 ac_cv_cxx_thread=yes
7813elif test "$ac_cv_pthread" = "yes"
7814then
7815 CXX="$CXX -pthread"
7816 ac_cv_cxx_thread=yes
7817fi
7818
7819if test $ac_cv_cxx_thread = yes
7820then
7821 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7822 $CXX -c conftest.$ac_ext 2>&5
7823 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7824 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7825 then
7826 ac_cv_cxx_thread=yes
7827 else
7828 ac_cv_cxx_thread=no
7829 fi
7830 rm -fr conftest*
7831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7833$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834fi
7835CXX="$ac_save_cxx"
7836
7837
7838# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7840$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007841if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843else
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007845/* end confdefs.h. */
7846#include <stdlib.h>
7847#include <stdarg.h>
7848#include <string.h>
7849#include <float.h>
7850
7851int
7852main ()
7853{
7854
7855 ;
7856 return 0;
7857}
7858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007859if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860 ac_cv_header_stdc=yes
7861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7865
7866if test $ac_cv_header_stdc = yes; then
7867 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007869/* end confdefs.h. */
7870#include <string.h>
7871
7872_ACEOF
7873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 $EGREP "memchr" >/dev/null 2>&1; then :
7875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876else
7877 ac_cv_header_stdc=no
7878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007879rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007880
7881fi
7882
7883if test $ac_cv_header_stdc = yes; then
7884 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886/* end confdefs.h. */
7887#include <stdlib.h>
7888
7889_ACEOF
7890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 $EGREP "free" >/dev/null 2>&1; then :
7892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893else
7894 ac_cv_header_stdc=no
7895fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007896rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007897
7898fi
7899
7900if test $ac_cv_header_stdc = yes; then
7901 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007903 :
7904else
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007906/* end confdefs.h. */
7907#include <ctype.h>
7908#include <stdlib.h>
7909#if ((' ' & 0x0FF) == 0x020)
7910# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7911# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7912#else
7913# define ISLOWER(c) \
7914 (('a' <= (c) && (c) <= 'i') \
7915 || ('j' <= (c) && (c) <= 'r') \
7916 || ('s' <= (c) && (c) <= 'z'))
7917# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7918#endif
7919
7920#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7921int
7922main ()
7923{
7924 int i;
7925 for (i = 0; i < 256; i++)
7926 if (XOR (islower (i), ISLOWER (i))
7927 || toupper (i) != TOUPPER (i))
7928 return 2;
7929 return 0;
7930}
7931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007932if ac_fn_c_try_run "$LINENO"; then :
7933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007939fi
7940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941fi
7942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7944$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007945if test $ac_cv_header_stdc = yes; then
7946
Matthias Kloseb9621712010-04-24 17:59:49 +00007947$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007948
7949fi
7950
stratakise768c862018-01-23 16:11:24 +01007951for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007952fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007953ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007954sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007955utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007956poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007957sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007958sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007959sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007960sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007961sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007962libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007963linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007964sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007965do :
7966 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7967ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007968if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007970#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007971_ACEOF
7972
7973fi
7974
Guido van Rossum627b2d71993-12-24 10:39:16 +00007975done
7976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007978for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7981$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007982if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007984else
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007987#include <sys/types.h>
7988#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Martin v. Löwis11437992002-04-12 09:54:03 +00007990int
7991main ()
7992{
7993if ((DIR *) 0)
7994return 0;
7995 ;
7996 return 0;
7997}
7998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006eval ac_res=\$$as_ac_Header
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8008$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008009if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008011#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008012_ACEOF
8013
8014ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017done
8018# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8019if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8021$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008022if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008024else
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029/* Override any GCC internal prototype to avoid an error.
8030 Use char because int might match the return type of a GCC
8031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032#ifdef __cplusplus
8033extern "C"
8034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008035char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ;
8041 return 0;
8042}
8043_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044for ac_lib in '' dir; do
8045 if test -z "$ac_lib"; then
8046 ac_res="none required"
8047 else
8048 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008056 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059done
Victor Stinnere0be4232011-10-25 13:06:09 +02008060if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062else
8063 ac_cv_search_opendir=no
8064fi
8065rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008066LIBS=$ac_func_search_save_LIBS
8067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8069$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Michael W. Hudson54241132001-12-07 15:38:26 +00008076else
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8078$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008079if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008081else
8082 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086/* Override any GCC internal prototype to avoid an error.
8087 Use char because int might match the return type of a GCC
8088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089#ifdef __cplusplus
8090extern "C"
8091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008092char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ;
8098 return 0;
8099}
8100_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101for ac_lib in '' x; do
8102 if test -z "$ac_lib"; then
8103 ac_res="none required"
8104 else
8105 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008106 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008111rm -f core conftest.err conftest.$ac_objext \
8112 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008113 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116done
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119else
8120 ac_cv_search_opendir=no
8121fi
8122rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123LIBS=$ac_func_search_save_LIBS
8124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8126$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008128if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008131fi
8132
8133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8136$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008137if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008142#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008143int
8144main ()
8145{
8146return makedev(0, 0);
8147 ;
8148 return 0;
8149}
8150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008152 ac_cv_header_sys_types_h_makedev=yes
8153else
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156rm -f core conftest.err conftest.$ac_objext \
8157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158
8159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8161$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008162
8163if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008164ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008168
8169fi
8170
8171
8172
8173 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008175if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008178
8179fi
8180
8181
8182 fi
8183fi
8184
Michael W. Hudson54241132001-12-07 15:38:26 +00008185
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008186# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8187# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8188SAVE_CFLAGS=$CFLAGS
8189CFLAGS="-std=c99 $CFLAGS"
8190for ac_header in bluetooth/bluetooth.h
8191do :
8192 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8193if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8194 cat >>confdefs.h <<_ACEOF
8195#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8196_ACEOF
8197
8198fi
8199
8200done
8201
8202CFLAGS=$SAVE_CFLAGS
8203
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008204# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8205for ac_header in net/if.h
8206do :
8207 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8208#ifdef STDC_HEADERS
8209# include <stdlib.h>
8210# include <stddef.h>
8211#else
8212# ifdef HAVE_STDLIB_H
8213# include <stdlib.h>
8214# endif
8215#endif
8216#ifdef HAVE_SYS_SOCKET_H
8217# include <sys/socket.h>
8218#endif
8219
8220"
Victor Stinnere0be4232011-10-25 13:06:09 +02008221if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008222 cat >>confdefs.h <<_ACEOF
8223#define HAVE_NET_IF_H 1
8224_ACEOF
8225
8226fi
8227
8228done
8229
8230
Martin v. Löwis11017b12006-01-14 18:12:57 +00008231# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008232for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008233do :
8234 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00008235#ifdef HAVE_ASM_TYPES_H
8236#include <asm/types.h>
8237#endif
8238#ifdef HAVE_SYS_SOCKET_H
8239#include <sys/socket.h>
8240#endif
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242"
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008245#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008246_ACEOF
8247
8248fi
8249
8250done
8251
8252
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008253# On Linux, qrtr.h requires asm/types.h
8254for ac_header in linux/qrtr.h
8255do :
8256 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8257#ifdef HAVE_ASM_TYPES_H
8258#include <asm/types.h>
8259#endif
8260#ifdef HAVE_SYS_SOCKET_H
8261#include <sys/socket.h>
8262#endif
8263
8264"
8265if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8266 cat >>confdefs.h <<_ACEOF
8267#define HAVE_LINUX_QRTR_H 1
8268_ACEOF
8269
8270fi
8271
8272done
8273
8274
caaveryeffc12f2017-09-06 18:18:10 -04008275for ac_header in linux/vm_sockets.h
8276do :
8277 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8278#ifdef HAVE_SYS_SOCKET_H
8279#include <sys/socket.h>
8280#endif
8281
8282"
8283if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8284 cat >>confdefs.h <<_ACEOF
8285#define HAVE_LINUX_VM_SOCKETS_H 1
8286_ACEOF
8287
8288fi
8289
8290done
8291
8292
karl ding360371f2020-04-29 15:31:19 -07008293# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8294for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008295do :
8296 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8297ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8298#ifdef HAVE_SYS_SOCKET_H
8299#include <sys/socket.h>
8300#endif
8301
8302"
8303if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8304 cat >>confdefs.h <<_ACEOF
8305#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8306_ACEOF
8307
8308fi
8309
8310done
8311
8312
Guido van Rossum627b2d71993-12-24 10:39:16 +00008313# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008314was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8316$as_echo_n "checking for clock_t in time.h... " >&6; }
8317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008319#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
8321_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008324 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326
8327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008329
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008330
Guido van Rossum627b2d71993-12-24 10:39:16 +00008331fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008332rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8335$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8338$as_echo_n "checking for makedev... " >&6; }
8339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008341
Jesus Cea740f53a2010-04-28 11:35:30 +00008342#if defined(MAJOR_IN_MKDEV)
8343#include <sys/mkdev.h>
8344#elif defined(MAJOR_IN_SYSMACROS)
8345#include <sys/sysmacros.h>
8346#else
8347#include <sys/types.h>
8348#endif
8349
Neal Norwitz11690112002-07-30 01:08:28 +00008350int
8351main ()
8352{
Jesus Cea740f53a2010-04-28 11:35:30 +00008353
8354 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008355 ;
8356 return 0;
8357}
Matthias Kloseb159a552010-04-25 21:00:44 +00008358
Neal Norwitz11690112002-07-30 01:08:28 +00008359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008360if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008361 ac_cv_has_makedev=yes
8362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008365rm -f core conftest.err conftest.$ac_objext \
8366 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8368$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008369if test "$ac_cv_has_makedev" = "yes"; then
8370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008372
8373fi
8374
Christian Heimes985ecdc2013-11-20 11:46:18 +01008375# byte swapping
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8377$as_echo_n "checking for le64toh... " >&6; }
8378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379/* end confdefs.h. */
8380
8381#ifdef HAVE_ENDIAN_H
8382#include <endian.h>
8383#elif defined(HAVE_SYS_ENDIAN_H)
8384#include <sys/endian.h>
8385#endif
8386
8387int
8388main ()
8389{
8390
8391 le64toh(1)
8392 ;
8393 return 0;
8394}
8395
8396_ACEOF
8397if ac_fn_c_try_link "$LINENO"; then :
8398 ac_cv_has_le64toh=yes
8399else
8400 ac_cv_has_le64toh=no
8401fi
8402rm -f core conftest.err conftest.$ac_objext \
8403 conftest$ac_exeext conftest.$ac_ext
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8405$as_echo "$ac_cv_has_le64toh" >&6; }
8406if test "$ac_cv_has_le64toh" = "yes"; then
8407
8408$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8409
8410fi
8411
Martin v. Löwis399a6892002-10-04 10:22:02 +00008412use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008413# Don't use largefile support for GNU/Hurd
8414case $ac_sys_system in GNU*)
8415 use_lfs=no
8416esac
8417
Martin v. Löwis399a6892002-10-04 10:22:02 +00008418if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008419# Two defines needed to enable largefile support on various platforms
8420# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008421case $ac_sys_system/$ac_sys_release in
8422AIX*)
8423
8424$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8425
8426 ;;
8427esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
8431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008433
Martin v. Löwis399a6892002-10-04 10:22:02 +00008434fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008435
Guido van Rossum84e7b241996-08-19 21:59:00 +00008436# Add some code to confdefs.h so that the test for off_t works on SCO
8437cat >> confdefs.h <<\EOF
8438#if defined(SCO_DS)
8439#undef _OFF_T
8440#endif
8441EOF
8442
Guido van Rossumef2255b2000-03-10 22:30:29 +00008443# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008444ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008445if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008447else
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449cat >>confdefs.h <<_ACEOF
8450#define mode_t int
8451_ACEOF
8452
8453fi
8454
Matthias Kloseb9621712010-04-24 17:59:49 +00008455ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458else
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
8460cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008462_ACEOF
8463
8464fi
8465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008467if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
8471cat >>confdefs.h <<_ACEOF
8472#define pid_t int
8473_ACEOF
8474
8475fi
8476
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008479#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008480_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008483if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008485else
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
8487cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008489_ACEOF
8490
8491fi
8492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8494$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008500#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008501
8502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505 ac_cv_type_uid_t=yes
8506else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507 ac_cv_type_uid_t=no
8508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008509rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8513$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008514if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
8518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008520
8521fi
8522
Mark Dickinson983bc162012-12-02 12:11:38 +00008523
Matthias Kloseb9621712010-04-24 17:59:49 +00008524ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
Matthias Kloseb9621712010-04-24 17:59:49 +00008527$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008528
8529fi
8530
Stefan Krah1919b7e2012-03-21 18:25:23 +01008531ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8532if test "x$ac_cv_type___uint128_t" = xyes; then :
8533
8534$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8535
8536fi
8537
Jack Jansendd19cf82001-12-06 22:36:17 +00008538
Michael W. Hudson54241132001-12-07 15:38:26 +00008539# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008540# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541# The cast to long int works around a bug in the HP C Compiler
8542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8544# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8546$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008547if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008549else
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 if test "$ac_cv_type_int" = yes; then
8554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008556as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008557See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 else
8559 ac_cv_sizeof_int=0
8560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8565$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566
8567
8568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008570#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008571_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008572
8573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574# The cast to long int works around a bug in the HP C Compiler
8575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8577# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8579$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008580if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 if test "$ac_cv_type_long" = yes; then
8587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008589as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008590See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 else
8592 ac_cv_sizeof_long=0
8593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8598$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599
8600
8601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008603#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008604_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008605
8606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607# The cast to long int works around a bug in the HP C Compiler
8608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8610# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8612$as_echo_n "checking size of long long... " >&6; }
8613if ${ac_cv_sizeof_long_long+:} false; then :
8614 $as_echo_n "(cached) " >&6
8615else
8616 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8617
8618else
8619 if test "$ac_cv_type_long_long" = yes; then
8620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8622as_fn_error 77 "cannot compute sizeof (long long)
8623See \`config.log' for more details" "$LINENO" 5; }
8624 else
8625 ac_cv_sizeof_long_long=0
8626 fi
8627fi
8628
8629fi
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8631$as_echo "$ac_cv_sizeof_long_long" >&6; }
8632
8633
8634
8635cat >>confdefs.h <<_ACEOF
8636#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8637_ACEOF
8638
8639
8640# The cast to long int works around a bug in the HP C Compiler
8641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8643# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8645$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008646if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008648else
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 if test "$ac_cv_type_void_p" = yes; then
8653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008655as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008656See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 else
8658 ac_cv_sizeof_void_p=0
8659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8664$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665
8666
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008669#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008670_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008671
8672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673# The cast to long int works around a bug in the HP C Compiler
8674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8676# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8678$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008679if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 if test "$ac_cv_type_short" = yes; then
8686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008688as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008689See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690 else
8691 ac_cv_sizeof_short=0
8692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8697$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698
8699
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008702#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008703_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008704
8705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706# The cast to long int works around a bug in the HP C Compiler
8707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8711$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_float" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723 else
8724 ac_cv_sizeof_float=0
8725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8730$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008735#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008737
8738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739# The cast to long int works around a bug in the HP C Compiler
8740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8742# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8744$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008745if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008749
Martin v. Löwis11437992002-04-12 09:54:03 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 if test "$ac_cv_type_double" = yes; then
8752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008754as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008755See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756 else
8757 ac_cv_sizeof_double=0
8758 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760
Martin v. Löwis11437992002-04-12 09:54:03 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8763$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764
8765
8766
Martin v. Löwis11437992002-04-12 09:54:03 +00008767cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008768#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008769_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008770
8771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772# The cast to long int works around a bug in the HP C Compiler
8773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8775# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8777$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008778if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008782
Martin v. Löwis11437992002-04-12 09:54:03 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 if test "$ac_cv_type_fpos_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008787as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008788See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789 else
8790 ac_cv_sizeof_fpos_t=0
8791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8796$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797
8798
8799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008802_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008803
Michael W. Hudson54241132001-12-07 15:38:26 +00008804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805# The cast to long int works around a bug in the HP C Compiler
8806# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8807# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8808# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8810$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008811if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008815
Martin v. Löwis18e16552006-02-15 17:27:45 +00008816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 if test "$ac_cv_type_size_t" = yes; then
8818 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008820as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008821See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 else
8823 ac_cv_sizeof_size_t=0
8824 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826
Martin v. Löwis18e16552006-02-15 17:27:45 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8829$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830
8831
8832
Martin v. Löwis18e16552006-02-15 17:27:45 +00008833cat >>confdefs.h <<_ACEOF
8834#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8835_ACEOF
8836
8837
Christian Heimes400adb02008-02-01 08:12:03 +00008838# The cast to long int works around a bug in the HP C Compiler
8839# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8840# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8841# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8843$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008844if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00008848
Christian Heimes400adb02008-02-01 08:12:03 +00008849else
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 if test "$ac_cv_type_pid_t" = yes; then
8851 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008853as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008854See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008855 else
8856 ac_cv_sizeof_pid_t=0
8857 fi
8858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008859
Christian Heimes400adb02008-02-01 08:12:03 +00008860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8862$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008863
8864
8865
8866cat >>confdefs.h <<_ACEOF
8867#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8868_ACEOF
8869
8870
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008871# The cast to long int works around a bug in the HP C Compiler
8872# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8873# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8874# This bug is HP SR number 8606223364.
8875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8876$as_echo_n "checking size of uintptr_t... " >&6; }
8877if ${ac_cv_sizeof_uintptr_t+:} false; then :
8878 $as_echo_n "(cached) " >&6
8879else
8880 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8881
8882else
8883 if test "$ac_cv_type_uintptr_t" = yes; then
8884 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8886as_fn_error 77 "cannot compute sizeof (uintptr_t)
8887See \`config.log' for more details" "$LINENO" 5; }
8888 else
8889 ac_cv_sizeof_uintptr_t=0
8890 fi
8891fi
8892
8893fi
8894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8895$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8896
8897
8898
8899cat >>confdefs.h <<_ACEOF
8900#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8901_ACEOF
8902
8903
Michael W. Hudson54241132001-12-07 15:38:26 +00008904
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008905
Eitan Adler3055c942018-05-15 22:58:09 -07008906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8907$as_echo_n "checking for long double... " >&6; }
8908if ${ac_cv_type_long_double+:} false; then :
8909 $as_echo_n "(cached) " >&6
8910else
8911 if test "$GCC" = yes; then
8912 ac_cv_type_long_double=yes
8913 else
8914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8915/* end confdefs.h. */
8916/* The Stardent Vistra knows sizeof (long double), but does
8917 not support it. */
8918 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008919int
8920main ()
8921{
Eitan Adler3055c942018-05-15 22:58:09 -07008922static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8923 sizeof (double) <= sizeof (long double))];
8924test_array [0] = 0;
8925return test_array [0];
8926
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008927 ;
8928 return 0;
8929}
8930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008931if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008932 ac_cv_type_long_double=yes
8933else
8934 ac_cv_type_long_double=no
8935fi
8936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8937 fi
8938fi
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8940$as_echo "$ac_cv_type_long_double" >&6; }
8941 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008944
Eitan Adler3055c942018-05-15 22:58:09 -07008945 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008946
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008947# The cast to long int works around a bug in the HP C Compiler
8948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8952$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008953if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008955else
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008957
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008958else
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 if test "$ac_cv_type_long_double" = yes; then
8960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008962as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008963See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964 else
8965 ac_cv_sizeof_long_double=0
8966 fi
8967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8971$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008972
8973
8974
8975cat >>confdefs.h <<_ACEOF
8976#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8977_ACEOF
8978
8979
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981# The cast to long int works around a bug in the HP C Compiler
8982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8984# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8986$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008987if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008989else
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008991
Thomas Woutersb2137042007-02-01 18:02:27 +00008992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 if test "$ac_cv_type__Bool" = yes; then
8994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008996as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008997See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 else
8999 ac_cv_sizeof__Bool=0
9000 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002
Thomas Woutersb2137042007-02-01 18:02:27 +00009003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9005$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006
9007
9008
Thomas Woutersb2137042007-02-01 18:02:27 +00009009cat >>confdefs.h <<_ACEOF
9010#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9011_ACEOF
9012
9013
Thomas Woutersb2137042007-02-01 18:02:27 +00009014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015# The cast to long int works around a bug in the HP C Compiler
9016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9020$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009021if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023else
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025#ifdef HAVE_SYS_TYPES_H
9026#include <sys/types.h>
9027#endif
9028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 if test "$ac_cv_type_off_t" = yes; then
9033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009035as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009036See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037 else
9038 ac_cv_sizeof_off_t=0
9039 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9044$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046
9047
Martin v. Löwis11437992002-04-12 09:54:03 +00009048cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009049#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009050_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009051
Michael W. Hudson54241132001-12-07 15:38:26 +00009052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9055$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009056if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009057 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9062$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009063else
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009066fi
9067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068# The cast to long int works around a bug in the HP C Compiler
9069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9071# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9073$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009074if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076else
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078#ifdef HAVE_SYS_TYPES_H
9079#include <sys/types.h>
9080#endif
9081#ifdef HAVE_TIME_H
9082#include <time.h>
9083#endif
9084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009086
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087else
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 if test "$ac_cv_type_time_t" = yes; then
9089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009091as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009092See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009093 else
9094 ac_cv_sizeof_time_t=0
9095 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009097
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9100$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102
9103
Martin v. Löwis11437992002-04-12 09:54:03 +00009104cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009105#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009106_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009107
Michael W. Hudson54241132001-12-07 15:38:26 +00009108
9109
Trent Mick635f6fb2000-08-23 21:33:05 +00009110# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009111ac_save_cc="$CC"
9112if test "$ac_cv_kpthread" = "yes"
9113then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009114elif test "$ac_cv_kthread" = "yes"
9115then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009116elif test "$ac_cv_pthread" = "yes"
9117then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009118fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9121$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009122have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009124/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009125
9126 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009127int
9128main ()
9129{
Guido van Rossum12580492000-09-24 16:47:19 +00009130pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ;
9132 return 0;
9133}
Matthias Kloseb159a552010-04-25 21:00:44 +00009134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009137 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9141$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009142if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9146# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9148$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009149if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009151else
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009153#ifdef HAVE_PTHREAD_H
9154#include <pthread.h>
9155#endif
9156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009159else
Matthias Kloseb9621712010-04-24 17:59:49 +00009160 if test "$ac_cv_type_pthread_t" = yes; then
9161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009163as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009164See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009165 else
9166 ac_cv_sizeof_pthread_t=0
9167 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009169
Trent Mick635f6fb2000-08-23 21:33:05 +00009170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9172$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009174
9175
Martin v. Löwis11437992002-04-12 09:54:03 +00009176cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009177#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009178_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009180
Trent Mick635f6fb2000-08-23 21:33:05 +00009181fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009182
9183# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9184# This checking will be unnecessary after removing deprecated TLS API.
9185# The cast to long int works around a bug in the HP C Compiler
9186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9188# This bug is HP SR number 8606223364.
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9190$as_echo_n "checking size of pthread_key_t... " >&6; }
9191if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9192 $as_echo_n "(cached) " >&6
9193else
9194 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9195"; then :
9196
9197else
9198 if test "$ac_cv_type_pthread_key_t" = yes; then
9199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9201as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9202See \`config.log' for more details" "$LINENO" 5; }
9203 else
9204 ac_cv_sizeof_pthread_key_t=0
9205 fi
9206fi
9207
9208fi
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9210$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9211
9212
9213
9214cat >>confdefs.h <<_ACEOF
9215#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9216_ACEOF
9217
9218
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9220$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9221if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9223/* end confdefs.h. */
9224#include <pthread.h>
9225int
9226main ()
9227{
9228pthread_key_t k; k * 1;
9229 ;
9230 return 0;
9231}
9232_ACEOF
9233if ac_fn_c_try_compile "$LINENO"; then :
9234 ac_pthread_key_t_is_arithmetic_type=yes
9235else
9236 ac_pthread_key_t_is_arithmetic_type=no
9237
9238fi
9239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9241$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9242 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9243
9244$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9245
9246 fi
9247else
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9249$as_echo "no" >&6; }
9250fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009251CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009252
Michael W. Hudson54241132001-12-07 15:38:26 +00009253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009254case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009255 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009256 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9257 ;;
9258 Darwin/*)
9259 OTHER_LIBTOOL_OPT=""
9260 ;;
9261esac
9262
9263
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009264
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009265case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009266 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009267 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9268 if test "${enable_universalsdk}"; then
9269 :
9270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009271 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009272 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009275 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009276 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009277 if test ${gcc_version} '<' 4.0
9278 then
9279 LIBTOOL_CRUFT="-lcc_dynamic"
9280 else
9281 LIBTOOL_CRUFT=""
9282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009284 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009285else
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009287/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009289 #include <unistd.h>
9290 int main(int argc, char*argv[])
9291 {
9292 if (sizeof(long) == 4) {
9293 return 0;
9294 } else {
9295 return 1;
9296 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009297 }
9298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009300if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009301 ac_osx_32bit=yes
9302else
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009307fi
9308
9309
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009310 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009311 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312 i386)
9313 MACOSX_DEFAULT_ARCH="i386"
9314 ;;
9315 ppc)
9316 MACOSX_DEFAULT_ARCH="ppc"
9317 ;;
9318 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009319 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009320 ;;
9321 esac
9322 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009323 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009324 i386)
9325 MACOSX_DEFAULT_ARCH="x86_64"
9326 ;;
9327 ppc)
9328 MACOSX_DEFAULT_ARCH="ppc64"
9329 ;;
9330 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009331 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009332 ;;
9333 esac
9334
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009335 fi
9336
9337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9342$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009343if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009344then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009345 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009347 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009350
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9352$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009353 if test $enable_shared = "yes"
9354 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009355 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00009356 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357else
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009360fi
9361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9363$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009364case $ac_sys_system/$ac_sys_release in
9365 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9370$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009371 ;;
9372 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9374$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009375 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009376esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009377
Guido van Rossum0a516c91994-09-12 10:58:40 +00009378# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379
Michael W. Hudson54241132001-12-07 15:38:26 +00009380
9381
9382
9383
Benjamin Peterson99f03762010-04-11 22:15:28 +00009384
Thomas Wouters477c8d52006-05-27 19:21:47 +00009385
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009386# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9387# -- usually .so, .sl on HP-UX, .dll on Cygwin
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9389$as_echo_n "checking the extension of shared libraries... " >&6; }
9390if test -z "$SHLIB_SUFFIX"; then
9391 case $ac_sys_system in
9392 hp*|HP*)
9393 case `uname -m` in
9394 ia64) SHLIB_SUFFIX=.so;;
9395 *) SHLIB_SUFFIX=.sl;;
9396 esac
9397 ;;
9398 CYGWIN*) SHLIB_SUFFIX=.dll;;
9399 *) SHLIB_SUFFIX=.so;;
9400 esac
9401fi
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9403$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009404
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009406# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009407# (Shared libraries in this instance are shared modules to be loaded into
9408# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9410$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009411if test -z "$LDSHARED"
9412then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009413 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009414 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009415 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009416 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009417 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009419 if test "$GCC" = "yes" ; then
9420 LDSHARED='$(CC) -shared'
9421 LDCXXSHARED='$(CXX) -shared'
9422 else
9423 LDSHARED='$(CC) -G'
9424 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009425 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009426 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 if test "$GCC" = "yes" ; then
9428 LDSHARED='$(CC) -shared'
9429 LDCXXSHARED='$(CXX) -shared'
9430 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009431 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009432 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009433 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009434 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009435 LDSHARED='$(CC) -bundle'
9436 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009437 if test "$enable_framework" ; then
9438 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009439 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9440 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009442 else
9443 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009444 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009445 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009446 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009447 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009448 LDSHARED='$(CC) -bundle'
9449 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009450 if test "$enable_framework" ; then
9451 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009452 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9453 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009454 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009455 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009456 # No framework, use the Python app as bundle-loader
9457 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009458 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009459 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009460 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009461 Darwin/*)
9462 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9463 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009464
Ned Deily36820b62014-06-25 13:44:22 -07009465 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9466 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9467 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9468 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9469 if test ${dep_target_major} -eq 10 && \
9470 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009471 then
Ned Deily36820b62014-06-25 13:44:22 -07009472 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009473 LDSHARED='$(CC) -bundle'
9474 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009475 if test "$enable_framework" ; then
9476 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009477 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9478 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009479 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009480 else
9481 # No framework, use the Python app as bundle-loader
9482 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9483 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009484 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009485 fi
Ned Deily36820b62014-06-25 13:44:22 -07009486 else
9487 # building for OS X 10.3 and later
9488 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9489 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9490 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009491 fi
9492 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009493 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009494 LDSHARED='$(CC) -shared'
9495 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009496 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009497 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009498 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009499 LDSHARED='$(CC) -shared'
9500 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009501 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009502 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009503 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009504 OpenBSD*)
9505 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9506 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009507 LDSHARED='$(CC) -shared $(CCSHARED)'
9508 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009509 else
9510 case `uname -r` in
9511 [01].* | 2.[0-7] | 2.[0-7].*)
9512 LDSHARED="ld -Bshareable ${LDFLAGS}"
9513 ;;
9514 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009515 LDSHARED='$(CC) -shared $(CCSHARED)'
9516 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009517 ;;
9518 esac
9519 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009520 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009521 LDSHARED='$(CC) -shared'
9522 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009523 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009524 if test "$GCC" = "yes" ; then
9525 LDSHARED='$(CC) -shared'
9526 LDCXXSHARED='$(CXX) -shared'
9527 else
9528 LDSHARED='$(CC) -G'
9529 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009530 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009531 SCO_SV*)
9532 LDSHARED='$(CC) -Wl,-G,-Bexport'
9533 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9534 CYGWIN*)
9535 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9536 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009537 *) LDSHARED="ld";;
9538 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9541$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009542LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009543BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009545# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9547$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009548if test -z "$CCSHARED"
9549then
Guido van Rossum07397971997-04-29 21:49:50 +00009550 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009551 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009552 then CCSHARED="-fPIC";
9553 elif test `uname -p` = sparc;
9554 then CCSHARED="-xcode=pic32";
9555 else CCSHARED="-Kpic";
9556 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009557 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009558 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009559 else CCSHARED="+z";
9560 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009561 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009562 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009563 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009564 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009565 if test "$GCC" = "yes"
9566 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009567 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009568 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009569 SCO_SV*)
9570 if test "$GCC" = "yes"
9571 then CCSHARED="-fPIC"
9572 else CCSHARED="-Kpic -belf"
9573 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009574 VxWorks*)
9575 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9579$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009580# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009581# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9583$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009584if test -z "$LINKFORSHARED"
9585then
Guido van Rossum07397971997-04-29 21:49:50 +00009586 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009587 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009588 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009589 LINKFORSHARED="-Wl,-E -Wl,+s";;
9590# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009591 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009592 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009593 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009595 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009596
9597 # Issue #18075: the default maximum stack size (8MBytes) is too
9598 # small for the default recursion limit. Increase the stack size
9599 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009600 # Note: This matches the value of THREAD_STACK_SIZE in
9601 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009602 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9603
Jack Jansene578a632001-08-15 01:27:14 +00009604 if test "$enable_framework"
9605 then
Jack Jansenda49e192005-01-07 13:08:22 +00009606 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009607 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009608 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009609 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009610 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009611 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009612 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009613 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9614 then
9615 LINKFORSHARED="-Wl,--export-dynamic"
9616 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009617 SunOS/5*) case $CC in
9618 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009619 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009620 then
9621 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009622 fi;;
9623 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009624 CYGWIN*)
9625 if test $enable_shared = "no"
9626 then
9627 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9628 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009629 QNX*)
9630 # -Wl,-E causes the symbols to be added to the dynamic
9631 # symbol table so that they can be found when a module
9632 # is loaded. -N 2048K causes the stack size to be set
9633 # to 2048 kilobytes so that the stack doesn't overflow
9634 # when running test_compile.py.
9635 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009636 VxWorks*)
9637 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9641$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009642
Michael W. Hudson54241132001-12-07 15:38:26 +00009643
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009644
Matthias Kloseb9621712010-04-24 17:59:49 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9646$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009647if test ! "$LIBRARY" = "$LDLIBRARY"
9648then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009649 case $ac_sys_system in
9650 CYGWIN*)
9651 # Cygwin needs CCSHARED when building extension DLLs
9652 # but not when building the interpreter DLL.
9653 CFLAGSFORSHARED='';;
9654 *)
9655 CFLAGSFORSHARED='$(CCSHARED)'
9656 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9659$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009660
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009661# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9662# library (with --enable-shared).
9663# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009664# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9665# if it is not required, since it creates a dependency of the shared library
9666# to LIBS. This, in turn, means that applications linking the shared libpython
9667# don't need to link LIBS explicitly. The default should be only changed
9668# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9671$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009672case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009673 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009674 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009675esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9677$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009678
9679
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9682$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009684 $as_echo_n "(cached) " >&6
9685else
9686 ac_check_lib_save_LIBS=$LIBS
9687LIBS="-lsendfile $LIBS"
9688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9689/* end confdefs.h. */
9690
9691/* Override any GCC internal prototype to avoid an error.
9692 Use char because int might match the return type of a GCC
9693 builtin and then its argument prototype would still apply. */
9694#ifdef __cplusplus
9695extern "C"
9696#endif
9697char sendfile ();
9698int
9699main ()
9700{
9701return sendfile ();
9702 ;
9703 return 0;
9704}
9705_ACEOF
9706if ac_fn_c_try_link "$LINENO"; then :
9707 ac_cv_lib_sendfile_sendfile=yes
9708else
9709 ac_cv_lib_sendfile_sendfile=no
9710fi
9711rm -f core conftest.err conftest.$ac_objext \
9712 conftest$ac_exeext conftest.$ac_ext
9713LIBS=$ac_check_lib_save_LIBS
9714fi
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9716$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009717if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009718 cat >>confdefs.h <<_ACEOF
9719#define HAVE_LIBSENDFILE 1
9720_ACEOF
9721
9722 LIBS="-lsendfile $LIBS"
9723
9724fi
9725
Matthias Kloseb9621712010-04-24 17:59:49 +00009726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9727$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009728if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009730else
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009732LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736/* Override any GCC internal prototype to avoid an error.
9737 Use char because int might match the return type of a GCC
9738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739#ifdef __cplusplus
9740extern "C"
9741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009742char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 ;
9748 return 0;
9749}
9750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009753else
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756rm -f core conftest.err conftest.$ac_objext \
9757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9761$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009762if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 cat >>confdefs.h <<_ACEOF
9764#define HAVE_LIBDL 1
9765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009767 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009768
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009769fi
9770 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9772$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009773if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009775else
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009777LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009787char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009798else
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9806$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009807if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 cat >>confdefs.h <<_ACEOF
9809#define HAVE_LIBDLD 1
9810_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009812 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009814fi
9815 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009816
Michael Felt0d3ccb42017-12-30 22:39:20 +01009817# checks for uuid.h location
9818for ac_header in uuid/uuid.h uuid.h
9819do :
9820 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9821ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9822if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9823 cat >>confdefs.h <<_ACEOF
9824#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9825_ACEOF
9826
9827fi
9828
9829done
9830
9831
Berker Peksag9a10ff42017-11-08 23:09:16 +03009832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9833$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h. */
9836#include <uuid/uuid.h>
9837int
9838main ()
9839{
9840
9841#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009842void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009843#endif
9844
9845 ;
9846 return 0;
9847}
9848_ACEOF
9849if ac_fn_c_try_compile "$LINENO"; then :
9850
9851$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9854$as_echo "yes" >&6; }
9855else
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9857$as_echo "no" >&6; }
9858
9859fi
9860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9861
Michael Felt0d3ccb42017-12-30 22:39:20 +01009862# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009863# FreeBSD and OpenBSD provides support as well
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9865$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9867/* end confdefs.h. */
9868#include <uuid.h>
9869int
9870main ()
9871{
9872
9873#ifndef uuid_create
9874void *x = uuid_create
9875#endif
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881if ac_fn_c_try_compile "$LINENO"; then :
9882
9883$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9884
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9886$as_echo "yes" >&6; }
9887else
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889$as_echo "no" >&6; }
9890
9891fi
9892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9893
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009894# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9895# stream in big-endian byte-order
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9897$as_echo_n "checking for uuid_enc_be... " >&6; }
9898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9899/* end confdefs.h. */
9900#include <uuid.h>
9901int
9902main ()
9903{
9904
9905#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009906void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009907#endif
9908
9909 ;
9910 return 0;
9911}
9912_ACEOF
9913if ac_fn_c_try_compile "$LINENO"; then :
9914
9915$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9916
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9918$as_echo "yes" >&6; }
9919else
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
9922
9923fi
9924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9925
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009926# 'Real Time' functions on Solaris
9927# posix4 on Solaris 2.6
9928# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009930$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009931if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009933else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009934 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938/* Override any GCC internal prototype to avoid an error.
9939 Use char because int might match the return type of a GCC
9940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009941#ifdef __cplusplus
9942extern "C"
9943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009944char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009945int
9946main ()
9947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 ;
9950 return 0;
9951}
9952_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953for ac_lib in '' pthread rt posix4; do
9954 if test -z "$ac_lib"; then
9955 ac_res="none required"
9956 else
9957 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009958 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009963rm -f core conftest.err conftest.$ac_objext \
9964 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009965 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968done
Victor Stinnere0be4232011-10-25 13:06:09 +02009969if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971else
9972 ac_cv_search_sem_init=no
9973fi
9974rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009975LIBS=$ac_func_search_save_LIBS
9976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9978$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009982
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009983fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009984
Martin v. Löwis519adae2003-09-20 10:47:47 +00009985
Martin v. Löwis19d17342003-06-14 21:03:05 +00009986# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9988$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009989if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009991else
9992 ac_check_lib_save_LIBS=$LIBS
9993LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009995/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997/* Override any GCC internal prototype to avoid an error.
9998 Use char because int might match the return type of a GCC
9999 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010000#ifdef __cplusplus
10001extern "C"
10002#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010003char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010004int
10005main ()
10006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010007return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010008 ;
10009 return 0;
10010}
10011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010013 ac_cv_lib_intl_textdomain=yes
10014else
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010017rm -f core conftest.err conftest.$ac_objext \
10018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010019LIBS=$ac_check_lib_save_LIBS
10020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10022$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010023if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010026
Brett Cannonc6d936e2009-06-07 20:09:53 +000010027 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010028fi
10029
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010030
10031# checks for system dependent C++ extensions support
10032case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10034$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010037
Georg Brandl59e87bd2011-02-15 19:48:59 +000010038 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010039int
10040main ()
10041{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010042loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ;
10044 return 0;
10045}
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Martin v. Löwis11437992002-04-12 09:54:03 +000010047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010048if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010049
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Matthias Kloseb159a552010-04-25 21:00:44 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010054$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010055
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010056else
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010059$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010060
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010062rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010063 conftest$ac_exeext conftest.$ac_ext
10064# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10065# of the AIX system used to build/package Python executable. This tag serves
10066# as a baseline for bdist module packages
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10068$as_echo_n "checking for the system builddate... " >&6; }
10069 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10070
10071cat >>confdefs.h <<_ACEOF
10072#define AIX_BUILDDATE $AIX_BUILDDATE
10073_ACEOF
10074
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10076$as_echo "$AIX_BUILDDATE" >&6; }
10077 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010078 *) ;;
10079esac
10080
Christian Heimes985ecdc2013-11-20 11:46:18 +010010081# check for systems that require aligned memory access
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10083$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010084if ${ac_cv_aligned_required+:} false; then :
10085 $as_echo_n "(cached) " >&6
10086else
10087 if test "$cross_compiling" = yes; then :
10088 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010089else
10090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091/* end confdefs.h. */
10092
10093int main()
10094{
10095 char s[16];
10096 int i, *p1, *p2;
10097 for (i=0; i < 16; i++)
10098 s[i] = i;
10099 p1 = (int*)(s+1);
10100 p2 = (int*)(s+2);
10101 if (*p1 == *p2)
10102 return 1;
10103 return 0;
10104}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010105_ACEOF
10106if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010107 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010108else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010109 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010110fi
10111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10112 conftest.$ac_objext conftest.beam conftest.$ac_ext
10113fi
10114
10115
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010116fi
10117
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10119$as_echo "$ac_cv_aligned_required" >&6; }
10120if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010121
10122$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10123
10124fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010125
10126# str, bytes and memoryview hash algorithm
10127
10128
10129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10130$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10131
10132# Check whether --with-hash_algorithm was given.
10133if test "${with_hash_algorithm+set}" = set; then :
10134 withval=$with_hash_algorithm;
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10136$as_echo "$withval" >&6; }
10137case "$withval" in
10138 siphash24)
10139 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10140
10141 ;;
10142 fnv)
10143 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10144
10145 ;;
10146 *)
10147 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10148 ;;
10149esac
10150
10151else
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10153$as_echo "default" >&6; }
10154fi
10155
10156
Charles-François Natalid30b0222014-05-08 23:08:51 +010010157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10158$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10159
10160# Check whether --with-address_sanitizer was given.
10161if test "${with_address_sanitizer+set}" = set; then :
10162 withval=$with_address_sanitizer;
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10164$as_echo "$withval" >&6; }
10165BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10166LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010167# ASan works by controlling memory allocation, our own malloc interferes.
10168with_pymalloc="no"
10169
10170else
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
10173fi
10174
10175
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10177$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10178
10179# Check whether --with-memory_sanitizer was given.
10180if test "${with_memory_sanitizer+set}" = set; then :
10181 withval=$with_memory_sanitizer;
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10183$as_echo "$withval" >&6; }
10184BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10185LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10186# MSan works by controlling memory allocation, our own malloc interferes.
10187with_pymalloc="no"
10188
10189else
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
10192fi
10193
10194
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10196$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10197
10198# Check whether --with-undefined_behavior_sanitizer was given.
10199if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10200 withval=$with_undefined_behavior_sanitizer;
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10202$as_echo "$withval" >&6; }
10203BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10204LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010205
10206else
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
10209fi
10210
10211
Guido van Rossum70c7f481998-03-26 18:44:10 +000010212# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10214$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010215if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010217else
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010219LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223/* Override any GCC internal prototype to avoid an error.
10224 Use char because int might match the return type of a GCC
10225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010226#ifdef __cplusplus
10227extern "C"
10228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010229char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230int
10231main ()
10232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010240else
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243rm -f core conftest.err conftest.$ac_objext \
10244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010245LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10248$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010249if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010250 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010251fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010252 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10254$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010255if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010257else
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010259LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263/* Override any GCC internal prototype to avoid an error.
10264 Use char because int might match the return type of a GCC
10265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010269char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010270int
10271main ()
10272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ;
10275 return 0;
10276}
10277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010280else
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283rm -f core conftest.err conftest.$ac_objext \
10284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010285LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10288$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010290 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010291fi
10292 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010293
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10295$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10301$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010302LIBS="$withval $LIBS"
10303
10304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307fi
10308
Guido van Rossum7f43da71994-08-01 12:15:30 +000010309
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010310
10311
10312
10313
10314
10315
Victor Stinnerb477d192020-01-22 22:48:16 +010010316
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010317if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10318 if test -n "$ac_tool_prefix"; then
10319 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10320set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if ${ac_cv_path_PKG_CONFIG+:} false; then :
10324 $as_echo_n "(cached) " >&6
10325else
10326 case $PKG_CONFIG in
10327 [\\/]* | ?:[\\/]*)
10328 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10329 ;;
10330 *)
10331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334 IFS=$as_save_IFS
10335 test -z "$as_dir" && as_dir=.
10336 for ac_exec_ext in '' $ac_executable_extensions; do
10337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340 break 2
10341 fi
10342done
10343 done
10344IFS=$as_save_IFS
10345
10346 ;;
10347esac
10348fi
10349PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10350if test -n "$PKG_CONFIG"; then
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10352$as_echo "$PKG_CONFIG" >&6; }
10353else
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356fi
10357
10358
10359fi
10360if test -z "$ac_cv_path_PKG_CONFIG"; then
10361 ac_pt_PKG_CONFIG=$PKG_CONFIG
10362 # Extract the first word of "pkg-config", so it can be a program name with args.
10363set dummy pkg-config; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10367 $as_echo_n "(cached) " >&6
10368else
10369 case $ac_pt_PKG_CONFIG in
10370 [\\/]* | ?:[\\/]*)
10371 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10372 ;;
10373 *)
10374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377 IFS=$as_save_IFS
10378 test -z "$as_dir" && as_dir=.
10379 for ac_exec_ext in '' $ac_executable_extensions; do
10380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10381 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383 break 2
10384 fi
10385done
10386 done
10387IFS=$as_save_IFS
10388
10389 ;;
10390esac
10391fi
10392ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10393if test -n "$ac_pt_PKG_CONFIG"; then
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10395$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10396else
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401 if test "x$ac_pt_PKG_CONFIG" = x; then
10402 PKG_CONFIG=""
10403 else
10404 case $cross_compiling:$ac_tool_warned in
10405yes:)
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10408ac_tool_warned=yes ;;
10409esac
10410 PKG_CONFIG=$ac_pt_PKG_CONFIG
10411 fi
10412else
10413 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10414fi
10415
10416fi
10417if test -n "$PKG_CONFIG"; then
10418 _pkg_min_version=0.9.0
10419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10420$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10421 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10423$as_echo "yes" >&6; }
10424 else
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427 PKG_CONFIG=""
10428 fi
10429fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010430
10431# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10433$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010434
10435# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010437 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010438else
10439 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010440fi
10441
10442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10444$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010445
10446# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10448$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010449
10450# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010451if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010452 withval=$with_system_ffi;
10453fi
10454
10455
Zachary Waref40d4dd2016-09-17 01:25:24 -050010456if test "$ac_sys_system" = "Darwin"
10457then
10458 case "$with_system_ffi" in
10459 "")
10460 with_system_ffi="no"
10461 ;;
10462 yes|no)
10463 ;;
10464 *)
10465 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10466 ;;
10467 esac
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10469$as_echo "$with_system_ffi" >&6; }
10470else
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10472$as_echo "yes" >&6; }
10473 if test "$with_system_ffi" != ""
10474 then
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10476$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10477 fi
10478 with_system_ffi="yes"
10479fi
Zachary Ware935043d2016-09-09 17:01:21 -070010480
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010481if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010482 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10483else
10484 LIBFFI_INCLUDEDIR=""
10485fi
10486
10487
Stefan Krah60187b52012-03-23 19:06:27 +010010488# Check for use of the system libmpdec library
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10490$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10491
10492# Check whether --with-system_libmpdec was given.
10493if test "${with_system_libmpdec+set}" = set; then :
10494 withval=$with_system_libmpdec;
10495else
10496 with_system_libmpdec="no"
10497fi
10498
10499
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10501$as_echo "$with_system_libmpdec" >&6; }
10502
Stefan Krah815280e2020-02-29 19:43:42 +010010503# Check whether _decimal should use a coroutine-local or thread-local context
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10505$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10506
10507# Check whether --with-decimal_contextvar was given.
10508if test "${with_decimal_contextvar+set}" = set; then :
10509 withval=$with_decimal_contextvar;
10510else
10511 with_decimal_contextvar="yes"
10512fi
10513
10514
10515if test "$with_decimal_contextvar" != "no"
10516then
10517
10518$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10519
10520fi
10521
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10523$as_echo "$with_decimal_contextvar" >&6; }
10524
Benjamin Peterson076ed002010-10-31 17:11:02 +000010525# Check for support for loadable sqlite extensions
10526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10527$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10528# Check whether --enable-loadable-sqlite-extensions was given.
10529if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10530 enableval=$enable_loadable_sqlite_extensions;
10531else
10532 enable_loadable_sqlite_extensions="no"
10533fi
10534
10535
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10537$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10538
Ned Deilyd819b932013-09-06 01:07:05 -070010539# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10540
10541
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10543$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10544
10545# Check whether --with-tcltk-includes was given.
10546if test "${with_tcltk_includes+set}" = set; then :
10547 withval=$with_tcltk_includes;
10548else
10549 with_tcltk_includes="default"
10550fi
10551
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10553$as_echo "$with_tcltk_includes" >&6; }
10554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10555$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10556
10557# Check whether --with-tcltk-libs was given.
10558if test "${with_tcltk_libs+set}" = set; then :
10559 withval=$with_tcltk_libs;
10560else
10561 with_tcltk_libs="default"
10562fi
10563
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10565$as_echo "$with_tcltk_libs" >&6; }
10566if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10567then
10568 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10569 then
10570 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10571 fi
10572 TCLTK_INCLUDES=""
10573 TCLTK_LIBS=""
10574else
10575 TCLTK_INCLUDES="$with_tcltk_includes"
10576 TCLTK_LIBS="$with_tcltk_libs"
10577fi
10578
Matthias Klose55708cc2009-04-30 08:06:49 +000010579# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10581$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010582
10583# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010585 withval=$with_dbmliborder;
10586if test x$with_dbmliborder = xyes
10587then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010588as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010589else
10590 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10591 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10592 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010593 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010594 fi
10595 done
10596fi
10597fi
10598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10600$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010601
Martin v. Löwis11437992002-04-12 09:54:03 +000010602# Templates for things AC_DEFINEd more than once.
10603# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010604
10605
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010606if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010607then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010608 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010610
10611 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010612 if test "$ac_sys_system" = "SunOS"; then
10613 CFLAGS="$CFLAGS -D_REENTRANT"
10614 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010615elif test "$ac_cv_kpthread" = "yes"
10616then
10617 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010618 if test "$ac_cv_cxx_thread" = "yes"; then
10619 CXX="$CXX -Kpthread"
10620 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010622elif test "$ac_cv_kthread" = "yes"
10623then
10624 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010625 if test "$ac_cv_cxx_thread" = "yes"; then
10626 CXX="$CXX -Kthread"
10627 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010628 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629elif test "$ac_cv_pthread" = "yes"
10630then
10631 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010632 if test "$ac_cv_cxx_thread" = "yes"; then
10633 CXX="$CXX -pthread"
10634 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010636else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010637 if test ! -z "$withval" -a -d "$withval"
10638 then LDFLAGS="$LDFLAGS -L$withval"
10639 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010640
10641 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010642 # define _POSIX_THREADS in unistd.h. Some apparently don't
10643 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10645$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010648
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010649#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010650#ifdef _POSIX_THREADS
10651yes
10652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
10654_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010657 unistd_defines_pthreads=yes
10658else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010659 unistd_defines_pthreads=no
10660fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010661rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10664$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010667
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010668 # Just looking for pthread_create in libpthread is not enough:
10669 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10670 # So we really have to include pthread.h, and then link.
10671 _libs=$LIBS
10672 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10674$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010677
10678#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010679#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010680
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010681void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010682int
10683main ()
10684{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010685
10686pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 ;
10688 return 0;
10689}
10690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10694$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010695 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010696
Guido van Rossum02a1c402000-02-25 19:26:31 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010699 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010702
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010703 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010704
Guido van Rossumad678af1998-10-02 14:42:15 +000010705else
Guido van Rossumad678af1998-10-02 14:42:15 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10708$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010709if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010713LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717/* Override any GCC internal prototype to avoid an error.
10718 Use char because int might match the return type of a GCC
10719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010720#ifdef __cplusplus
10721extern "C"
10722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010723char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010724int
10725main ()
10726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737rm -f core conftest.err conftest.$ac_objext \
10738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010739LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10742$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010743if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010744
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010745 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010746 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010747
Greg Steinadf63d62000-07-05 10:38:09 +000010748else
Greg Steinadf63d62000-07-05 10:38:09 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10751$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010752if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010754else
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010756LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760/* Override any GCC internal prototype to avoid an error.
10761 Use char because int might match the return type of a GCC
10762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763#ifdef __cplusplus
10764extern "C"
10765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010766char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010767int
10768main ()
10769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ;
10772 return 0;
10773}
10774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010780rm -f core conftest.err conftest.$ac_objext \
10781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10785$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010786if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010788 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010789 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010790
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010791else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10794$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010795if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010799LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803/* Override any GCC internal prototype to avoid an error.
10804 Use char because int might match the return type of a GCC
10805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010806#ifdef __cplusplus
10807extern "C"
10808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010809char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010810int
10811main ()
10812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ;
10815 return 0;
10816}
10817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010820else
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010823rm -f core conftest.err conftest.$ac_objext \
10824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10828$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010829if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010830
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010831 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010832 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010833
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010834else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10837$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010838if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010840else
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010842LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846/* Override any GCC internal prototype to avoid an error.
10847 Use char because int might match the return type of a GCC
10848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010849#ifdef __cplusplus
10850extern "C"
10851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010852char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010853int
10854main ()
10855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010866rm -f core conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010868LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10871$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010873
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010874 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010875 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010876
Guido van Rossumb93a8621998-05-07 13:27:32 +000010877else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010878
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010879 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10880
Guido van Rossum2d38f911996-06-26 19:47:01 +000010881fi
10882
Guido van Rossum627b2d71993-12-24 10:39:16 +000010883
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010884fi
10885
Guido van Rossum0be3e491997-05-22 20:33:33 +000010886fi
10887
Guido van Rossum49545951997-12-02 19:28:29 +000010888fi
10889
Guido van Rossumb93a8621998-05-07 13:27:32 +000010890fi
10891
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893rm -f core conftest.err conftest.$ac_objext \
10894 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10897$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010898if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900else
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010902LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906/* Override any GCC internal prototype to avoid an error.
10907 Use char because int might match the return type of a GCC
10908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010909#ifdef __cplusplus
10910extern "C"
10911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010912char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010913int
10914main ()
10915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010928LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10931$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010932if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010933
Martin v. Löwis130fb172001-07-19 11:00:41 +000010934 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010935
Guido van Rossum627b2d71993-12-24 10:39:16 +000010936fi
10937
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010938
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010939fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010940
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010941if test "$posix_threads" = "yes"; then
10942 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945
10946 fi
10947
10948 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10949 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010950 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010952
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010953 ;;
10954 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010956
10957 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010958 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010960
10961 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962 esac
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10965$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010966 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970 ac_cv_pthread_system_supported=no
10971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010974
10975 #include <stdio.h>
10976 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977 void *foo(void *parm) {
10978 return NULL;
10979 }
10980 main() {
10981 pthread_attr_t attr;
10982 pthread_t id;
10983 if (pthread_attr_init(&attr)) exit(-1);
10984 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10985 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10986 exit(0);
10987 }
10988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010990 ac_cv_pthread_system_supported=yes
10991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010996fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998
Guido van Rossum627b2d71993-12-24 10:39:16 +000010999fi
11000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11002$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011003 if test "$ac_cv_pthread_system_supported" = "yes"; then
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011006
11007 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 for ac_func in pthread_sigmask
11009do :
11010 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011011if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011014_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011015 case $ac_sys_system in
11016 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011019
11020 ;;
11021 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011022fi
11023done
11024
pdoxe14679c2017-10-05 00:01:56 -070011025 for ac_func in pthread_getcpuclockid
11026do :
11027 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11028if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11029 cat >>confdefs.h <<_ACEOF
11030#define HAVE_PTHREAD_GETCPUCLOCKID 1
11031_ACEOF
11032
11033fi
11034done
11035
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011036fi
11037
11038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11042$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011044if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049 ipv6=no
11050 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11052$as_echo "yes" >&6; }
11053 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054
11055 ipv6=yes
11056 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058else
Martin v. Löwis11437992002-04-12 09:54:03 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062 /* AF_INET6 available check */
11063#include <sys/types.h>
11064#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011065int
11066main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011068int domain = AF_INET6;
11069 ;
11070 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071}
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011073if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11076$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079else
Matthias Kloseb159a552010-04-25 21:00:44 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011083 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011088if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11090$as_echo_n "checking if RFC2553 API is available... " >&6; }
11091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011093
11094 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011095#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011096int
11097main ()
11098{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011099struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011100 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 ;
11102 return 0;
11103}
Matthias Kloseb159a552010-04-25 21:00:44 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011107
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011110 ipv6=yes
11111
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011112else
Matthias Kloseb159a552010-04-25 21:00:44 +000011113
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011115$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011116 ipv6=no
11117
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011120fi
11121
11122if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011124
11125fi
11126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127fi
11128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129
11130ipv6type=unknown
11131ipv6lib=none
11132ipv6trylibc=no
11133
11134if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11136$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011137 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11138 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139 case $i in
11140 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011142/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144#include <netinet/in.h>
11145#ifdef IPV6_INRIA_VERSION
11146yes
11147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011151 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011153rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154
11155 ;;
11156 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011158/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011159
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160#include <netinet/in.h>
11161#ifdef __KAME__
11162yes
11163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167 ipv6type=$i;
11168 ipv6lib=inet6
11169 ipv6libdir=/usr/local/v6/lib
11170 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011171fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011172rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173
11174 ;;
11175 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011178
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179#include <features.h>
11180#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11181yes
11182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186 ipv6type=$i;
11187 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011189rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190
11191 ;;
11192 linux-inet6)
11193 if test -d /usr/inet6; then
11194 ipv6type=$i
11195 ipv6lib=inet6
11196 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011197 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011198 fi
11199 ;;
11200 solaris)
11201 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011202 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011203 ipv6type=$i
11204 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011205 fi
11206 fi
11207 ;;
11208 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011210/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011211
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212#include <sys/param.h>
11213#ifdef _TOSHIBA_INET6
11214yes
11215#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011216_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011219 ipv6type=$i;
11220 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011221 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011223rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011224
11225 ;;
11226 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011228/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011229
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011230#include </usr/local/v6/include/sys/v6config.h>
11231#ifdef __V6D__
11232yes
11233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011234_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011236 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011237 ipv6type=$i;
11238 ipv6lib=v6;
11239 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011240 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011241fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011242rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011243
11244 ;;
11245 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011249#include <sys/param.h>
11250#ifdef _ZETA_MINAMI_INET6
11251yes
11252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011256 ipv6type=$i;
11257 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011258 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011261
11262 ;;
11263 esac
11264 if test "$ipv6type" != "unknown"; then
11265 break
11266 fi
11267 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11269$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011270fi
11271
11272if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11273 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11274 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11275 echo "using lib$ipv6lib"
11276 else
11277 if test $ipv6trylibc = "yes"; then
11278 echo "using libc"
11279 else
11280 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11281 echo "You need to fetch lib$ipv6lib.a from appropriate"
11282 echo 'ipv6 kit and compile beforehand.'
11283 exit 1
11284 fi
11285 fi
11286fi
11287
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11289$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291/* end confdefs.h. */
11292 /* CAN_RAW_FD_FRAMES available check */
11293#include <linux/can/raw.h>
11294int
11295main ()
11296{
11297int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11298 ;
11299 return 0;
11300}
11301_ACEOF
11302if ac_fn_c_try_compile "$LINENO"; then :
11303
11304
11305$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11306
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11308$as_echo "yes" >&6; }
11309
11310else
11311
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314
11315fi
11316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11317
Zackery Spytz97e0de02020-04-09 06:03:49 -060011318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11319$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11321/* end confdefs.h. */
11322
11323#include <linux/can/raw.h>
11324int
11325main ()
11326{
11327int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11328 ;
11329 return 0;
11330}
11331_ACEOF
11332if ac_fn_c_try_compile "$LINENO"; then :
11333
11334
11335$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11336
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11338$as_echo "yes" >&6; }
11339
11340else
11341
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343$as_echo "no" >&6; }
11344
11345fi
11346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11347
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011348# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11350$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354 withval=$with_doc_strings;
11355fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011356
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011357
11358if test -z "$with_doc_strings"
11359then with_doc_strings="yes"
11360fi
11361if test "$with_doc_strings" != "no"
11362then
11363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011365
11366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11368$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011369
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011370# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11372$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376 withval=$with_pymalloc;
11377fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011378
Neil Schemenauera35c6882001-02-27 04:45:05 +000011379
Neil Schemenauer16c22972002-03-22 15:34:49 +000011380if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011381then
11382 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011383fi
11384if test "$with_pymalloc" != "no"
11385then
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011388
11389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11391$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011392
Nick Coghlan6ea41862017-06-11 13:16:15 +100011393# Check for --with-c-locale-coercion
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11395$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11396
11397# Check whether --with-c-locale-coercion was given.
11398if test "${with_c_locale_coercion+set}" = set; then :
11399 withval=$with_c_locale_coercion;
11400fi
11401
11402
11403if test -z "$with_c_locale_coercion"
11404then
11405 with_c_locale_coercion="yes"
11406fi
11407if test "$with_c_locale_coercion" != "no"
11408then
11409
11410$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11411
11412fi
11413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11414$as_echo "$with_c_locale_coercion" >&6; }
11415
Benjamin Peterson05159c42009-12-03 03:01:27 +000011416# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11418$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011419
11420# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011422 withval=$with_valgrind;
11423else
11424 with_valgrind=no
11425fi
11426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11428$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011429if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 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 +020011431if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011434
11435else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011436 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011437
11438fi
11439
11440
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011441 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011442fi
11443
Łukasz Langaa785c872016-09-09 17:37:37 -070011444# Check for DTrace support
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11446$as_echo_n "checking for --with-dtrace... " >&6; }
11447
11448# Check whether --with-dtrace was given.
11449if test "${with_dtrace+set}" = set; then :
11450 withval=$with_dtrace;
11451else
11452 with_dtrace=no
11453fi
11454
11455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11456$as_echo "$with_dtrace" >&6; }
11457
11458
11459
11460
11461
11462DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011463DTRACE_HEADERS=
11464DTRACE_OBJS=
11465
11466if test "$with_dtrace" = "yes"
11467then
11468 # Extract the first word of "dtrace", so it can be a program name with args.
11469set dummy dtrace; ac_word=$2
11470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11471$as_echo_n "checking for $ac_word... " >&6; }
11472if ${ac_cv_path_DTRACE+:} false; then :
11473 $as_echo_n "(cached) " >&6
11474else
11475 case $DTRACE in
11476 [\\/]* | ?:[\\/]*)
11477 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11478 ;;
11479 *)
11480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11481for as_dir in $PATH
11482do
11483 IFS=$as_save_IFS
11484 test -z "$as_dir" && as_dir=.
11485 for ac_exec_ext in '' $ac_executable_extensions; do
11486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11487 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11489 break 2
11490 fi
11491done
11492 done
11493IFS=$as_save_IFS
11494
11495 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11496 ;;
11497esac
11498fi
11499DTRACE=$ac_cv_path_DTRACE
11500if test -n "$DTRACE"; then
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11502$as_echo "$DTRACE" >&6; }
11503else
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505$as_echo "no" >&6; }
11506fi
11507
11508
11509 if test "$DTRACE" = "not found"; then
11510 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11511 fi
11512
11513$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11514
11515 DTRACE_HEADERS="Include/pydtrace_probes.h"
11516
11517 # On OS X, DTrace providers do not need to be explicitly compiled and
11518 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11519 # generation flag '-G'. We check for presence of this flag, rather than
11520 # hardcoding support by OS, in the interest of robustness.
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11522$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11523if ${ac_cv_dtrace_link+:} false; then :
11524 $as_echo_n "(cached) " >&6
11525else
11526 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011527 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011528 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011529 ac_cv_dtrace_link=yes
11530
11531fi
11532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11533$as_echo "$ac_cv_dtrace_link" >&6; }
11534 if test "$ac_cv_dtrace_link" = "yes"; then
11535 DTRACE_OBJS="Python/pydtrace.o"
11536 fi
11537fi
11538
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011539# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011540
Guido van Rossum98935bf2001-09-05 19:13:16 +000011541DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011542
Guido van Rossume97ee181999-12-20 21:27:22 +000011543# the dlopen() function means we might want to use dynload_shlib.o. some
11544# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011545for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011546do :
11547 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011548if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011550#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011551_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011552
Guido van Rossume97ee181999-12-20 21:27:22 +000011553fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011554done
Guido van Rossume97ee181999-12-20 21:27:22 +000011555
Michael W. Hudson54241132001-12-07 15:38:26 +000011556
Guido van Rossume97ee181999-12-20 21:27:22 +000011557# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11558# loading of modules.
11559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11561$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011562if test -z "$DYNLOADFILE"
11563then
11564 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011565 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11566 if test "$ac_cv_func_dlopen" = yes
11567 then DYNLOADFILE="dynload_shlib.o"
11568 else DYNLOADFILE="dynload_aix.o"
11569 fi
11570 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011571 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011572 *)
11573 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11574 # out any dynamic loading
11575 if test "$ac_cv_func_dlopen" = yes
11576 then DYNLOADFILE="dynload_shlib.o"
11577 else DYNLOADFILE="dynload_stub.o"
11578 fi
11579 ;;
11580 esac
11581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11583$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011584if test "$DYNLOADFILE" != "dynload_stub.o"
11585then
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
Matthias Kloseb9621712010-04-24 17:59:49 +000011587$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011588
11589fi
11590
Neil Schemenauer4e425612001-06-19 15:44:15 +000011591# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11592
Michael W. Hudson54241132001-12-07 15:38:26 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11595$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011596if test -z "$MACHDEP_OBJS"
11597then
Jack Jansene578a632001-08-15 01:27:14 +000011598 MACHDEP_OBJS=$extra_machdep_objs
11599else
11600 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011601fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011602if test -z "$MACHDEP_OBJS"; then
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11604$as_echo "none" >&6; }
11605else
11606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11607$as_echo "$MACHDEP_OBJS" >&6; }
11608fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011609
Guido van Rossum627b2d71993-12-24 10:39:16 +000011610# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011611for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011612 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11613 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011614 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011615 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011616 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011617 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011618 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011619 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011620 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011621 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011622 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011623 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011624 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011625 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011626 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011627 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011628 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011629 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11630 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011631 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011632 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011633 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011634 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011635 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011636do :
11637 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11638ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011639if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011640 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011642_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011643
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011644fi
11645done
11646
Michael W. Hudson54241132001-12-07 15:38:26 +000011647
Benjamin Peterson40caa052018-09-12 15:52:40 -070011648# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11649# links. Some libc implementations have a stub lchmod implementation that always
11650# returns an error.
11651if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011652 for ac_func in lchmod
11653do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011654 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11655if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011656 cat >>confdefs.h <<_ACEOF
11657#define HAVE_LCHMOD 1
11658_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011659
11660fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011661done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011662
11663fi
11664
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011665ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11666 #include <dirent.h>
11667"
11668if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11669
11670$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11671
11672fi
11673
11674
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011675# For some functions, having a definition is not sufficient, since
11676# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11678$as_echo_n "checking for chroot... " >&6; }
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011680/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011681#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011682int
11683main ()
11684{
11685void *x=chroot
11686 ;
11687 return 0;
11688}
11689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011691
Matthias Kloseb9621712010-04-24 17:59:49 +000011692$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011693
Matthias Kloseb159a552010-04-25 21:00:44 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11698$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011699
11700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11703$as_echo_n "checking for link... " >&6; }
11704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011705/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011706#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011707int
11708main ()
11709{
11710void *x=link
11711 ;
11712 return 0;
11713}
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011718
Matthias Kloseb159a552010-04-25 21:00:44 +000011719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011724
11725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11728$as_echo_n "checking for symlink... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011731#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011732int
11733main ()
11734{
11735void *x=symlink
11736 ;
11737 return 0;
11738}
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011741
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011743
Matthias Kloseb159a552010-04-25 21:00:44 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011745$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011746else
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011749
11750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11753$as_echo_n "checking for fchdir... " >&6; }
11754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011755/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011756#include <unistd.h>
11757int
11758main ()
11759{
11760void *x=fchdir
11761 ;
11762 return 0;
11763}
11764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011768
Matthias Kloseb159a552010-04-25 21:00:44 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011774
11775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11778$as_echo_n "checking for fsync... " >&6; }
11779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011780/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011781#include <unistd.h>
11782int
11783main ()
11784{
11785void *x=fsync
11786 ;
11787 return 0;
11788}
11789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011790if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011791
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011793
Matthias Kloseb159a552010-04-25 21:00:44 +000011794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11798$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011799
11800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11803$as_echo_n "checking for fdatasync... " >&6; }
11804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011806#include <unistd.h>
11807int
11808main ()
11809{
11810void *x=fdatasync
11811 ;
11812 return 0;
11813}
11814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011818
Matthias Kloseb159a552010-04-25 21:00:44 +000011819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11823$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011824
11825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11828$as_echo_n "checking for epoll... " >&6; }
11829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011830/* end confdefs.h. */
11831#include <sys/epoll.h>
11832int
11833main ()
11834{
11835void *x=epoll_create
11836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011841
Matthias Kloseb9621712010-04-24 17:59:49 +000011842$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011843
Matthias Kloseb159a552010-04-25 21:00:44 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011849
11850fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11853$as_echo_n "checking for epoll_create1... " >&6; }
11854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11855/* end confdefs.h. */
11856#include <sys/epoll.h>
11857int
11858main ()
11859{
11860void *x=epoll_create1
11861 ;
11862 return 0;
11863}
11864_ACEOF
11865if ac_fn_c_try_compile "$LINENO"; then :
11866
11867$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11868
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11870$as_echo "yes" >&6; }
11871else
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874
11875fi
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11878$as_echo_n "checking for kqueue... " >&6; }
11879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011880/* end confdefs.h. */
11881
11882#include <sys/types.h>
11883#include <sys/event.h>
11884
11885int
11886main ()
11887{
11888int x=kqueue()
11889 ;
11890 return 0;
11891}
11892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011896
Matthias Kloseb159a552010-04-25 21:00:44 +000011897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11901$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011902
11903fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11906$as_echo_n "checking for prlimit... " >&6; }
11907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908/* end confdefs.h. */
11909
11910#include <sys/time.h>
11911#include <sys/resource.h>
11912
11913int
11914main ()
11915{
11916void *x=prlimit
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921if ac_fn_c_try_compile "$LINENO"; then :
11922
11923$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11924
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11926$as_echo "yes" >&6; }
11927else
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
11930
11931fi
11932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11933
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11935$as_echo_n "checking for memfd_create... " >&6; }
11936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11937/* end confdefs.h. */
11938
11939#ifdef HAVE_SYS_MMAN_H
11940#include <sys/mman.h>
11941#endif
11942#ifdef HAVE_SYS_MEMFD_H
11943#include <sys/memfd.h>
11944#endif
11945
11946int
11947main ()
11948{
11949void *x=memfd_create
11950 ;
11951 return 0;
11952}
11953_ACEOF
11954if ac_fn_c_try_compile "$LINENO"; then :
11955
11956$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11957
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11959$as_echo "yes" >&6; }
11960else
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
11963
11964fi
11965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11966
Martin v. Löwisd5843682002-11-21 20:41:28 +000011967# On some systems (eg. FreeBSD 5), we would find a definition of the
11968# functions ctermid_r, setgroups in the library, but no prototype
11969# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11970# address to avoid compiler warnings and potential miscompilations
11971# because of the missing prototypes.
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11974$as_echo_n "checking for ctermid_r... " >&6; }
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011977
Martin v. Löwisd5843682002-11-21 20:41:28 +000011978#include <stdio.h>
11979
Martin v. Löwisd5843682002-11-21 20:41:28 +000011980int
11981main ()
11982{
11983void* p = ctermid_r
11984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011991
Matthias Kloseb159a552010-04-25 21:00:44 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011993$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011997
11998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12000
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12002$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012003if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012004 $as_echo_n "(cached) " >&6
12005else
12006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012007/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012008#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012009int
12010main ()
12011{
12012void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012013
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012019 ac_cv_flock_decl=yes
12020else
12021 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012022
12023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012025
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012026fi
12027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12028$as_echo "$ac_cv_flock_decl" >&6; }
12029if test "x${ac_cv_flock_decl}" = xyes; then
12030 for ac_func in flock
12031do :
12032 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012033if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012034 cat >>confdefs.h <<_ACEOF
12035#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012036_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012037
Antoine Pitroua3000072010-09-07 14:52:42 +000012038else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012040$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012042 $as_echo_n "(cached) " >&6
12043else
12044 ac_check_lib_save_LIBS=$LIBS
12045LIBS="-lbsd $LIBS"
12046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12047/* end confdefs.h. */
12048
12049/* Override any GCC internal prototype to avoid an error.
12050 Use char because int might match the return type of a GCC
12051 builtin and then its argument prototype would still apply. */
12052#ifdef __cplusplus
12053extern "C"
12054#endif
12055char flock ();
12056int
12057main ()
12058{
12059return flock ();
12060 ;
12061 return 0;
12062}
12063_ACEOF
12064if ac_fn_c_try_link "$LINENO"; then :
12065 ac_cv_lib_bsd_flock=yes
12066else
12067 ac_cv_lib_bsd_flock=no
12068fi
12069rm -f core conftest.err conftest.$ac_objext \
12070 conftest$ac_exeext conftest.$ac_ext
12071LIBS=$ac_check_lib_save_LIBS
12072fi
12073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12074$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012075if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012076 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012077
12078
12079$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12080
12081
12082fi
12083
12084
12085fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012086done
12087
Antoine Pitroua3000072010-09-07 14:52:42 +000012088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12091$as_echo_n "checking for getpagesize... " >&6; }
12092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012093/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012094
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012095#include <unistd.h>
12096
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012097int
12098main ()
12099{
12100void* p = getpagesize
12101 ;
12102 return 0;
12103}
12104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012108
Matthias Kloseb159a552010-04-25 21:00:44 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012110$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12113$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012114
12115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012117
Victor Stinner984890f2011-11-24 13:53:38 +010012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12119$as_echo_n "checking for broken unsetenv... " >&6; }
12120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12121/* end confdefs.h. */
12122
12123#include <stdlib.h>
12124
12125int
12126main ()
12127{
12128int res = unsetenv("DUMMY")
12129 ;
12130 return 0;
12131}
12132_ACEOF
12133if ac_fn_c_try_compile "$LINENO"; then :
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12135$as_echo "no" >&6; }
12136else
12137
12138$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12139
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12141$as_echo "yes" >&6; }
12142
12143fi
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012146for ac_prog in true
12147do
12148 # Extract the first word of "$ac_prog", so it can be a program name with args.
12149set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12151$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012152if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012154else
12155 if test -n "$TRUE"; then
12156 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12157else
12158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159for as_dir in $PATH
12160do
12161 IFS=$as_save_IFS
12162 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012165 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 $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 +000012167 break 2
12168 fi
12169done
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012172
12173fi
12174fi
12175TRUE=$ac_cv_prog_TRUE
12176if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12178$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12181$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012182fi
12183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012185 test -n "$TRUE" && break
12186done
12187test -n "$TRUE" || TRUE="/bin/true"
12188
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12191$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012194else
12195 ac_check_lib_save_LIBS=$LIBS
12196LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012200/* Override any GCC internal prototype to avoid an error.
12201 Use char because int might match the return type of a GCC
12202 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012203#ifdef __cplusplus
12204extern "C"
12205#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012206char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012207int
12208main ()
12209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012211 ;
12212 return 0;
12213}
12214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012215if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012216 ac_cv_lib_c_inet_aton=yes
12217else
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012220rm -f core conftest.err conftest.$ac_objext \
12221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012222LIBS=$ac_check_lib_save_LIBS
12223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12225$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012227 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12230$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012233else
12234 ac_check_lib_save_LIBS=$LIBS
12235LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239/* Override any GCC internal prototype to avoid an error.
12240 Use char because int might match the return type of a GCC
12241 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012242#ifdef __cplusplus
12243extern "C"
12244#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012245char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012246int
12247main ()
12248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012250 ;
12251 return 0;
12252}
12253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012255 ac_cv_lib_resolv_inet_aton=yes
12256else
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012259rm -f core conftest.err conftest.$ac_objext \
12260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012261LIBS=$ac_check_lib_save_LIBS
12262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12264$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012265if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012266 cat >>confdefs.h <<_ACEOF
12267#define HAVE_LIBRESOLV 1
12268_ACEOF
12269
12270 LIBS="-lresolv $LIBS"
12271
12272fi
12273
12274
12275fi
12276
12277
Christian Heimesd0764e22007-12-04 15:00:33 +000012278# On Tru64, chflags seems to be present, but calling it will
12279# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12281$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012286 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012287else
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012289/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012290
Christian Heimesd0764e22007-12-04 15:00:33 +000012291#include <sys/stat.h>
12292#include <unistd.h>
12293int main(int argc, char*argv[])
12294{
12295 if(chflags(argv[0], 0) != 0)
12296 return 1;
12297 return 0;
12298}
Ned Deily3eb67d52011-06-28 00:00:28 -070012299
Christian Heimesd0764e22007-12-04 15:00:33 +000012300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012302 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012308fi
12309
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012310
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12313$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012314if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012316if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012317 ac_cv_have_chflags="yes"
12318else
12319 ac_cv_have_chflags="no"
12320fi
12321
12322fi
12323if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012326
12327fi
12328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12330$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012331if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012335 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012336else
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012338/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012339
Christian Heimesd0764e22007-12-04 15:00:33 +000012340#include <sys/stat.h>
12341#include <unistd.h>
12342int main(int argc, char*argv[])
12343{
12344 if(lchflags(argv[0], 0) != 0)
12345 return 1;
12346 return 0;
12347}
Ned Deily3eb67d52011-06-28 00:00:28 -070012348
Christian Heimesd0764e22007-12-04 15:00:33 +000012349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012351 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12356 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012357fi
12358
12359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12362$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012363if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012366 ac_cv_have_lchflags="yes"
12367else
12368 ac_cv_have_lchflags="no"
12369fi
12370
12371fi
12372if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012375
12376fi
12377
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012378case $ac_sys_system/$ac_sys_release in
12379Darwin/*)
12380 _CUR_CFLAGS="${CFLAGS}"
12381 _CUR_LDFLAGS="${LDFLAGS}"
12382 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12383 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12384 ;;
12385esac
12386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12388$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012389if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012391else
12392 ac_check_lib_save_LIBS=$LIBS
12393LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012395/* end confdefs.h. */
12396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397/* Override any GCC internal prototype to avoid an error.
12398 Use char because int might match the return type of a GCC
12399 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012400#ifdef __cplusplus
12401extern "C"
12402#endif
12403char inflateCopy ();
12404int
12405main ()
12406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012408 ;
12409 return 0;
12410}
12411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012413 ac_cv_lib_z_inflateCopy=yes
12414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012417rm -f core conftest.err conftest.$ac_objext \
12418 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012419LIBS=$ac_check_lib_save_LIBS
12420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12422$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012423if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012426
12427fi
12428
12429
12430case $ac_sys_system/$ac_sys_release in
12431Darwin/*)
12432 CFLAGS="${_CUR_CFLAGS}"
12433 LDFLAGS="${_CUR_LDFLAGS}"
12434 ;;
12435esac
12436
Matthias Kloseb9621712010-04-24 17:59:49 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12438$as_echo_n "checking for hstrerror... " >&6; }
12439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012441
Martin v. Löwise9416172003-05-03 10:12:45 +000012442#include <netdb.h>
12443
Martin v. Löwise9416172003-05-03 10:12:45 +000012444int
12445main ()
12446{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012447void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012455
Matthias Kloseb159a552010-04-25 21:00:44 +000012456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012457$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12460$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012461
12462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463rm -f core conftest.err conftest.$ac_objext \
12464 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12467$as_echo_n "checking for inet_aton... " >&6; }
12468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012470
Martin v. Löwis86d66262006-02-17 08:40:11 +000012471#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012472#include <sys/socket.h>
12473#include <netinet/in.h>
12474#include <arpa/inet.h>
12475
Martin v. Löwise9416172003-05-03 10:12:45 +000012476int
12477main ()
12478{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012479void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012480 ;
12481 return 0;
12482}
12483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012487
Matthias Kloseb159a552010-04-25 21:00:44 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012489$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012490else
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12492$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012493
12494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012495rm -f core conftest.err conftest.$ac_objext \
12496 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497
Matthias Kloseb9621712010-04-24 17:59:49 +000012498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12499$as_echo_n "checking for inet_pton... " >&6; }
12500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012501/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012502
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012503#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012504#include <sys/socket.h>
12505#include <netinet/in.h>
12506#include <arpa/inet.h>
12507
Martin v. Löwise9416172003-05-03 10:12:45 +000012508int
12509main ()
12510{
12511void* p = inet_pton
12512 ;
12513 return 0;
12514}
12515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012519
Matthias Kloseb159a552010-04-25 21:00:44 +000012520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012521$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12524$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012525
12526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012528
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012529# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12531$as_echo_n "checking for setgroups... " >&6; }
12532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012534
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012535#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012536#ifdef HAVE_GRP_H
12537#include <grp.h>
12538#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012539
Martin v. Löwisd5843682002-11-21 20:41:28 +000012540int
12541main ()
12542{
12543void* p = setgroups
12544 ;
12545 return 0;
12546}
12547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012551
Matthias Kloseb159a552010-04-25 21:00:44 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012553$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012554else
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12556$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012557
12558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012560
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012561# check for openpty and forkpty
12562
12563for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012564do :
12565 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012568#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012569_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12573$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012574if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012576else
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012578LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582/* Override any GCC internal prototype to avoid an error.
12583 Use char because int might match the return type of a GCC
12584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012585#ifdef __cplusplus
12586extern "C"
12587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012588char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012589int
12590main ()
12591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 ;
12594 return 0;
12595}
12596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012598 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012602rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012604LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12607$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012608if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012610 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012611else
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12613$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012614if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012616else
12617 ac_check_lib_save_LIBS=$LIBS
12618LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012620/* end confdefs.h. */
12621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622/* Override any GCC internal prototype to avoid an error.
12623 Use char because int might match the return type of a GCC
12624 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012625#ifdef __cplusplus
12626extern "C"
12627#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012628char openpty ();
12629int
12630main ()
12631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012638 ac_cv_lib_bsd_openpty=yes
12639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core conftest.err conftest.$ac_objext \
12643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012644LIBS=$ac_check_lib_save_LIBS
12645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12647$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012650 LIBS="$LIBS -lbsd"
12651fi
12652
12653
12654fi
12655
Fred Drake8cef4cf2000-06-28 16:40:38 +000012656
12657fi
12658done
12659
12660for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012661do :
12662 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012663if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012666_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012667
Fred Drake8cef4cf2000-06-28 16:40:38 +000012668else
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12670$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012671if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012673else
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012675LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679/* Override any GCC internal prototype to avoid an error.
12680 Use char because int might match the return type of a GCC
12681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012682#ifdef __cplusplus
12683extern "C"
12684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012685char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012686int
12687main ()
12688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 ;
12691 return 0;
12692}
12693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012696else
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012699rm -f core conftest.err conftest.$ac_objext \
12700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012701LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12704$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012705if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012707 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12710$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012711if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012713else
12714 ac_check_lib_save_LIBS=$LIBS
12715LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012717/* end confdefs.h. */
12718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719/* Override any GCC internal prototype to avoid an error.
12720 Use char because int might match the return type of a GCC
12721 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012722#ifdef __cplusplus
12723extern "C"
12724#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012725char forkpty ();
12726int
12727main ()
12728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012730 ;
12731 return 0;
12732}
12733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012735 ac_cv_lib_bsd_forkpty=yes
12736else
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012739rm -f core conftest.err conftest.$ac_objext \
12740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012741LIBS=$ac_check_lib_save_LIBS
12742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12744$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012745if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012747 LIBS="$LIBS -lbsd"
12748fi
12749
12750
12751fi
12752
Fred Drake8cef4cf2000-06-28 16:40:38 +000012753
12754fi
12755done
12756
Jack Jansendd19cf82001-12-06 22:36:17 +000012757
Michael W. Hudson54241132001-12-07 15:38:26 +000012758# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012759for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012760do :
12761 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12762ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012763if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012766_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012768fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769done
12770
Michael W. Hudson54241132001-12-07 15:38:26 +000012771
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012772ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012773if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012774 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012775
Martin v. Löwis1142de32002-03-29 16:28:31 +000012776else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012778 *" dup2.$ac_objext "* ) ;;
12779 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012781esac
12782
Martin v. Löwis1142de32002-03-29 16:28:31 +000012783fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012784
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012785ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012786if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012787 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12788
12789else
12790 case " $LIBOBJS " in
12791 *" strdup.$ac_objext "* ) ;;
12792 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12793 ;;
12794esac
12795
12796fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012797
12798
12799for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012800do :
12801 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012802if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012808#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012812getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012813 ;
12814 return 0;
12815}
12816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012817if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012820
Guido van Rossum627b2d71993-12-24 10:39:16 +000012821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012823
Guido van Rossum627b2d71993-12-24 10:39:16 +000012824fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012825done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012826
Jack Jansen150753c2003-03-29 22:07:47 +000012827for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012828do :
12829 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012830if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012836#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012837int
12838main ()
12839{
12840setpgrp(0,0);
12841 ;
12842 return 0;
12843}
12844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012848
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012851
12852fi
12853done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012854
Michael W. Hudson54241132001-12-07 15:38:26 +000012855
Gregory P. Smith387512c2018-12-30 15:42:32 -080012856# We search for both crypt and crypt_r as one or the other may be defined
12857# This gets us our -lcrypt in LIBS when required on the target platform.
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12859$as_echo_n "checking for library containing crypt... " >&6; }
12860if ${ac_cv_search_crypt+:} false; then :
12861 $as_echo_n "(cached) " >&6
12862else
12863 ac_func_search_save_LIBS=$LIBS
12864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12865/* end confdefs.h. */
12866
12867/* Override any GCC internal prototype to avoid an error.
12868 Use char because int might match the return type of a GCC
12869 builtin and then its argument prototype would still apply. */
12870#ifdef __cplusplus
12871extern "C"
12872#endif
12873char crypt ();
12874int
12875main ()
12876{
12877return crypt ();
12878 ;
12879 return 0;
12880}
12881_ACEOF
12882for ac_lib in '' crypt; do
12883 if test -z "$ac_lib"; then
12884 ac_res="none required"
12885 else
12886 ac_res=-l$ac_lib
12887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12888 fi
12889 if ac_fn_c_try_link "$LINENO"; then :
12890 ac_cv_search_crypt=$ac_res
12891fi
12892rm -f core conftest.err conftest.$ac_objext \
12893 conftest$ac_exeext
12894 if ${ac_cv_search_crypt+:} false; then :
12895 break
12896fi
12897done
12898if ${ac_cv_search_crypt+:} false; then :
12899
12900else
12901 ac_cv_search_crypt=no
12902fi
12903rm conftest.$ac_ext
12904LIBS=$ac_func_search_save_LIBS
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12907$as_echo "$ac_cv_search_crypt" >&6; }
12908ac_res=$ac_cv_search_crypt
12909if test "$ac_res" != no; then :
12910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12911
12912fi
12913
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12915$as_echo_n "checking for library containing crypt_r... " >&6; }
12916if ${ac_cv_search_crypt_r+:} false; then :
12917 $as_echo_n "(cached) " >&6
12918else
12919 ac_func_search_save_LIBS=$LIBS
12920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12921/* end confdefs.h. */
12922
12923/* Override any GCC internal prototype to avoid an error.
12924 Use char because int might match the return type of a GCC
12925 builtin and then its argument prototype would still apply. */
12926#ifdef __cplusplus
12927extern "C"
12928#endif
12929char crypt_r ();
12930int
12931main ()
12932{
12933return crypt_r ();
12934 ;
12935 return 0;
12936}
12937_ACEOF
12938for ac_lib in '' crypt; do
12939 if test -z "$ac_lib"; then
12940 ac_res="none required"
12941 else
12942 ac_res=-l$ac_lib
12943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12944 fi
12945 if ac_fn_c_try_link "$LINENO"; then :
12946 ac_cv_search_crypt_r=$ac_res
12947fi
12948rm -f core conftest.err conftest.$ac_objext \
12949 conftest$ac_exeext
12950 if ${ac_cv_search_crypt_r+:} false; then :
12951 break
12952fi
12953done
12954if ${ac_cv_search_crypt_r+:} false; then :
12955
12956else
12957 ac_cv_search_crypt_r=no
12958fi
12959rm conftest.$ac_ext
12960LIBS=$ac_func_search_save_LIBS
12961fi
12962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12963$as_echo "$ac_cv_search_crypt_r" >&6; }
12964ac_res=$ac_cv_search_crypt_r
12965if test "$ac_res" != no; then :
12966 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12967
12968fi
12969
12970
12971ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12972if test "x$ac_cv_func_crypt_r" = xyes; then :
12973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12974/* end confdefs.h. */
12975
12976#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12977#include <crypt.h>
12978
12979int
12980main ()
12981{
12982
12983struct crypt_data d;
12984char *r = crypt_r("", "", &d);
12985
12986 ;
12987 return 0;
12988}
12989_ACEOF
12990if ac_fn_c_try_compile "$LINENO"; then :
12991
12992$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12993
12994fi
12995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12996
12997fi
12998
12999
Victor Stinnere0be4232011-10-25 13:06:09 +020013000for ac_func in clock_gettime
13001do :
13002 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13003if test "x$ac_cv_func_clock_gettime" = xyes; then :
13004 cat >>confdefs.h <<_ACEOF
13005#define HAVE_CLOCK_GETTIME 1
13006_ACEOF
13007
13008else
13009
13010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13011$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13012if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13013 $as_echo_n "(cached) " >&6
13014else
13015 ac_check_lib_save_LIBS=$LIBS
13016LIBS="-lrt $LIBS"
13017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13018/* end confdefs.h. */
13019
13020/* Override any GCC internal prototype to avoid an error.
13021 Use char because int might match the return type of a GCC
13022 builtin and then its argument prototype would still apply. */
13023#ifdef __cplusplus
13024extern "C"
13025#endif
13026char clock_gettime ();
13027int
13028main ()
13029{
13030return clock_gettime ();
13031 ;
13032 return 0;
13033}
13034_ACEOF
13035if ac_fn_c_try_link "$LINENO"; then :
13036 ac_cv_lib_rt_clock_gettime=yes
13037else
13038 ac_cv_lib_rt_clock_gettime=no
13039fi
13040rm -f core conftest.err conftest.$ac_objext \
13041 conftest$ac_exeext conftest.$ac_ext
13042LIBS=$ac_check_lib_save_LIBS
13043fi
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13045$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13046if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13047
Victor Stinner7efb8332014-08-29 15:41:08 +020013048 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013049 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13050
13051
13052$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13053
13054
13055fi
13056
13057
13058fi
13059done
13060
13061
13062for ac_func in clock_getres
13063do :
13064 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13065if test "x$ac_cv_func_clock_getres" = xyes; then :
13066 cat >>confdefs.h <<_ACEOF
13067#define HAVE_CLOCK_GETRES 1
13068_ACEOF
13069
13070else
13071
13072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13073$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13074if ${ac_cv_lib_rt_clock_getres+:} false; then :
13075 $as_echo_n "(cached) " >&6
13076else
13077 ac_check_lib_save_LIBS=$LIBS
13078LIBS="-lrt $LIBS"
13079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13080/* end confdefs.h. */
13081
13082/* Override any GCC internal prototype to avoid an error.
13083 Use char because int might match the return type of a GCC
13084 builtin and then its argument prototype would still apply. */
13085#ifdef __cplusplus
13086extern "C"
13087#endif
13088char clock_getres ();
13089int
13090main ()
13091{
13092return clock_getres ();
13093 ;
13094 return 0;
13095}
13096_ACEOF
13097if ac_fn_c_try_link "$LINENO"; then :
13098 ac_cv_lib_rt_clock_getres=yes
13099else
13100 ac_cv_lib_rt_clock_getres=no
13101fi
13102rm -f core conftest.err conftest.$ac_objext \
13103 conftest$ac_exeext conftest.$ac_ext
13104LIBS=$ac_check_lib_save_LIBS
13105fi
13106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13107$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13108if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13109
13110 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13111
13112
13113fi
13114
13115
13116fi
13117done
13118
13119
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013120for ac_func in clock_settime
13121do :
13122 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13123if test "x$ac_cv_func_clock_settime" = xyes; then :
13124 cat >>confdefs.h <<_ACEOF
13125#define HAVE_CLOCK_SETTIME 1
13126_ACEOF
13127
13128else
13129
13130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13131$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13132if ${ac_cv_lib_rt_clock_settime+:} false; then :
13133 $as_echo_n "(cached) " >&6
13134else
13135 ac_check_lib_save_LIBS=$LIBS
13136LIBS="-lrt $LIBS"
13137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138/* end confdefs.h. */
13139
13140/* Override any GCC internal prototype to avoid an error.
13141 Use char because int might match the return type of a GCC
13142 builtin and then its argument prototype would still apply. */
13143#ifdef __cplusplus
13144extern "C"
13145#endif
13146char clock_settime ();
13147int
13148main ()
13149{
13150return clock_settime ();
13151 ;
13152 return 0;
13153}
13154_ACEOF
13155if ac_fn_c_try_link "$LINENO"; then :
13156 ac_cv_lib_rt_clock_settime=yes
13157else
13158 ac_cv_lib_rt_clock_settime=no
13159fi
13160rm -f core conftest.err conftest.$ac_objext \
13161 conftest$ac_exeext conftest.$ac_ext
13162LIBS=$ac_check_lib_save_LIBS
13163fi
13164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13165$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13166if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13167
13168 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13169
13170
13171fi
13172
13173
13174fi
13175done
13176
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13179$as_echo_n "checking for major... " >&6; }
13180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013182
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013183#if defined(MAJOR_IN_MKDEV)
13184#include <sys/mkdev.h>
13185#elif defined(MAJOR_IN_SYSMACROS)
13186#include <sys/sysmacros.h>
13187#else
13188#include <sys/types.h>
13189#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013190
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013191int
13192main ()
13193{
13194
13195 makedev(major(0),minor(0));
13196
13197 ;
13198 return 0;
13199}
13200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013202
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13207$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013208
13209else
Skip Montanaro6dead952003-09-25 14:50:04 +000013210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013213
13214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013215rm -f core conftest.err conftest.$ac_objext \
13216 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013217
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013218# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013219# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13221$as_echo_n "checking for getaddrinfo... " >&6; }
13222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013224
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013225#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013226#include <sys/socket.h>
13227#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013228#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230int
13231main ()
13232{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013233getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 ;
13235 return 0;
13236}
13237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013238if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239 have_getaddrinfo=yes
13240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013243rm -f core conftest.err conftest.$ac_objext \
13244 conftest$ac_exeext conftest.$ac_ext
13245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13246$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247if test $have_getaddrinfo = yes
13248then
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13250$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013251 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013255
13256if test "${enable_ipv6+set}" = set; then
13257 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13258else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013260fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264
Stefan Krah19c21392012-11-22 23:47:32 +010013265#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266#include <sys/types.h>
13267#include <netdb.h>
13268#include <string.h>
13269#include <sys/socket.h>
13270#include <netinet/in.h>
13271
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013272int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273{
13274 int passive, gaierr, inet4 = 0, inet6 = 0;
13275 struct addrinfo hints, *ai, *aitop;
13276 char straddr[INET6_ADDRSTRLEN], strport[16];
13277
13278 for (passive = 0; passive <= 1; passive++) {
13279 memset(&hints, 0, sizeof(hints));
13280 hints.ai_family = AF_UNSPEC;
13281 hints.ai_flags = passive ? AI_PASSIVE : 0;
13282 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013283 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13285 (void)gai_strerror(gaierr);
13286 goto bad;
13287 }
13288 for (ai = aitop; ai; ai = ai->ai_next) {
13289 if (ai->ai_addr == NULL ||
13290 ai->ai_addrlen == 0 ||
13291 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13292 straddr, sizeof(straddr), strport, sizeof(strport),
13293 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13294 goto bad;
13295 }
13296 switch (ai->ai_family) {
13297 case AF_INET:
13298 if (strcmp(strport, "54321") != 0) {
13299 goto bad;
13300 }
13301 if (passive) {
13302 if (strcmp(straddr, "0.0.0.0") != 0) {
13303 goto bad;
13304 }
13305 } else {
13306 if (strcmp(straddr, "127.0.0.1") != 0) {
13307 goto bad;
13308 }
13309 }
13310 inet4++;
13311 break;
13312 case AF_INET6:
13313 if (strcmp(strport, "54321") != 0) {
13314 goto bad;
13315 }
13316 if (passive) {
13317 if (strcmp(straddr, "::") != 0) {
13318 goto bad;
13319 }
13320 } else {
13321 if (strcmp(straddr, "::1") != 0) {
13322 goto bad;
13323 }
13324 }
13325 inet6++;
13326 break;
13327 case AF_UNSPEC:
13328 goto bad;
13329 break;
13330 default:
13331 /* another family support? */
13332 break;
13333 }
13334 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013335 freeaddrinfo(aitop);
13336 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013337 }
13338
13339 if (!(inet4 == 0 || inet4 == 2))
13340 goto bad;
13341 if (!(inet6 == 0 || inet6 == 2))
13342 goto bad;
13343
13344 if (aitop)
13345 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013346 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013347
13348 bad:
13349 if (aitop)
13350 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013351 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013352}
13353
Martin v. Löwis11437992002-04-12 09:54:03 +000013354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013355if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013356 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357else
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13361 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013364fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013365
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13369$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13370
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013371if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013372then
13373 if test $ipv6 = yes
13374 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013375 echo 'Fatal: You must get working getaddrinfo() function.'
13376 echo ' or you can specify "--disable-ipv6"'.
13377 exit 1
13378 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013379else
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013382
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013383fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013384
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013385for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013386do :
13387 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013388if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013390#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013391_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013393fi
13394done
13395
Michael W. Hudson54241132001-12-07 15:38:26 +000013396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13399$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013400if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013404/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405#include <sys/types.h>
13406#include <sys/time.h>
13407#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409int
13410main ()
13411{
13412if ((struct tm *) 0)
13413return 0;
13414 ;
13415 return 0;
13416}
13417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13426$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013427if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013430
13431fi
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13434$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013435if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440#include <sys/types.h>
13441#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443int
13444main ()
13445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446struct tm tm;
13447 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 ;
13450 return 0;
13451}
13452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454 ac_cv_struct_tm=time.h
13455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13461$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013462if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465
13466fi
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468ac_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 +000013469#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471"
Victor Stinnere0be4232011-10-25 13:06:09 +020013472if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
13474cat >>confdefs.h <<_ACEOF
13475#define HAVE_STRUCT_TM_TM_ZONE 1
13476_ACEOF
13477
13478
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484
13485else
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13487"
Victor Stinnere0be4232011-10-25 13:06:09 +020013488if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492fi
13493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013495#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496_ACEOF
13497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13499$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013500if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013505#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506#if !HAVE_DECL_TZNAME
13507extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
Martin v. Löwis11437992002-04-12 09:54:03 +000013510int
13511main ()
13512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013513return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013518if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013519 ac_cv_var_tzname=yes
13520else
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013523rm -f core conftest.err conftest.$ac_objext \
13524 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13527$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013528 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013531
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532 fi
13533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535ac_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 +020013536if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
13538cat >>confdefs.h <<_ACEOF
13539#define HAVE_STRUCT_STAT_ST_RDEV 1
13540_ACEOF
13541
13542
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013543fi
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545ac_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 +020013546if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548cat >>confdefs.h <<_ACEOF
13549#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13550_ACEOF
13551
13552
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013553fi
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555ac_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 +020013556if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013557
13558cat >>confdefs.h <<_ACEOF
13559#define HAVE_STRUCT_STAT_ST_FLAGS 1
13560_ACEOF
13561
13562
13563fi
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565ac_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 +020013566if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013567
13568cat >>confdefs.h <<_ACEOF
13569#define HAVE_STRUCT_STAT_ST_GEN 1
13570_ACEOF
13571
13572
13573fi
13574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575ac_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 +020013576if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013577
13578cat >>confdefs.h <<_ACEOF
13579#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13580_ACEOF
13581
13582
13583fi
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585ac_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 +020013586if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013587
Martin v. Löwis11437992002-04-12 09:54:03 +000013588cat >>confdefs.h <<_ACEOF
13589#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13590_ACEOF
13591
13592
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013593fi
13594
Stefan Krah267b6392016-04-26 01:09:18 +020013595ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13596 #include <sys/types.h>
13597 #include <pwd.h>
13598
13599"
13600if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13601
13602cat >>confdefs.h <<_ACEOF
13603#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13604_ACEOF
13605
13606
13607fi
13608ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13609 #include <sys/types.h>
13610 #include <pwd.h>
13611
13612"
13613if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13614
13615cat >>confdefs.h <<_ACEOF
13616#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13617_ACEOF
13618
13619
13620fi
13621
Zachary Ware6a6967e2016-10-01 00:47:27 -050013622# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13623ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13624"
13625if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13626
13627cat >>confdefs.h <<_ACEOF
13628#define HAVE_SIGINFO_T_SI_BAND 1
13629_ACEOF
13630
13631
13632fi
13633
Michael W. Hudson54241132001-12-07 15:38:26 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13636$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013637if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639else
Matthias Kloseb159a552010-04-25 21:00:44 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013642/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013643#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013644int
13645main ()
13646{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ;
13649 return 0;
13650}
13651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013653 ac_cv_header_time_altzone=yes
13654else
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659fi
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13662$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013663if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013666
13667fi
13668
Guido van Rossumda88dad1995-01-26 00:46:29 +000013669was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13671$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013673/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013674
13675#include <sys/types.h>
13676#include <sys/select.h>
13677#include <sys/time.h>
13678
Martin v. Löwis11437992002-04-12 09:54:03 +000013679int
13680main ()
13681{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013682;
Martin v. Löwis11437992002-04-12 09:54:03 +000013683 ;
13684 return 0;
13685}
13686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
13689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013692 was_it_defined=yes
13693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13697$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13700$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013701if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013706#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013707int
13708main ()
13709{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013710struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ;
13712 return 0;
13713}
13714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013716 ac_cv_struct_addrinfo=yes
13717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13721fi
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13724$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013725if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013728
13729fi
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13732$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013733if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013737/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013738
13739# include <sys/types.h>
13740# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013741int
13742main ()
13743{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013744struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ;
13746 return 0;
13747}
13748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013749if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013750 ac_cv_struct_sockaddr_storage=yes
13751else
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13755fi
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13758$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013759if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013762
13763fi
13764
Christian Heimesdffa3942016-09-05 23:54:41 +020013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13766$as_echo_n "checking for sockaddr_alg... " >&6; }
13767if ${ac_cv_struct_sockaddr_alg+:} false; then :
13768 $as_echo_n "(cached) " >&6
13769else
13770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13771/* end confdefs.h. */
13772
13773# include <sys/types.h>
13774# include <sys/socket.h>
13775# include <linux/if_alg.h>
13776int
13777main ()
13778{
13779struct sockaddr_alg s
13780 ;
13781 return 0;
13782}
13783_ACEOF
13784if ac_fn_c_try_compile "$LINENO"; then :
13785 ac_cv_struct_sockaddr_alg=yes
13786else
13787 ac_cv_struct_sockaddr_alg=no
13788fi
13789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13790fi
13791
13792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13793$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13794if test $ac_cv_struct_sockaddr_alg = yes; then
13795
13796$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13797
13798fi
13799
Guido van Rossum627b2d71993-12-24 10:39:16 +000013800# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13803$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013804if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013809$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013810int
13811main ()
13812{
13813static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013814test_array [0] = 0;
13815return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
13817 ;
13818 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013819}
Martin v. Löwis11437992002-04-12 09:54:03 +000013820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013822 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013823else
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13829$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013830if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832
13833fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13836$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013837if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013839else
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013841/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842
Martin v. Löwis11437992002-04-12 09:54:03 +000013843int
13844main ()
13845{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013846
Martin v. Löwis11437992002-04-12 09:54:03 +000013847#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013848 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013850 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852 char const *const *pcpcc;
13853 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 /* NEC SVR4.0.2 mips cc rejects this. */
13855 struct point {int x, y;};
13856 static struct point const zero = {0,0};
13857 /* AIX XL C 1.02.0.0 rejects this.
13858 It does not let you subtract one const X* pointer from another in
13859 an arm of an if-expression whose if-part is not a constant
13860 expression */
13861 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864 ++pcpcc;
13865 ppc = (char**) pcpcc;
13866 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013867 { /* SCO 3.2v4 cc rejects this sort of thing. */
13868 char tx;
13869 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 }
13875 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13876 int x[] = {25, 17};
13877 const int *foo = &x[0];
13878 ++foo;
13879 }
13880 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13881 typedef const int *iptr;
13882 iptr p = 0;
13883 ++p;
13884 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013885 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013887 struct s { int j; const int *ap[3]; } bx;
13888 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 }
13890 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13891 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013895#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013896
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ;
13898 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013899}
Martin v. Löwis11437992002-04-12 09:54:03 +000013900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013902 ac_cv_c_const=yes
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13909$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013913
13914fi
13915
Michael W. Hudson54241132001-12-07 15:38:26 +000013916
Guido van Rossumda88dad1995-01-26 00:46:29 +000013917works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13919$as_echo_n "checking for working signed char... " >&6; }
13920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013921/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013922
Martin v. Löwis11437992002-04-12 09:54:03 +000013923int
13924main ()
13925{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013926signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 ;
13928 return 0;
13929}
13930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013931if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013932 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013933else
Skip Montanaro6dead952003-09-25 14:50:04 +000013934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013936
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013937
Guido van Rossum7f43da71994-08-01 12:15:30 +000013938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13941$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013942
Guido van Rossumda88dad1995-01-26 00:46:29 +000013943have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13945$as_echo_n "checking for prototypes... " >&6; }
13946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013947/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013948int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013949int
13950main ()
13951{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 ;
13954 return 0;
13955}
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb159a552010-04-25 21:00:44 +000013961 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13965$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013966
Guido van Rossumda88dad1995-01-26 00:46:29 +000013967works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13969$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013972
13973#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013974int foo(int x, ...) {
13975 va_list va;
13976 va_start(va, x);
13977 va_arg(va, int);
13978 va_arg(va, char *);
13979 va_arg(va, double);
13980 return 0;
13981}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013982
Martin v. Löwis11437992002-04-12 09:54:03 +000013983int
13984main ()
13985{
Guido van Rossum90eea071996-08-30 20:58:57 +000013986return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 ;
13988 return 0;
13989}
13990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
13993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013996 works=yes
13997
Guido van Rossum627b2d71993-12-24 10:39:16 +000013998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14001$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014002
Martin v. Löwisd6320502004-08-12 13:45:08 +000014003# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14005$as_echo_n "checking for socketpair... " >&6; }
14006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014007/* end confdefs.h. */
14008
14009#include <sys/types.h>
14010#include <sys/socket.h>
14011
14012int
14013main ()
14014{
14015void *x=socketpair
14016 ;
14017 return 0;
14018}
14019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014023
Matthias Kloseb159a552010-04-25 21:00:44 +000014024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014025$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014026else
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14028$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014029
14030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014032
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014033# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14035$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014038#include <sys/types.h>
14039#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014040int
14041main ()
14042{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014043struct sockaddr x;
14044x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 ;
14046 return 0;
14047}
14048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014049if ac_fn_c_try_compile "$LINENO"; then :
14050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14051$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014054
14055else
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14057$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014058
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014061
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14071$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072 OLD_CFLAGS=$CFLAGS
14073 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014075/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076
14077# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079int
14080main ()
14081{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082
14083 char *name;
14084 struct hostent *he, *res;
14085 char buffer[2048];
14086 int buflen = 2048;
14087 int h_errnop;
14088
14089 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
14091 ;
14092 return 0;
14093}
14094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014098
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14103$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105else
Skip Montanaro6dead952003-09-25 14:50:04 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14108$as_echo "no" >&6; }
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14110$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014112/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014113
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014114# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116int
14117main ()
14118{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014119
14120 char *name;
14121 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014122 char buffer[2048];
14123 int buflen = 2048;
14124 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014125
Matthias Kloseb159a552010-04-25 21:00:44 +000014126 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014127
14128 ;
14129 return 0;
14130}
14131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014135
Martin v. Löwis11437992002-04-12 09:54:03 +000014136
Matthias Kloseb159a552010-04-25 21:00:44 +000014137$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14140$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014141
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014142else
Skip Montanaro6dead952003-09-25 14:50:04 +000014143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14145$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14147$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14149/* end confdefs.h. */
14150
14151# include <netdb.h>
14152
14153int
14154main ()
14155{
14156
14157 char *name;
14158 struct hostent *he;
14159 struct hostent_data data;
14160
14161 (void) gethostbyname_r(name, he, &data);
14162
14163 ;
14164 return 0;
14165}
14166_ACEOF
14167if ac_fn_c_try_compile "$LINENO"; then :
14168
14169 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14170
14171
14172$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14173
14174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14175$as_echo "yes" >&6; }
14176
14177else
14178
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14180$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014190 CFLAGS=$OLD_CFLAGS
14191
14192else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 for ac_func in gethostbyname
14195do :
14196 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014197if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014199#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014200_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014201
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014202fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014203done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014204
Michael W. Hudson54241132001-12-07 15:38:26 +000014205
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014206fi
14207
Michael W. Hudson54241132001-12-07 15:38:26 +000014208
14209
14210
14211
14212
14213
Guido van Rossum627b2d71993-12-24 10:39:16 +000014214# checks for system services
14215# (none yet)
14216
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014217# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014218ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014220
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014221else
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14223$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014224if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014226else
Martin v. Löwis11437992002-04-12 09:54:03 +000014227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014228LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232/* Override any GCC internal prototype to avoid an error.
14233 Use char because int might match the return type of a GCC
14234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014235#ifdef __cplusplus
14236extern "C"
14237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014238char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014239int
14240main ()
14241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ;
14244 return 0;
14245}
14246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014252rm -f core conftest.err conftest.$ac_objext \
14253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014254LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14257$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014258if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 cat >>confdefs.h <<_ACEOF
14260#define HAVE_LIBIEEE 1
14261_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014262
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014263 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014264
Guido van Rossum627b2d71993-12-24 10:39:16 +000014265fi
14266
Michael W. Hudson54241132001-12-07 15:38:26 +000014267
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014268fi
14269
Michael W. Hudson54241132001-12-07 15:38:26 +000014270
Guido van Rossum7f43da71994-08-01 12:15:30 +000014271# check for --with-libm=...
14272
Guido van Rossum563e7081996-09-10 18:20:48 +000014273case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014274Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014275*) LIBM=-lm
14276esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14278$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014281if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014283if test "$withval" = no
14284then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14286$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014287elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014288then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14290$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014291else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014292fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014293else
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14295$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296fi
14297
Guido van Rossum7f43da71994-08-01 12:15:30 +000014298
14299# check for --with-libc=...
14300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14302$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014305if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014307if test "$withval" = no
14308then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14310$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014311elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014312then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14314$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014315else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014316fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014317else
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14319$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320fi
14321
Guido van Rossum7f43da71994-08-01 12:15:30 +000014322
Stefan Krah1919b7e2012-03-21 18:25:23 +010014323# **************************************
14324# * Check for gcc x64 inline assembler *
14325# **************************************
14326
14327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14328$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14330/* end confdefs.h. */
14331
14332int
14333main ()
14334{
14335
14336 __asm__ __volatile__ ("movq %rcx, %rax");
14337
14338 ;
14339 return 0;
14340}
14341_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014342if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014343 have_gcc_asm_for_x64=yes
14344else
14345 have_gcc_asm_for_x64=no
14346fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014347rm -f core conftest.err conftest.$ac_objext \
14348 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14350$as_echo "$have_gcc_asm_for_x64" >&6; }
14351if test "$have_gcc_asm_for_x64" = yes
14352then
14353
14354$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14355
14356fi
14357
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014358# **************************************************
14359# * Check for various properties of floating point *
14360# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014361
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14363$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14364if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014366else
14367
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014368
14369ax_cv_c_float_words_bigendian=unknown
14370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014371/* end confdefs.h. */
14372
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014373
14374double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14375
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014376
14377_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014378if ac_fn_c_try_compile "$LINENO"; then :
14379
14380
Arnon Yaari5dd83602020-04-01 18:19:09 +030014381if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014382 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014383fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014384if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014385 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14386 ax_cv_c_float_words_bigendian=no
14387 else
14388 ax_cv_c_float_words_bigendian=unknown
14389 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014390fi
14391
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014392
14393fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014395fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14397$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014398
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014399case $ax_cv_c_float_words_bigendian in
14400 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014401
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014402$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14403 ;;
14404 no)
14405 ;;
14406 *)
14407 as_fn_error $? "
14408
14409Unknown float word ordering. You need to manually preset
14410ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14411
14412 " "$LINENO" 5 ;;
14413esac
14414
14415
14416if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014417then
14418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014420
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014421elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014422then
14423
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014424$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14425
14426else
14427 # Some ARM platforms use a mixed-endian representation for doubles.
14428 # While Python doesn't currently have full support for these platforms
14429 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14430 # conversions work.
14431 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14432 # or little, then it must be this?
14433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014435
14436fi
14437
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014438# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014439# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014440# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014441# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014442# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014443# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014444
14445# This inline assembler syntax may also work for suncc and icc,
14446# so we try it on all platforms.
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14449$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014451/* end confdefs.h. */
14452
14453int
14454main ()
14455{
14456
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014457 unsigned short cw;
14458 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14459 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014460
14461 ;
14462 return 0;
14463}
14464_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014465if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014466 have_gcc_asm_for_x87=yes
14467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014469fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014470rm -f core conftest.err conftest.$ac_objext \
14471 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14473$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014474if test "$have_gcc_asm_for_x87" = yes
14475then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014478
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014479fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14482$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14484/* end confdefs.h. */
14485
14486int
14487main ()
14488{
14489
14490 unsigned int fpcr;
14491 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14492 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14493
14494 ;
14495 return 0;
14496}
14497_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014498if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014499 have_gcc_asm_for_mc68881=yes
14500else
14501 have_gcc_asm_for_mc68881=no
14502fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014503rm -f core conftest.err conftest.$ac_objext \
14504 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14506$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14507if test "$have_gcc_asm_for_mc68881" = yes
14508then
14509
14510$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14511
14512fi
14513
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014514# Detect whether system arithmetic is subject to x87-style double
14515# rounding issues. The result of this test has little meaning on non
14516# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14517# mode is round-to-nearest and double rounding issues are present, and
14518# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14520$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014521# $BASECFLAGS may affect the result
14522ac_save_cc="$CC"
14523CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014524if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014525 ac_cv_x87_double_rounding=no
14526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014528/* end confdefs.h. */
14529
14530#include <stdlib.h>
14531#include <math.h>
14532int main() {
14533 volatile double x, y, z;
14534 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14535 x = 0.99999999999999989; /* 1-2**-53 */
14536 y = 1./x;
14537 if (y != 1.)
14538 exit(0);
14539 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14540 x = 1e16;
14541 y = 2.99999;
14542 z = x + y;
14543 if (z != 1e16+4.)
14544 exit(0);
14545 /* both tests show evidence of double rounding */
14546 exit(1);
14547}
14548
14549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014550if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014551 ac_cv_x87_double_rounding=no
14552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014557fi
14558
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014559CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14561$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014562if test "$ac_cv_x87_double_rounding" = yes
14563then
14564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014566
14567fi
14568
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014569# ************************************
14570# * Check for mathematical functions *
14571# ************************************
14572
14573LIBS_SAVE=$LIBS
14574LIBS="$LIBS $LIBM"
14575
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014576for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14577do :
14578 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14579ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014580if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014581 cat >>confdefs.h <<_ACEOF
14582#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14583_ACEOF
14584
14585fi
14586done
14587
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014588for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014589do :
14590 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14591ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014592if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014593 cat >>confdefs.h <<_ACEOF
14594#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14595_ACEOF
14596
14597fi
14598done
14599
14600ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14601"
Victor Stinnere0be4232011-10-25 13:06:09 +020014602if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014603 ac_have_decl=1
14604else
14605 ac_have_decl=0
14606fi
14607
14608cat >>confdefs.h <<_ACEOF
14609#define HAVE_DECL_ISINF $ac_have_decl
14610_ACEOF
14611ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14612"
Victor Stinnere0be4232011-10-25 13:06:09 +020014613if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014614 ac_have_decl=1
14615else
14616 ac_have_decl=0
14617fi
14618
14619cat >>confdefs.h <<_ACEOF
14620#define HAVE_DECL_ISNAN $ac_have_decl
14621_ACEOF
14622ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14623"
Victor Stinnere0be4232011-10-25 13:06:09 +020014624if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014625 ac_have_decl=1
14626else
14627 ac_have_decl=0
14628fi
14629
14630cat >>confdefs.h <<_ACEOF
14631#define HAVE_DECL_ISFINITE $ac_have_decl
14632_ACEOF
14633
14634
Mark Dickinsona614f042009-11-28 12:48:43 +000014635# For multiprocessing module, check that sem_open
14636# actually works. For FreeBSD versions <= 7.2,
14637# the kernel module that provides POSIX semaphores
14638# isn't loaded by default, so an attempt to call
14639# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14641$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014642if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014644else
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014646 ac_cv_posix_semaphores_enabled=yes
14647else
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014649/* end confdefs.h. */
14650
14651#include <unistd.h>
14652#include <fcntl.h>
14653#include <stdio.h>
14654#include <semaphore.h>
14655#include <sys/stat.h>
14656
14657int main(void) {
14658 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14659 if (a == SEM_FAILED) {
14660 perror("sem_open");
14661 return 1;
14662 }
14663 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014664 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014665 return 0;
14666}
14667
14668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014669if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014670 ac_cv_posix_semaphores_enabled=yes
14671else
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014674rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14675 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014676fi
14677
14678
Mark Dickinsona614f042009-11-28 12:48:43 +000014679fi
14680
Matthias Kloseb9621712010-04-24 17:59:49 +000014681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14682$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014683if test $ac_cv_posix_semaphores_enabled = no
14684then
14685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014687
14688fi
14689
Mark Dickinson10683072009-04-18 21:18:19 +000014690# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14692$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014693if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014695else
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014697 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014698else
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014700/* end confdefs.h. */
14701
14702#include <unistd.h>
14703#include <fcntl.h>
14704#include <stdio.h>
14705#include <semaphore.h>
14706#include <sys/stat.h>
14707
14708int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014709 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014710 int count;
14711 int res;
14712 if(a==SEM_FAILED){
14713 perror("sem_open");
14714 return 1;
14715
14716 }
14717 res = sem_getvalue(a, &count);
14718 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014719 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014720 return res==-1 ? 1 : 0;
14721}
14722
Mark Dickinson10683072009-04-18 21:18:19 +000014723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014725 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014726else
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014731fi
14732
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014733
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014734fi
14735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14737$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014738if test $ac_cv_broken_sem_getvalue = yes
14739then
14740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014742
14743fi
14744
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014745ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14746"
14747if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14748 ac_have_decl=1
14749else
14750 ac_have_decl=0
14751fi
14752
14753cat >>confdefs.h <<_ACEOF
14754#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14755_ACEOF
14756ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14757"
14758if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14759 ac_have_decl=1
14760else
14761 ac_have_decl=0
14762fi
14763
14764cat >>confdefs.h <<_ACEOF
14765#define HAVE_DECL_RTLD_NOW $ac_have_decl
14766_ACEOF
14767ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14768"
14769if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14770 ac_have_decl=1
14771else
14772 ac_have_decl=0
14773fi
14774
14775cat >>confdefs.h <<_ACEOF
14776#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14777_ACEOF
14778ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14779"
14780if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14781 ac_have_decl=1
14782else
14783 ac_have_decl=0
14784fi
14785
14786cat >>confdefs.h <<_ACEOF
14787#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14788_ACEOF
14789ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14790"
14791if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14792 ac_have_decl=1
14793else
14794 ac_have_decl=0
14795fi
14796
14797cat >>confdefs.h <<_ACEOF
14798#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14799_ACEOF
14800ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14801"
14802if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14803 ac_have_decl=1
14804else
14805 ac_have_decl=0
14806fi
14807
14808cat >>confdefs.h <<_ACEOF
14809#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14810_ACEOF
14811ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14812"
14813if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14814 ac_have_decl=1
14815else
14816 ac_have_decl=0
14817fi
14818
14819cat >>confdefs.h <<_ACEOF
14820#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14821_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014822ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14823"
14824if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14825 ac_have_decl=1
14826else
14827 ac_have_decl=0
14828fi
14829
14830cat >>confdefs.h <<_ACEOF
14831#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14832_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014833
14834
Mark Dickinsonbd792642009-03-18 20:06:12 +000014835# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14837$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014838# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014839if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014840 enableval=$enable_big_digits; case $enable_big_digits in
14841yes)
14842 enable_big_digits=30 ;;
14843no)
14844 enable_big_digits=15 ;;
1484515|30)
14846 ;;
14847*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014848 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 +000014849esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14851$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014852
14853cat >>confdefs.h <<_ACEOF
14854#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14855_ACEOF
14856
14857
14858else
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14860$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014861fi
14862
14863
Guido van Rossumef2255b2000-03-10 22:30:29 +000014864# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014865ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014866if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014867
14868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014870
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014871 wchar_h="yes"
14872
Guido van Rossumef2255b2000-03-10 22:30:29 +000014873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014875
14876fi
14877
Michael W. Hudson54241132001-12-07 15:38:26 +000014878
Martin v. Löwis11437992002-04-12 09:54:03 +000014879
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014880# determine wchar_t size
14881if test "$wchar_h" = yes
14882then
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14888$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014889if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14893"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
Martin v. Löwis11437992002-04-12 09:54:03 +000014895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 if test "$ac_cv_type_wchar_t" = yes; then
14897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014899as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014900See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901 else
14902 ac_cv_sizeof_wchar_t=0
14903 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014905
Martin v. Löwis11437992002-04-12 09:54:03 +000014906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14908$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909
14910
14911
Martin v. Löwis11437992002-04-12 09:54:03 +000014912cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014913#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014914_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014915
Michael W. Hudson54241132001-12-07 15:38:26 +000014916
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014917fi
14918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14920$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014921have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014923/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014924
14925#include <tcl.h>
14926#if TCL_UTF_MAX != 6
14927# error "NOT UCS4_TCL"
14928#endif
14929int
14930main ()
14931{
14932
14933 ;
14934 return 0;
14935}
14936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014937if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014938
14939
Matthias Kloseb9621712010-04-24 17:59:49 +000014940$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014941
14942 have_ucs4_tcl=yes
14943
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14947$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014948
Skip Montanaro6dead952003-09-25 14:50:04 +000014949# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014950if test "$wchar_h" = yes
14951then
14952 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14954$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014955 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014957else
14958
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014960 ac_cv_wchar_t_signed=yes
14961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014963/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014964
14965 #include <wchar.h>
14966 int main()
14967 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014968 /* Success: exit code 0 */
14969 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014970 }
14971
14972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014973if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014974 ac_cv_wchar_t_signed=yes
14975else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014980fi
14981
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014982fi
14983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14985$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986fi
14987
Michael Osipov3738fad2018-08-24 18:17:19 +020014988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14989$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014990# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014991if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014992 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014993then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014996
Michael Osipov3738fad2018-08-24 18:17:19 +020014997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14998$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014999else
Michael Osipov3738fad2018-08-24 18:17:19 +020015000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015002fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015003
15004# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15006$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015007if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015009else
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 ac_cv_c_bigendian=unknown
15011 # See if we're dealing with a universal compiler.
15012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013/* end confdefs.h. */
15014#ifndef __APPLE_CC__
15015 not a universal capable compiler
15016 #endif
15017 typedef int dummy;
15018
Skip Montanaro6dead952003-09-25 14:50:04 +000015019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015020if ac_fn_c_try_compile "$LINENO"; then :
15021
15022 # Check for potential -arch flags. It is not universal unless
15023 # there are at least two -arch flags with different values.
15024 ac_arch=
15025 ac_prev=
15026 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15027 if test -n "$ac_prev"; then
15028 case $ac_word in
15029 i?86 | x86_64 | ppc | ppc64)
15030 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15031 ac_arch=$ac_word
15032 else
15033 ac_cv_c_bigendian=universal
15034 break
15035 fi
15036 ;;
15037 esac
15038 ac_prev=
15039 elif test "x$ac_word" = "x-arch"; then
15040 ac_prev=arch
15041 fi
15042 done
15043fi
15044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15045 if test $ac_cv_c_bigendian = unknown; then
15046 # See if sys/param.h defines the BYTE_ORDER macro.
15047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015048/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015051
Martin v. Löwis11437992002-04-12 09:54:03 +000015052int
15053main ()
15054{
Matthias Kloseb9621712010-04-24 17:59:49 +000015055#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15056 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15057 && LITTLE_ENDIAN)
15058 bogus endian macros
15059 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
15061 ;
15062 return 0;
15063}
15064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015065if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015066 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015068/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015069#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015075#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 not big endian
15077 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015078
15079 ;
15080 return 0;
15081}
15082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015083if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015084 ac_cv_c_bigendian=yes
15085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015089fi
15090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15091 fi
15092 if test $ac_cv_c_bigendian = unknown; then
15093 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015095/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015096#include <limits.h>
15097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098int
15099main ()
15100{
Matthias Kloseb9621712010-04-24 17:59:49 +000015101#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15102 bogus endian macros
15103 #endif
15104
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 ;
15106 return 0;
15107}
15108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015109if ac_fn_c_try_compile "$LINENO"; then :
15110 # It does; now see whether it defined to _BIG_ENDIAN or not.
15111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15112/* end confdefs.h. */
15113#include <limits.h>
15114
15115int
15116main ()
15117{
15118#ifndef _BIG_ENDIAN
15119 not big endian
15120 #endif
15121
15122 ;
15123 return 0;
15124}
15125_ACEOF
15126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15132fi
15133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15134 fi
15135 if test $ac_cv_c_bigendian = unknown; then
15136 # Compile a test program.
15137 if test "$cross_compiling" = yes; then :
15138 # Try to guess by grepping values from an object file.
15139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15140/* end confdefs.h. */
15141short int ascii_mm[] =
15142 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15143 short int ascii_ii[] =
15144 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15145 int use_ascii (int i) {
15146 return ascii_mm[i] + ascii_ii[i];
15147 }
15148 short int ebcdic_ii[] =
15149 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15150 short int ebcdic_mm[] =
15151 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15152 int use_ebcdic (int i) {
15153 return ebcdic_mm[i] + ebcdic_ii[i];
15154 }
15155 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156
Matthias Kloseb9621712010-04-24 17:59:49 +000015157int
15158main ()
15159{
15160return use_ascii (foo) == use_ebcdic (foo);
15161 ;
15162 return 0;
15163}
15164_ACEOF
15165if ac_fn_c_try_compile "$LINENO"; then :
15166 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15167 ac_cv_c_bigendian=yes
15168 fi
15169 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15170 if test "$ac_cv_c_bigendian" = unknown; then
15171 ac_cv_c_bigendian=no
15172 else
15173 # finding both strings is unlikely to happen, but who knows?
15174 ac_cv_c_bigendian=unknown
15175 fi
15176 fi
15177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015179else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015181/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015183int
15184main ()
15185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 /* Are we little or big endian? From Harbison&Steele. */
15188 union
15189 {
15190 long int l;
15191 char c[sizeof (long int)];
15192 } u;
15193 u.l = 1;
15194 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195
15196 ;
15197 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015198}
Martin v. Löwis11437992002-04-12 09:54:03 +000015199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015200if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015201 ac_cv_c_bigendian=no
15202else
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15212$as_echo "$ac_cv_c_bigendian" >&6; }
15213 case $ac_cv_c_bigendian in #(
15214 yes)
15215 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15216;; #(
15217 no)
15218 ;; #(
15219 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 ;; #(
15224 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015225 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015226 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015228
Michael W. Hudson54241132001-12-07 15:38:26 +000015229
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015230# ABI version string for Python extension modules. This appears between the
15231# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15232# from the following attributes which affect the ABI of this Python build (in
15233# this order):
15234#
15235# * The Python implementation (always 'cpython-' for us)
15236# * The major and minor version numbers
15237# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015238#
15239# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015240# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15241# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015242#
15243# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15244# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015245
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15247$as_echo_n "checking ABIFLAGS... " >&6; }
15248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15249$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15251$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015252SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15254$as_echo "$SOABI" >&6; }
15255
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015256# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15257if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015258 # Similar to SOABI but remove "d" flag from ABIFLAGS
15259
15260 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15261
15262cat >>confdefs.h <<_ACEOF
15263#define ALT_SOABI "${ALT_SOABI}"
15264_ACEOF
15265
15266fi
15267
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015268
15269case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015270 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015271 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15272 *)
15273 EXT_SUFFIX=${SHLIB_SUFFIX};;
15274esac
15275
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15277$as_echo_n "checking LDVERSION... " >&6; }
15278LDVERSION='$(VERSION)$(ABIFLAGS)'
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15280$as_echo "$LDVERSION" >&6; }
15281
E. M. Brayc994c8f2019-05-24 17:33:47 +020015282# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015283
E. M. Brayb1fc4172019-05-24 18:39:39 +020015284if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015285 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015286else
15287 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015288fi
15289
doko@python.org87421192013-01-26 11:39:31 +010015290
Victor Stinner8510f432020-03-10 09:53:09 +010015291# Check for --with-libdir-name
15292# /usr/$LIDIRNAME/python$VERSION
15293
15294PLATLIBDIR="lib"
15295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15296$as_echo_n "checking for --with-platlibdir... " >&6; }
15297
15298# Check whether --with-platlibdir was given.
15299if test "${with_platlibdir+set}" = set; then :
15300 withval=$with_platlibdir;
15301# ignore 3 options:
15302# --with-platlibdir
15303# --with-platlibdir=
15304# --without-platlibdir
15305if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15306then
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15308$as_echo "yes" >&6; }
15309 PLATLIBDIR="$withval"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015310else
Victor Stinner8510f432020-03-10 09:53:09 +010015311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15312$as_echo "no" >&6; }
15313fi
15314else
15315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15316$as_echo "no" >&6; }
15317fi
15318
15319
15320
15321
15322if test x$PLATFORM_TRIPLET = x; then
15323 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15324else
15325 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015326fi
doko@python.org87421192013-01-26 11:39:31 +010015327
15328
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015329# Check whether right shifting a negative integer extends the sign bit
15330# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15332$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015333if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015335else
Martin v. Löwis11437992002-04-12 09:54:03 +000015336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015338 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015339else
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015341/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015342
15343int main()
15344{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015345 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015346}
15347
Martin v. Löwis11437992002-04-12 09:54:03 +000015348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015349if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015350 ac_cv_rshift_extends_sign=yes
15351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015356fi
15357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358fi
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15361$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015362if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015363then
Martin v. Löwis11437992002-04-12 09:54:03 +000015364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015366
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015367fi
15368
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015369# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15371$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015372if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015374else
Martin v. Löwis11437992002-04-12 09:54:03 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015377/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015378#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015379int
15380main ()
15381{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015382
15383 FILE *f = fopen("/dev/null", "r");
15384 flockfile(f);
15385 getc_unlocked(f);
15386 funlockfile(f);
15387
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 ;
15389 return 0;
15390}
15391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015393 ac_cv_have_getc_unlocked=yes
15394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ac_cv_have_getc_unlocked=no
15396fi
15397rm -f core conftest.err conftest.$ac_objext \
15398 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400
Matthias Kloseb9621712010-04-24 17:59:49 +000015401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15402$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015403if test "$ac_cv_have_getc_unlocked" = yes
15404then
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
Matthias Kloseb9621712010-04-24 17:59:49 +000015406$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015407
15408fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015409
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015410# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015411# save the value of LIBS so we don't actually link Python with readline
15412LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015413
Gregory P. Smith18820942008-09-07 06:24:49 +000015414# On some systems we need to link readline to a termcap compatible
15415# library. NOTE: Keep the precedence of listed libraries synchronised
15416# with setup.py.
15417py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15419$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015420for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015421 if test -z "$py_libtermcap"; then
15422 READLINE_LIBS="-lreadline"
15423 else
15424 READLINE_LIBS="-lreadline -l$py_libtermcap"
15425 fi
15426 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015428/* end confdefs.h. */
15429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015430/* Override any GCC internal prototype to avoid an error.
15431 Use char because int might match the return type of a GCC
15432 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015433#ifdef __cplusplus
15434extern "C"
15435#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015436char readline ();
15437int
15438main ()
15439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015441 ;
15442 return 0;
15443}
15444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015445if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015446 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015448rm -f core conftest.err conftest.$ac_objext \
15449 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015450 if test $py_cv_lib_readline = yes; then
15451 break
15452 fi
15453done
15454# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15455#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015456if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15458$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15461$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015464
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015465fi
15466
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015467# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015469/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015470#include <readline/readline.h>
15471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015472if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015473 have_readline=yes
15474else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015475 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015476
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015477fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015478rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015479if test $have_readline = yes
15480then
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015482/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015483#include <readline/readline.h>
15484
15485_ACEOF
15486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015487 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015488
Matthias Kloseb9621712010-04-24 17:59:49 +000015489$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015490
15491fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015492rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015495/* end confdefs.h. */
15496#include <readline/readline.h>
15497
15498_ACEOF
15499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015500 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015503
15504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015505rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015506
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015507fi
15508
Martin v. Löwis0daad592001-09-30 21:09:59 +000015509# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15511$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015512if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015514else
Martin v. Löwis11437992002-04-12 09:54:03 +000015515 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015516LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520/* Override any GCC internal prototype to avoid an error.
15521 Use char because int might match the return type of a GCC
15522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015523#ifdef __cplusplus
15524extern "C"
15525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015526char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015527int
15528main ()
15529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015531 ;
15532 return 0;
15533}
15534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015540rm -f core conftest.err conftest.$ac_objext \
15541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015542LIBS=$ac_check_lib_save_LIBS
15543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15545$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015546if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015549
Martin v. Löwis0daad592001-09-30 21:09:59 +000015550fi
15551
Michael W. Hudson54241132001-12-07 15:38:26 +000015552
Thomas Wouters89d996e2007-09-08 17:39:28 +000015553# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15555$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015556if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015558else
15559 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015560LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015562/* end confdefs.h. */
15563
15564/* Override any GCC internal prototype to avoid an error.
15565 Use char because int might match the return type of a GCC
15566 builtin and then its argument prototype would still apply. */
15567#ifdef __cplusplus
15568extern "C"
15569#endif
15570char rl_completion_display_matches_hook ();
15571int
15572main ()
15573{
15574return rl_completion_display_matches_hook ();
15575 ;
15576 return 0;
15577}
15578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015579if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015580 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015584rm -f core conftest.err conftest.$ac_objext \
15585 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015586LIBS=$ac_check_lib_save_LIBS
15587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15589$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015590if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015593
15594fi
15595
15596
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015597# also in 4.0, but not in editline
15598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15599$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15600if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15601 $as_echo_n "(cached) " >&6
15602else
15603 ac_check_lib_save_LIBS=$LIBS
15604LIBS="-lreadline $READLINE_LIBS $LIBS"
15605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15606/* end confdefs.h. */
15607
15608/* Override any GCC internal prototype to avoid an error.
15609 Use char because int might match the return type of a GCC
15610 builtin and then its argument prototype would still apply. */
15611#ifdef __cplusplus
15612extern "C"
15613#endif
15614char rl_resize_terminal ();
15615int
15616main ()
15617{
15618return rl_resize_terminal ();
15619 ;
15620 return 0;
15621}
15622_ACEOF
15623if ac_fn_c_try_link "$LINENO"; then :
15624 ac_cv_lib_readline_rl_resize_terminal=yes
15625else
15626 ac_cv_lib_readline_rl_resize_terminal=no
15627fi
15628rm -f core conftest.err conftest.$ac_objext \
15629 conftest$ac_exeext conftest.$ac_ext
15630LIBS=$ac_check_lib_save_LIBS
15631fi
15632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15633$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15634if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15635
15636$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15637
15638fi
15639
15640
Martin v. Löwis0daad592001-09-30 21:09:59 +000015641# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15643$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015644if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015646else
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015648LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652/* Override any GCC internal prototype to avoid an error.
15653 Use char because int might match the return type of a GCC
15654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015655#ifdef __cplusplus
15656extern "C"
15657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015658char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015659int
15660main ()
15661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 ;
15664 return 0;
15665}
15666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015669else
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015672rm -f core conftest.err conftest.$ac_objext \
15673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015674LIBS=$ac_check_lib_save_LIBS
15675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15677$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015678if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015681
Guido van Rossum353ae582001-07-10 16:45:32 +000015682fi
15683
Jack Jansendd19cf82001-12-06 22:36:17 +000015684
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015685# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015687/* end confdefs.h. */
15688#include <readline/readline.h>
15689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015690if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015691 have_readline=yes
15692else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015693 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015694
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015695fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015696rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015697if test $have_readline = yes
15698then
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015700/* end confdefs.h. */
15701#include <readline/readline.h>
15702
15703_ACEOF
15704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015706
Matthias Kloseb9621712010-04-24 17:59:49 +000015707$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015708
15709fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015710rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015711
15712fi
15713
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15715$as_echo_n "checking for append_history in -lreadline... " >&6; }
15716if ${ac_cv_lib_readline_append_history+:} false; then :
15717 $as_echo_n "(cached) " >&6
15718else
15719 ac_check_lib_save_LIBS=$LIBS
15720LIBS="-lreadline $READLINE_LIBS $LIBS"
15721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15722/* end confdefs.h. */
15723
15724/* Override any GCC internal prototype to avoid an error.
15725 Use char because int might match the return type of a GCC
15726 builtin and then its argument prototype would still apply. */
15727#ifdef __cplusplus
15728extern "C"
15729#endif
15730char append_history ();
15731int
15732main ()
15733{
15734return append_history ();
15735 ;
15736 return 0;
15737}
15738_ACEOF
15739if ac_fn_c_try_link "$LINENO"; then :
15740 ac_cv_lib_readline_append_history=yes
15741else
15742 ac_cv_lib_readline_append_history=no
15743fi
15744rm -f core conftest.err conftest.$ac_objext \
15745 conftest$ac_exeext conftest.$ac_ext
15746LIBS=$ac_check_lib_save_LIBS
15747fi
15748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15749$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15750if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15751
15752$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15753
15754fi
15755
15756
Martin v. Löwis82bca632006-02-10 20:49:30 +000015757# End of readline checks: restore LIBS
15758LIBS=$LIBS_no_readline
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15761$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015762if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015764else
Martin v. Löwis11437992002-04-12 09:54:03 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015767 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015771
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015772#include <stdlib.h>
15773#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015774int main()
15775{
15776 int val1 = nice(1);
15777 if (val1 != -1 && val1 == nice(2))
15778 exit(0);
15779 exit(1);
15780}
15781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015783if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015784 ac_cv_broken_nice=yes
15785else
Matthias Kloseb9621712010-04-24 17:59:49 +000015786 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015790fi
15791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792fi
15793
Matthias Kloseb9621712010-04-24 17:59:49 +000015794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15795$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015796if test "$ac_cv_broken_nice" = yes
15797then
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015800
15801fi
15802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15804$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015805if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015807else
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015809 ac_cv_broken_poll=no
15810else
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015812/* end confdefs.h. */
15813
15814#include <poll.h>
15815
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015816int main()
15817{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015818 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015819 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015820
15821 close (42);
15822
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015823 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015824 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015825 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015826 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015827 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015828 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015829 return 1;
15830}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015831
15832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015833if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015834 ac_cv_broken_poll=yes
15835else
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015842fi
15843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15845$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015846if test "$ac_cv_broken_poll" = yes
15847then
15848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015850
15851fi
15852
Martin v. Löwis1d459062005-03-14 21:23:33 +000015853# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15855$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015856if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015858else
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015861 ac_cv_working_tzset=no
15862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015864/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015865
15866#include <stdlib.h>
15867#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015868#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015869
15870#if HAVE_TZNAME
15871extern char *tzname[];
15872#endif
15873
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015874int main()
15875{
Brett Cannon18367812003-09-19 00:59:16 +000015876 /* Note that we need to ensure that not only does tzset(3)
15877 do 'something' with localtime, but it works as documented
15878 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015879 This includes making sure that tzname is set properly if
15880 tm->tm_zone does not exist since it is the alternative way
15881 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015882
15883 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015884 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015885 */
15886
Martin v. Löwis1d459062005-03-14 21:23:33 +000015887 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015888 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15889
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015890 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015891 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015892 if (localtime(&groundhogday)->tm_hour != 0)
15893 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015894#if HAVE_TZNAME
15895 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15896 if (strcmp(tzname[0], "UTC") ||
15897 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15898 exit(1);
15899#endif
Brett Cannon18367812003-09-19 00:59:16 +000015900
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015901 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015902 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015903 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015904 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015905#if HAVE_TZNAME
15906 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15907 exit(1);
15908#endif
Brett Cannon18367812003-09-19 00:59:16 +000015909
15910 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15911 tzset();
15912 if (localtime(&groundhogday)->tm_hour != 11)
15913 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015914#if HAVE_TZNAME
15915 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15916 exit(1);
15917#endif
15918
15919#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015920 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15921 exit(1);
15922 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15923 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015924#endif
Brett Cannon18367812003-09-19 00:59:16 +000015925
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015926 exit(0);
15927}
15928
15929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015930if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015931 ac_cv_working_tzset=yes
15932else
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015937fi
15938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939fi
15940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15942$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015943if test "$ac_cv_working_tzset" = yes
15944then
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015947
15948fi
15949
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015950# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15952$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015953if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015955else
Matthias Kloseb9621712010-04-24 17:59:49 +000015956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015957/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015958#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015959int
15960main ()
15961{
15962
15963struct stat st;
15964st.st_mtim.tv_nsec = 1;
15965
15966 ;
15967 return 0;
15968}
15969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015971 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015972else
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15976fi
15977
Matthias Kloseb9621712010-04-24 17:59:49 +000015978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15979$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015980if test "$ac_cv_stat_tv_nsec" = yes
15981then
15982
Matthias Kloseb9621712010-04-24 17:59:49 +000015983$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015984
15985fi
15986
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015987# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15989$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015990if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015991 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015992else
Matthias Kloseb9621712010-04-24 17:59:49 +000015993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015994/* end confdefs.h. */
15995#include <sys/stat.h>
15996int
15997main ()
15998{
15999
16000struct stat st;
16001st.st_mtimespec.tv_nsec = 1;
16002
16003 ;
16004 return 0;
16005}
16006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016008 ac_cv_stat_tv_nsec2=yes
16009else
Matthias Kloseb9621712010-04-24 17:59:49 +000016010 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16013fi
16014
Matthias Kloseb9621712010-04-24 17:59:49 +000016015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16016$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016017if test "$ac_cv_stat_tv_nsec2" = yes
16018then
16019
Matthias Kloseb9621712010-04-24 17:59:49 +000016020$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016021
16022fi
16023
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016024# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016025ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016026if test "$cross_compiling" = no; then
16027 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16028fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016029
16030for ac_header in curses.h ncurses.h
16031do :
16032 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16033ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16034if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16035 cat >>confdefs.h <<_ACEOF
16036#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16037_ACEOF
16038
16039fi
16040
16041done
16042
16043
16044# On Solaris, term.h requires curses.h
16045for ac_header in term.h
16046do :
16047 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16048#ifdef HAVE_CURSES_H
16049#include <curses.h>
16050#endif
16051
16052"
16053if test "x$ac_cv_header_term_h" = xyes; then :
16054 cat >>confdefs.h <<_ACEOF
16055#define HAVE_TERM_H 1
16056_ACEOF
16057
16058fi
16059
16060done
16061
16062
Jack Jansen666b1e72001-10-31 12:11:48 +000016063# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16065$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016066if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016068else
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016070/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016071#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016072int
16073main ()
16074{
Jack Jansen666b1e72001-10-31 12:11:48 +000016075
16076 int rtn;
16077 rtn = mvwdelch(0,0,0);
16078
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ;
16080 return 0;
16081}
16082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016083if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016084 ac_cv_mvwdelch_is_expression=yes
16085else
Matthias Kloseb9621712010-04-24 17:59:49 +000016086 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16089fi
16090
Matthias Kloseb9621712010-04-24 17:59:49 +000016091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16092$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016093
16094if test "$ac_cv_mvwdelch_is_expression" = yes
16095then
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016098
16099fi
16100
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016101# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16102# structs since version 5.7. If the macro is defined as zero before including
16103# [n]curses.h, ncurses will expose fields of the structs regardless of the
16104# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16106$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016107if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016108 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016109else
Matthias Kloseb9621712010-04-24 17:59:49 +000016110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016111/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016112
16113 #define NCURSES_OPAQUE 0
16114 #include <curses.h>
16115
Martin v. Löwis11437992002-04-12 09:54:03 +000016116int
16117main ()
16118{
Jack Jansen666b1e72001-10-31 12:11:48 +000016119
16120 WINDOW *w;
16121 w->_flags = 0;
16122
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 ;
16124 return 0;
16125}
16126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016127if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016128 ac_cv_window_has_flags=yes
16129else
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16133fi
16134
Matthias Kloseb9621712010-04-24 17:59:49 +000016135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16136$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016137
Jack Jansen666b1e72001-10-31 12:11:48 +000016138
16139if test "$ac_cv_window_has_flags" = yes
16140then
Martin v. Löwis11437992002-04-12 09:54:03 +000016141
Matthias Kloseb9621712010-04-24 17:59:49 +000016142$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016143
16144fi
16145
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16147$as_echo_n "checking for is_pad... " >&6; }
16148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16149/* end confdefs.h. */
16150#include <curses.h>
16151int
16152main ()
16153{
16154
16155#ifndef is_pad
16156void *x=is_pad
16157#endif
16158
16159 ;
16160 return 0;
16161}
16162_ACEOF
16163if ac_fn_c_try_compile "$LINENO"; then :
16164
16165$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16166
16167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16168$as_echo "yes" >&6; }
16169else
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16171$as_echo "no" >&6; }
16172
16173fi
16174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16177$as_echo_n "checking for is_term_resized... " >&6; }
16178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016179/* end confdefs.h. */
16180#include <curses.h>
16181int
16182main ()
16183{
16184void *x=is_term_resized
16185 ;
16186 return 0;
16187}
16188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016190
Matthias Kloseb9621712010-04-24 17:59:49 +000016191$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016192
Matthias Kloseb159a552010-04-25 21:00:44 +000016193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016194$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016195else
Matthias Kloseb9621712010-04-24 17:59:49 +000016196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16197$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016198
16199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16203$as_echo_n "checking for resize_term... " >&6; }
16204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016205/* end confdefs.h. */
16206#include <curses.h>
16207int
16208main ()
16209{
16210void *x=resize_term
16211 ;
16212 return 0;
16213}
16214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016215if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016216
Matthias Kloseb9621712010-04-24 17:59:49 +000016217$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016218
Matthias Kloseb159a552010-04-25 21:00:44 +000016219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016220$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016221else
Matthias Kloseb9621712010-04-24 17:59:49 +000016222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16223$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016224
16225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16227
Matthias Kloseb9621712010-04-24 17:59:49 +000016228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16229$as_echo_n "checking for resizeterm... " >&6; }
16230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016231/* end confdefs.h. */
16232#include <curses.h>
16233int
16234main ()
16235{
16236void *x=resizeterm
16237 ;
16238 return 0;
16239}
16240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016241if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016242
Matthias Kloseb9621712010-04-24 17:59:49 +000016243$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016244
Matthias Kloseb159a552010-04-25 21:00:44 +000016245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016246$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016247else
Matthias Kloseb9621712010-04-24 17:59:49 +000016248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16249$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016250
16251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016253
16254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16255$as_echo_n "checking for immedok... " >&6; }
16256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257/* end confdefs.h. */
16258#include <curses.h>
16259int
16260main ()
16261{
16262
16263#ifndef immedok
16264void *x=immedok
16265#endif
16266
16267 ;
16268 return 0;
16269}
16270_ACEOF
16271if ac_fn_c_try_compile "$LINENO"; then :
16272
16273$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16274
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16276$as_echo "yes" >&6; }
16277else
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16279$as_echo "no" >&6; }
16280
16281fi
16282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16283
16284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16285$as_echo_n "checking for syncok... " >&6; }
16286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287/* end confdefs.h. */
16288#include <curses.h>
16289int
16290main ()
16291{
16292
16293#ifndef syncok
16294void *x=syncok
16295#endif
16296
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301if ac_fn_c_try_compile "$LINENO"; then :
16302
16303$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16304
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16306$as_echo "yes" >&6; }
16307else
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16309$as_echo "no" >&6; }
16310
16311fi
16312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16313
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16315$as_echo_n "checking for wchgat... " >&6; }
16316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16317/* end confdefs.h. */
16318#include <curses.h>
16319int
16320main ()
16321{
16322
16323#ifndef wchgat
16324void *x=wchgat
16325#endif
16326
16327 ;
16328 return 0;
16329}
16330_ACEOF
16331if ac_fn_c_try_compile "$LINENO"; then :
16332
16333$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16334
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16336$as_echo "yes" >&6; }
16337else
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16339$as_echo "no" >&6; }
16340
16341fi
16342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16343
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16345$as_echo_n "checking for filter... " >&6; }
16346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16347/* end confdefs.h. */
16348#include <curses.h>
16349int
16350main ()
16351{
16352
16353#ifndef filter
16354void *x=filter
16355#endif
16356
16357 ;
16358 return 0;
16359}
16360_ACEOF
16361if ac_fn_c_try_compile "$LINENO"; then :
16362
16363$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16364
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16366$as_echo "yes" >&6; }
16367else
16368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16369$as_echo "no" >&6; }
16370
16371fi
16372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16373
16374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16375$as_echo_n "checking for has_key... " >&6; }
16376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16377/* end confdefs.h. */
16378#include <curses.h>
16379int
16380main ()
16381{
16382
16383#ifndef has_key
16384void *x=has_key
16385#endif
16386
16387 ;
16388 return 0;
16389}
16390_ACEOF
16391if ac_fn_c_try_compile "$LINENO"; then :
16392
16393$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16394
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16396$as_echo "yes" >&6; }
16397else
16398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16399$as_echo "no" >&6; }
16400
16401fi
16402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16403
16404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16405$as_echo_n "checking for typeahead... " >&6; }
16406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16407/* end confdefs.h. */
16408#include <curses.h>
16409int
16410main ()
16411{
16412
16413#ifndef typeahead
16414void *x=typeahead
16415#endif
16416
16417 ;
16418 return 0;
16419}
16420_ACEOF
16421if ac_fn_c_try_compile "$LINENO"; then :
16422
16423$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16424
16425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16426$as_echo "yes" >&6; }
16427else
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16429$as_echo "no" >&6; }
16430
16431fi
16432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16433
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16435$as_echo_n "checking for use_env... " >&6; }
16436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437/* end confdefs.h. */
16438#include <curses.h>
16439int
16440main ()
16441{
16442
16443#ifndef use_env
16444void *x=use_env
16445#endif
16446
16447 ;
16448 return 0;
16449}
16450_ACEOF
16451if ac_fn_c_try_compile "$LINENO"; then :
16452
16453$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16454
16455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16456$as_echo "yes" >&6; }
16457else
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16459$as_echo "no" >&6; }
16460
16461fi
16462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016463# last curses configure check
16464CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016465
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16467$as_echo "$as_me: checking for device files" >&6;}
16468
16469if test "x$cross_compiling" = xyes; then
16470 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16472$as_echo_n "checking for /dev/ptmx... " >&6; }
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16474$as_echo "not set" >&6; }
16475 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16476 fi
16477 if test "${ac_cv_file__dev_ptc+set}" != set; then
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16479$as_echo_n "checking for /dev/ptc... " >&6; }
16480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16481$as_echo "not set" >&6; }
16482 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16483 fi
16484fi
16485
Matthias Kloseb9621712010-04-24 17:59:49 +000016486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16487$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016488if ${ac_cv_file__dev_ptmx+:} false; then :
16489 $as_echo_n "(cached) " >&6
16490else
16491 test "$cross_compiling" = yes &&
16492 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16493if test -r "/dev/ptmx"; then
16494 ac_cv_file__dev_ptmx=yes
16495else
16496 ac_cv_file__dev_ptmx=no
16497fi
16498fi
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16500$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16501if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016502
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016503fi
16504
16505if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016506
Matthias Kloseb9621712010-04-24 17:59:49 +000016507$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016508
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16511$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016512if ${ac_cv_file__dev_ptc+:} false; then :
16513 $as_echo_n "(cached) " >&6
16514else
16515 test "$cross_compiling" = yes &&
16516 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16517if test -r "/dev/ptc"; then
16518 ac_cv_file__dev_ptc=yes
16519else
16520 ac_cv_file__dev_ptc=no
16521fi
16522fi
16523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16524$as_echo "$ac_cv_file__dev_ptc" >&6; }
16525if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016526
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016527fi
16528
16529if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016530
Matthias Kloseb9621712010-04-24 17:59:49 +000016531$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016532
Neal Norwitz865400f2003-03-21 01:42:58 +000016533fi
16534
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016535if test $ac_sys_system = Darwin
16536then
16537 LIBS="$LIBS -framework CoreFoundation"
16538fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016539
Matthias Kloseb9621712010-04-24 17:59:49 +000016540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16541$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016542if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016543 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016544else
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016546 ac_cv_have_size_t_format="cross -- assuming yes"
16547
Thomas Wouters477c8d52006-05-27 19:21:47 +000016548else
Matthias Kloseb9621712010-04-24 17:59:49 +000016549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016550/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016551
Thomas Wouters477c8d52006-05-27 19:21:47 +000016552#include <stdio.h>
16553#include <stddef.h>
16554#include <string.h>
16555
Christian Heimes2c181612007-12-17 20:04:13 +000016556#ifdef HAVE_SYS_TYPES_H
16557#include <sys/types.h>
16558#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016559
16560#ifdef HAVE_SSIZE_T
16561typedef ssize_t Py_ssize_t;
16562#elif SIZEOF_VOID_P == SIZEOF_LONG
16563typedef long Py_ssize_t;
16564#else
16565typedef int Py_ssize_t;
16566#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016567
Christian Heimes2c181612007-12-17 20:04:13 +000016568int main()
16569{
16570 char buffer[256];
16571
Thomas Wouters477c8d52006-05-27 19:21:47 +000016572 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16573 return 1;
16574
Thomas Wouters89f507f2006-12-13 04:49:30 +000016575 if (strcmp(buffer, "123"))
16576 return 1;
16577
16578 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16579 return 1;
16580
16581 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016582 return 1;
16583
16584 return 0;
16585}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016586
Thomas Wouters477c8d52006-05-27 19:21:47 +000016587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016588if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016589 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016590else
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016595fi
16596
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16599$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016600if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016601
Matthias Kloseb9621712010-04-24 17:59:49 +000016602$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016603
16604fi
16605
Matthias Kloseb9621712010-04-24 17:59:49 +000016606ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016607#ifdef HAVE_SYS_TYPES_H
16608#include <sys/types.h>
16609#endif
16610#ifdef HAVE_SYS_SOCKET_H
16611#include <sys/socket.h>
16612#endif
16613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614"
Victor Stinnere0be4232011-10-25 13:06:09 +020016615if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016616
Martin v. Löwis11437992002-04-12 09:54:03 +000016617else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016618
Matthias Kloseb9621712010-04-24 17:59:49 +000016619$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016620
16621fi
16622
Michael W. Hudson54241132001-12-07 15:38:26 +000016623
Matthias Kloseb9621712010-04-24 17:59:49 +000016624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16625$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016626if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016627 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016628else
Matthias Kloseb9621712010-04-24 17:59:49 +000016629 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016630 ac_cv_broken_mbstowcs=no
16631else
Matthias Kloseb9621712010-04-24 17:59:49 +000016632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016633/* end confdefs.h. */
16634
Stefan Krah19c21392012-11-22 23:47:32 +010016635#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016636#include<stdlib.h>
16637int main() {
16638 size_t len = -1;
16639 const char *str = "text";
16640 len = mbstowcs(NULL, str, 0);
16641 return (len != 4);
16642}
16643
16644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016645if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016646 ac_cv_broken_mbstowcs=no
16647else
Matthias Kloseb9621712010-04-24 17:59:49 +000016648 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016652fi
16653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016654fi
16655
Matthias Kloseb9621712010-04-24 17:59:49 +000016656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16657$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016658if test "$ac_cv_broken_mbstowcs" = yes
16659then
16660
Matthias Kloseb9621712010-04-24 17:59:49 +000016661$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016662
16663fi
16664
Antoine Pitroub52ec782009-01-25 16:34:23 +000016665# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16667$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016668
16669# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016670if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016671 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016672if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016673then
16674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016676
Matthias Kloseb9621712010-04-24 17:59:49 +000016677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16678$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016679fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016680if test "$withval" = no
16681then
16682
16683$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16684
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016687fi
16688
Antoine Pitrou042b1282010-08-13 21:15:58 +000016689else
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16691$as_echo "no value specified" >&6; }
16692fi
16693
Antoine Pitroub52ec782009-01-25 16:34:23 +000016694
Matthias Kloseb17289e2012-03-15 19:51:34 +010016695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16696$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16697if ${ac_cv_computed_gotos+:} false; then :
16698 $as_echo_n "(cached) " >&6
16699else
16700 if test "$cross_compiling" = yes; then :
16701 if test "${with_computed_gotos+set}" = set; then
16702 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16703 else
16704 ac_cv_computed_gotos=no
16705 fi
16706else
16707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16708/* end confdefs.h. */
16709
16710int main(int argc, char **argv)
16711{
16712 static void *targets[1] = { &&LABEL1 };
16713 goto LABEL2;
16714LABEL1:
16715 return 0;
16716LABEL2:
16717 goto *targets[0];
16718 return 1;
16719}
16720
16721_ACEOF
16722if ac_fn_c_try_run "$LINENO"; then :
16723 ac_cv_computed_gotos=yes
16724else
16725 ac_cv_computed_gotos=no
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
16731fi
16732
16733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16734$as_echo "$ac_cv_computed_gotos" >&6; }
16735case "$ac_cv_computed_gotos" in yes*)
16736
16737$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16738
16739esac
16740
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016741case $ac_sys_system in
16742AIX*)
16743
16744$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16745 ;;
16746esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016747
Michael W. Hudson54241132001-12-07 15:38:26 +000016748
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016749
16750
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016751for h in `(cd $srcdir;echo Python/thread_*.h)`
16752do
16753 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16754done
16755
Michael W. Hudson54241132001-12-07 15:38:26 +000016756
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016757SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16759$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016760for dir in $SRCDIRS; do
16761 if test ! -d $dir; then
16762 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016763 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016764done
Matthias Kloseb9621712010-04-24 17:59:49 +000016765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16766$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016767
Stefan Krah1919b7e2012-03-21 18:25:23 +010016768# Availability of -O2:
16769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16770$as_echo_n "checking for -O2... " >&6; }
16771saved_cflags="$CFLAGS"
16772CFLAGS="-O2"
16773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774/* end confdefs.h. */
16775
16776int
16777main ()
16778{
16779
16780
16781 ;
16782 return 0;
16783}
16784_ACEOF
16785if ac_fn_c_try_compile "$LINENO"; then :
16786 have_O2=yes
16787else
16788 have_O2=no
16789fi
16790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16792$as_echo "$have_O2" >&6; }
16793CFLAGS="$saved_cflags"
16794
16795# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16796# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16798$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16799saved_cflags="$CFLAGS"
16800CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16801if test "$have_O2" = no; then
16802 CFLAGS=""
16803fi
16804if test "$cross_compiling" = yes; then :
16805 have_glibc_memmove_bug=undefined
16806else
16807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16808/* end confdefs.h. */
16809
16810#include <stdio.h>
16811#include <stdlib.h>
16812#include <string.h>
16813void foo(void *p, void *q) { memmove(p, q, 19); }
16814int main() {
16815 char a[32] = "123456789000000000";
16816 foo(&a[9], a);
16817 if (strcmp(a, "123456789123456789000000000") != 0)
16818 return 1;
16819 foo(a, &a[9]);
16820 if (strcmp(a, "123456789000000000") != 0)
16821 return 1;
16822 return 0;
16823}
16824
16825_ACEOF
16826if ac_fn_c_try_run "$LINENO"; then :
16827 have_glibc_memmove_bug=no
16828else
16829 have_glibc_memmove_bug=yes
16830fi
16831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16832 conftest.$ac_objext conftest.beam conftest.$ac_ext
16833fi
16834
16835CFLAGS="$saved_cflags"
16836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16837$as_echo "$have_glibc_memmove_bug" >&6; }
16838if test "$have_glibc_memmove_bug" = yes; then
16839
16840$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16841
16842fi
16843
16844if test "$have_gcc_asm_for_x87" = yes; then
16845 # Some versions of gcc miscompile inline asm:
16846 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16847 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16848 case $CC in
16849 *gcc*)
16850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16851$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16852 saved_cflags="$CFLAGS"
16853 CFLAGS="-O2"
16854 if test "$cross_compiling" = yes; then :
16855 have_ipa_pure_const_bug=undefined
16856else
16857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16858/* end confdefs.h. */
16859
16860 __attribute__((noinline)) int
16861 foo(int *p) {
16862 int r;
16863 asm ( "movl \$6, (%1)\n\t"
16864 "xorl %0, %0\n\t"
16865 : "=r" (r) : "r" (p) : "memory"
16866 );
16867 return r;
16868 }
16869 int main() {
16870 int p = 8;
16871 if ((foo(&p) ? : p) != 6)
16872 return 1;
16873 return 0;
16874 }
16875
16876_ACEOF
16877if ac_fn_c_try_run "$LINENO"; then :
16878 have_ipa_pure_const_bug=no
16879else
16880 have_ipa_pure_const_bug=yes
16881fi
16882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16883 conftest.$ac_objext conftest.beam conftest.$ac_ext
16884fi
16885
16886 CFLAGS="$saved_cflags"
16887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16888$as_echo "$have_ipa_pure_const_bug" >&6; }
16889 if test "$have_ipa_pure_const_bug" = yes; then
16890
16891$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16892
16893 fi
16894 ;;
16895 esac
16896fi
16897
Victor Stinner4f5366e2015-01-09 02:13:19 +010016898# Check for stdatomic.h
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16900$as_echo_n "checking for stdatomic.h... " >&6; }
16901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16902/* end confdefs.h. */
16903
16904
16905 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016906 atomic_int int_var;
16907 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016908 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016909 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16910 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16911 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016912 return 0;
16913 }
16914
16915
16916_ACEOF
16917if ac_fn_c_try_link "$LINENO"; then :
16918 have_stdatomic_h=yes
16919else
16920 have_stdatomic_h=no
16921fi
16922rm -f core conftest.err conftest.$ac_objext \
16923 conftest$ac_exeext conftest.$ac_ext
16924
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16926$as_echo "$have_stdatomic_h" >&6; }
16927
16928if test "$have_stdatomic_h" = yes; then
16929
16930$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16931
16932fi
16933
16934# Check for GCC >= 4.7 __atomic builtins
16935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16936$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16938/* end confdefs.h. */
16939
16940
16941 volatile int val = 1;
16942 int main() {
16943 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16944 return 0;
16945 }
16946
16947
16948_ACEOF
16949if ac_fn_c_try_link "$LINENO"; then :
16950 have_builtin_atomic=yes
16951else
16952 have_builtin_atomic=no
16953fi
16954rm -f core conftest.err conftest.$ac_objext \
16955 conftest$ac_exeext conftest.$ac_ext
16956
16957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16958$as_echo "$have_builtin_atomic" >&6; }
16959
16960if test "$have_builtin_atomic" = yes; then
16961
16962$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16963
16964fi
16965
Ned Deily322f5ba2013-11-21 23:01:59 -080016966# ensurepip option
16967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16968$as_echo_n "checking for ensurepip... " >&6; }
16969
16970# Check whether --with-ensurepip was given.
16971if test "${with_ensurepip+set}" = set; then :
16972 withval=$with_ensurepip;
16973else
16974 with_ensurepip=upgrade
16975fi
16976
16977case $with_ensurepip in #(
16978 yes|upgrade) :
16979 ENSUREPIP=upgrade ;; #(
16980 install) :
16981 ENSUREPIP=install ;; #(
16982 no) :
16983 ENSUREPIP=no ;; #(
16984 *) :
16985 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16986esac
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16988$as_echo "$ENSUREPIP" >&6; }
16989
16990
Victor Stinner35a97c02015-03-08 02:59:09 +010016991# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16993$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16995/* end confdefs.h. */
16996
16997
16998 #include <dirent.h>
16999
17000 int main() {
17001 struct dirent entry;
17002 return entry.d_type == DT_UNKNOWN;
17003 }
17004
17005
17006_ACEOF
17007if ac_fn_c_try_link "$LINENO"; then :
17008 have_dirent_d_type=yes
17009else
17010 have_dirent_d_type=no
17011fi
17012rm -f core conftest.err conftest.$ac_objext \
17013 conftest$ac_exeext conftest.$ac_ext
17014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17015$as_echo "$have_dirent_d_type" >&6; }
17016
17017if test "$have_dirent_d_type" = yes; then
17018
17019$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17020
17021fi
17022
Victor Stinner9eb57c52015-03-19 22:21:49 +010017023# check if the Linux getrandom() syscall is available
17024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17025$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17027/* end confdefs.h. */
17028
17029
Victor Stinner1b80b242016-04-12 22:34:58 +020017030 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017031 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017032 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017033
17034 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017035 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017036 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017037 const int flags = GRND_NONBLOCK;
17038 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017039 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017040 return 0;
17041 }
17042
17043
17044_ACEOF
17045if ac_fn_c_try_link "$LINENO"; then :
17046 have_getrandom_syscall=yes
17047else
17048 have_getrandom_syscall=no
17049fi
17050rm -f core conftest.err conftest.$ac_objext \
17051 conftest$ac_exeext conftest.$ac_ext
17052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17053$as_echo "$have_getrandom_syscall" >&6; }
17054
17055if test "$have_getrandom_syscall" = yes; then
17056
17057$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17058
17059fi
17060
Victor Stinner3abf44e2015-09-18 15:38:37 +020017061# check if the getrandom() function is available
17062# the test was written for the Solaris function of <sys/random.h>
17063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17064$as_echo_n "checking for the getrandom() function... " >&6; }
17065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17066/* end confdefs.h. */
17067
17068
17069 #include <sys/random.h>
17070
17071 int main() {
17072 char buffer[1];
17073 const size_t buflen = sizeof(buffer);
17074 const int flags = 0;
17075 /* ignore the result, Python checks for ENOSYS at runtime */
17076 (void)getrandom(buffer, buflen, flags);
17077 return 0;
17078 }
17079
17080
17081_ACEOF
17082if ac_fn_c_try_link "$LINENO"; then :
17083 have_getrandom=yes
17084else
17085 have_getrandom=no
17086fi
17087rm -f core conftest.err conftest.$ac_objext \
17088 conftest$ac_exeext conftest.$ac_ext
17089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17090$as_echo "$have_getrandom" >&6; }
17091
17092if test "$have_getrandom" = yes; then
17093
17094$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17095
17096fi
17097
Neil Schemenauer5741c452019-02-08 10:48:46 -080017098# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17099# shm_* may only be available if linking against librt
17100save_LIBS="$LIBS"
17101save_includes_default="$ac_includes_default"
17102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17103$as_echo_n "checking for library containing shm_open... " >&6; }
17104if ${ac_cv_search_shm_open+:} false; then :
17105 $as_echo_n "(cached) " >&6
17106else
17107 ac_func_search_save_LIBS=$LIBS
17108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17109/* end confdefs.h. */
17110
17111/* Override any GCC internal prototype to avoid an error.
17112 Use char because int might match the return type of a GCC
17113 builtin and then its argument prototype would still apply. */
17114#ifdef __cplusplus
17115extern "C"
17116#endif
17117char shm_open ();
17118int
17119main ()
17120{
17121return shm_open ();
17122 ;
17123 return 0;
17124}
17125_ACEOF
17126for ac_lib in '' rt; do
17127 if test -z "$ac_lib"; then
17128 ac_res="none required"
17129 else
17130 ac_res=-l$ac_lib
17131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17132 fi
17133 if ac_fn_c_try_link "$LINENO"; then :
17134 ac_cv_search_shm_open=$ac_res
17135fi
17136rm -f core conftest.err conftest.$ac_objext \
17137 conftest$ac_exeext
17138 if ${ac_cv_search_shm_open+:} false; then :
17139 break
17140fi
17141done
17142if ${ac_cv_search_shm_open+:} false; then :
17143
17144else
17145 ac_cv_search_shm_open=no
17146fi
17147rm conftest.$ac_ext
17148LIBS=$ac_func_search_save_LIBS
17149fi
17150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17151$as_echo "$ac_cv_search_shm_open" >&6; }
17152ac_res=$ac_cv_search_shm_open
17153if test "$ac_res" != no; then :
17154 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17155
17156fi
17157
17158if test "$ac_cv_search_shm_open" = "-lrt"; then
17159
17160$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17161
17162fi
17163for ac_header in sys/mman.h
17164do :
17165 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17166if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17167 cat >>confdefs.h <<_ACEOF
17168#define HAVE_SYS_MMAN_H 1
17169_ACEOF
17170
17171fi
17172
17173done
17174
17175# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17176ac_includes_default="\
17177${ac_includes_default}
17178#ifndef __cplusplus
17179# ifdef HAVE_SYS_MMAN_H
17180# include <sys/mman.h>
17181# endif
17182#endif
17183"
17184for ac_func in shm_open shm_unlink
17185do :
17186 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17187ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17188if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17189 cat >>confdefs.h <<_ACEOF
17190#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17191_ACEOF
17192
17193fi
17194done
17195
17196# we don't want to link with librt always, restore LIBS
17197LIBS="$save_LIBS"
17198ac_includes_default="$save_includes_default"
17199
Christian Heimesff5be6e2018-01-20 13:19:21 +010017200# Check for usable OpenSSL
17201
17202 found=false
17203
17204# Check whether --with-openssl was given.
17205if test "${with_openssl+set}" = set; then :
17206 withval=$with_openssl;
17207 case "$withval" in
17208 "" | y | ye | yes | n | no)
17209 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17210 ;;
17211 *) ssldirs="$withval"
17212 ;;
17213 esac
17214
17215else
17216
17217 # if pkg-config is installed and openssl has installed a .pc file,
17218 # then use that information and don't search ssldirs
17219 if test -n "$ac_tool_prefix"; then
17220 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17221set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17223$as_echo_n "checking for $ac_word... " >&6; }
17224if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17225 $as_echo_n "(cached) " >&6
17226else
17227 if test -n "$PKG_CONFIG"; then
17228 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17229else
17230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17231for as_dir in $PATH
17232do
17233 IFS=$as_save_IFS
17234 test -z "$as_dir" && as_dir=.
17235 for ac_exec_ext in '' $ac_executable_extensions; do
17236 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17237 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17238 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17239 break 2
17240 fi
17241done
17242 done
17243IFS=$as_save_IFS
17244
17245fi
17246fi
17247PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17248if test -n "$PKG_CONFIG"; then
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17250$as_echo "$PKG_CONFIG" >&6; }
17251else
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17253$as_echo "no" >&6; }
17254fi
17255
17256
17257fi
17258if test -z "$ac_cv_prog_PKG_CONFIG"; then
17259 ac_ct_PKG_CONFIG=$PKG_CONFIG
17260 # Extract the first word of "pkg-config", so it can be a program name with args.
17261set dummy pkg-config; ac_word=$2
17262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17263$as_echo_n "checking for $ac_word... " >&6; }
17264if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17265 $as_echo_n "(cached) " >&6
17266else
17267 if test -n "$ac_ct_PKG_CONFIG"; then
17268 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17269else
17270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17271for as_dir in $PATH
17272do
17273 IFS=$as_save_IFS
17274 test -z "$as_dir" && as_dir=.
17275 for ac_exec_ext in '' $ac_executable_extensions; do
17276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17277 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17279 break 2
17280 fi
17281done
17282 done
17283IFS=$as_save_IFS
17284
17285fi
17286fi
17287ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17288if test -n "$ac_ct_PKG_CONFIG"; then
17289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17290$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17291else
17292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17293$as_echo "no" >&6; }
17294fi
17295
17296 if test "x$ac_ct_PKG_CONFIG" = x; then
17297 PKG_CONFIG=""
17298 else
17299 case $cross_compiling:$ac_tool_warned in
17300yes:)
17301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17303ac_tool_warned=yes ;;
17304esac
17305 PKG_CONFIG=$ac_ct_PKG_CONFIG
17306 fi
17307else
17308 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17309fi
17310
17311 if test x"$PKG_CONFIG" != x""; then
17312 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17313 if test $? = 0; then
17314 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17315 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17316 found=true
17317 fi
17318 fi
17319
17320 # no such luck; use some default ssldirs
17321 if ! $found; then
17322 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17323 fi
17324
17325
17326fi
17327
17328
17329
17330 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17331 # an 'openssl' subdirectory
17332
17333 if ! $found; then
17334 OPENSSL_INCLUDES=
17335 for ssldir in $ssldirs; do
17336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17337$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17338 if test -f "$ssldir/include/openssl/ssl.h"; then
17339 OPENSSL_INCLUDES="-I$ssldir/include"
17340 OPENSSL_LDFLAGS="-L$ssldir/lib"
17341 OPENSSL_LIBS="-lssl -lcrypto"
17342 found=true
17343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17344$as_echo "yes" >&6; }
17345 break
17346 else
17347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349 fi
17350 done
17351
17352 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17353 # it will just work!
17354 fi
17355
17356 # try the preprocessor and linker with our new flags,
17357 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17358
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17360$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17361 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17362 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17363
17364 save_LIBS="$LIBS"
17365 save_LDFLAGS="$LDFLAGS"
17366 save_CPPFLAGS="$CPPFLAGS"
17367 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17368 LIBS="$OPENSSL_LIBS $LIBS"
17369 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17371/* end confdefs.h. */
17372#include <openssl/ssl.h>
17373int
17374main ()
17375{
17376SSL_new(NULL)
17377 ;
17378 return 0;
17379}
17380_ACEOF
17381if ac_fn_c_try_link "$LINENO"; then :
17382
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17384$as_echo "yes" >&6; }
17385 have_openssl=yes
17386
17387else
17388
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17390$as_echo "no" >&6; }
17391 have_openssl=no
17392
17393fi
17394rm -f core conftest.err conftest.$ac_objext \
17395 conftest$ac_exeext conftest.$ac_ext
17396 CPPFLAGS="$save_CPPFLAGS"
17397 LDFLAGS="$save_LDFLAGS"
17398 LIBS="$save_LIBS"
17399
17400
17401
17402
17403
17404
17405if test "$have_openssl" = yes; then
17406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17407$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17408
17409 save_LIBS="$LIBS"
17410 save_LDFLAGS="$LDFLAGS"
17411 save_CPPFLAGS="$CPPFLAGS"
17412 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17413 LIBS="$OPENSSL_LIBS $LIBS"
17414 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17415
17416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17417/* end confdefs.h. */
17418
17419 #include <openssl/x509_vfy.h>
17420
17421int
17422main ()
17423{
17424
17425 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17426 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17427 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17428 X509_VERIFY_PARAM_set_hostflags(p, 0);
17429
17430 ;
17431 return 0;
17432}
17433
17434_ACEOF
17435if ac_fn_c_try_link "$LINENO"; then :
17436
17437 ac_cv_has_x509_verify_param_set1_host=yes
17438
17439else
17440
17441 ac_cv_has_x509_verify_param_set1_host=no
17442
17443fi
17444rm -f core conftest.err conftest.$ac_objext \
17445 conftest$ac_exeext conftest.$ac_ext
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17447$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17448 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17449
17450$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17451
17452 fi
17453
17454 CPPFLAGS="$save_CPPFLAGS"
17455 LDFLAGS="$save_LDFLAGS"
17456 LIBS="$save_LIBS"
17457fi
17458
Christian Heimes892d66e2018-01-29 14:10:18 +010017459# ssl module default cipher suite string
17460
17461
17462
17463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17464$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17465
17466# Check whether --with-ssl-default-suites was given.
17467if test "${with_ssl_default_suites+set}" = set; then :
17468 withval=$with_ssl_default_suites;
17469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17470$as_echo "$withval" >&6; }
17471case "$withval" in
17472 python)
17473 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17474
17475 ;;
17476 openssl)
17477 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17478
17479 ;;
17480 *)
17481 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17482
17483 cat >>confdefs.h <<_ACEOF
17484#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17485_ACEOF
17486
17487 ;;
17488esac
17489
17490else
17491
17492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17493$as_echo "python" >&6; }
17494$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17495
17496
17497fi
17498
17499
Christian Heimes9b60e552020-05-15 23:54:53 +020017500# builtin hash modules
17501default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17502
17503$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17504
17505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17506$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17507
17508# Check whether --with-builtin-hashlib-hashes was given.
17509if test "${with_builtin_hashlib_hashes+set}" = set; then :
17510 withval=$with_builtin_hashlib_hashes;
17511case "$withval" in
17512 yes)
17513 withval=$default_hashlib_hashes
17514 ;;
17515 no)
17516 withval=""
17517 ;;
17518esac
17519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17520$as_echo "$withval" >&6; }
17521cat >>confdefs.h <<_ACEOF
17522#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17523_ACEOF
17524
17525
17526else
17527
17528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17529$as_echo "$default_hashlib_hashes" >&6; };
17530cat >>confdefs.h <<_ACEOF
17531#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17532_ACEOF
17533
17534
17535fi
17536
17537
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017538# --with-experimental-isolated-subinterpreters
17539
17540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17541$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17542
17543# Check whether --with-experimental-isolated-subinterpreters was given.
17544if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17545 withval=$with_experimental_isolated_subinterpreters;
17546if test "$withval" != no
17547then
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17549$as_echo "yes" >&6; };
17550 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17551
17552else
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17554$as_echo "no" >&6; };
17555fi
17556else
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17558$as_echo "no" >&6; }
17559fi
17560
17561
Christian Heimes892d66e2018-01-29 14:10:18 +010017562
Guido van Rossum627b2d71993-12-24 10:39:16 +000017563# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017564ac_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 +000017565
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017566ac_config_files="$ac_config_files Modules/ld_so_aix"
17567
Martin v. Löwis11437992002-04-12 09:54:03 +000017568cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017569# This file is a shell script that caches the results of configure
17570# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017571# scripts and configure runs, see configure's option --config-cache.
17572# It is not useful on other systems. If it contains results you don't
17573# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017574#
Martin v. Löwis11437992002-04-12 09:54:03 +000017575# config.status only pays attention to the cache file if you give it
17576# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017577#
Skip Montanaro6dead952003-09-25 14:50:04 +000017578# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017579# loading this file, other *unset* `ac_cv_foo' will be assigned the
17580# following values.
17581
17582_ACEOF
17583
Guido van Rossumf78abae1997-01-21 22:02:36 +000017584# The following way of writing the cache mishandles newlines in values,
17585# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017587# Ultrix sh set writes to stderr and can't be redirected directly,
17588# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589(
17590 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17591 eval ac_val=\$$ac_var
17592 case $ac_val in #(
17593 *${as_nl}*)
17594 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017595 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17596$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597 esac
17598 case $ac_var in #(
17599 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017600 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17601 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 esac ;;
17603 esac
17604 done
17605
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17608 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017609 # `set' does not quote correctly, so add quotes: double-quote
17610 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017611 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017612 "s/'/'\\\\''/g;
17613 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017615 *)
17616 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 esac |
17620 sort
17621) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017624 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17627 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17629 :end' >>confcache
17630if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17631 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017632 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17634$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017635 if test ! -f "$cache_file" || test -h "$cache_file"; then
17636 cat confcache >"$cache_file"
17637 else
17638 case $cache_file in #(
17639 */* | ?:*)
17640 mv -f confcache "$cache_file"$$ &&
17641 mv -f "$cache_file"$$ "$cache_file" ;; #(
17642 *)
17643 mv -f confcache "$cache_file" ;;
17644 esac
17645 fi
17646 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017647 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017648 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17649$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017650 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017651fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017652rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017653
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017654test "x$prefix" = xNONE && prefix=$ac_default_prefix
17655# Let make expand exec_prefix.
17656test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017658DEFS=-DHAVE_CONFIG_H
17659
Skip Montanaro6dead952003-09-25 14:50:04 +000017660ac_libobjs=
17661ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017662U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017663for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17664 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17668 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017669 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17670 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017671done
17672LIBOBJS=$ac_libobjs
17673
17674LTLIBOBJS=$ac_ltlibobjs
17675
17676
Martin v. Löwis11437992002-04-12 09:54:03 +000017677
Matthias Kloseb9621712010-04-24 17:59:49 +000017678
Victor Stinnere0be4232011-10-25 13:06:09 +020017679: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017680ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017681ac_clean_files_save=$ac_clean_files
17682ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017683{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17684$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17685as_write_fail=0
17686cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017687#! $SHELL
17688# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017689# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017690# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017691# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017692
Martin v. Löwis11437992002-04-12 09:54:03 +000017693debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017694ac_cs_recheck=false
17695ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017696
Matthias Kloseb9621712010-04-24 17:59:49 +000017697SHELL=\${CONFIG_SHELL-$SHELL}
17698export SHELL
17699_ASEOF
17700cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17701## -------------------- ##
17702## M4sh Initialization. ##
17703## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017705# Be more Bourne compatible
17706DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017707if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 emulate sh
17709 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017710 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017711 # is contrary to our usage. Disable this feature.
17712 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017714else
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 case `(set -o) 2>/dev/null` in #(
17716 *posix*) :
17717 set -o posix ;; #(
17718 *) :
17719 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017721fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017722
17723
Matthias Kloseb9621712010-04-24 17:59:49 +000017724as_nl='
17725'
17726export as_nl
17727# Printing a long string crashes Solaris 7 /usr/bin/printf.
17728as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17729as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17730as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17731# Prefer a ksh shell builtin over an external printf program on Solaris,
17732# but without wasting forks for bash or zsh.
17733if test -z "$BASH_VERSION$ZSH_VERSION" \
17734 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17735 as_echo='print -r --'
17736 as_echo_n='print -rn --'
17737elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17738 as_echo='printf %s\n'
17739 as_echo_n='printf %s'
17740else
17741 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17742 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17743 as_echo_n='/usr/ucb/echo -n'
17744 else
17745 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17746 as_echo_n_body='eval
17747 arg=$1;
17748 case $arg in #(
17749 *"$as_nl"*)
17750 expr "X$arg" : "X\\(.*\\)$as_nl";
17751 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17752 esac;
17753 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17754 '
17755 export as_echo_n_body
17756 as_echo_n='sh -c $as_echo_n_body as_echo'
17757 fi
17758 export as_echo_body
17759 as_echo='sh -c $as_echo_body as_echo'
17760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017761
17762# The user is always right.
17763if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017764 PATH_SEPARATOR=:
17765 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17766 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17767 PATH_SEPARATOR=';'
17768 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771
17772# IFS
17773# We need space, tab and new line, in precisely that order. Quoting is
17774# there to prevent editors from complaining about space-tab.
17775# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17776# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777IFS=" "" $as_nl"
17778
17779# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017780as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017781case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782 *[\\/]* ) as_myself=$0 ;;
17783 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017784for as_dir in $PATH
17785do
17786 IFS=$as_save_IFS
17787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017788 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 ;;
17793esac
17794# We did not find ourselves, most probably we were run as `sh COMMAND'
17795# in which case we are not to be found in the path.
17796if test "x$as_myself" = x; then
17797 as_myself=$0
17798fi
17799if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017800 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17801 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802fi
17803
Matthias Kloseb9621712010-04-24 17:59:49 +000017804# Unset variables that we do not need and which cause bugs (e.g. in
17805# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17806# suppresses any "Segmentation fault" message there. '((' could
17807# trigger a bug in pdksh 5.2.14.
17808for as_var in BASH_ENV ENV MAIL MAILPATH
17809do eval test x\${$as_var+set} = xset \
17810 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811done
17812PS1='$ '
17813PS2='> '
17814PS4='+ '
17815
17816# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017817LC_ALL=C
17818export LC_ALL
17819LANGUAGE=C
17820export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821
Matthias Kloseb9621712010-04-24 17:59:49 +000017822# CDPATH.
17823(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17824
17825
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017826# as_fn_error STATUS ERROR [LINENO LOG_FD]
17827# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017828# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17829# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017830# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017831as_fn_error ()
17832{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017833 as_status=$1; test $as_status -eq 0 && as_status=1
17834 if test "$4"; then
17835 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17836 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017837 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017838 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017839 as_fn_exit $as_status
17840} # as_fn_error
17841
17842
17843# as_fn_set_status STATUS
17844# -----------------------
17845# Set $? to STATUS, without forking.
17846as_fn_set_status ()
17847{
17848 return $1
17849} # as_fn_set_status
17850
17851# as_fn_exit STATUS
17852# -----------------
17853# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17854as_fn_exit ()
17855{
17856 set +e
17857 as_fn_set_status $1
17858 exit $1
17859} # as_fn_exit
17860
17861# as_fn_unset VAR
17862# ---------------
17863# Portably unset VAR.
17864as_fn_unset ()
17865{
17866 { eval $1=; unset $1;}
17867}
17868as_unset=as_fn_unset
17869# as_fn_append VAR VALUE
17870# ----------------------
17871# Append the text in VALUE to the end of the definition contained in VAR. Take
17872# advantage of any shell optimizations that allow amortized linear growth over
17873# repeated appends, instead of the typical quadratic growth present in naive
17874# implementations.
17875if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17876 eval 'as_fn_append ()
17877 {
17878 eval $1+=\$2
17879 }'
17880else
17881 as_fn_append ()
17882 {
17883 eval $1=\$$1\$2
17884 }
17885fi # as_fn_append
17886
17887# as_fn_arith ARG...
17888# ------------------
17889# Perform arithmetic evaluation on the ARGs, and store the result in the
17890# global $as_val. Take advantage of shells that can avoid forks. The arguments
17891# must be portable across $(()) and expr.
17892if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17893 eval 'as_fn_arith ()
17894 {
17895 as_val=$(( $* ))
17896 }'
17897else
17898 as_fn_arith ()
17899 {
17900 as_val=`expr "$@" || test $? -eq 1`
17901 }
17902fi # as_fn_arith
17903
17904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905if expr a : '\(a\)' >/dev/null 2>&1 &&
17906 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17907 as_expr=expr
17908else
17909 as_expr=false
17910fi
17911
17912if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17913 as_basename=basename
17914else
17915 as_basename=false
17916fi
17917
Matthias Kloseb9621712010-04-24 17:59:49 +000017918if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17919 as_dirname=dirname
17920else
17921 as_dirname=false
17922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924as_me=`$as_basename -- "$0" ||
17925$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17926 X"$0" : 'X\(//\)$' \| \
17927 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017928$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929 sed '/^.*\/\([^/][^/]*\)\/*$/{
17930 s//\1/
17931 q
17932 }
17933 /^X\/\(\/\/\)$/{
17934 s//\1/
17935 q
17936 }
17937 /^X\/\(\/\).*/{
17938 s//\1/
17939 q
17940 }
17941 s/.*/./; q'`
17942
Matthias Kloseb9621712010-04-24 17:59:49 +000017943# Avoid depending upon Character Ranges.
17944as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17945as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17946as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17947as_cr_digits='0123456789'
17948as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949
17950ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017951case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017955 xy) ECHO_C='\c';;
17956 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17957 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 esac;;
17959*)
17960 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017961esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017962
Martin v. Löwis11437992002-04-12 09:54:03 +000017963rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017964if test -d conf$$.dir; then
17965 rm -f conf$$.dir/conf$$.file
17966else
17967 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017968 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017970if (echo >conf$$.file) 2>/dev/null; then
17971 if ln -s conf$$.file conf$$ 2>/dev/null; then
17972 as_ln_s='ln -s'
17973 # ... but there are two gotchas:
17974 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17975 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017976 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017977 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017978 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017979 elif ln conf$$.file conf$$ 2>/dev/null; then
17980 as_ln_s=ln
17981 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017982 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017983 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017984else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017985 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17988rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017989
Matthias Kloseb9621712010-04-24 17:59:49 +000017990
17991# as_fn_mkdir_p
17992# -------------
17993# Create "$as_dir" as a directory, including parents if necessary.
17994as_fn_mkdir_p ()
17995{
17996
17997 case $as_dir in #(
17998 -*) as_dir=./$as_dir;;
17999 esac
18000 test -d "$as_dir" || eval $as_mkdir_p || {
18001 as_dirs=
18002 while :; do
18003 case $as_dir in #(
18004 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18005 *) as_qdir=$as_dir;;
18006 esac
18007 as_dirs="'$as_qdir' $as_dirs"
18008 as_dir=`$as_dirname -- "$as_dir" ||
18009$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18010 X"$as_dir" : 'X\(//\)[^/]' \| \
18011 X"$as_dir" : 'X\(//\)$' \| \
18012 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18013$as_echo X"$as_dir" |
18014 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18015 s//\1/
18016 q
18017 }
18018 /^X\(\/\/\)[^/].*/{
18019 s//\1/
18020 q
18021 }
18022 /^X\(\/\/\)$/{
18023 s//\1/
18024 q
18025 }
18026 /^X\(\/\).*/{
18027 s//\1/
18028 q
18029 }
18030 s/.*/./; q'`
18031 test -d "$as_dir" && break
18032 done
18033 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018034 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018035
18036
18037} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018038if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018039 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018040else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018041 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018042 as_mkdir_p=false
18043fi
18044
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018045
18046# as_fn_executable_p FILE
18047# -----------------------
18048# Test if FILE is an executable regular file.
18049as_fn_executable_p ()
18050{
18051 test -f "$1" && test -x "$1"
18052} # as_fn_executable_p
18053as_test_x='test -x'
18054as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018055
18056# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018057as_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 +000018058
18059# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018060as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018061
18062
Martin v. Löwis11437992002-04-12 09:54:03 +000018063exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018064## ----------------------------------- ##
18065## Main body of $CONFIG_STATUS script. ##
18066## ----------------------------------- ##
18067_ASEOF
18068test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018069
Matthias Kloseb9621712010-04-24 17:59:49 +000018070cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18071# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018072# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073# values after options handling.
18074ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018075This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018076generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018077
18078 CONFIG_FILES = $CONFIG_FILES
18079 CONFIG_HEADERS = $CONFIG_HEADERS
18080 CONFIG_LINKS = $CONFIG_LINKS
18081 CONFIG_COMMANDS = $CONFIG_COMMANDS
18082 $ $0 $@
18083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084on `(hostname || uname -n) 2>/dev/null | sed 1q`
18085"
18086
Martin v. Löwis11437992002-04-12 09:54:03 +000018087_ACEOF
18088
Matthias Kloseb9621712010-04-24 17:59:49 +000018089case $ac_config_files in *"
18090"*) set x $ac_config_files; shift; ac_config_files=$*;;
18091esac
18092
18093case $ac_config_headers in *"
18094"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18095esac
18096
18097
18098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018099# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018100config_files="$ac_config_files"
18101config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018104
Matthias Kloseb9621712010-04-24 17:59:49 +000018105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018106ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018107\`$as_me' instantiates files and other configuration actions
18108from templates according to the current configuration. Unless the files
18109and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018110
Matthias Kloseb9621712010-04-24 17:59:49 +000018111Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018112
18113 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018115 --config print configuration, then exit
18116 -q, --quiet, --silent
18117 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018118 -d, --debug don't remove temporary files
18119 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018120 --file=FILE[:TEMPLATE]
18121 instantiate the configuration file FILE
18122 --header=FILE[:TEMPLATE]
18123 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018124
18125Configuration files:
18126$config_files
18127
18128Configuration headers:
18129$config_headers
18130
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018131Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018134cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18135ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018136ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018137python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018138configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018139 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018140
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018141Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018142This config.status script is free software; the Free Software Foundation
18143gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144
18145ac_pwd='$ac_pwd'
18146srcdir='$srcdir'
18147INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018148MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018149test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018150_ACEOF
18151
Matthias Kloseb9621712010-04-24 17:59:49 +000018152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18153# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018154ac_need_defaults=:
18155while test $# != 0
18156do
18157 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018158 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18160 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018161 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018162 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018163 --*=)
18164 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18165 ac_optarg=
18166 ac_shift=:
18167 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018169 ac_option=$1
18170 ac_optarg=$2
18171 ac_shift=shift
18172 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018173 esac
18174
Skip Montanaro6dead952003-09-25 14:50:04 +000018175 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018177 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18178 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018180 $as_echo "$ac_cs_version"; exit ;;
18181 --config | --confi | --conf | --con | --co | --c )
18182 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018183 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 debug=: ;;
18185 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018186 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018187 case $ac_optarg in
18188 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018189 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 esac
18191 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018192 ac_need_defaults=false;;
18193 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018194 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018195 case $ac_optarg in
18196 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18197 esac
18198 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018199 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200 --he | --h)
18201 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018202 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018203Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018205 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018206 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18207 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18208 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018209
18210 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018211 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018212Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018213
Matthias Kloseb9621712010-04-24 17:59:49 +000018214 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018216
18217 esac
18218 shift
18219done
18220
Skip Montanaro6dead952003-09-25 14:50:04 +000018221ac_configure_extra_args=
18222
18223if $ac_cs_silent; then
18224 exec 6>/dev/null
18225 ac_configure_extra_args="$ac_configure_extra_args --silent"
18226fi
18227
18228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018230if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018231 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 shift
18233 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18234 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018236 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018237fi
18238
Martin v. Löwis11437992002-04-12 09:54:03 +000018239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241exec 5>>config.log
18242{
18243 echo
18244 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18245## Running $as_me. ##
18246_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018247 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018252_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018253
Matthias Kloseb9621712010-04-24 17:59:49 +000018254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018255
18256# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018257for ac_config_target in $ac_config_targets
18258do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259 case $ac_config_target in
18260 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18261 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18262 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018263 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18264 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018266 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018267 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018268 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018269 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270
Victor Stinnere0be4232011-10-25 13:06:09 +020018271 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 esac
18273done
18274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275
Martin v. Löwis11437992002-04-12 09:54:03 +000018276# If the user did not use the arguments to specify the items to instantiate,
18277# then the envvar interface is used. Set only those that are not.
18278# We use the long form for the default assignment because of an extremely
18279# bizarre bug on SunOS 4.1.3.
18280if $ac_need_defaults; then
18281 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18282 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18283fi
18284
Skip Montanaro6dead952003-09-25 14:50:04 +000018285# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018287# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288# Hook for its removal unless debugging.
18289# Note that there is a small window in which the directory will not be cleaned:
18290# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018291$debug ||
18292{
Victor Stinnere0be4232011-10-25 13:06:09 +020018293 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018295 : "${ac_tmp:=$tmp}"
18296 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018298 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018299}
Martin v. Löwis11437992002-04-12 09:54:03 +000018300# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018301
Martin v. Löwis11437992002-04-12 09:54:03 +000018302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018304 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018305} ||
18306{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018307 tmp=./conf$$-$RANDOM
18308 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018309} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018310ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018311
Matthias Kloseb9621712010-04-24 17:59:49 +000018312# Set up the scripts for CONFIG_FILES section.
18313# No need to generate them if there are no CONFIG_FILES.
18314# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018316
Matthias Kloseb9621712010-04-24 17:59:49 +000018317
18318ac_cr=`echo X | tr X '\015'`
18319# On cygwin, bash can eat \r inside `` if the user requested igncr.
18320# But we know of no other shell where ac_cr would be empty at this
18321# point, so we can use a bashism as a fallback.
18322if test "x$ac_cr" = x; then
18323 eval ac_cr=\$\'\\r\'
18324fi
18325ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18326if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018327 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018328else
18329 ac_cs_awk_cr=$ac_cr
18330fi
18331
Victor Stinnere0be4232011-10-25 13:06:09 +020018332echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018333_ACEOF
18334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335
Matthias Kloseb9621712010-04-24 17:59:49 +000018336{
18337 echo "cat >conf$$subs.awk <<_ACEOF" &&
18338 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18339 echo "_ACEOF"
18340} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018341 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18342ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343ac_delim='%!_!# '
18344for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018345 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018346 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347
Matthias Kloseb9621712010-04-24 17:59:49 +000018348 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18349 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018350 break
18351 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018352 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353 else
18354 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018356done
Matthias Kloseb9621712010-04-24 17:59:49 +000018357rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358
Matthias Kloseb9621712010-04-24 17:59:49 +000018359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018360cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018362sed -n '
18363h
18364s/^/S["/; s/!.*/"]=/
18365p
18366g
18367s/^[^!]*!//
18368:repl
18369t repl
18370s/'"$ac_delim"'$//
18371t delim
18372:nl
18373h
18374s/\(.\{148\}\)..*/\1/
18375t more1
18376s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18377p
18378n
18379b repl
18380:more1
18381s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18382p
18383g
18384s/.\{148\}//
18385t nl
18386:delim
18387h
18388s/\(.\{148\}\)..*/\1/
18389t more2
18390s/["\\]/\\&/g; s/^/"/; s/$/"/
18391p
18392b
18393:more2
18394s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18395p
18396g
18397s/.\{148\}//
18398t delim
18399' <conf$$subs.awk | sed '
18400/^[^""]/{
18401 N
18402 s/\n//
18403}
18404' >>$CONFIG_STATUS || ac_write_fail=1
18405rm -f conf$$subs.awk
18406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18407_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018408cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018409 for (key in S) S_is_set[key] = 1
18410 FS = ""
18411
18412}
18413{
18414 line = $ 0
18415 nfields = split(line, field, "@")
18416 substed = 0
18417 len = length(field[1])
18418 for (i = 2; i < nfields; i++) {
18419 key = field[i]
18420 keylen = length(key)
18421 if (S_is_set[key]) {
18422 value = S[key]
18423 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18424 len += length(value) + length(field[++i])
18425 substed = 1
18426 } else
18427 len += 1 + keylen
18428 }
18429
18430 print line
18431}
18432
18433_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18436if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18437 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18438else
18439 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018440fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018441 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018442_ACEOF
18443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018444# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18445# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018446# trailing colons and then remove the whole line if VPATH becomes empty
18447# (actually we leave an empty line to preserve line numbers).
18448if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018449 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18450h
18451s///
18452s/^/:/
18453s/[ ]*$/:/
18454s/:\$(srcdir):/:/g
18455s/:\${srcdir}:/:/g
18456s/:@srcdir@:/:/g
18457s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018459x
18460s/\(=[ ]*\).*/\1/
18461G
18462s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463s/^[^=]*=[ ]*$//
18464}'
18465fi
18466
Matthias Kloseb9621712010-04-24 17:59:49 +000018467cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018468fi # test -n "$CONFIG_FILES"
18469
Matthias Kloseb9621712010-04-24 17:59:49 +000018470# Set up the scripts for CONFIG_HEADERS section.
18471# No need to generate them if there are no CONFIG_HEADERS.
18472# This happens for instance with `./config.status Makefile'.
18473if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018474cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018475BEGIN {
18476_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477
Matthias Kloseb9621712010-04-24 17:59:49 +000018478# Transform confdefs.h into an awk script `defines.awk', embedded as
18479# here-document in config.status, that substitutes the proper values into
18480# config.h.in to produce config.h.
18481
18482# Create a delimiter string that does not exist in confdefs.h, to ease
18483# handling of long lines.
18484ac_delim='%!_!# '
18485for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018486 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18487 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018488 break
18489 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018490 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018491 else
18492 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18493 fi
18494done
18495
18496# For the awk script, D is an array of macro values keyed by name,
18497# likewise P contains macro parameters if any. Preserve backslash
18498# newline sequences.
18499
18500ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18501sed -n '
18502s/.\{148\}/&'"$ac_delim"'/g
18503t rset
18504:rset
18505s/^[ ]*#[ ]*define[ ][ ]*/ /
18506t def
18507d
18508:def
18509s/\\$//
18510t bsnl
18511s/["\\]/\\&/g
18512s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18513D["\1"]=" \3"/p
18514s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18515d
18516:bsnl
18517s/["\\]/\\&/g
18518s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18519D["\1"]=" \3\\\\\\n"\\/p
18520t cont
18521s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18522t cont
18523d
18524:cont
18525n
18526s/.\{148\}/&'"$ac_delim"'/g
18527t clear
18528:clear
18529s/\\$//
18530t bsnlc
18531s/["\\]/\\&/g; s/^/"/; s/$/"/p
18532d
18533:bsnlc
18534s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18535b cont
18536' <confdefs.h | sed '
18537s/'"$ac_delim"'/"\\\
18538"/g' >>$CONFIG_STATUS || ac_write_fail=1
18539
18540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18541 for (key in D) D_is_set[key] = 1
18542 FS = ""
18543}
18544/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18545 line = \$ 0
18546 split(line, arg, " ")
18547 if (arg[1] == "#") {
18548 defundef = arg[2]
18549 mac1 = arg[3]
18550 } else {
18551 defundef = substr(arg[1], 2)
18552 mac1 = arg[2]
18553 }
18554 split(mac1, mac2, "(") #)
18555 macro = mac2[1]
18556 prefix = substr(line, 1, index(line, defundef) - 1)
18557 if (D_is_set[macro]) {
18558 # Preserve the white space surrounding the "#".
18559 print prefix "define", macro P[macro] D[macro]
18560 next
18561 } else {
18562 # Replace #undef with comments. This is necessary, for example,
18563 # in the case of _POSIX_SOURCE, which is predefined and required
18564 # on some systems where configure will not decide to define it.
18565 if (defundef == "undef") {
18566 print "/*", prefix defundef, macro, "*/"
18567 next
18568 }
18569 }
18570}
18571{ print }
18572_ACAWK
18573_ACEOF
18574cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018575 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018576fi # test -n "$CONFIG_HEADERS"
18577
18578
18579eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18580shift
18581for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018582do
18583 case $ac_tag in
18584 :[FHLC]) ac_mode=$ac_tag; continue;;
18585 esac
18586 case $ac_mode$ac_tag in
18587 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018588 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589 :[FH]-) ac_tag=-:-;;
18590 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18591 esac
18592 ac_save_IFS=$IFS
18593 IFS=:
18594 set x $ac_tag
18595 IFS=$ac_save_IFS
18596 shift
18597 ac_file=$1
18598 shift
18599
18600 case $ac_mode in
18601 :L) ac_source=$1;;
18602 :[FH])
18603 ac_file_inputs=
18604 for ac_f
18605 do
18606 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018607 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018608 *) # Look for the file first in the build tree, then in the source tree
18609 # (if the path is not absolute). The absolute path cannot be DOS-style,
18610 # because $ac_f cannot contain `:'.
18611 test -f "$ac_f" ||
18612 case $ac_f in
18613 [\\/$]*) false;;
18614 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18615 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018616 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018618 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18619 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620 done
18621
18622 # Let's still pretend it is `configure' which instantiates (i.e., don't
18623 # use $as_me), people would be surprised to read:
18624 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018625 configure_input='Generated from '`
18626 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18627 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628 if test x"$ac_file" != x-; then
18629 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018630 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18631$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018632 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018633 # Neutralize special characters interpreted by sed in replacement strings.
18634 case $configure_input in #(
18635 *\&* | *\|* | *\\* )
18636 ac_sed_conf_input=`$as_echo "$configure_input" |
18637 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18638 *) ac_sed_conf_input=$configure_input;;
18639 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018640
18641 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018642 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18643 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644 esac
18645 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 esac
18647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018648 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018649$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018650 X"$ac_file" : 'X\(//\)[^/]' \| \
18651 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018652 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018653$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18655 s//\1/
18656 q
18657 }
18658 /^X\(\/\/\)[^/].*/{
18659 s//\1/
18660 q
18661 }
18662 /^X\(\/\/\)$/{
18663 s//\1/
18664 q
18665 }
18666 /^X\(\/\).*/{
18667 s//\1/
18668 q
18669 }
18670 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018671 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018672 ac_builddir=.
18673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018674case "$ac_dir" in
18675.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18676*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018677 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018678 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018679 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018680 case $ac_top_builddir_sub in
18681 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18682 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18683 esac ;;
18684esac
18685ac_abs_top_builddir=$ac_pwd
18686ac_abs_builddir=$ac_pwd$ac_dir_suffix
18687# for backward compatibility:
18688ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018689
18690case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018691 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018692 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018693 ac_top_srcdir=$ac_top_builddir_sub
18694 ac_abs_top_srcdir=$ac_pwd ;;
18695 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018696 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697 ac_top_srcdir=$srcdir
18698 ac_abs_top_srcdir=$srcdir ;;
18699 *) # Relative name.
18700 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18701 ac_top_srcdir=$ac_top_build_prefix$srcdir
18702 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018703esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018704ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705
Martin v. Löwis11437992002-04-12 09:54:03 +000018706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707 case $ac_mode in
18708 :F)
18709 #
18710 # CONFIG_FILE
18711 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018712
18713 case $INSTALL in
18714 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018715 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018716 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018717 ac_MKDIR_P=$MKDIR_P
18718 case $MKDIR_P in
18719 [\\/$]* | ?:[\\/]* ) ;;
18720 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18721 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018722_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018723
Matthias Kloseb9621712010-04-24 17:59:49 +000018724cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018725# If the template does not know about datarootdir, expand it.
18726# FIXME: This hack should be removed a few years after 2.60.
18727ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018728ac_sed_dataroot='
18729/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730 p
18731 q
18732}
18733/@datadir@/p
18734/@docdir@/p
18735/@infodir@/p
18736/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018737/@mandir@/p'
18738case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739*datarootdir*) ac_datarootdir_seen=yes;;
18740*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18742$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018744cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745 ac_datarootdir_hack='
18746 s&@datadir@&$datadir&g
18747 s&@docdir@&$docdir&g
18748 s&@infodir@&$infodir&g
18749 s&@localedir@&$localedir&g
18750 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018751 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752esac
18753_ACEOF
18754
18755# Neutralize VPATH when `$srcdir' = `.'.
18756# Shell code in configure.ac might set extrasub.
18757# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018758cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18759ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018760$extrasub
18761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018763:t
18764/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018765s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018766s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018767s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018768s&@srcdir@&$ac_srcdir&;t t
18769s&@abs_srcdir@&$ac_abs_srcdir&;t t
18770s&@top_srcdir@&$ac_top_srcdir&;t t
18771s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18772s&@builddir@&$ac_builddir&;t t
18773s&@abs_builddir@&$ac_abs_builddir&;t t
18774s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18775s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018776s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018777$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018778"
Victor Stinnere0be4232011-10-25 13:06:09 +020018779eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18780 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018782test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018783 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18784 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18785 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018787which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018788$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018789which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018790
Victor Stinnere0be4232011-10-25 13:06:09 +020018791 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018793 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18794 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018795 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018796 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797 ;;
18798 :H)
18799 #
18800 # CONFIG_HEADER
18801 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018802 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018803 {
18804 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018805 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18806 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018807 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018808 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018809 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18810$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018811 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018812 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018813 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018814 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018815 fi
18816 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018817 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018818 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018819 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018820 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018821 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823
18824 esac
18825
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018826
18827 case $ac_file$ac_mode in
18828 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18829
18830 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018831done # for ac_tag
18832
Guido van Rossum627b2d71993-12-24 10:39:16 +000018833
Matthias Kloseb9621712010-04-24 17:59:49 +000018834as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018835_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018836ac_clean_files=$ac_clean_files_save
18837
Matthias Kloseb9621712010-04-24 17:59:49 +000018838test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018839 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018840
Martin v. Löwis11437992002-04-12 09:54:03 +000018841
18842# configure is writing to config.log, and then calls config.status.
18843# config.status does its own redirection, appending to config.log.
18844# Unfortunately, on DOS this fails, as config.log is still kept open
18845# by configure, so config.status won't be able to write to it; its
18846# output is simply discarded. So we exec the FD to /dev/null,
18847# effectively closing config.log, so it can be properly (re)opened and
18848# appended to by config.status. When coming back to configure, we
18849# need to make the FD available again.
18850if test "$no_create" != yes; then
18851 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018852 ac_config_status_args=
18853 test "$silent" = yes &&
18854 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018856 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 exec 5>>config.log
18858 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18859 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018860 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018861fi
18862if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18864$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018865fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018866
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018867
Christian Heimes75ed8902013-11-20 01:11:18 +010018868echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018869if test ! -f Modules/Setup.local
18870then
18871 echo "# Edit this file for local setup changes" >Modules/Setup.local
18872fi
18873
Christian Heimes75ed8902013-11-20 01:11:18 +010018874echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018875$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018876 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018877 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018878mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018879
18880if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18881 echo "" >&6
18882 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018883 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 +000018884 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018885 echo "" >&6
18886 echo "" >&6
18887fi
18888