blob: a2c7ddf595db2ac935dca3b56f2db3e3eab279dd [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Benjamin Peterson5c0c3252019-11-05 21:58:31 -0800785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700857PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Benjamin Peterson5c0c3252019-11-05 21:58:31 -0800899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001411\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001477 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001491 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1492 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001505 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1506 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001515 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001516 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001517 --with-lto Enable Link Time Optimization in any build. Disabled
1518 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001519 --with-hash-algorithm=[fnv|siphash24]
1520 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001521 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001522 enable AddressSanitizer (asan)
1523 --with-memory-sanitizer enable MemorySanitizer (msan)
1524 --with-undefined-behavior-sanitizer
1525 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001527 --with-system-expat build pyexpat module using an installed expat
1528 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001529 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001530 --with-system-libmpdec build _decimal module using an installed libmpdec
1531 library
Ned Deilyd819b932013-09-06 01:07:05 -07001532 --with-tcltk-includes='-I...'
1533 override search for Tcl and Tk include files
1534 --with-tcltk-libs='-L...'
1535 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001536 --with-dbmliborder=db1:db2:...
1537 order to check db backends for dbm. Valid value is a
1538 colon separated string with the backend names
1539 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001542 --with(out)-c-locale-coercion
1543 disable/enable C locale coercion to a UTF-8 based
1544 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001545 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001546 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001547 --with-libm=STRING math library
1548 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001549 --with(out)-computed-gotos
1550 Use computed gotos in evaluation loop (enabled by
1551 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001552 --with(out)-ensurepip=[=upgrade]
1553 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001554 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001555 --with-ssl-default-suites=[python|openssl|STRING]
1556 Override default cipher suites string, python: use
1557 Python's preferred selection (default), openssl:
1558 leave OpenSSL's defaults untouched, STRING: use a
1559 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001571 PROFILE_TASK
1572 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001573 PKG_CONFIG path to pkg-config utility
1574 PKG_CONFIG_PATH
1575 directories to add to pkg-config's search path
1576 PKG_CONFIG_LIBDIR
1577 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579Use these variables to override the choices made by `configure' or to help
1580it to find libraries and programs with nonstandard names/locations.
1581
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001582Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001585fi
1586
1587if test "$ac_init_help" = "recursive"; then
1588 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 test -d "$ac_dir" ||
1591 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1592 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_builddir=.
1594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595case "$ac_dir" in
1596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1597*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 case $ac_top_builddir_sub in
1602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1604 esac ;;
1605esac
1606ac_abs_top_builddir=$ac_pwd
1607ac_abs_builddir=$ac_pwd$ac_dir_suffix
1608# for backward compatibility:
1609ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
1611case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 ac_top_srcdir=$ac_top_builddir_sub
1615 ac_abs_top_srcdir=$ac_pwd ;;
1616 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 ac_top_srcdir=$srcdir
1619 ac_abs_top_srcdir=$srcdir ;;
1620 *) # Relative name.
1621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1622 ac_top_srcdir=$ac_top_build_prefix$srcdir
1623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001624esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 cd "$ac_dir" || { ac_status=$?; continue; }
1628 # Check for guested configure.
1629 if test -f "$ac_srcdir/configure.gnu"; then
1630 echo &&
1631 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1632 elif test -f "$ac_srcdir/configure"; then
1633 echo &&
1634 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 fi || ac_status=$?
1638 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 done
1640fi
1641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001643if $ac_init_version; then
1644 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001645python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001647
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001648Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649This configure script is free software; the Free Software Foundation
1650gives unlimited permission to copy, distribute and modify it.
1651_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001654
1655## ------------------------ ##
1656## Autoconf initialization. ##
1657## ------------------------ ##
1658
1659# ac_fn_c_try_compile LINENO
1660# --------------------------
1661# Try to compile conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_compile ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 rm -f conftest.$ac_objext
1666 if { { ac_try="$ac_compile"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_compile") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681 test $ac_status = 0; } && {
1682 test -z "$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 } && test -s conftest.$ac_objext; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_compile
1696
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001697# ac_fn_c_try_cpp LINENO
1698# ----------------------
1699# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_cpp ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { { ac_try="$ac_cpp conftest.$ac_ext"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } > conftest.i && {
1719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 }; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
1729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_cpp
1733
Matthias Kloseb9621712010-04-24 17:59:49 +00001734# ac_fn_c_try_link LINENO
1735# -----------------------
1736# Try to link conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_c_try_link ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext conftest$ac_exeext
1741 if { { ac_try="$ac_link"
1742case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745esac
1746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747$as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_link") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_c_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest$ac_exeext && {
1760 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001761 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 }; then :
1763 ac_retval=0
1764else
1765 $as_echo "$as_me: failed program was:" >&5
1766sed 's/^/| /' conftest.$ac_ext >&5
1767
1768 ac_retval=1
1769fi
1770 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1771 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1772 # interfere with the next link command; also delete a directory that is
1773 # left behind by Apple's compiler. We do this before executing the actions.
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_link
1779
Matthias Kloseb9621712010-04-24 17:59:49 +00001780# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1783# the include files in INCLUDES and setting the cache variable VAR
1784# accordingly.
1785ac_fn_c_check_header_mongrel ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001788 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001791if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793fi
1794eval ac_res=\$$3
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1796$as_echo "$ac_res" >&6; }
1797else
1798 # Is the header compilable?
1799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1800$as_echo_n "checking $2 usability... " >&6; }
1801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 ac_header_compiler=yes
1808else
1809 ac_header_compiler=no
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1813$as_echo "$ac_header_compiler" >&6; }
1814
1815# Is the header present?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1817$as_echo_n "checking $2 presence... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820#include <$2>
1821_ACEOF
1822if ac_fn_c_try_cpp "$LINENO"; then :
1823 ac_header_preproc=yes
1824else
1825 ac_header_preproc=no
1826fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001827rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1829$as_echo "$ac_header_preproc" >&6; }
1830
1831# So? What about this header?
1832case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1833 yes:no: )
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1835$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1838 ;;
1839 no:yes:* )
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1841$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1843$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1845$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1847$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1849$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001850( $as_echo "## --------------------------------------- ##
1851## Report this to https://bugs.python.org/ ##
1852## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 ) | sed "s/^/$as_me: WARNING: /" >&2
1854 ;;
1855esac
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1857$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001858if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001859 $as_echo_n "(cached) " >&6
1860else
1861 eval "$3=\$ac_header_compiler"
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
1866fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001867 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001868
1869} # ac_fn_c_check_header_mongrel
1870
1871# ac_fn_c_try_run LINENO
1872# ----------------------
1873# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1874# that executables *can* be run.
1875ac_fn_c_try_run ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 if { { ac_try="$ac_link"
1879case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_link") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1889 { { case "(($ac_try" in
1890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1891 *) ac_try_echo=$ac_try;;
1892esac
1893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1894$as_echo "$ac_try_echo"; } >&5
1895 (eval "$ac_try") 2>&5
1896 ac_status=$?
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898 test $ac_status = 0; }; }; then :
1899 ac_retval=0
1900else
1901 $as_echo "$as_me: program exited with status $ac_status" >&5
1902 $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905 ac_retval=$ac_status
1906fi
1907 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_run
1912
1913# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1914# -------------------------------------------------------
1915# Tests whether HEADER exists and can be compiled using the include files in
1916# INCLUDES, setting the cache variable VAR accordingly.
1917ac_fn_c_check_header_compile ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928#include <$2>
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 eval "$3=yes"
1932else
1933 eval "$3=no"
1934fi
1935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942} # ac_fn_c_check_header_compile
1943
Matthias Kloseb9621712010-04-24 17:59:49 +00001944# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1945# -------------------------------------------
1946# Tests whether TYPE exists after having included INCLUDES, setting cache
1947# variable VAR accordingly.
1948ac_fn_c_check_type ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 eval "$3=no"
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof ($2))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973int
1974main ()
1975{
1976if (sizeof (($2)))
1977 return 0;
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983
1984else
1985 eval "$3=yes"
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_check_type
1997
Matthias Kloseb9621712010-04-24 17:59:49 +00001998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_hi=$ac_mid; break
2041else
2042 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2043 if test $ac_lo -le $ac_mid; then
2044 ac_lo= ac_hi=
2045 break
2046 fi
2047 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 done
2051else
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002059test_array [0] = 0;
2060return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002076test_array [0] = 0;
2077return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002189if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245
2246} # ac_fn_c_check_func
2247
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002248# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2249# ---------------------------------------------
2250# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2251# accordingly.
2252ac_fn_c_check_decl ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 as_decl_name=`echo $2|sed 's/ *(.*//'`
2256 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2258$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2259if eval \${$3+:} false; then :
2260 $as_echo_n "(cached) " >&6
2261else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268#ifndef $as_decl_name
2269#ifdef __cplusplus
2270 (void) $as_decl_use;
2271#else
2272 (void) $as_decl_name;
2273#endif
2274#endif
2275
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291
2292} # ac_fn_c_check_decl
2293
Matthias Kloseb9621712010-04-24 17:59:49 +00002294# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2295# ----------------------------------------------------
2296# Tries to find if the field MEMBER exists in type AGGR, after including
2297# INCLUDES, setting cache variable VAR accordingly.
2298ac_fn_c_check_member ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2302$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002303if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$5
2325int
2326main ()
2327{
2328static $2 ac_aggr;
2329if (sizeof ac_aggr.$3)
2330return 0;
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$4=yes"
2337else
2338 eval "$4=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$4
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002348
2349} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002354It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002355generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002391 $as_echo "PATH: $as_dir"
2392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Kloseb9621712010-04-24 17:59:49 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Kloseb9621712010-04-24 17:59:49 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598else
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603do
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703
Christian Heimesff5be6e2018-01-20 13:19:21 +01002704
2705
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002706if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002707 # If we're building out-of-tree, we need to make sure the following
2708 # resources get picked up before their $srcdir counterparts.
2709 # Objects/ -> typeslots.inc
2710 # Include/ -> Python-ast.h, graminit.h
2711 # Python/ -> importlib.h
2712 # (A side effect of this is that these resources will automatically be
2713 # regenerated when building out-of-tree, regardless of whether or not
2714 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2715 # off.)
2716 BASECPPFLAGS="-IObjects -IInclude -IPython"
2717else
2718 BASECPPFLAGS=""
2719fi
2720
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721
2722
2723
2724
Victor Stinner9ed34a82017-05-02 22:35:58 +02002725if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727# Extract the first word of "git", so it can be a program name with args.
2728set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2730$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo_n "(cached) " >&6
2733else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 if test -n "$HAS_GIT"; then
2735 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736else
2737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738for as_dir in $PATH
2739do
2740 IFS=$as_save_IFS
2741 test -z "$as_dir" && as_dir=.
2742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2746 break 2
2747 fi
2748done
2749 done
2750IFS=$as_save_IFS
2751
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
2754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=$ac_cv_prog_HAS_GIT
2756if test -n "$HAS_GIT"; then
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2758$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2761$as_echo "no" >&6; }
2762fi
2763
2764
2765else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769then
Xiang Zhang4c855572018-08-20 22:36:19 +08002770 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2771 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2772 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 GITVERSION=""
2775 GITTAG=""
2776 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777fi
2778
2779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
2782
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002783ac_aux_dir=
2784for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2785 if test -f "$ac_dir/install-sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install-sh -c"
2788 break
2789 elif test -f "$ac_dir/install.sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install.sh -c"
2792 break
2793 elif test -f "$ac_dir/shtool"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/shtool install -c"
2796 break
2797 fi
2798done
2799if test -z "$ac_aux_dir"; then
2800 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2801fi
2802
2803# These three variables are undocumented and unsupported,
2804# and are intended to be withdrawn in a future Autoconf release.
2805# They can cause serious problems if a builder's source tree is in a directory
2806# whose full name contains unusual characters.
2807ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2808ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2809ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2810
2811
2812# Make sure we can run config.sub.
2813$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2814 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2817$as_echo_n "checking build system type... " >&6; }
2818if ${ac_cv_build+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 ac_build_alias=$build_alias
2822test "x$ac_build_alias" = x &&
2823 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2824test "x$ac_build_alias" = x &&
2825 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2826ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2827 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2828
2829fi
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2831$as_echo "$ac_cv_build" >&6; }
2832case $ac_cv_build in
2833*-*-*) ;;
2834*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2835esac
2836build=$ac_cv_build
2837ac_save_IFS=$IFS; IFS='-'
2838set x $ac_cv_build
2839shift
2840build_cpu=$1
2841build_vendor=$2
2842shift; shift
2843# Remember, the first character of IFS is used to create $*,
2844# except with old shells:
2845build_os=$*
2846IFS=$ac_save_IFS
2847case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2848
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2851$as_echo_n "checking host system type... " >&6; }
2852if ${ac_cv_host+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 if test "x$host_alias" = x; then
2856 ac_cv_host=$ac_cv_build
2857else
2858 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2860fi
2861
2862fi
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2864$as_echo "$ac_cv_host" >&6; }
2865case $ac_cv_host in
2866*-*-*) ;;
2867*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2868esac
2869host=$ac_cv_host
2870ac_save_IFS=$IFS; IFS='-'
2871set x $ac_cv_host
2872shift
2873host_cpu=$1
2874host_vendor=$2
2875shift; shift
2876# Remember, the first character of IFS is used to create $*,
2877# except with old shells:
2878host_os=$*
2879IFS=$ac_save_IFS
2880case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2881
2882
2883
doko@python.orga10e4a92013-01-25 18:45:12 +01002884
2885
Ned Deilyfcbc2462014-08-22 13:32:49 -07002886# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2887rm -f pybuilddir.txt
2888
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889for ac_prog in python$PACKAGE_VERSION python3 python
2890do
2891 # Extract the first word of "$ac_prog", so it can be a program name with args.
2892set dummy $ac_prog; ac_word=$2
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2894$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo_n "(cached) " >&6
2897else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 if test -n "$PYTHON_FOR_REGEN"; then
2899 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900else
2901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902for as_dir in $PATH
2903do
2904 IFS=$as_save_IFS
2905 test -z "$as_dir" && as_dir=.
2906 for ac_exec_ext in '' $ac_executable_extensions; do
2907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2910 break 2
2911 fi
2912done
2913 done
2914IFS=$as_save_IFS
2915
2916fi
2917fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2919if test -n "$PYTHON_FOR_REGEN"; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2921$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922else
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2924$as_echo "no" >&6; }
2925fi
2926
2927
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932
2933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934if test "$cross_compiling" = yes; then
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2936$as_echo_n "checking for python interpreter for cross build... " >&6; }
2937 if test -z "$PYTHON_FOR_BUILD"; then
2938 for interp in python$PACKAGE_VERSION python3 python; do
2939 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002940 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941 break
2942 fi
2943 interp=
2944 done
2945 if test x$interp = x; then
2946 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2947 fi
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2949$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002950 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002952elif test "$cross_compiling" = maybe; then
2953 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002954else
2955 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
Benjamin Petersond23f8222009-04-05 19:13:16 +00002960if test "$prefix" != "/"; then
2961 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2962fi
2963
2964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965
2966
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002967# We don't use PACKAGE_ variables, and they cause conflicts
2968# with other autoconf-based packages that include Python.h
2969grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2970rm confdefs.h
2971mv confdefs.h.new confdefs.h
2972
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002973
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002974VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002975
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002976# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002977
2978SOVERSION=1.0
2979
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980# The later defininition of _XOPEN_SOURCE disables certain features
2981# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
2985
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991
2992
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998
2999
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
3006
3007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003010# Arguments passed to configure.
3011
3012CONFIG_ARGS="$ac_configure_args"
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3015$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 case $enableval in
3020 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003021 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 # information
3023 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003024 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3027 if test ! -d "${enableval}"
3028 then
3029 enableval=/
3030 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
3034 case $enableval in
3035 no)
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038 ;;
3039 *)
3040 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 if test ! -d "${UNIVERSALSDK}"
3042 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003043 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 ;;
3046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049else
3050
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056if test -n "${UNIVERSALSDK}"
3057then
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3059$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060else
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
Ned Deily87adb6e2013-10-18 21:09:56 -07003067ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069# For backward compatibility reasons we prefer to select '32-bit' if available,
3070# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072if test "`uname -s`" = "Darwin"
3073then
3074 if test -n "${UNIVERSALSDK}"
3075 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003076 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077 then
3078 UNIVERSAL_ARCHS="intel"
3079 fi
3080 fi
3081fi
3082
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3085$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
3087# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090 UNIVERSAL_ARCHS="$withval"
3091
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092fi
3093
Ned Deily87adb6e2013-10-18 21:09:56 -07003094if test -n "${UNIVERSALSDK}"
3095then
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3097$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3098else
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100$as_echo "no" >&6; }
3101fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103
3104# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106 withval=$with_framework_name;
3107 PYTHONFRAMEWORK=${withval}
3108 PYTHONFRAMEWORKDIR=${withval}.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3110
3111else
3112
3113 PYTHONFRAMEWORK=Python
3114 PYTHONFRAMEWORKDIR=Python.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3116
3117fi
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003122 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003124 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 esac
3126 case $enableval in
3127 no)
3128 PYTHONFRAMEWORK=
3129 PYTHONFRAMEWORKDIR=no-framework
3130 PYTHONFRAMEWORKPREFIX=
3131 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST=
3133 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 FRAMEWORKALTINSTALLFIRST=
3135 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 if test "x${prefix}" = "xNONE"; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003143 ;;
3144 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003147 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003148 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003149 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3150 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003151 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 if test "x${prefix}" = "xNONE" ; then
3155 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
3161 case "${enableval}" in
3162 /System*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 if test "${prefix}" = "NONE" ; then
3165 # See below
3166 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3167 fi
3168 ;;
3169
3170 /Library*)
3171 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3172 ;;
3173
3174 */Library/Frameworks)
3175 MDIR="`dirname "${enableval}"`"
3176 MDIR="`dirname "${MDIR}"`"
3177 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3178
3179 if test "${prefix}" = "NONE"; then
3180 # User hasn't specified the
3181 # --prefix option, but wants to install
3182 # the framework in a non-default location,
3183 # ensure that the compatibility links get
3184 # installed relative to that prefix as well
3185 # instead of in /usr/local.
3186 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3187 fi
3188 ;;
3189
3190 *)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 ;;
3193 esac
3194
Jack Jansen127e56e2001-09-11 14:41:54 +00003195 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003197 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003203 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3204
3205 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3206
Jack Jansene578a632001-08-15 01:27:14 +00003207 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Guido van Rossum563e7081996-09-10 18:20:48 +00003209else
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003212 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORKPREFIX=
3214 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215 FRAMEWORKINSTALLFIRST=
3216 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 FRAMEWORKALTINSTALLFIRST=
3218 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003219 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 if test "x${prefix}" = "xNONE" ; then
3221 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3222 else
3223 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3224 fi
Jack Jansene578a632001-08-15 01:27:14 +00003225 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228fi
3229
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
3231
Michael W. Hudson54241132001-12-07 15:38:26 +00003232
3233
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003237
3238
3239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003241
Ned Deilyb8f944f2013-11-21 22:42:25 -08003242
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003243
3244cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003245#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003246_ACEOF
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003250## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003251## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003252##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253# Set name for machine-dependent library files
3254
Matthias Kloseb9621712010-04-24 17:59:49 +00003255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3256$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257if test -z "$MACHDEP"
3258then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 # avoid using uname for cross builds
3260 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003261 # ac_sys_system and ac_sys_release are used for setting
3262 # a lot of different things including 'define_xopen_source'
3263 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003265 *-*-linux-android*)
3266 ac_sys_system=Linux-android
3267 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 *-*-linux*)
3269 ac_sys_system=Linux
3270 ;;
3271 *-*-cygwin*)
3272 ac_sys_system=Cygwin
3273 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003274 *-*-vxworks*)
3275 ac_sys_system=VxWorks
3276 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003299 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003300 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003301 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003302 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3307$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003308
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003309
3310if test "$cross_compiling" = yes; then
3311 case "$host" in
3312 *-*-linux*)
3313 case "$host_cpu" in
3314 arm*)
3315 _host_cpu=arm
3316 ;;
3317 *)
3318 _host_cpu=$host_cpu
3319 esac
3320 ;;
3321 *-*-cygwin*)
3322 _host_cpu=
3323 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003324 *-*-vxworks*)
3325 _host_cpu=$host_cpu
3326 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327 *)
3328 # for now, limit cross builds to known configurations
3329 MACHDEP="unknown"
3330 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3331 esac
3332 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3333fi
3334
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003335# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3336# disable features if it is defined, without any means to access these
3337# features as extensions. For these systems, we skip the definition of
3338# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3339# some feature, make sure there is no alternative way to access this
3340# feature. Also, when using wildcards, make sure you have verified the
3341# need for not defining _XOPEN_SOURCE on all systems matching the
3342# wildcard, and that the wildcard does not include future systems
3343# (which may remove their limitations).
3344case $ac_sys_system/$ac_sys_release in
3345 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3346 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003347 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003348 # In addition, Stefan Krah confirms that issue #1244610 exists through
3349 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003350 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003351 define_xopen_source=no
3352 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3353 # also defined. This can be overridden by defining _BSD_SOURCE
3354 # As this has a different meaning on Linux, only define it on OpenBSD
3355
Matthias Kloseb9621712010-04-24 17:59:49 +00003356$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003357
3358 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003359 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003365
3366 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003367 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3368 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3369 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003370 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003371 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003372 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3373 # request to enable features supported by the standard as a request
3374 # to disable features not supported by the standard. The best way
3375 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3376 # entirely and define __EXTENSIONS__ instead.
3377 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003378 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3380 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003381 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003382 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003383 define_xopen_source=no;;
3384 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003385 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003387 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003388 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3389 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3390 # identifies itself as Darwin/7.*
3391 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3392 # disables platform specific features beyond repair.
3393 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3394 # has no effect, don't bother defining them
3395 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003396 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003397 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003398 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003399 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3400 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3401 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003402 AIX/4)
3403 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003404 AIX/5)
3405 if test `uname -r` -eq 1; then
3406 define_xopen_source=no
3407 fi
3408 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003409 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3410 # defining NI_NUMERICHOST.
3411 QNX/6.3.2)
3412 define_xopen_source=no
3413 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003414 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3415 # in network headers still using system V types.
3416 VxWorks/*)
3417 define_xopen_source=no
3418 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003419
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420esac
3421
3422if test $define_xopen_source = yes
3423then
Victor Stinner14d098d2011-09-07 22:29:43 +02003424 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Victor Stinner14d098d2011-09-07 22:29:43 +02003426$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3430 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3431 # several APIs are not declared. Since this is also needed in some
3432 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Matthias Kloseb9621712010-04-24 17:59:49 +00003434$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003437
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003438$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440fi
3441
Christian Heimes647cd872013-12-07 23:39:33 +01003442# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3443case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003444 hp*|HP*)
3445 define_stdc_a1=yes;;
3446 *)
3447 define_stdc_a1=no;;
3448esac
3449
3450if test $define_stdc_a1 = yes
3451then
Christian Heimes647cd872013-12-07 23:39:33 +01003452
3453$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3454
Christian Heimesb02bcae2013-12-08 15:21:08 +01003455fi
Christian Heimes647cd872013-12-07 23:39:33 +01003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3458# it may influence the way we can build extensions, so distutils
3459# needs to check it
3460
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461
Jack Jansen6b08a402004-06-03 12:41:45 +00003462CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003463EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003464
Guido van Rossum627b2d71993-12-24 10:39:16 +00003465# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003466
3467# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3468# for debug/optimization stuff. BASECFLAGS is for flags that are required
3469# just to get things to compile and link. Users are free to override OPT
3470# when running configure or make. The build should not break if they do.
3471# BASECFLAGS should generally not be messed with, however.
3472
Guido van Rossum8b131c51995-03-09 14:10:13 +00003473# If the user switches compilers, we can't believe the cache
3474if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3475then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003476 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003477(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003478fi
3479
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003480# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3481# when the compiler supports them, but we don't always want -O2, and
3482# we set -g later.
3483if test -z "$CFLAGS"; then
3484 CFLAGS=
3485fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486
3487if test "$ac_sys_system" = "Darwin"
3488then
3489 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003490 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 # information
3492 if test -z "${CC}"
3493 then
3494 found_gcc=
3495 found_clang=
3496 as_save_IFS=$IFS; IFS=:
3497 for as_dir in $PATH
3498 do
3499 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003500 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003502 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003503 fi
3504 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003505 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003507 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508 fi
3509 fi
3510 done
3511 IFS=$as_save_IFS
3512
3513 if test -n "$found_gcc" -a -n "$found_clang"
3514 then
3515 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3516 then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3518$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3519 CC="$found_clang"
3520 CXX="$found_clang++"
3521 fi
3522
3523
3524 elif test -z "$found_gcc" -a -n "$found_clang"
3525 then
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3527$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3528 CC="$found_clang"
3529 CXX="$found_clang++"
3530
3531 elif test -z "$found_gcc" -a -z "$found_clang"
3532 then
3533 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3534 if test -n "${found_clang}"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3537$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3538 CC="${found_clang}"
3539 CXX="`/usr/bin/xcrun -find clang++`"
3540
3541 # else: use default behaviour
3542 fi
3543 fi
3544 fi
3545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546ac_ext=c
3547ac_cpp='$CPP $CPPFLAGS'
3548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550ac_compiler_gnu=$ac_cv_c_compiler_gnu
3551if test -n "$ac_tool_prefix"; then
3552 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3553set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3555$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003556if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003558else
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
3561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 break 2
3572 fi
3573done
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003576
Jack Jansendd19cf82001-12-06 22:36:17 +00003577fi
3578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003580if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003583else
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003586fi
3587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589fi
3590if test -z "$ac_cv_prog_CC"; then
3591 ac_ct_CC=$CC
3592 # Extract the first word of "gcc", so it can be a program name with args.
3593set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003596if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003598else
3599 if test -n "$ac_ct_CC"; then
3600 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3601else
3602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603for as_dir in $PATH
3604do
3605 IFS=$as_save_IFS
3606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 break 2
3612 fi
3613done
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003616
3617fi
3618fi
3619ac_ct_CC=$ac_cv_prog_ac_ct_CC
3620if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3622$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 if test "x$ac_ct_CC" = x; then
3629 CC=""
3630 else
3631 case $cross_compiling:$ac_tool_warned in
3632yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635ac_tool_warned=yes ;;
3636esac
3637 CC=$ac_ct_CC
3638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642
Jack Jansendd19cf82001-12-06 22:36:17 +00003643if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test -n "$ac_tool_prefix"; then
3645 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003646set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3648$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003649if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003651else
3652 if test -n "$CC"; then
3653 ac_cv_prog_CC="$CC" # Let the user override the test.
3654else
Martin v. Löwis11437992002-04-12 09:54:03 +00003655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656for as_dir in $PATH
3657do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 break 2
3665 fi
3666done
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003669
3670fi
3671fi
3672CC=$ac_cv_prog_CC
3673if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3675$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3678$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684if test -z "$CC"; then
3685 # Extract the first word of "cc", so it can be a program name with args.
3686set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003689if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
3692 if test -n "$CC"; then
3693 ac_cv_prog_CC="$CC" # Let the user override the test.
3694else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699 IFS=$as_save_IFS
3700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3704 ac_prog_rejected=yes
3705 continue
3706 fi
3707 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 break 2
3710 fi
3711done
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003714
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715if test $ac_prog_rejected = yes; then
3716 # We found a bogon in the path, so make sure we never use it.
3717 set dummy $ac_cv_prog_CC
3718 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 # We chose a different compiler from the bogus one.
3721 # However, it has the same basename, so the bogon will be chosen
3722 # first if we set CC to just the basename; use the full file name.
3723 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003724 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 fi
3726fi
3727fi
3728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
3740if test -z "$CC"; then
3741 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 do
3744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3747$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003748if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003750else
3751 if test -n "$CC"; then
3752 ac_cv_prog_CC="$CC" # Let the user override the test.
3753else
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
3769fi
3770fi
3771CC=$ac_cv_prog_CC
3772if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3774$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3777$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003778fi
3779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 test -n "$CC" && break
3782 done
3783fi
3784if test -z "$CC"; then
3785 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787do
3788 # Extract the first word of "$ac_prog", so it can be a program name with args.
3789set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
3795 if test -n "$ac_ct_CC"; then
3796 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3797else
3798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 break 2
3808 fi
3809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
3814fi
3815ac_ct_CC=$ac_cv_prog_ac_ct_CC
3816if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3818$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$ac_ct_CC" && break
3826done
Michael W. Hudson54241132001-12-07 15:38:26 +00003827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828 if test "x$ac_ct_CC" = x; then
3829 CC=""
3830 else
3831 case $cross_compiling:$ac_tool_warned in
3832yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835ac_tool_warned=yes ;;
3836esac
3837 CC=$ac_ct_CC
3838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840
3841fi
3842
3843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003846as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003847See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848
3849# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003850$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3851set X $ac_compile
3852ac_compiler=$2
3853for ac_option in --version -v -V -qversion; do
3854 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855case "(($ac_try" in
3856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857 *) ac_try_echo=$ac_try;;
3858esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3860$as_echo "$ac_try_echo"; } >&5
3861 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 if test -s conftest.err; then
3864 sed '10a\
3865... rest of stderr output deleted ...
3866 10q' conftest.err >conftest.er1
3867 cat conftest.er1 >&5
3868 fi
3869 rm -f conftest.er1 conftest.err
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }
3872done
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
3885ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003886ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003887# Try to create an executable without -o first, disregard a.out.
3888# It will help us diagnose broken compilers, and finding out an intuition
3889# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3891$as_echo_n "checking whether the C compiler works... " >&6; }
3892ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3893
3894# The possible output files:
3895ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897ac_rmfiles=
3898for ac_file in $ac_files
3899do
3900 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3903 esac
3904done
3905rm -f $ac_rmfiles
3906
Matthias Kloseb9621712010-04-24 17:59:49 +00003907if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3919# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3920# in a Makefile. We should not override ac_cv_exeext if it was cached,
3921# so that the user can short-circuit this test for compilers unknown to
3922# Autoconf.
3923for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003924do
3925 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928 ;;
3929 [ab].out )
3930 # We found the default executable, but exeext='' is most
3931 # certainly right.
3932 break;;
3933 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 then :; else
3936 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3937 fi
3938 # We set ac_cv_exeext here because the later test for it is not
3939 # safe: cross compilers may not add the suffix if given an `-o'
3940 # argument, so we may need to know it at that point already.
3941 # Even if this section looks crufty: it has the advantage of
3942 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 break;;
3944 * )
3945 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 esac
3947done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948test "$ac_cv_exeext" = no && ac_cv_exeext=
3949
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003950else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 ac_file=''
3952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if test -z "$ac_file"; then :
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3955$as_echo "no" >&6; }
3956$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003957sed 's/^/| /' conftest.$ac_ext >&5
3958
Matthias Kloseb9621712010-04-24 17:59:49 +00003959{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003961as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003962See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003963else
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3965$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3968$as_echo_n "checking for C compiler default output file name... " >&6; }
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3970$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3976$as_echo_n "checking for suffix of executables... " >&6; }
3977if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3987 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3989# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3990# work properly (i.e., refer to `conftest.exe'), while it won't with
3991# `rm'.
3992for ac_file in conftest.exe conftest conftest.*; do
3993 test -f "$ac_file" || continue
3994 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3997 break;;
3998 * ) break;;
3999 esac
4000done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001else
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007rm -f conftest conftest$ac_cv_exeext
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4009$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
4011rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004012EXEEXT=$ac_cv_exeext
4013ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015/* end confdefs.h. */
4016#include <stdio.h>
4017int
4018main ()
4019{
4020FILE *f = fopen ("conftest.out", "w");
4021 return ferror (f) || fclose (f) != 0;
4022
4023 ;
4024 return 0;
4025}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004027ac_clean_files="$ac_clean_files conftest.out"
4028# Check that the compiler produces executables we can run. If not, either
4029# the compiler is broken, or we cross compile.
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4031$as_echo_n "checking whether we are cross compiling... " >&6; }
4032if test "$cross_compiling" != yes; then
4033 { { ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
4038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4039$as_echo "$ac_try_echo"; } >&5
4040 (eval "$ac_link") 2>&5
4041 ac_status=$?
4042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4043 test $ac_status = 0; }
4044 if { ac_try='./conftest$ac_cv_exeext'
4045 { { case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_try") 2>&5
4052 ac_status=$?
4053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }; }; then
4055 cross_compiling=no
4056 else
4057 if test "$cross_compiling" = maybe; then
4058 cross_compiling=yes
4059 else
4060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004063If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004064See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 fi
4066 fi
4067fi
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4069$as_echo "$cross_compiling" >&6; }
4070
4071rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4072ac_clean_files=$ac_clean_files_save
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4074$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004075if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo_n "(cached) " >&6
4077else
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004079/* end confdefs.h. */
4080
4081int
4082main ()
4083{
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004090if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 for ac_file in conftest.o conftest.obj conftest.*; do
4102 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4106 break;;
4107 esac
4108done
4109else
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004111sed 's/^/| /' conftest.$ac_ext >&5
4112
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004115as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004116See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004117fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4121$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004122OBJEXT=$ac_cv_objext
4123ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4125$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004126if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
Martin v. Löwis11437992002-04-12 09:54:03 +00004132int
4133main ()
4134{
4135#ifndef __GNUC__
4136 choke me
4137#endif
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_compiler_gnu=yes
4145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004149ac_cv_c_compiler_gnu=$ac_compiler_gnu
4150
4151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4153$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4154if test $ac_compiler_gnu = yes; then
4155 GCC=yes
4156else
4157 GCC=
4158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_test_CFLAGS=${CFLAGS+set}
4160ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4162$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166 ac_save_c_werror_flag=$ac_c_werror_flag
4167 ac_c_werror_flag=yes
4168 ac_cv_prog_cc_g=no
4169 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Martin v. Löwis11437992002-04-12 09:54:03 +00004173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004182 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 CFLAGS=""
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186/* end confdefs.h. */
4187
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197
Matthias Kloseb9621712010-04-24 17:59:49 +00004198else
4199 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4220 ac_c_werror_flag=$ac_save_c_werror_flag
4221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4223$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004224if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004226elif test $ac_cv_prog_cc_g = yes; then
4227 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 CFLAGS="-g -O2"
4229 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004230 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231 fi
4232else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004233 if test "$GCC" = yes; then
4234 CFLAGS="-O2"
4235 else
4236 CFLAGS=
4237 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4240$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004241if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004243else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004245ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#include <stdarg.h>
4249#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004250struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004251/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4252struct buf { int x; };
4253FILE * (*rcsopen) (struct buf *, struct stat *, int);
4254static char *e (p, i)
4255 char **p;
4256 int i;
4257{
4258 return p[i];
4259}
4260static char *f (char * (*g) (char **, int), char **p, ...)
4261{
4262 char *s;
4263 va_list v;
4264 va_start (v,p);
4265 s = g (p, va_arg (v,int));
4266 va_end (v);
4267 return s;
4268}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004269
4270/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4271 function prototypes and stuff, but not '\xHH' hex character constants.
4272 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004274 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4275 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004277int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4280 inside strings and character constants. */
4281#define FOO(x) 'x'
4282int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4283
Skip Montanaro6dead952003-09-25 14:50:04 +00004284int test (int i, double x);
4285struct s1 {int (*f) (int a);};
4286struct s2 {int (*f) (double a);};
4287int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4288int argc;
4289char **argv;
4290int
4291main ()
4292{
4293return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4294 ;
4295 return 0;
4296}
4297_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4299 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004300do
4301 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305rm -f core conftest.err conftest.$ac_objext
4306 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004307done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309CC=$ac_save_CC
4310
4311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312# AC_CACHE_VAL
4313case "x$ac_cv_prog_cc_c89" in
4314 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4316$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4319$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004320 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4323$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004326
Matthias Kloseb9621712010-04-24 17:59:49 +00004327fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004328
Martin v. Löwis11437992002-04-12 09:54:03 +00004329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4341$as_echo_n "checking how to run the C preprocessor... " >&6; }
4342# On Suns, sometimes $CPP names a directory.
4343if test -n "$CPP" && test -d "$CPP"; then
4344 CPP=
4345fi
4346if test -z "$CPP"; then
4347 if ${ac_cv_prog_CPP+:} false; then :
4348 $as_echo_n "(cached) " >&6
4349else
4350 # Double quotes because CPP needs to be expanded
4351 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4352 do
4353 ac_preproc_ok=false
4354for ac_c_preproc_warn_flag in '' yes
4355do
4356 # Use a header file that comes with gcc, so configuring glibc
4357 # with a fresh cross-compiler works.
4358 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4359 # <limits.h> exists even on freestanding compilers.
4360 # On the NeXT, cc -E runs the code through the compiler's parser,
4361 # not just through cpp. "Syntax error" is here to catch this case.
4362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4363/* end confdefs.h. */
4364#ifdef __STDC__
4365# include <limits.h>
4366#else
4367# include <assert.h>
4368#endif
4369 Syntax error
4370_ACEOF
4371if ac_fn_c_try_cpp "$LINENO"; then :
4372
4373else
4374 # Broken: fails on valid input.
4375continue
4376fi
4377rm -f conftest.err conftest.i conftest.$ac_ext
4378
4379 # OK, works on sane cases. Now check whether nonexistent headers
4380 # can be detected and how.
4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382/* end confdefs.h. */
4383#include <ac_nonexistent.h>
4384_ACEOF
4385if ac_fn_c_try_cpp "$LINENO"; then :
4386 # Broken: success on invalid input.
4387continue
4388else
4389 # Passes both tests.
4390ac_preproc_ok=:
4391break
4392fi
4393rm -f conftest.err conftest.i conftest.$ac_ext
4394
4395done
4396# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4397rm -f conftest.i conftest.err conftest.$ac_ext
4398if $ac_preproc_ok; then :
4399 break
4400fi
4401
4402 done
4403 ac_cv_prog_CPP=$CPP
4404
4405fi
4406 CPP=$ac_cv_prog_CPP
4407else
4408 ac_cv_prog_CPP=$CPP
4409fi
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4411$as_echo "$CPP" >&6; }
4412ac_preproc_ok=false
4413for ac_c_preproc_warn_flag in '' yes
4414do
4415 # Use a header file that comes with gcc, so configuring glibc
4416 # with a fresh cross-compiler works.
4417 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4418 # <limits.h> exists even on freestanding compilers.
4419 # On the NeXT, cc -E runs the code through the compiler's parser,
4420 # not just through cpp. "Syntax error" is here to catch this case.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#ifdef __STDC__
4424# include <limits.h>
4425#else
4426# include <assert.h>
4427#endif
4428 Syntax error
4429_ACEOF
4430if ac_fn_c_try_cpp "$LINENO"; then :
4431
4432else
4433 # Broken: fails on valid input.
4434continue
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438 # OK, works on sane cases. Now check whether nonexistent headers
4439 # can be detected and how.
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h. */
4442#include <ac_nonexistent.h>
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445 # Broken: success on invalid input.
4446continue
4447else
4448 # Passes both tests.
4449ac_preproc_ok=:
4450break
4451fi
4452rm -f conftest.err conftest.i conftest.$ac_ext
4453
4454done
4455# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4456rm -f conftest.i conftest.err conftest.$ac_ext
4457if $ac_preproc_ok; then :
4458
4459else
4460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4462as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4463See \`config.log' for more details" "$LINENO" 5; }
4464fi
4465
4466ac_ext=c
4467ac_cpp='$CPP $CPPFLAGS'
4468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4470ac_compiler_gnu=$ac_cv_c_compiler_gnu
4471
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4473$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4474if ${ac_cv_path_GREP+:} false; then :
4475 $as_echo_n "(cached) " >&6
4476else
4477 if test -z "$GREP"; then
4478 ac_path_GREP_found=false
4479 # Loop through the user's path and test for each of PROGNAME-LIST
4480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4482do
4483 IFS=$as_save_IFS
4484 test -z "$as_dir" && as_dir=.
4485 for ac_prog in grep ggrep; do
4486 for ac_exec_ext in '' $ac_executable_extensions; do
4487 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4488 as_fn_executable_p "$ac_path_GREP" || continue
4489# Check for GNU ac_path_GREP and select it if it is found.
4490 # Check for GNU $ac_path_GREP
4491case `"$ac_path_GREP" --version 2>&1` in
4492*GNU*)
4493 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4494*)
4495 ac_count=0
4496 $as_echo_n 0123456789 >"conftest.in"
4497 while :
4498 do
4499 cat "conftest.in" "conftest.in" >"conftest.tmp"
4500 mv "conftest.tmp" "conftest.in"
4501 cp "conftest.in" "conftest.nl"
4502 $as_echo 'GREP' >> "conftest.nl"
4503 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4504 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4505 as_fn_arith $ac_count + 1 && ac_count=$as_val
4506 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4507 # Best one so far, save it but keep looking for a better one
4508 ac_cv_path_GREP="$ac_path_GREP"
4509 ac_path_GREP_max=$ac_count
4510 fi
4511 # 10*(2^10) chars as input seems more than enough
4512 test $ac_count -gt 10 && break
4513 done
4514 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4515esac
4516
4517 $ac_path_GREP_found && break 3
4518 done
4519 done
4520 done
4521IFS=$as_save_IFS
4522 if test -z "$ac_cv_path_GREP"; then
4523 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4524 fi
4525else
4526 ac_cv_path_GREP=$GREP
4527fi
4528
4529fi
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4531$as_echo "$ac_cv_path_GREP" >&6; }
4532 GREP="$ac_cv_path_GREP"
4533
4534
Łukasz Langaa785c872016-09-09 17:37:37 -07004535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4536$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4537if ${ac_cv_path_SED+:} false; then :
4538 $as_echo_n "(cached) " >&6
4539else
4540 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4541 for ac_i in 1 2 3 4 5 6 7; do
4542 ac_script="$ac_script$as_nl$ac_script"
4543 done
4544 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4545 { ac_script=; unset ac_script;}
4546 if test -z "$SED"; then
4547 ac_path_SED_found=false
4548 # Loop through the user's path and test for each of PROGNAME-LIST
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
4554 for ac_prog in sed gsed; do
4555 for ac_exec_ext in '' $ac_executable_extensions; do
4556 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4557 as_fn_executable_p "$ac_path_SED" || continue
4558# Check for GNU ac_path_SED and select it if it is found.
4559 # Check for GNU $ac_path_SED
4560case `"$ac_path_SED" --version 2>&1` in
4561*GNU*)
4562 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4563*)
4564 ac_count=0
4565 $as_echo_n 0123456789 >"conftest.in"
4566 while :
4567 do
4568 cat "conftest.in" "conftest.in" >"conftest.tmp"
4569 mv "conftest.tmp" "conftest.in"
4570 cp "conftest.in" "conftest.nl"
4571 $as_echo '' >> "conftest.nl"
4572 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4573 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4574 as_fn_arith $ac_count + 1 && ac_count=$as_val
4575 if test $ac_count -gt ${ac_path_SED_max-0}; then
4576 # Best one so far, save it but keep looking for a better one
4577 ac_cv_path_SED="$ac_path_SED"
4578 ac_path_SED_max=$ac_count
4579 fi
4580 # 10*(2^10) chars as input seems more than enough
4581 test $ac_count -gt 10 && break
4582 done
4583 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4584esac
4585
4586 $ac_path_SED_found && break 3
4587 done
4588 done
4589 done
4590IFS=$as_save_IFS
4591 if test -z "$ac_cv_path_SED"; then
4592 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4593 fi
4594else
4595 ac_cv_path_SED=$SED
4596fi
4597
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4600$as_echo "$ac_cv_path_SED" >&6; }
4601 SED="$ac_cv_path_SED"
4602 rm -f conftest.sed
4603
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004604
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605
4606
Matthias Kloseb9621712010-04-24 17:59:49 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4608$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004610# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004611if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
4614 case $withval in
4615 no) with_cxx_main=no
4616 MAINCC='$(CC)';;
4617 yes) with_cxx_main=yes
4618 MAINCC='$(CXX)';;
4619 *) with_cxx_main=yes
4620 MAINCC=$withval
4621 if test -z "$CXX"
4622 then
4623 CXX=$withval
4624 fi;;
4625 esac
4626else
4627
4628 with_cxx_main=no
4629 MAINCC='$(CC)'
4630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4634$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636preset_cxx="$CXX"
4637if test -z "$CXX"
4638then
4639 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 gcc) if test -n "$ac_tool_prefix"; then
4641 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4642set dummy ${ac_tool_prefix}g++; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_CXX+:} false; then :
4646 $as_echo_n "(cached) " >&6
4647else
4648 case $CXX in
4649 [\\/]* | ?:[\\/]*)
4650 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4651 ;;
4652 *)
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in notfound
4655do
4656 IFS=$as_save_IFS
4657 test -z "$as_dir" && as_dir=.
4658 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662 break 2
4663 fi
4664done
4665 done
4666IFS=$as_save_IFS
4667
4668 ;;
4669esac
4670fi
4671CXX=$ac_cv_path_CXX
4672if test -n "$CXX"; then
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4674$as_echo "$CXX" >&6; }
4675else
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681fi
4682if test -z "$ac_cv_path_CXX"; then
4683 ac_pt_CXX=$CXX
4684 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004685set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688if ${ac_cv_path_ac_pt_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690else
4691 case $ac_pt_CXX in
4692 [\\/]* | ?:[\\/]*)
4693 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4694 ;;
4695 *)
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in notfound
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
4707done
4708 done
4709IFS=$as_save_IFS
4710
4711 ;;
4712esac
4713fi
4714ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4715if test -n "$ac_pt_CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4717$as_echo "$ac_pt_CXX" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723 if test "x$ac_pt_CXX" = x; then
4724 CXX="g++"
4725 else
4726 case $cross_compiling:$ac_tool_warned in
4727yes:)
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4730ac_tool_warned=yes ;;
4731esac
4732 CXX=$ac_pt_CXX
4733 fi
4734else
4735 CXX="$ac_cv_path_CXX"
4736fi
4737 ;;
4738 cc) if test -n "$ac_tool_prefix"; then
4739 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4740set dummy ${ac_tool_prefix}c++; ac_word=$2
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004743if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745else
4746 case $CXX in
4747 [\\/]* | ?:[\\/]*)
4748 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4749 ;;
4750 *)
4751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in notfound
4753do
4754 IFS=$as_save_IFS
4755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760 break 2
4761 fi
4762done
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 ;;
4767esac
4768fi
4769CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004770if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4772$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004773else
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004777
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778
4779fi
4780if test -z "$ac_cv_path_CXX"; then
4781 ac_pt_CXX=$CXX
4782 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004786if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 ;;
4793 *)
4794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in notfound
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 break 2
4804 fi
4805done
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 ;;
4810esac
4811fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4813if test -n "$ac_pt_CXX"; then
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4815$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816else
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004820
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 if test "x$ac_pt_CXX" = x; then
4822 CXX="c++"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_pt_CXX
4831 fi
4832else
4833 CXX="$ac_cv_path_CXX"
4834fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 clang|*/clang) if test -n "$ac_tool_prefix"; then
4837 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4838set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if ${ac_cv_path_CXX+:} false; then :
4842 $as_echo_n "(cached) " >&6
4843else
4844 case $CXX in
4845 [\\/]* | ?:[\\/]*)
4846 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in notfound
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004856 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860done
4861 done
4862IFS=$as_save_IFS
4863
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864 ;;
4865esac
4866fi
4867CXX=$ac_cv_path_CXX
4868if test -n "$CXX"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4870$as_echo "$CXX" >&6; }
4871else
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876
4877fi
4878if test -z "$ac_cv_path_CXX"; then
4879 ac_pt_CXX=$CXX
4880 # Extract the first word of "clang++", so it can be a program name with args.
4881set dummy clang++; ac_word=$2
4882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883$as_echo_n "checking for $ac_word... " >&6; }
4884if ${ac_cv_path_ac_pt_CXX+:} false; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 case $ac_pt_CXX in
4888 [\\/]* | ?:[\\/]*)
4889 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4890 ;;
4891 *)
4892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893for as_dir in notfound
4894do
4895 IFS=$as_save_IFS
4896 test -z "$as_dir" && as_dir=.
4897 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004899 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901 break 2
4902 fi
4903done
4904 done
4905IFS=$as_save_IFS
4906
4907 ;;
4908esac
4909fi
4910ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4911if test -n "$ac_pt_CXX"; then
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4913$as_echo "$ac_pt_CXX" >&6; }
4914else
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916$as_echo "no" >&6; }
4917fi
4918
4919 if test "x$ac_pt_CXX" = x; then
4920 CXX="clang++"
4921 else
4922 case $cross_compiling:$ac_tool_warned in
4923yes:)
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4926ac_tool_warned=yes ;;
4927esac
4928 CXX=$ac_pt_CXX
4929 fi
4930else
4931 CXX="$ac_cv_path_CXX"
4932fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004933 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004934 icc|*/icc) if test -n "$ac_tool_prefix"; then
4935 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4936set dummy ${ac_tool_prefix}icpc; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_CXX+:} false; then :
4940 $as_echo_n "(cached) " >&6
4941else
4942 case $CXX in
4943 [\\/]* | ?:[\\/]*)
4944 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4945 ;;
4946 *)
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in notfound
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
4953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962 ;;
4963esac
4964fi
4965CXX=$ac_cv_path_CXX
4966if test -n "$CXX"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4968$as_echo "$CXX" >&6; }
4969else
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974
4975fi
4976if test -z "$ac_cv_path_CXX"; then
4977 ac_pt_CXX=$CXX
4978 # Extract the first word of "icpc", so it can be a program name with args.
4979set dummy icpc; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_ac_pt_CXX+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 case $ac_pt_CXX in
4986 [\\/]* | ?:[\\/]*)
4987 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4988 ;;
4989 *)
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in notfound
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999 break 2
5000 fi
5001done
5002 done
5003IFS=$as_save_IFS
5004
5005 ;;
5006esac
5007fi
5008ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5009if test -n "$ac_pt_CXX"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5011$as_echo "$ac_pt_CXX" >&6; }
5012else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017 if test "x$ac_pt_CXX" = x; then
5018 CXX="icpc"
5019 else
5020 case $cross_compiling:$ac_tool_warned in
5021yes:)
5022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5024ac_tool_warned=yes ;;
5025esac
5026 CXX=$ac_pt_CXX
5027 fi
5028else
5029 CXX="$ac_cv_path_CXX"
5030fi
5031 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032 esac
5033 if test "$CXX" = "notfound"
5034 then
5035 CXX=""
5036 fi
5037fi
5038if test -z "$CXX"
5039then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 if test -n "$ac_tool_prefix"; then
5041 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5042 do
5043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005047if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
5050 if test -n "$CXX"; then
5051 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067
5068fi
5069fi
5070CXX=$ac_cv_prog_CXX
5071if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077fi
5078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 test -n "$CXX" && break
5081 done
5082fi
5083if test -z "$CXX"; then
5084 ac_ct_CXX=$CXX
5085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5086do
5087 # Extract the first word of "$ac_prog", so it can be a program name with args.
5088set dummy $ac_prog; ac_word=$2
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
5091if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5092 $as_echo_n "(cached) " >&6
5093else
5094 if test -n "$ac_ct_CXX"; then
5095 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5096else
5097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
5102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 ac_cv_prog_ac_ct_CXX="$ac_prog"
5105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106 break 2
5107 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005109 done
5110IFS=$as_save_IFS
5111
5112fi
5113fi
5114ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5115if test -n "$ac_ct_CXX"; then
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5117$as_echo "$ac_ct_CXX" >&6; }
5118else
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
5121fi
5122
5123
5124 test -n "$ac_ct_CXX" && break
5125done
5126
5127 if test "x$ac_ct_CXX" = x; then
5128 CXX="notfound"
5129 else
5130 case $cross_compiling:$ac_tool_warned in
5131yes:)
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5134ac_tool_warned=yes ;;
5135esac
5136 CXX=$ac_ct_CXX
5137 fi
5138fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139
5140 if test "$CXX" = "notfound"
5141 then
5142 CXX=""
5143 fi
5144fi
5145if test "$preset_cxx" != "$CXX"
5146then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005147 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148
5149 By default, distutils will build C++ extension modules with \"$CXX\".
5150 If this is not intended, then set CXX on the configure command line.
5151 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005152$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005153
5154 By default, distutils will build C++ extension modules with \"$CXX\".
5155 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005156 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005157fi
5158
5159
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005160MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5161
5162
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5164$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5165cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005166#undef bfin
5167#undef cris
5168#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005170#undef hppa
5171#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005172#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005173#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005174#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005175#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005176#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005177#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005178 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005179#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005180# if defined(__x86_64__) && defined(__LP64__)
5181 x86_64-linux-gnu
5182# elif defined(__x86_64__) && defined(__ILP32__)
5183 x86_64-linux-gnux32
5184# elif defined(__i386__)
5185 i386-linux-gnu
5186# elif defined(__aarch64__) && defined(__AARCH64EL__)
5187# if defined(__ILP32__)
5188 aarch64_ilp32-linux-gnu
5189# else
5190 aarch64-linux-gnu
5191# endif
5192# elif defined(__aarch64__) && defined(__AARCH64EB__)
5193# if defined(__ILP32__)
5194 aarch64_be_ilp32-linux-gnu
5195# else
5196 aarch64_be-linux-gnu
5197# endif
5198# elif defined(__alpha__)
5199 alpha-linux-gnu
5200# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5201# if defined(__ARMEL__)
5202 arm-linux-gnueabihf
5203# else
5204 armeb-linux-gnueabihf
5205# endif
5206# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5207# if defined(__ARMEL__)
5208 arm-linux-gnueabi
5209# else
5210 armeb-linux-gnueabi
5211# endif
5212# elif defined(__hppa__)
5213 hppa-linux-gnu
5214# elif defined(__ia64__)
5215 ia64-linux-gnu
5216# elif defined(__m68k__) && !defined(__mcoldfire__)
5217 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005218# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5219# if _MIPS_SIM == _ABIO32
5220 mipsisa32r6el-linux-gnu
5221# elif _MIPS_SIM == _ABIN32
5222 mipsisa64r6el-linux-gnuabin32
5223# elif _MIPS_SIM == _ABI64
5224 mipsisa64r6el-linux-gnuabi64
5225# else
5226# error unknown platform triplet
5227# endif
5228# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5229# if _MIPS_SIM == _ABIO32
5230 mipsisa32r6-linux-gnu
5231# elif _MIPS_SIM == _ABIN32
5232 mipsisa64r6-linux-gnuabin32
5233# elif _MIPS_SIM == _ABI64
5234 mipsisa64r6-linux-gnuabi64
5235# else
5236# error unknown platform triplet
5237# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# elif defined(__mips_hard_float) && defined(_MIPSEL)
5239# if _MIPS_SIM == _ABIO32
5240 mipsel-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mips64el-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mips64el-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
5248# elif defined(__mips_hard_float)
5249# if _MIPS_SIM == _ABIO32
5250 mips-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__or1k__)
5259 or1k-linux-gnu
5260# elif defined(__powerpc__) && defined(__SPE__)
5261 powerpc-linux-gnuspe
5262# elif defined(__powerpc64__)
5263# if defined(__LITTLE_ENDIAN__)
5264 powerpc64le-linux-gnu
5265# else
5266 powerpc64-linux-gnu
5267# endif
5268# elif defined(__powerpc__)
5269 powerpc-linux-gnu
5270# elif defined(__s390x__)
5271 s390x-linux-gnu
5272# elif defined(__s390__)
5273 s390-linux-gnu
5274# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5275 sh4-linux-gnu
5276# elif defined(__sparc__) && defined(__arch64__)
5277 sparc64-linux-gnu
5278# elif defined(__sparc__)
5279 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005280# elif defined(__riscv)
5281# if __riscv_xlen == 32
5282 riscv32-linux-gnu
5283# elif __riscv_xlen == 64
5284 riscv64-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__FreeBSD_kernel__)
5292# if defined(__LP64__)
5293 x86_64-kfreebsd-gnu
5294# elif defined(__i386__)
5295 i386-kfreebsd-gnu
5296# else
5297# error unknown platform triplet
5298# endif
5299#elif defined(__gnu_hurd__)
5300 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005301#elif defined(__APPLE__)
5302 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005303#elif defined(__VXWORKS__)
5304 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305#else
5306# error unknown platform triplet
5307#endif
5308
5309EOF
5310
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005311if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5314$as_echo "$PLATFORM_TRIPLET" >&6; }
5315else
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5317$as_echo "none" >&6; }
5318fi
5319rm -f conftest.c conftest.out
5320
5321if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5322 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5323 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5324 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005325elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5326 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328
doko@ubuntu.com55532312016-06-14 08:55:19 +02005329if test x$MULTIARCH != x; then
5330 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5331fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332
5333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5335$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5336save_LDFLAGS="$LDFLAGS"
5337LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5340/* end confdefs.h. */
5341
5342int
5343main ()
5344{
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350if ac_fn_c_try_link "$LINENO"; then :
5351 NO_AS_NEEDED="-Wl,--no-as-needed"
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5353$as_echo "yes" >&6; }
5354else
5355 NO_AS_NEEDED=""
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359rm -f core conftest.err conftest.$ac_objext \
5360 conftest$ac_exeext conftest.$ac_ext
5361LDFLAGS="$save_LDFLAGS"
5362
5363
5364
5365# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5368$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005369if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371else
5372 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5373 then ac_cv_path_EGREP="$GREP -E"
5374 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 # Loop through the user's path and test for each of PROGNAME-LIST
5378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5380do
5381 IFS=$as_save_IFS
5382 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 for ac_prog in egrep; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005386 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005387# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 # Check for GNU $ac_path_EGREP
5389case `"$ac_path_EGREP" --version 2>&1` in
5390*GNU*)
5391 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5392*)
5393 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 while :
5396 do
5397 cat "conftest.in" "conftest.in" >"conftest.tmp"
5398 mv "conftest.tmp" "conftest.in"
5399 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5405 # Best one so far, save it but keep looking for a better one
5406 ac_cv_path_EGREP="$ac_path_EGREP"
5407 ac_path_EGREP_max=$ac_count
5408 fi
5409 # 10*(2^10) chars as input seems more than enough
5410 test $ac_count -gt 10 && break
5411 done
5412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5413esac
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $ac_path_EGREP_found && break 3
5416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005421 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423else
5424 ac_cv_path_EGREP=$EGREP
5425fi
5426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 fi
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5430$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005432
5433
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5435$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005436if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo_n "(cached) " >&6
5438else
5439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005441#include <stdlib.h>
5442#include <stdarg.h>
5443#include <string.h>
5444#include <float.h>
5445
5446int
5447main ()
5448{
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_header_stdc=yes
5456else
5457 ac_cv_header_stdc=no
5458fi
5459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471else
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005474rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Matthias Kloseb9621712010-04-24 17:59:49 +00005476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <stdlib.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "free" >/dev/null 2>&1; then :
5487
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f conftest*
5492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5497 if test "$cross_compiling" = yes; then :
5498 :
5499else
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <ctype.h>
5503#include <stdlib.h>
5504#if ((' ' & 0x0FF) == 0x020)
5505# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5506# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5507#else
5508# define ISLOWER(c) \
5509 (('a' <= (c) && (c) <= 'i') \
5510 || ('j' <= (c) && (c) <= 'r') \
5511 || ('s' <= (c) && (c) <= 'z'))
5512# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5513#endif
5514
5515#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5516int
5517main ()
5518{
5519 int i;
5520 for (i = 0; i < 256; i++)
5521 if (XOR (islower (i), ISLOWER (i))
5522 || toupper (i) != TOUPPER (i))
5523 return 2;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_run "$LINENO"; then :
5528
5529else
5530 ac_cv_header_stdc=no
5531fi
5532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5533 conftest.$ac_objext conftest.beam conftest.$ac_ext
5534fi
5535
5536fi
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5539$as_echo "$ac_cv_header_stdc" >&6; }
5540if test $ac_cv_header_stdc = yes; then
5541
5542$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5543
5544fi
5545
5546# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5547for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5548 inttypes.h stdint.h unistd.h
5549do :
5550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5551ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5552"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat >>confdefs.h <<_ACEOF
5555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
5560done
5561
5562
5563
5564 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005565if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 MINIX=yes
5567else
5568 MINIX=
5569fi
5570
5571
5572 if test "$MINIX" = yes; then
5573
5574$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5575
5576
5577$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5578
5579
5580$as_echo "#define _MINIX 1" >>confdefs.h
5581
5582 fi
5583
5584
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5586$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005587if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 $as_echo_n "(cached) " >&6
5589else
5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5591/* end confdefs.h. */
5592
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005593# define __EXTENSIONS__ 1
5594 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_safe_to_define___extensions__=yes
5605else
5606 ac_cv_safe_to_define___extensions__=no
5607fi
5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5609fi
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5611$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5612 test $ac_cv_safe_to_define___extensions__ = yes &&
5613 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5614
5615 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5618
5619 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5620
5621 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5622
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5626$as_echo_n "checking for the Android API level... " >&6; }
5627cat >> conftest.c <<EOF
5628#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005629android_api = __ANDROID_API__
5630arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631#else
5632#error not Android
5633#endif
5634EOF
5635
5636if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5638 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5640$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005641 if test -z "$ANDROID_API_LEVEL"; then
5642 echo 'Fatal: you must define __ANDROID_API__'
5643 exit 1
5644 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645
5646cat >>confdefs.h <<_ACEOF
5647#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5648_ACEOF
5649
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005650
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5652$as_echo_n "checking for the Android arm ABI... " >&6; }
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5654$as_echo "$_arm_arch" >&6; }
5655 if test "$_arm_arch" = 7; then
5656 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5657 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5658 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659else
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5661$as_echo "not Android" >&6; }
5662fi
5663rm -f conftest.c conftest.out
5664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665# Check for unsupported systems
5666case $ac_sys_system/$ac_sys_release in
5667atheos*|Linux*/1*)
5668 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5669 echo See README for details.
5670 exit 1;;
5671esac
5672
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5675$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005678if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 withval=$with_suffix;
5680 case $withval in
5681 no) EXEEXT=;;
5682 yes) EXEEXT=.exe;;
5683 *) EXEEXT=$withval;;
5684 esac
5685fi
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5688$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Test whether we're running on a non-case-sensitive system, in which
5691# case we give a warning if no ext is given
5692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5694$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test ! -d CaseSensitiveTestDir; then
5696mkdir CaseSensitiveTestDir
5697fi
5698
5699if test -d casesensitivetestdir
5700then
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5702$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 BUILDEXEEXT=.exe
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 BUILDEXEEXT=$EXEEXT
5708fi
5709rmdir CaseSensitiveTestDir
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711case $ac_sys_system in
5712hp*|HP*)
5713 case $CC in
5714 cc|*/cc) CC="$CC -Ae";;
5715 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716esac
5717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5720$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721if test -z "$LIBRARY"
5722then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005723 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5726$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# LDLIBRARY is the name of the library to link against (as opposed to the
5729# name of the library into which to insert object files). BLDLIBRARY is also
5730# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5731# is blank as the main program is not linked directly against LDLIBRARY.
5732# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5733# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5734# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5735# DLLLIBRARY is the shared (i.e., DLL) library.
5736#
5737# RUNSHARED is used to run shared python without installed libraries
5738#
5739# INSTSONAME is the name of the shared library that will be use to install
5740# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005741#
5742# LDVERSION is the shared library version number, normally the Python version
5743# with the ABI build flags appended.
5744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746
5747
5748
5749
5750
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752LDLIBRARY="$LIBRARY"
5753BLDLIBRARY='$(LDLIBRARY)'
5754INSTSONAME='$(LDLIBRARY)'
5755DLLLIBRARY=''
5756LDLIBRARYDIR=''
5757RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005758LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LINKCC is the command that links the python executable -- default is $(CC).
5761# If CXX is set, and if it is needed to link a main function that was
5762# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5763# python might then depend on the C++ runtime
5764# This is altered for AIX in order to build the export list before
5765# linking.
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5768$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769if test -z "$LINKCC"
5770then
5771 LINKCC='$(PURIFY) $(MAINCC)'
5772 case $ac_sys_system in
5773 AIX*)
5774 exp_extra="\"\""
5775 if test $ac_sys_release -ge 5 -o \
5776 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5777 exp_extra="."
5778 fi
5779 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 QNX*)
5781 # qcc must be used because the other compilers do not
5782 # support -N.
5783 LINKCC=qcc;;
5784 esac
5785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5787$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
5789# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5790# make sure we default having it set to "no": this is used by
5791# distutils.unixccompiler to know if it should add --enable-new-dtags
5792# to linker command lines, and failing to detect GNU ld simply results
5793# in the same bahaviour as before.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5796$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797ac_prog=ld
5798if test "$GCC" = yes; then
5799 ac_prog=`$CC -print-prog-name=ld`
5800fi
5801case `"$ac_prog" -V 2>&1 < /dev/null` in
5802 *GNU*)
5803 GNULD=yes;;
5804 *)
5805 GNULD=no;;
5806esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5808$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5811$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 enableval=$enable_shared;
5815fi
5816
5817
5818if test -z "$enable_shared"
5819then
5820 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005821 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 enable_shared="yes";;
5823 *)
5824 enable_shared="no";;
5825 esac
5826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5828$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5831$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enableval=$enable_profiling;
5835fi
5836
5837if test "x$enable_profiling" = xyes; then
5838 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005839 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841/* end confdefs.h. */
5842int main() { return 0; }
5843_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844if ac_fn_c_try_link "$LINENO"; then :
5845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005847 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849rm -f core conftest.err conftest.$ac_objext \
5850 conftest$ac_exeext conftest.$ac_ext
5851 CC="$ac_save_cc"
5852else
5853 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5856$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858if test "x$enable_profiling" = xyes; then
5859 BASECFLAGS="-pg $BASECFLAGS"
5860 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
5862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865
5866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5867# library that we build, but we do not want to link against it (we
5868# will find it with a -framework option). For this reason there is an
5869# extra variable BLDLIBRARY against which Python and the extension
5870# modules are linked, BLDLIBRARY. This is normally the same as
5871# LDLIBRARY, but empty for MacOSX framework builds.
5872if test "$enable_framework"
5873then
5874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005875 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 BLDLIBRARY=''
5877else
5878 BLDLIBRARY='$(LDLIBRARY)'
5879fi
5880
5881# Other platforms follow
5882if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005883 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887 case $ac_sys_system in
5888 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).dll.a'
5890 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
5892 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).so'
5894 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005897 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005898 then
5899 PY3LIBRARY=libpython3.so
5900 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005902 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
5904 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005907 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005908 then
5909 PY3LIBRARY=libpython3.so
5910 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 hp*|HP*)
5913 case `uname -m` in
5914 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
5920 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).dylib'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005929 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005932 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934 esac
5935else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005936 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 case $ac_sys_system in
5938 CYGWIN*)
5939 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
5943fi
5944
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005945if test "$cross_compiling" = yes; then
5946 RUNSHARED=
5947fi
5948
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5950$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005953if test -n "$ac_tool_prefix"; then
5954 for ac_prog in ar aal
5955 do
5956 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005960if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962else
5963 if test -n "$AR"; then
5964 ac_cv_prog_AR="$AR" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 break 2
5976 fi
5977done
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979IFS=$as_save_IFS
5980
5981fi
5982fi
5983AR=$ac_cv_prog_AR
5984if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5986$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
5991
5992
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005993 test -n "$AR" && break
5994 done
5995fi
5996if test -z "$AR"; then
5997 ac_ct_AR=$AR
5998 for ac_prog in ar aal
5999do
6000 # Extract the first word of "$ac_prog", so it can be a program name with args.
6001set dummy $ac_prog; ac_word=$2
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003$as_echo_n "checking for $ac_word... " >&6; }
6004if ${ac_cv_prog_ac_ct_AR+:} false; then :
6005 $as_echo_n "(cached) " >&6
6006else
6007 if test -n "$ac_ct_AR"; then
6008 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6009else
6010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011for as_dir in $PATH
6012do
6013 IFS=$as_save_IFS
6014 test -z "$as_dir" && as_dir=.
6015 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 ac_cv_prog_ac_ct_AR="$ac_prog"
6018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6019 break 2
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 done
6023IFS=$as_save_IFS
6024
6025fi
6026fi
6027ac_ct_AR=$ac_cv_prog_ac_ct_AR
6028if test -n "$ac_ct_AR"; then
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6030$as_echo "$ac_ct_AR" >&6; }
6031else
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033$as_echo "no" >&6; }
6034fi
6035
6036
6037 test -n "$ac_ct_AR" && break
6038done
6039
6040 if test "x$ac_ct_AR" = x; then
6041 AR="ar"
6042 else
6043 case $cross_compiling:$ac_tool_warned in
6044yes:)
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6047ac_tool_warned=yes ;;
6048esac
6049 AR=$ac_ct_AR
6050 fi
6051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052
6053
6054# tweak ARFLAGS only if the user didn't set it on the command line
6055
6056if test -z "$ARFLAGS"
6057then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006058 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
doko@ubuntu.com58844492012-06-30 18:25:32 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in readelf
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
6068if ${ac_cv_prog_READELF+:} false; then :
6069 $as_echo_n "(cached) " >&6
6070else
6071 if test -n "$READELF"; then
6072 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
6079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006081 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083 break 2
6084 fi
6085done
6086 done
6087IFS=$as_save_IFS
6088
6089fi
6090fi
6091READELF=$ac_cv_prog_READELF
6092if test -n "$READELF"; then
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6094$as_echo "$READELF" >&6; }
6095else
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
6098fi
6099
6100
6101 test -n "$READELF" && break
6102 done
6103fi
6104if test -z "$READELF"; then
6105 ac_ct_READELF=$READELF
6106 for ac_prog in readelf
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_READELF"; then
6116 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006125 ac_cv_prog_ac_ct_READELF="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
6129done
6130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6136if test -n "$ac_ct_READELF"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6138$as_echo "$ac_ct_READELF" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_READELF" && break
6146done
6147
6148 if test "x$ac_ct_READELF" = x; then
6149 READELF=":"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 READELF=$ac_ct_READELF
6158 fi
6159fi
6160
6161if test "$cross_compiling" = yes; then
6162 case "$READELF" in
6163 readelf|:)
6164 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6165 ;;
6166 esac
6167fi
6168
6169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006172hp*|HP*)
6173 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 if test -z "$INSTALL"
6175 then
6176 INSTALL="${srcdir}/install-sh -c"
6177 fi
6178esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179# Find a good install program. We prefer a C program (faster),
6180# so one script is as good as another. But avoid the broken or
6181# incompatible versions:
6182# SysV /etc/install, /usr/sbin/install
6183# SunOS /usr/etc/install
6184# IRIX /sbin/install
6185# AIX /bin/install
6186# AmigaOS /C/install, which installs bootblocks on floppy discs
6187# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6188# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6189# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6190# OS/2's system install, which has a completely different semantic
6191# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006192# Reject install programs that cannot install multiple files.
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6194$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006196if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198else
6199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH
6201do
6202 IFS=$as_save_IFS
6203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 # Account for people who put trailing slashes in PATH elements.
6205case $as_dir/ in #((
6206 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209 /usr/ucb/* ) ;;
6210 *)
6211 # OSF1 and SCO ODT 3.0 have their own names for install.
6212 # Don't use installbsd from OSF since it installs stuff as root
6213 # by default.
6214 for ac_prog in ginstall scoinst install; do
6215 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006216 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 if test $ac_prog = install &&
6218 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6219 # AIX install. It has an incompatible calling convention.
6220 :
6221 elif test $ac_prog = install &&
6222 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6223 # program-specific install script used by HP pwplus--don't use.
6224 :
6225 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 rm -rf conftest.one conftest.two conftest.dir
6227 echo one > conftest.one
6228 echo two > conftest.two
6229 mkdir conftest.dir
6230 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6231 test -s conftest.one && test -s conftest.two &&
6232 test -s conftest.dir/conftest.one &&
6233 test -s conftest.dir/conftest.two
6234 then
6235 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6236 break 3
6237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 fi
6239 fi
6240 done
6241 done
6242 ;;
6243esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006244
6245 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246IFS=$as_save_IFS
6247
Matthias Kloseb9621712010-04-24 17:59:49 +00006248rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250fi
6251 if test "${ac_cv_path_install+set}" = set; then
6252 INSTALL=$ac_cv_path_install
6253 else
6254 # As a last resort, use the slow shell script. Don't cache a
6255 # value for INSTALL within a source directory, because that will
6256 # break other packages using the cache if that directory is
6257 # removed, or if the value is a relative name.
6258 INSTALL=$ac_install_sh
6259 fi
6260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6262$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6265# It thinks the first close brace ends the variable substitution.
6266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6267
6268test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6269
6270test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6271
Matthias Klose93a0ef12012-03-15 18:08:34 +01006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6273$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6274if test -z "$MKDIR_P"; then
6275 if ${ac_cv_path_mkdir+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277else
6278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6280do
6281 IFS=$as_save_IFS
6282 test -z "$as_dir" && as_dir=.
6283 for ac_prog in mkdir gmkdir; do
6284 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006285 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006286 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6287 'mkdir (GNU coreutils) '* | \
6288 'mkdir (coreutils) '* | \
6289 'mkdir (fileutils) '4.1*)
6290 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6291 break 3;;
6292 esac
6293 done
6294 done
6295 done
6296IFS=$as_save_IFS
6297
6298fi
6299
6300 test -d ./--version && rmdir ./--version
6301 if test "${ac_cv_path_mkdir+set}" = set; then
6302 MKDIR_P="$ac_cv_path_mkdir -p"
6303 else
6304 # As a last resort, use the slow shell script. Don't cache a
6305 # value for MKDIR_P within a source directory, because that will
6306 # break other packages using the cache if that directory is
6307 # removed, or if the value is a relative name.
6308 MKDIR_P="$ac_install_sh -d"
6309 fi
6310fi
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6312$as_echo "$MKDIR_P" >&6; }
6313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Not every filesystem supports hard links
6316
6317if test -z "$LN" ; then
6318 case $ac_sys_system in
6319 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 *) LN=ln;;
6321 esac
6322fi
6323
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006324# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006325
6326ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6330$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
6332# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006333if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334 withval=$with_pydebug;
6335if test "$withval" != no
6336then
6337
Matthias Kloseb9621712010-04-24 17:59:49 +00006338$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6341$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006343 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006344else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347else
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
Victor Stinnerf4e47032019-04-25 00:56:28 +02006353# Check for --with-trace-refs
6354# --with-trace-refs
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6356$as_echo_n "checking for --with-trace-refs... " >&6; }
6357
6358# Check whether --with-trace-refs was given.
6359if test "${with_trace_refs+set}" = set; then :
6360 withval=$with_trace_refs;
6361else
6362 with_trace_refs=no
6363fi
6364
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6366$as_echo "$with_trace_refs" >&6; }
6367
6368if test "$with_trace_refs" = "yes"
6369then
6370
6371$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6372
6373fi
6374
6375# Check for --with-assertions.
6376# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006377assertions='false'
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6379$as_echo_n "checking for --with-assertions... " >&6; }
6380
6381# Check whether --with-assertions was given.
6382if test "${with_assertions+set}" = set; then :
6383 withval=$with_assertions;
6384if test "$withval" != no
6385then
6386 assertions='true'
6387fi
6388fi
6389
6390if test "$assertions" = 'true'; then
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392$as_echo "yes" >&6; }
6393elif test "$Py_DEBUG" = 'true'; then
6394 assertions='true'
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6396$as_echo "implied by --with-pydebug" >&6; }
6397else
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
Brett Cannon63d98bc2016-09-06 17:12:40 -07006402# Enable optimization flags
6403
6404
6405Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6407$as_echo_n "checking for --enable-optimizations... " >&6; }
6408# Check whether --enable-optimizations was given.
6409if test "${enable_optimizations+set}" = set; then :
6410 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006411if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412then
6413 Py_OPT='true'
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; };
6416else
6417 Py_OPT='false'
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; };
6420fi
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006427 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6428 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006429 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006430 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006431 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006432 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006433 DEF_MAKE_RULE="build_all"
6434else
6435 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006436 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006437 DEF_MAKE_RULE="all"
6438fi
6439
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006440
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6442$as_echo_n "checking PROFILE_TASK... " >&6; }
6443if test -z "$PROFILE_TASK"
6444then
6445 PROFILE_TASK='-m test --pgo'
6446fi
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6448$as_echo "$PROFILE_TASK" >&6; }
6449
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006450# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6451# normal names in the default $PATH (ie: Ubuntu). They exist under the
6452# non-suffixed name in their versioned llvm directory.
6453
6454llvm_bin_dir=''
6455llvm_path="${PATH}"
6456if test "${CC}" = "clang"
6457then
6458 clang_bin=`which clang`
6459 # Some systems install clang elsewhere as a symlink to the real path
6460 # which is where the related llvm tools are located.
6461 if test -L "${clang_bin}"
6462 then
6463 clang_dir=`dirname "${clang_bin}"`
6464 clang_bin=`readlink "${clang_bin}"`
6465 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6466 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6467 fi
6468fi
6469
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006470# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6472$as_echo_n "checking for --with-lto... " >&6; }
6473
6474# Check whether --with-lto was given.
6475if test "${with_lto+set}" = set; then :
6476 withval=$with_lto;
6477if test "$withval" != no
6478then
6479 Py_LTO='true'
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6481$as_echo "yes" >&6; };
6482else
6483 Py_LTO='false'
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; };
6486fi
6487else
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492if test "$Py_LTO" = 'true' ; then
6493 case $CC in
6494 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006495
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006496 if test -n "$ac_tool_prefix"; then
6497 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6498set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_LLVM_AR+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 case $LLVM_AR in
6505 [\\/]* | ?:[\\/]*)
6506 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6507 ;;
6508 *)
6509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in ${llvm_path}
6511do
6512 IFS=$as_save_IFS
6513 test -z "$as_dir" && as_dir=.
6514 for ac_exec_ext in '' $ac_executable_extensions; do
6515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518 break 2
6519 fi
6520done
6521 done
6522IFS=$as_save_IFS
6523
6524 ;;
6525esac
6526fi
6527LLVM_AR=$ac_cv_path_LLVM_AR
6528if test -n "$LLVM_AR"; then
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6530$as_echo "$LLVM_AR" >&6; }
6531else
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006537fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006538if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006539 ac_pt_LLVM_AR=$LLVM_AR
6540 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006541set dummy llvm-ar; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $ac_pt_LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6550 ;;
6551 *)
6552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in ${llvm_path}
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561 break 2
6562 fi
6563done
6564 done
6565IFS=$as_save_IFS
6566
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006567 ;;
6568esac
6569fi
6570ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6571if test -n "$ac_pt_LLVM_AR"; then
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6573$as_echo "$ac_pt_LLVM_AR" >&6; }
6574else
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006579 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006580 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006581 else
6582 case $cross_compiling:$ac_tool_warned in
6583yes:)
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6586ac_tool_warned=yes ;;
6587esac
6588 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589 fi
6590else
6591 LLVM_AR="$ac_cv_path_LLVM_AR"
6592fi
6593
6594
6595 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6596 then
6597 LLVM_AR_FOUND="found"
6598 else
6599 LLVM_AR_FOUND="not-found"
6600 fi
6601 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6602 then
6603 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6604 if test -n "${found_llvm_ar}"
6605 then
6606 LLVM_AR='/usr/bin/xcrun llvm-ar'
6607 LLVM_AR_FOUND=found
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6609$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6610 fi
6611 fi
6612 if test $LLVM_AR_FOUND = not-found
6613 then
6614 LLVM_PROFR_ERR=yes
6615 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6616 else
6617 LLVM_AR_ERR=no
6618 fi
6619 AR="${LLVM_AR}"
6620 case $ac_sys_system in
6621 Darwin*)
6622 # Any changes made here should be reflected in the GCC+Darwin case below
6623 LTOFLAGS="-flto -Wl,-export_dynamic"
6624 ;;
6625 *)
6626 LTOFLAGS="-flto"
6627 ;;
6628 esac
6629 ;;
6630 *gcc*)
6631 case $ac_sys_system in
6632 Darwin*)
6633 LTOFLAGS="-flto -Wl,-export_dynamic"
6634 ;;
6635 *)
6636 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6637 ;;
6638 esac
6639 ;;
6640 esac
6641
6642 if test "$ac_cv_prog_cc_g" = "yes"
6643 then
6644 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6645 # to get debug symbols.
6646 LTOFLAGS="$LTOFLAGS -g"
6647 fi
6648
stratakisf92c7aa2018-12-04 15:54:01 +01006649 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006650 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006651fi
6652
6653# Enable PGO flags.
6654
6655
6656
6657
6658
6659
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006660if test -n "$ac_tool_prefix"; then
6661 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6662set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ;;
6689esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6692if test -n "$LLVM_PROFDATA"; then
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6694$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695else
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
6698fi
6699
6700
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006701fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006703 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6704 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705set dummy llvm-profdata; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710else
6711 case $ac_pt_LLVM_PROFDATA in
6712 [\\/]* | ?:[\\/]*)
6713 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6714 ;;
6715 *)
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in ${llvm_path}
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725 break 2
6726 fi
6727done
6728 done
6729IFS=$as_save_IFS
6730
Gregory P. Smith799520c2016-09-07 16:10:00 -07006731 ;;
6732esac
6733fi
6734ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6735if test -n "$ac_pt_LLVM_PROFDATA"; then
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6737$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6738else
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006743 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006745 else
6746 case $cross_compiling:$ac_tool_warned in
6747yes:)
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6750ac_tool_warned=yes ;;
6751esac
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 fi
6754else
6755 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6756fi
6757
6758
6759if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6760then
6761 LLVM_PROF_FOUND="found"
6762else
6763 LLVM_PROF_FOUND="not-found"
6764fi
6765if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6766then
6767 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6768 if test -n "${found_llvm_profdata}"
6769 then
6770 # llvm-profdata isn't directly in $PATH in some cases.
6771 # https://apple.stackexchange.com/questions/197053/
6772 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6773 LLVM_PROF_FOUND=found
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6775$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6776 fi
6777fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778LLVM_PROF_ERR=no
6779case $CC in
6780 *clang*)
6781 # Any changes made here should be reflected in the GCC+Darwin case below
6782 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6783 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6786 if test $LLVM_PROF_FOUND = not-found
6787 then
6788 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006789 if test "${REQUIRE_PGO}" = "yes"
6790 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006791 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006792 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793 fi
6794 ;;
6795 *gcc*)
6796 case $ac_sys_system in
6797 Darwin*)
6798 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6799 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 then
6804 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805 if test "${REQUIRE_PGO}" = "yes"
6806 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006807 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 fi
6810 ;;
6811 *)
6812 PGO_PROF_GEN_FLAG="-fprofile-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6814 LLVM_PROF_MERGER="true"
6815 LLVM_PROF_FILE=""
6816 ;;
6817 esac
6818 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006819 *icc*)
6820 PGO_PROF_GEN_FLAG="-prof-gen"
6821 PGO_PROF_USE_FLAG="-prof-use"
6822 LLVM_PROF_MERGER="true"
6823 LLVM_PROF_FILE=""
6824 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825esac
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6828# merged with this chunk of code?
6829
6830# Optimizer/debugger flags
6831# ------------------------
6832# (The following bit of code is complicated enough - please keep things
6833# indented properly. Just pretend you're editing Python code. ;-)
6834
6835# There are two parallel sets of case statements below, one that checks to
6836# see if OPT was set and one that does BASECFLAGS setting based upon
6837# compiler and platform. BASECFLAGS tweaks need to be made even if the
6838# user set OPT.
6839
Victor Stinner23a683a2019-04-12 21:27:37 +02006840case $CC in
6841 *clang*)
6842 cc_is_clang=1
6843 ;;
6844 *)
6845 if $CC --version 2>&1 | grep -q clang
6846 then
6847 cc_is_clang=1
6848 else
6849 cc_is_clang=
6850 fi
6851esac
6852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853# tweak OPT based on compiler and platform, only if the user didn't set
6854# it on the command line
6855
Victor Stinner9ed34a82017-05-02 22:35:58 +02006856
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006857if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858then
6859 case $GCC in
6860 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6862 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6863 WRAP="-fwrapv"
6864 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006865
Victor Stinner35f3d242017-04-21 12:35:24 +02006866 if test -n "${cc_is_clang}"
6867 then
6868 # Clang also needs -fwrapv
6869 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006870 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6871 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006872 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006873 fi
6874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 case $ac_cv_prog_cc_g in
6876 yes)
6877 if test "$Py_DEBUG" = 'true' ; then
6878 # Optimization messes up debuggers, so turn it off for
6879 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006880 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006881 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 else
Victor Stinner28205b22017-04-21 11:24:34 +02006886 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 fi
6888 ;;
6889 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006890 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 ;;
6892 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894 case $ac_sys_system in
6895 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6896 ;;
6897 esac
6898 ;;
6899
6900 *)
6901 OPT="-O"
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
6906
6907
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006908
stratakiscf10a752018-12-19 18:19:01 +01006909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910# The -arch flags for universal builds on OSX
6911UNIVERSAL_ARCH_FLAGS=
6912
6913
6914# tweak BASECFLAGS based on compiler and platform
6915case $GCC in
6916yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006917 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006918
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6920$as_echo_n "checking for -Wextra... " >&6; }
6921 ac_save_cc="$CC"
6922 CC="$CC -Wextra -Werror"
6923 if ${ac_cv_extra_warnings+:} false; then :
6924 $as_echo_n "(cached) " >&6
6925else
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927/* end confdefs.h. */
6928
6929
6930int
6931main ()
6932{
6933
6934 ;
6935 return 0;
6936}
6937
6938_ACEOF
6939if ac_fn_c_try_compile "$LINENO"; then :
6940
6941 ac_cv_extra_warnings=yes
6942
6943else
6944
6945 ac_cv_extra_warnings=no
6946
6947fi
6948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6949fi
6950
6951 CC="$ac_save_cc"
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6953$as_echo "$ac_cv_extra_warnings" >&6; }
6954
6955 if test $ac_cv_extra_warnings = yes
6956 then
6957 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6958 fi
6959
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960 # Python doesn't violate C99 aliasing rules, but older versions of
6961 # GCC produce warnings for legal Python code. Enable
6962 # -fno-strict-aliasing on versions of GCC that support but produce
6963 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6965$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966 ac_save_cc="$CC"
6967 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006969 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006971else
Matthias Kloseb9621712010-04-24 17:59:49 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 CC="$ac_save_cc -fstrict-aliasing"
6988 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990/* end confdefs.h. */
6991
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006992 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993int
6994main ()
6995{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006996double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 ;
6998 return 0;
6999}
Matthias Kloseb159a552010-04-25 21:00:44 +00007000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
7004 ac_cv_no_strict_aliasing=no
7005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006else
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 ac_cv_no_strict_aliasing=yes
7009
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007010fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013else
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 ac_cv_no_strict_aliasing=no
7016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007019fi
7020
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7024$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026 then
7027 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7028 fi
7029
Zachary Ware5af85642015-12-21 12:09:17 -06007030 # ICC doesn't recognize the option, but only emits a warning
7031 ## XXX does it emit an unused result warning and can it be disabled?
7032 case "$CC" in
7033 *icc*)
7034 ac_cv_disable_unused_result_warning=no
7035 ;;
7036 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7038$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7039 ac_save_cc="$CC"
7040 CC="$CC -Wunused-result -Werror"
7041 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007042 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007043 $as_echo_n "(cached) " >&6
7044else
7045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7046/* end confdefs.h. */
7047
7048
7049int
7050main ()
7051{
7052
7053 ;
7054 return 0;
7055}
7056
7057_ACEOF
7058if ac_fn_c_try_compile "$LINENO"; then :
7059
7060 ac_cv_disable_unused_result_warning=yes
7061
7062else
7063
7064 ac_cv_disable_unused_result_warning=no
7065
7066fi
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068fi
7069
7070 CFLAGS="$save_CFLAGS"
7071 CC="$ac_save_cc"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7073$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007074 ;;
7075 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007076
7077 if test $ac_cv_disable_unused_result_warning = yes
7078 then
7079 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007080 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7084$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wunused-parameter -Werror"
7087 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092
7093
7094int
7095main ()
7096{
7097
7098 ;
7099 return 0;
7100}
7101
7102_ACEOF
7103if ac_fn_c_try_compile "$LINENO"; then :
7104
7105 ac_cv_disable_unused_parameter_warning=yes
7106
7107else
7108
7109 ac_cv_disable_unused_parameter_warning=no
7110
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7113fi
7114
7115 CC="$ac_save_cc"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7117$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7118
7119 if test $ac_cv_disable_unused_parameter_warning = yes
7120 then
7121 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7122 fi
7123
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7125$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Wmissing-field-initializers -Werror"
7128 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7129 $as_echo_n "(cached) " >&6
7130else
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132/* end confdefs.h. */
7133
7134
7135int
7136main ()
7137{
7138
7139 ;
7140 return 0;
7141}
7142
7143_ACEOF
7144if ac_fn_c_try_compile "$LINENO"; then :
7145
7146 ac_cv_disable_missing_field_initializers=yes
7147
7148else
7149
7150 ac_cv_disable_missing_field_initializers=no
7151
7152fi
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7154fi
7155
7156 CC="$ac_save_cc"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7158$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7159
7160 if test $ac_cv_disable_missing_field_initializers = yes
7161 then
7162 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007163 fi
7164
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7166$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7167 ac_save_cc="$CC"
7168 CC="$CC -Wsign-compare"
7169 save_CFLAGS="$CFLAGS"
7170 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7171 $as_echo_n "(cached) " >&6
7172else
7173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174/* end confdefs.h. */
7175
7176
7177int
7178main ()
7179{
7180
7181 ;
7182 return 0;
7183}
7184
7185_ACEOF
7186if ac_fn_c_try_compile "$LINENO"; then :
7187
7188 ac_cv_enable_sign_compare_warning=yes
7189
7190else
7191
7192 ac_cv_enable_sign_compare_warning=no
7193
7194fi
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7196fi
7197
7198 CFLAGS="$save_CFLAGS"
7199 CC="$ac_save_cc"
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7201$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7202
7203 if test $ac_cv_enable_sign_compare_warning = yes
7204 then
7205 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7206 fi
7207
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7209$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7210 ac_save_cc="$CC"
7211 CC="$CC -Wunreachable-code"
7212 save_CFLAGS="$CFLAGS"
7213 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7214 $as_echo_n "(cached) " >&6
7215else
7216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7217/* end confdefs.h. */
7218
7219
7220int
7221main ()
7222{
7223
7224 ;
7225 return 0;
7226}
7227
7228_ACEOF
7229if ac_fn_c_try_compile "$LINENO"; then :
7230
7231 ac_cv_enable_unreachable_code_warning=yes
7232
7233else
7234
7235 ac_cv_enable_unreachable_code_warning=no
7236
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7239fi
7240
7241 CFLAGS="$save_CFLAGS"
7242 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007243
7244 # Don't enable unreachable code warning in debug mode, since it usually
7245 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007246 # Issue #24324: Unfortunately, the unreachable code warning does not work
7247 # correctly on gcc and has been silently removed from the compiler.
7248 # It is supported on clang but on OS X systems gcc may be an alias
7249 # for clang. Try to determine if the compiler is not really gcc and,
7250 # if so, only then enable the warning.
7251 if test $ac_cv_enable_unreachable_code_warning = yes && \
7252 test "$Py_DEBUG" != "true" && \
7253 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007254 then
7255 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007256 else
7257 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7260$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007261
INADA Naokie3364842018-06-05 20:40:53 +09007262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7263$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7264 ac_save_cc="$CC"
7265 CC="$CC -Werror -Wstrict-prototypes"
7266 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268else
7269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7270/* end confdefs.h. */
7271
7272
7273int
7274main ()
7275{
7276
7277 ;
7278 return 0;
7279}
7280
7281_ACEOF
7282if ac_fn_c_try_compile "$LINENO"; then :
7283
7284 ac_cv_enable_strict_prototypes_warning=yes
7285
7286else
7287
7288 ac_cv_enable_strict_prototypes_warning=no
7289
7290fi
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292fi
7293
7294 CC="$ac_save_cc"
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7296$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7297
7298 if test $ac_cv_enable_strict_prototypes_warning = yes
7299 then
7300 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7301 fi
7302
Victor Stinner193ee0a2017-02-06 14:24:00 +01007303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7304$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7305 ac_save_cc="$CC"
7306 CC="$CC -Werror=implicit-function-declaration"
7307 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7308 $as_echo_n "(cached) " >&6
7309else
7310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311/* end confdefs.h. */
7312
7313
7314int
7315main ()
7316{
7317
7318 ;
7319 return 0;
7320}
7321
7322_ACEOF
7323if ac_fn_c_try_compile "$LINENO"; then :
7324
7325 ac_cv_enable_implicit_function_declaration_error=yes
7326
7327else
7328
7329 ac_cv_enable_implicit_function_declaration_error=no
7330
7331fi
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333fi
7334
7335 CC="$ac_save_cc"
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7337$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7338
7339 if test $ac_cv_enable_implicit_function_declaration_error = yes
7340 then
7341 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7342 fi
7343
Vinay Sajip0b60f642019-10-15 08:26:12 +01007344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7345$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7346 ac_save_cc="$CC"
7347 CC="$CC -fvisibility=hidden"
7348 if ${ac_cv_enable_visibility+:} false; then :
7349 $as_echo_n "(cached) " >&6
7350else
7351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7352/* end confdefs.h. */
7353
7354
7355int
7356main ()
7357{
7358
7359 ;
7360 return 0;
7361}
7362
7363_ACEOF
7364if ac_fn_c_try_compile "$LINENO"; then :
7365
7366 ac_cv_enable_visibility=yes
7367
7368else
7369
7370 ac_cv_enable_visibility=no
7371
7372fi
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374fi
7375
7376 CC="$ac_save_cc"
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7378$as_echo "$ac_cv_enable_visibility" >&6; }
7379
7380 if test $ac_cv_enable_visibility = yes
7381 then
7382 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7383 fi
7384
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007385 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7386 # support. Without this, treatment of subnormals doesn't follow
7387 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007388 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007389 alpha*)
7390 BASECFLAGS="$BASECFLAGS -mieee"
7391 ;;
7392 esac
7393
7394 case $ac_sys_system in
7395 SCO_SV*)
7396 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7397 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007398
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 Darwin*)
7400 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7401 # used to be here, but non-Apple gcc doesn't accept them.
7402 if test "${CC}" = gcc
7403 then
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007405$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007406 case "${UNIVERSALSDK}" in
7407 */MacOSX10.4u.sdk)
7408 # Build using 10.4 SDK, force usage of gcc when the
7409 # compiler is gcc, otherwise the user will get very
7410 # confusing error messages when building on OSX 10.6
7411 CC=gcc-4.0
7412 CPP=cpp-4.0
7413 ;;
7414 esac
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007416$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007417 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418
Ned Deily87adb6e2013-10-18 21:09:56 -07007419 if test "${enable_universalsdk}"
7420 then
7421 case "$UNIVERSAL_ARCHS" in
7422 32-bit)
7423 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7424 LIPO_32BIT_FLAGS=""
7425 ARCH_RUN_32BIT=""
7426 ;;
7427 64-bit)
7428 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7429 LIPO_32BIT_FLAGS=""
7430 ARCH_RUN_32BIT="true"
7431 ;;
7432 all)
7433 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7434 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7435 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7436 ;;
7437 intel)
7438 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7439 LIPO_32BIT_FLAGS="-extract i386"
7440 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7441 ;;
7442 intel-32)
7443 UNIVERSAL_ARCH_FLAGS="-arch i386"
7444 LIPO_32BIT_FLAGS=""
7445 ARCH_RUN_32BIT=""
7446 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007447 intel-64)
7448 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7449 LIPO_32BIT_FLAGS=""
7450 ARCH_RUN_32BIT="true"
7451 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007452 3-way)
7453 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7454 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7455 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7456 ;;
7457 *)
7458 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7459 ;;
7460 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461
Ned Deily87adb6e2013-10-18 21:09:56 -07007462 if test "${UNIVERSALSDK}" != "/"
7463 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007464 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7465 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007466 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007467 else
7468 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7469 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007470 fi
7471 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472
Ned Deily87adb6e2013-10-18 21:09:56 -07007473 # Calculate an appropriate deployment target for this build:
7474 # The deployment target value is used explicitly to enable certain
7475 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007476 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007477 # component of the string returned by distutils.get_platform().
7478 #
7479 # Use the value from:
7480 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7481 # 2. the operating system version of the build machine if >= 10.6
7482 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7483 # below to pick either 10.3, 10.4, or 10.5 as the target.
7484 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7487$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007488 cur_target_major=`sw_vers -productVersion | \
7489 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7490 cur_target_minor=`sw_vers -productVersion | \
7491 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7492 cur_target="${cur_target_major}.${cur_target_minor}"
7493 if test ${cur_target_major} -eq 10 && \
7494 test ${cur_target_minor} -ge 3 && \
7495 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 then
Ned Deily36820b62014-06-25 13:44:22 -07007497 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 cur_target=10.3
7499 if test ${enable_universalsdk}
7500 then
7501 case "$UNIVERSAL_ARCHS" in
7502 all|3-way|intel|64-bit)
7503 # These configurations were first supported in 10.5
7504 cur_target='10.5'
7505 ;;
7506 esac
7507 else
7508 if test `/usr/bin/arch` = "i386"
7509 then
7510 # 10.4 was the first release to support Intel archs
7511 cur_target="10.4"
7512 fi
7513 fi
7514 fi
7515 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007516
Ned Deily87adb6e2013-10-18 21:09:56 -07007517 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7518 # environment with a value that is the same as what we'll use
7519 # in the Makefile to ensure that we'll get the same compiler
7520 # environment during configure and build time.
7521 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7522 export MACOSX_DEPLOYMENT_TARGET
7523 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7525$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007526
Ned Deily87adb6e2013-10-18 21:09:56 -07007527 # end of Darwin* tests
7528 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529 esac
7530 ;;
7531
7532*)
7533 case $ac_sys_system in
7534 OpenUNIX*|UnixWare*)
7535 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7536 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537 SCO_SV*)
7538 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7539 ;;
7540 esac
7541 ;;
7542esac
7543
Zachary Ware5af85642015-12-21 12:09:17 -06007544# ICC needs -fp-model strict or floats behave badly
7545case "$CC" in
7546*icc*)
7547 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7548 ;;
7549esac
7550
T. Woutersddbfa2c2017-05-23 01:30:49 +02007551if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 :
7553else
7554 OPT="-DNDEBUG $OPT"
7555fi
7556
7557if test "$ac_arch_flags"
7558then
7559 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562# On some compilers, pthreads are available without further options
7563# (e.g. MacOS X). On some of these systems, the compiler will not
7564# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7565# So we have to see first whether pthreads are available without
7566# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7568$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007569if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_pthread_is_default=no
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576/* end confdefs.h. */
7577
Stefan Krah7dba5942012-11-22 22:49:11 +01007578#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579#include <pthread.h>
7580
7581void* routine(void* p){return NULL;}
7582
7583int main(){
7584 pthread_t p;
7585 if(pthread_create(&p,NULL,routine,NULL)!=0)
7586 return 1;
7587 (void)pthread_detach(p);
7588 return 0;
7589}
7590
7591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007592if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593
7594 ac_cv_pthread_is_default=yes
7595 ac_cv_kthread=no
7596 ac_cv_pthread=no
7597
7598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603fi
7604
7605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606fi
7607
Matthias Kloseb9621712010-04-24 17:59:49 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7609$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610
7611
7612if test $ac_cv_pthread_is_default = yes
7613then
7614 ac_cv_kpthread=no
7615else
7616# -Kpthread, if available, provides the right #defines
7617# and linker options to make pthread_create available
7618# Some compilers won't report that they do not support -Kpthread,
7619# so we need to run a program to see whether it really made the
7620# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7622$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007623if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625else
7626 ac_save_cc="$CC"
7627CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007628if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629 ac_cv_kpthread=no
7630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632/* end confdefs.h. */
7633
Stefan Krah7dba5942012-11-22 22:49:11 +01007634#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635#include <pthread.h>
7636
7637void* routine(void* p){return NULL;}
7638
7639int main(){
7640 pthread_t p;
7641 if(pthread_create(&p,NULL,routine,NULL)!=0)
7642 return 1;
7643 (void)pthread_detach(p);
7644 return 0;
7645}
7646
7647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007648if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649 ac_cv_kpthread=yes
7650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7654 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655fi
7656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657CC="$ac_save_cc"
7658fi
7659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7661$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662fi
7663
7664if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7665then
7666# -Kthread, if available, provides the right #defines
7667# and linker options to make pthread_create available
7668# Some compilers won't report that they do not support -Kthread,
7669# so we need to run a program to see whether it really made the
7670# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7672$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007673if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675else
7676 ac_save_cc="$CC"
7677CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007678if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679 ac_cv_kthread=no
7680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682/* end confdefs.h. */
7683
Stefan Krah7dba5942012-11-22 22:49:11 +01007684#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685#include <pthread.h>
7686
7687void* routine(void* p){return NULL;}
7688
7689int main(){
7690 pthread_t p;
7691 if(pthread_create(&p,NULL,routine,NULL)!=0)
7692 return 1;
7693 (void)pthread_detach(p);
7694 return 0;
7695}
7696
7697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007698if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699 ac_cv_kthread=yes
7700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705fi
7706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707CC="$ac_save_cc"
7708fi
7709
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7711$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
7713
7714if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7715then
7716# -pthread, if available, provides the right #defines
7717# and linker options to make pthread_create available
7718# Some compilers won't report that they do not support -pthread,
7719# so we need to run a program to see whether it really made the
7720# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7722$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007723if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725else
7726 ac_save_cc="$CC"
7727CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007728if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729 ac_cv_pthread=no
7730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732/* end confdefs.h. */
7733
Stefan Krah7dba5942012-11-22 22:49:11 +01007734#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735#include <pthread.h>
7736
7737void* routine(void* p){return NULL;}
7738
7739int main(){
7740 pthread_t p;
7741 if(pthread_create(&p,NULL,routine,NULL)!=0)
7742 return 1;
7743 (void)pthread_detach(p);
7744 return 0;
7745}
7746
7747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007748if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749 ac_cv_pthread=yes
7750else
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755fi
7756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757CC="$ac_save_cc"
7758fi
7759
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7761$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
7763
7764# If we have set a CC compiler flag for thread support then
7765# check if it works for CXX, too.
7766ac_cv_cxx_thread=no
7767if test ! -z "$CXX"
7768then
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7770$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771ac_save_cxx="$CXX"
7772
7773if test "$ac_cv_kpthread" = "yes"
7774then
7775 CXX="$CXX -Kpthread"
7776 ac_cv_cxx_thread=yes
7777elif test "$ac_cv_kthread" = "yes"
7778then
7779 CXX="$CXX -Kthread"
7780 ac_cv_cxx_thread=yes
7781elif test "$ac_cv_pthread" = "yes"
7782then
7783 CXX="$CXX -pthread"
7784 ac_cv_cxx_thread=yes
7785fi
7786
7787if test $ac_cv_cxx_thread = yes
7788then
7789 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7790 $CXX -c conftest.$ac_ext 2>&5
7791 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7792 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7793 then
7794 ac_cv_cxx_thread=yes
7795 else
7796 ac_cv_cxx_thread=no
7797 fi
7798 rm -fr conftest*
7799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7801$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802fi
7803CXX="$ac_save_cxx"
7804
7805
7806# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7808$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007809if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811else
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813/* end confdefs.h. */
7814#include <stdlib.h>
7815#include <stdarg.h>
7816#include <string.h>
7817#include <float.h>
7818
7819int
7820main ()
7821{
7822
7823 ;
7824 return 0;
7825}
7826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007827if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828 ac_cv_header_stdc=yes
7829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7833
7834if test $ac_cv_header_stdc = yes; then
7835 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837/* end confdefs.h. */
7838#include <string.h>
7839
7840_ACEOF
7841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $EGREP "memchr" >/dev/null 2>&1; then :
7843
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844else
7845 ac_cv_header_stdc=no
7846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007847rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848
7849fi
7850
7851if test $ac_cv_header_stdc = yes; then
7852 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854/* end confdefs.h. */
7855#include <stdlib.h>
7856
7857_ACEOF
7858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 $EGREP "free" >/dev/null 2>&1; then :
7860
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861else
7862 ac_cv_header_stdc=no
7863fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007864rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865
7866fi
7867
7868if test $ac_cv_header_stdc = yes; then
7869 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871 :
7872else
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007874/* end confdefs.h. */
7875#include <ctype.h>
7876#include <stdlib.h>
7877#if ((' ' & 0x0FF) == 0x020)
7878# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7879# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7880#else
7881# define ISLOWER(c) \
7882 (('a' <= (c) && (c) <= 'i') \
7883 || ('j' <= (c) && (c) <= 'r') \
7884 || ('s' <= (c) && (c) <= 'z'))
7885# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7886#endif
7887
7888#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7889int
7890main ()
7891{
7892 int i;
7893 for (i = 0; i < 256; i++)
7894 if (XOR (islower (i), ISLOWER (i))
7895 || toupper (i) != TOUPPER (i))
7896 return 2;
7897 return 0;
7898}
7899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if ac_fn_c_try_run "$LINENO"; then :
7901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007907fi
7908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007909fi
7910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7912$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007913if test $ac_cv_header_stdc = yes; then
7914
Matthias Kloseb9621712010-04-24 17:59:49 +00007915$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007916
7917fi
7918
stratakise768c862018-01-23 16:11:24 +01007919for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007920fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007921ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007922sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007923utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007924poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007925sys/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 +01007926sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007927sys/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 +01007928sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007929sys/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 -07007930libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007931linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007932sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007933do :
7934 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7935ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007939_ACEOF
7940
7941fi
7942
Guido van Rossum627b2d71993-12-24 10:39:16 +00007943done
7944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007945ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007946for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7949$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007950if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955#include <sys/types.h>
7956#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958int
7959main ()
7960{
7961if ((DIR *) 0)
7962return 0;
7963 ;
7964 return 0;
7965}
7966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007969else
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974eval ac_res=\$$as_ac_Header
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7976$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007980_ACEOF
7981
7982ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007983fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007985done
7986# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7987if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7989$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007990if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992else
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997/* Override any GCC internal prototype to avoid an error.
7998 Use char because int might match the return type of a GCC
7999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000#ifdef __cplusplus
8001extern "C"
8002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008003char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008004int
8005main ()
8006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 ;
8009 return 0;
8010}
8011_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012for ac_lib in '' dir; do
8013 if test -z "$ac_lib"; then
8014 ac_res="none required"
8015 else
8016 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022rm -f core conftest.err conftest.$ac_objext \
8023 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008024 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027done
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030else
8031 ac_cv_search_opendir=no
8032fi
8033rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008034LIBS=$ac_func_search_save_LIBS
8035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8037$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008039if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008043
Michael W. Hudson54241132001-12-07 15:38:26 +00008044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8046$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008047if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008049else
8050 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054/* Override any GCC internal prototype to avoid an error.
8055 Use char because int might match the return type of a GCC
8056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057#ifdef __cplusplus
8058extern "C"
8059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008060char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ;
8066 return 0;
8067}
8068_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069for ac_lib in '' x; do
8070 if test -z "$ac_lib"; then
8071 ac_res="none required"
8072 else
8073 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008074 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079rm -f core conftest.err conftest.$ac_objext \
8080 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008081 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084done
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087else
8088 ac_cv_search_opendir=no
8089fi
8090rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008091LIBS=$ac_func_search_save_LIBS
8092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8094$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008099fi
8100
8101fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008102
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8104$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008105if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107else
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008109/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008110#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008111int
8112main ()
8113{
8114return makedev(0, 0);
8115 ;
8116 return 0;
8117}
8118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008120 ac_cv_header_sys_types_h_makedev=yes
8121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008126
8127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8129$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008130
8131if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008132ac_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 +02008133if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008136
8137fi
8138
8139
8140
8141 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 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 +02008143if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008146
8147fi
8148
8149
8150 fi
8151fi
8152
Michael W. Hudson54241132001-12-07 15:38:26 +00008153
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008154# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8155# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8156SAVE_CFLAGS=$CFLAGS
8157CFLAGS="-std=c99 $CFLAGS"
8158for ac_header in bluetooth/bluetooth.h
8159do :
8160 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8161if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8162 cat >>confdefs.h <<_ACEOF
8163#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8164_ACEOF
8165
8166fi
8167
8168done
8169
8170CFLAGS=$SAVE_CFLAGS
8171
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008172# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8173for ac_header in net/if.h
8174do :
8175 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8176#ifdef STDC_HEADERS
8177# include <stdlib.h>
8178# include <stddef.h>
8179#else
8180# ifdef HAVE_STDLIB_H
8181# include <stdlib.h>
8182# endif
8183#endif
8184#ifdef HAVE_SYS_SOCKET_H
8185# include <sys/socket.h>
8186#endif
8187
8188"
Victor Stinnere0be4232011-10-25 13:06:09 +02008189if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008190 cat >>confdefs.h <<_ACEOF
8191#define HAVE_NET_IF_H 1
8192_ACEOF
8193
8194fi
8195
8196done
8197
8198
Martin v. Löwis11017b12006-01-14 18:12:57 +00008199# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008200for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008201do :
8202 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 +00008203#ifdef HAVE_ASM_TYPES_H
8204#include <asm/types.h>
8205#endif
8206#ifdef HAVE_SYS_SOCKET_H
8207#include <sys/socket.h>
8208#endif
8209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210"
Victor Stinnere0be4232011-10-25 13:06:09 +02008211if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008212 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008213#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008214_ACEOF
8215
8216fi
8217
8218done
8219
8220
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008221# On Linux, qrtr.h requires asm/types.h
8222for ac_header in linux/qrtr.h
8223do :
8224 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8225#ifdef HAVE_ASM_TYPES_H
8226#include <asm/types.h>
8227#endif
8228#ifdef HAVE_SYS_SOCKET_H
8229#include <sys/socket.h>
8230#endif
8231
8232"
8233if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8234 cat >>confdefs.h <<_ACEOF
8235#define HAVE_LINUX_QRTR_H 1
8236_ACEOF
8237
8238fi
8239
8240done
8241
8242
caaveryeffc12f2017-09-06 18:18:10 -04008243for ac_header in linux/vm_sockets.h
8244do :
8245 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8246#ifdef HAVE_SYS_SOCKET_H
8247#include <sys/socket.h>
8248#endif
8249
8250"
8251if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8252 cat >>confdefs.h <<_ACEOF
8253#define HAVE_LINUX_VM_SOCKETS_H 1
8254_ACEOF
8255
8256fi
8257
8258done
8259
8260
Charles-François Natali47413c12011-10-06 19:47:44 +02008261# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008262for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008263do :
8264 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8265ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8266#ifdef HAVE_SYS_SOCKET_H
8267#include <sys/socket.h>
8268#endif
8269
8270"
8271if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8272 cat >>confdefs.h <<_ACEOF
8273#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8274_ACEOF
8275
8276fi
8277
8278done
8279
8280
Guido van Rossum627b2d71993-12-24 10:39:16 +00008281# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008282was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8284$as_echo_n "checking for clock_t in time.h... " >&6; }
8285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008286/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008292 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008293else
Martin v. Löwis11437992002-04-12 09:54:03 +00008294
8295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008297
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008298
Guido van Rossum627b2d71993-12-24 10:39:16 +00008299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008300rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8303$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008304
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8306$as_echo_n "checking for makedev... " >&6; }
8307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008308/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008309
Jesus Cea740f53a2010-04-28 11:35:30 +00008310#if defined(MAJOR_IN_MKDEV)
8311#include <sys/mkdev.h>
8312#elif defined(MAJOR_IN_SYSMACROS)
8313#include <sys/sysmacros.h>
8314#else
8315#include <sys/types.h>
8316#endif
8317
Neal Norwitz11690112002-07-30 01:08:28 +00008318int
8319main ()
8320{
Jesus Cea740f53a2010-04-28 11:35:30 +00008321
8322 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008323 ;
8324 return 0;
8325}
Matthias Kloseb159a552010-04-25 21:00:44 +00008326
Neal Norwitz11690112002-07-30 01:08:28 +00008327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008328if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008329 ac_cv_has_makedev=yes
8330else
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008333rm -f core conftest.err conftest.$ac_objext \
8334 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8336$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008337if test "$ac_cv_has_makedev" = "yes"; then
8338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008340
8341fi
8342
Christian Heimes985ecdc2013-11-20 11:46:18 +01008343# byte swapping
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8345$as_echo_n "checking for le64toh... " >&6; }
8346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h. */
8348
8349#ifdef HAVE_ENDIAN_H
8350#include <endian.h>
8351#elif defined(HAVE_SYS_ENDIAN_H)
8352#include <sys/endian.h>
8353#endif
8354
8355int
8356main ()
8357{
8358
8359 le64toh(1)
8360 ;
8361 return 0;
8362}
8363
8364_ACEOF
8365if ac_fn_c_try_link "$LINENO"; then :
8366 ac_cv_has_le64toh=yes
8367else
8368 ac_cv_has_le64toh=no
8369fi
8370rm -f core conftest.err conftest.$ac_objext \
8371 conftest$ac_exeext conftest.$ac_ext
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8373$as_echo "$ac_cv_has_le64toh" >&6; }
8374if test "$ac_cv_has_le64toh" = "yes"; then
8375
8376$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8377
8378fi
8379
Martin v. Löwis399a6892002-10-04 10:22:02 +00008380use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008381# Don't use largefile support for GNU/Hurd
8382case $ac_sys_system in GNU*)
8383 use_lfs=no
8384esac
8385
Martin v. Löwis399a6892002-10-04 10:22:02 +00008386if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008387# Two defines needed to enable largefile support on various platforms
8388# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008389case $ac_sys_system/$ac_sys_release in
8390AIX*)
8391
8392$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8393
8394 ;;
8395esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
8399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008401
Martin v. Löwis399a6892002-10-04 10:22:02 +00008402fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008403
Guido van Rossum84e7b241996-08-19 21:59:00 +00008404# Add some code to confdefs.h so that the test for off_t works on SCO
8405cat >> confdefs.h <<\EOF
8406#if defined(SCO_DS)
8407#undef _OFF_T
8408#endif
8409EOF
8410
Guido van Rossumef2255b2000-03-10 22:30:29 +00008411# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008412ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008414
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008415else
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
8417cat >>confdefs.h <<_ACEOF
8418#define mode_t int
8419_ACEOF
8420
8421fi
8422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008424if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
8428cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
8431
8432fi
8433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008435if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008437else
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439cat >>confdefs.h <<_ACEOF
8440#define pid_t int
8441_ACEOF
8442
8443fi
8444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008447#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008452
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
8458
8459fi
8460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8462$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
8470_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473 ac_cv_type_uid_t=yes
8474else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008475 ac_cv_type_uid_t=no
8476fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008477rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008478
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8481$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008482if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008485
8486
Matthias Kloseb9621712010-04-24 17:59:49 +00008487$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008488
8489fi
8490
Mark Dickinson983bc162012-12-02 12:11:38 +00008491
Matthias Kloseb9621712010-04-24 17:59:49 +00008492ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008496
8497fi
8498
Stefan Krah1919b7e2012-03-21 18:25:23 +01008499ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8500if test "x$ac_cv_type___uint128_t" = xyes; then :
8501
8502$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8503
8504fi
8505
Jack Jansendd19cf82001-12-06 22:36:17 +00008506
Michael W. Hudson54241132001-12-07 15:38:26 +00008507# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008508# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509# The cast to long int works around a bug in the HP C Compiler
8510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8512# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8514$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 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 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 if test "$ac_cv_type_int" = yes; then
8522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008524as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008525See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526 else
8527 ac_cv_sizeof_int=0
8528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8533$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534
8535
8536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008538#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008539_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008540
8541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542# The cast to long int works around a bug in the HP C Compiler
8543# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8544# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8545# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8547$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 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 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 if test "$ac_cv_type_long" = yes; then
8555 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008557as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008558See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 else
8560 ac_cv_sizeof_long=0
8561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8566$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567
8568
8569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008571#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008573
8574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575# The cast to long int works around a bug in the HP C Compiler
8576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8578# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8580$as_echo_n "checking size of long long... " >&6; }
8581if ${ac_cv_sizeof_long_long+:} false; then :
8582 $as_echo_n "(cached) " >&6
8583else
8584 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8585
8586else
8587 if test "$ac_cv_type_long_long" = yes; then
8588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8590as_fn_error 77 "cannot compute sizeof (long long)
8591See \`config.log' for more details" "$LINENO" 5; }
8592 else
8593 ac_cv_sizeof_long_long=0
8594 fi
8595fi
8596
8597fi
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8599$as_echo "$ac_cv_sizeof_long_long" >&6; }
8600
8601
8602
8603cat >>confdefs.h <<_ACEOF
8604#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8605_ACEOF
8606
8607
8608# The cast to long int works around a bug in the HP C Compiler
8609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8613$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 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 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 if test "$ac_cv_type_void_p" = yes; then
8621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008623as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008624See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 else
8626 ac_cv_sizeof_void_p=0
8627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8632$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633
8634
8635
Martin v. Löwis11437992002-04-12 09:54:03 +00008636cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008637#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008638_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008639
8640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641# The cast to long int works around a bug in the HP C Compiler
8642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8646$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008647if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 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 +00008651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 if test "$ac_cv_type_short" = yes; then
8654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008656as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008657See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 else
8659 ac_cv_sizeof_short=0
8660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8665$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666
8667
8668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008670#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008671_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008672
8673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8679$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008680if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 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 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type_float" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 else
8692 ac_cv_sizeof_float=0
8693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8698$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699
8700
8701
Martin v. Löwis11437992002-04-12 09:54:03 +00008702cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008703#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008704_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008705
8706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707# The cast to long int works around a bug in the HP C Compiler
8708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8712$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 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 +00008717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718else
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 if test "$ac_cv_type_double" = yes; then
8720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008722as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008723See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724 else
8725 ac_cv_sizeof_double=0
8726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8731$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732
8733
8734
Martin v. Löwis11437992002-04-12 09:54:03 +00008735cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008736#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008737_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008738
8739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740# The cast to long int works around a bug in the HP C Compiler
8741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8743# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8745$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008746if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 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 +00008750
Martin v. Löwis11437992002-04-12 09:54:03 +00008751else
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 if test "$ac_cv_type_fpos_t" = yes; then
8753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008755as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008756See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 else
8758 ac_cv_sizeof_fpos_t=0
8759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761
Martin v. Löwis11437992002-04-12 09:54:03 +00008762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8764$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765
8766
8767
Martin v. Löwis11437992002-04-12 09:54:03 +00008768cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008769#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008770_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008771
Michael W. Hudson54241132001-12-07 15:38:26 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773# The cast to long int works around a bug in the HP C Compiler
8774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8778$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 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 +00008783
Martin v. Löwis18e16552006-02-15 17:27:45 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$ac_cv_type_size_t" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008790 else
8791 ac_cv_sizeof_size_t=0
8792 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794
Martin v. Löwis18e16552006-02-15 17:27:45 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8797$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798
8799
8800
Martin v. Löwis18e16552006-02-15 17:27:45 +00008801cat >>confdefs.h <<_ACEOF
8802#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8803_ACEOF
8804
8805
Christian Heimes400adb02008-02-01 08:12:03 +00008806# The cast to long int works around a bug in the HP C Compiler
8807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8811$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008812if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 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 +00008816
Christian Heimes400adb02008-02-01 08:12:03 +00008817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 if test "$ac_cv_type_pid_t" = yes; then
8819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008821as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008822See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008823 else
8824 ac_cv_sizeof_pid_t=0
8825 fi
8826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827
Christian Heimes400adb02008-02-01 08:12:03 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8830$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008831
8832
8833
8834cat >>confdefs.h <<_ACEOF
8835#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8836_ACEOF
8837
8838
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008839# The cast to long int works around a bug in the HP C Compiler
8840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8842# This bug is HP SR number 8606223364.
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8844$as_echo_n "checking size of uintptr_t... " >&6; }
8845if ${ac_cv_sizeof_uintptr_t+:} false; then :
8846 $as_echo_n "(cached) " >&6
8847else
8848 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8849
8850else
8851 if test "$ac_cv_type_uintptr_t" = yes; then
8852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8854as_fn_error 77 "cannot compute sizeof (uintptr_t)
8855See \`config.log' for more details" "$LINENO" 5; }
8856 else
8857 ac_cv_sizeof_uintptr_t=0
8858 fi
8859fi
8860
8861fi
8862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8863$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8864
8865
8866
8867cat >>confdefs.h <<_ACEOF
8868#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8869_ACEOF
8870
8871
Michael W. Hudson54241132001-12-07 15:38:26 +00008872
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
Eitan Adler3055c942018-05-15 22:58:09 -07008874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8875$as_echo_n "checking for long double... " >&6; }
8876if ${ac_cv_type_long_double+:} false; then :
8877 $as_echo_n "(cached) " >&6
8878else
8879 if test "$GCC" = yes; then
8880 ac_cv_type_long_double=yes
8881 else
8882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8883/* end confdefs.h. */
8884/* The Stardent Vistra knows sizeof (long double), but does
8885 not support it. */
8886 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887int
8888main ()
8889{
Eitan Adler3055c942018-05-15 22:58:09 -07008890static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8891 sizeof (double) <= sizeof (long double))];
8892test_array [0] = 0;
8893return test_array [0];
8894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895 ;
8896 return 0;
8897}
8898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008899if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008900 ac_cv_type_long_double=yes
8901else
8902 ac_cv_type_long_double=no
8903fi
8904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8905 fi
8906fi
8907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8908$as_echo "$ac_cv_type_long_double" >&6; }
8909 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008910
Matthias Kloseb9621712010-04-24 17:59:49 +00008911$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008912
Eitan Adler3055c942018-05-15 22:58:09 -07008913 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008914
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008915# The cast to long int works around a bug in the HP C Compiler
8916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8920$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008921if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008923else
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 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 +00008925
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008926else
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 if test "$ac_cv_type_long_double" = yes; then
8928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008930as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008931See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008932 else
8933 ac_cv_sizeof_long_double=0
8934 fi
8935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8939$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008940
8941
8942
8943cat >>confdefs.h <<_ACEOF
8944#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8945_ACEOF
8946
8947
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949# The cast to long int works around a bug in the HP C Compiler
8950# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8951# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8952# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8954$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008955if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 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 +00008959
Thomas Woutersb2137042007-02-01 18:02:27 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if test "$ac_cv_type__Bool" = yes; then
8962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008964as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008965See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966 else
8967 ac_cv_sizeof__Bool=0
8968 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970
Thomas Woutersb2137042007-02-01 18:02:27 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8973$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974
8975
8976
Thomas Woutersb2137042007-02-01 18:02:27 +00008977cat >>confdefs.h <<_ACEOF
8978#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8979_ACEOF
8980
8981
Thomas Woutersb2137042007-02-01 18:02:27 +00008982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983# The cast to long int works around a bug in the HP C Compiler
8984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8988$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993#ifdef HAVE_SYS_TYPES_H
8994#include <sys/types.h>
8995#endif
8996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 if test "$ac_cv_type_off_t" = yes; then
9001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009003as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009004See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005 else
9006 ac_cv_sizeof_off_t=0
9007 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9012$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009014
9015
Martin v. Löwis11437992002-04-12 09:54:03 +00009016cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009017#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009019
Michael W. Hudson54241132001-12-07 15:38:26 +00009020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9023$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009024if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009025 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9030$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009034fi
9035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036# The cast to long int works around a bug in the HP C Compiler
9037# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9038# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9039# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9041$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009042if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046#ifdef HAVE_SYS_TYPES_H
9047#include <sys/types.h>
9048#endif
9049#ifdef HAVE_TIME_H
9050#include <time.h>
9051#endif
9052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009054
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009055else
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 if test "$ac_cv_type_time_t" = yes; then
9057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009059as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009060See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009061 else
9062 ac_cv_sizeof_time_t=0
9063 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9068$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009070
9071
Martin v. Löwis11437992002-04-12 09:54:03 +00009072cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009073#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009074_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009075
Michael W. Hudson54241132001-12-07 15:38:26 +00009076
9077
Trent Mick635f6fb2000-08-23 21:33:05 +00009078# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009079ac_save_cc="$CC"
9080if test "$ac_cv_kpthread" = "yes"
9081then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009082elif test "$ac_cv_kthread" = "yes"
9083then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009084elif test "$ac_cv_pthread" = "yes"
9085then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009086fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9089$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009090have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009092/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
9094 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009095int
9096main ()
9097{
Guido van Rossum12580492000-09-24 16:47:19 +00009098pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 ;
9100 return 0;
9101}
Matthias Kloseb159a552010-04-25 21:00:44 +00009102
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009104if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009105 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9109$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009110if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009112# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9113# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9114# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9116$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009117if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009119else
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009121#ifdef HAVE_PTHREAD_H
9122#include <pthread.h>
9123#endif
9124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009127else
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 if test "$ac_cv_type_pthread_t" = yes; then
9129 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009131as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009132See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009133 else
9134 ac_cv_sizeof_pthread_t=0
9135 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009137
Trent Mick635f6fb2000-08-23 21:33:05 +00009138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9140$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009142
9143
Martin v. Löwis11437992002-04-12 09:54:03 +00009144cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009145#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009146_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009148
Trent Mick635f6fb2000-08-23 21:33:05 +00009149fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009150
9151# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9152# This checking will be unnecessary after removing deprecated TLS API.
9153# The cast to long int works around a bug in the HP C Compiler
9154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9156# This bug is HP SR number 8606223364.
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9158$as_echo_n "checking size of pthread_key_t... " >&6; }
9159if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9160 $as_echo_n "(cached) " >&6
9161else
9162 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9163"; then :
9164
9165else
9166 if test "$ac_cv_type_pthread_key_t" = yes; then
9167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9169as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9170See \`config.log' for more details" "$LINENO" 5; }
9171 else
9172 ac_cv_sizeof_pthread_key_t=0
9173 fi
9174fi
9175
9176fi
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9178$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9179
9180
9181
9182cat >>confdefs.h <<_ACEOF
9183#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9184_ACEOF
9185
9186
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9188$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9189if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191/* end confdefs.h. */
9192#include <pthread.h>
9193int
9194main ()
9195{
9196pthread_key_t k; k * 1;
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201if ac_fn_c_try_compile "$LINENO"; then :
9202 ac_pthread_key_t_is_arithmetic_type=yes
9203else
9204 ac_pthread_key_t_is_arithmetic_type=no
9205
9206fi
9207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9209$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9210 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9211
9212$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9213
9214 fi
9215else
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
9218fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009219CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009220
Michael W. Hudson54241132001-12-07 15:38:26 +00009221
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009222case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009223 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009224 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9225 ;;
9226 Darwin/*)
9227 OTHER_LIBTOOL_OPT=""
9228 ;;
9229esac
9230
9231
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009233case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009234 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009235 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9236 if test "${enable_universalsdk}"; then
9237 :
9238 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009239 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009240 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009241 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009242 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009243 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009244 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009245 if test ${gcc_version} '<' 4.0
9246 then
9247 LIBTOOL_CRUFT="-lcc_dynamic"
9248 else
9249 LIBTOOL_CRUFT=""
9250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009252 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253else
Matthias Kloseb9621712010-04-24 17:59:49 +00009254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009256
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 #include <unistd.h>
9258 int main(int argc, char*argv[])
9259 {
9260 if (sizeof(long) == 4) {
9261 return 0;
9262 } else {
9263 return 1;
9264 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009265 }
9266
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009268if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 ac_osx_32bit=yes
9270else
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9274 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009275fi
9276
9277
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009278 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009279 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009280 i386)
9281 MACOSX_DEFAULT_ARCH="i386"
9282 ;;
9283 ppc)
9284 MACOSX_DEFAULT_ARCH="ppc"
9285 ;;
9286 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009287 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009288 ;;
9289 esac
9290 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009291 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009292 i386)
9293 MACOSX_DEFAULT_ARCH="x86_64"
9294 ;;
9295 ppc)
9296 MACOSX_DEFAULT_ARCH="ppc64"
9297 ;;
9298 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009299 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009300 ;;
9301 esac
9302
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009303 fi
9304
9305 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009306 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9310$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009311if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009312then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009313 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009315 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9320$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009321 if test $enable_shared = "yes"
9322 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009323 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 +00009324 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009325else
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009328fi
9329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9331$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009332case $ac_sys_system/$ac_sys_release in
9333 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9338$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009339 ;;
9340 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009343 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009344esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009345
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347
Michael W. Hudson54241132001-12-07 15:38:26 +00009348
9349
9350
9351
Benjamin Peterson99f03762010-04-11 22:15:28 +00009352
Thomas Wouters477c8d52006-05-27 19:21:47 +00009353
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009354# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9355# -- usually .so, .sl on HP-UX, .dll on Cygwin
9356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9357$as_echo_n "checking the extension of shared libraries... " >&6; }
9358if test -z "$SHLIB_SUFFIX"; then
9359 case $ac_sys_system in
9360 hp*|HP*)
9361 case `uname -m` in
9362 ia64) SHLIB_SUFFIX=.so;;
9363 *) SHLIB_SUFFIX=.sl;;
9364 esac
9365 ;;
9366 CYGWIN*) SHLIB_SUFFIX=.dll;;
9367 *) SHLIB_SUFFIX=.so;;
9368 esac
9369fi
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9371$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009372
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009374# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009375# (Shared libraries in this instance are shared modules to be loaded into
9376# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9378$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379if test -z "$LDSHARED"
9380then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009381 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009382 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009383 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009384 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009385 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009387 if test "$GCC" = "yes" ; then
9388 LDSHARED='$(CC) -shared'
9389 LDCXXSHARED='$(CXX) -shared'
9390 else
9391 LDSHARED='$(CC) -G'
9392 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009393 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009394 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009395 if test "$GCC" = "yes" ; then
9396 LDSHARED='$(CC) -shared'
9397 LDCXXSHARED='$(CXX) -shared'
9398 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009399 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009400 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009401 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009402 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009403 LDSHARED='$(CC) -bundle'
9404 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009405 if test "$enable_framework" ; then
9406 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009407 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9408 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009409 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009410 else
9411 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009412 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009413 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009414 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009415 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED='$(CC) -bundle'
9417 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009418 if test "$enable_framework" ; then
9419 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009420 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9421 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009422 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009423 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009424 # No framework, use the Python app as bundle-loader
9425 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009426 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009428 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009429 Darwin/*)
9430 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9431 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009432
Ned Deily36820b62014-06-25 13:44:22 -07009433 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9434 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9435 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9436 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9437 if test ${dep_target_major} -eq 10 && \
9438 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009439 then
Ned Deily36820b62014-06-25 13:44:22 -07009440 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009441 LDSHARED='$(CC) -bundle'
9442 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009443 if test "$enable_framework" ; then
9444 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009445 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9446 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009448 else
9449 # No framework, use the Python app as bundle-loader
9450 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9451 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009452 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 fi
Ned Deily36820b62014-06-25 13:44:22 -07009454 else
9455 # building for OS X 10.3 and later
9456 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9457 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9458 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009459 fi
9460 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009461 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009462 LDSHARED='$(CC) -shared'
9463 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009464 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009465 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009466 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009467 LDSHARED='$(CC) -shared'
9468 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009469 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009470 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009471 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009472 OpenBSD*)
9473 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9474 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009475 LDSHARED='$(CC) -shared $(CCSHARED)'
9476 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009477 else
9478 case `uname -r` in
9479 [01].* | 2.[0-7] | 2.[0-7].*)
9480 LDSHARED="ld -Bshareable ${LDFLAGS}"
9481 ;;
9482 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009483 LDSHARED='$(CC) -shared $(CCSHARED)'
9484 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009485 ;;
9486 esac
9487 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009488 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009489 LDSHARED='$(CC) -shared'
9490 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009491 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009492 if test "$GCC" = "yes" ; then
9493 LDSHARED='$(CC) -shared'
9494 LDCXXSHARED='$(CXX) -shared'
9495 else
9496 LDSHARED='$(CC) -G'
9497 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009498 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009499 SCO_SV*)
9500 LDSHARED='$(CC) -Wl,-G,-Bexport'
9501 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9502 CYGWIN*)
9503 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9504 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009505 *) LDSHARED="ld";;
9506 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9509$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009510LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009511BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009512# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009513# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9515$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009516if test -z "$CCSHARED"
9517then
Guido van Rossum07397971997-04-29 21:49:50 +00009518 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009519 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009520 then CCSHARED="-fPIC";
9521 elif test `uname -p` = sparc;
9522 then CCSHARED="-xcode=pic32";
9523 else CCSHARED="-Kpic";
9524 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009525 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009526 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009527 else CCSHARED="+z";
9528 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009529 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009530 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009531 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009532 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009533 if test "$GCC" = "yes"
9534 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009535 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009536 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009537 SCO_SV*)
9538 if test "$GCC" = "yes"
9539 then CCSHARED="-fPIC"
9540 else CCSHARED="-Kpic -belf"
9541 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009542 VxWorks*)
9543 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9547$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009548# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9551$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009552if test -z "$LINKFORSHARED"
9553then
Guido van Rossum07397971997-04-29 21:49:50 +00009554 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009555 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009556 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009557 LINKFORSHARED="-Wl,-E -Wl,+s";;
9558# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009559 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009560 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009561 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009563 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009564
9565 # Issue #18075: the default maximum stack size (8MBytes) is too
9566 # small for the default recursion limit. Increase the stack size
9567 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009568 # Note: This matches the value of THREAD_STACK_SIZE in
9569 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009570 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9571
Jack Jansene578a632001-08-15 01:27:14 +00009572 if test "$enable_framework"
9573 then
Jack Jansenda49e192005-01-07 13:08:22 +00009574 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009575 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009576 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009577 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009578 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009579 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009580 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009581 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9582 then
9583 LINKFORSHARED="-Wl,--export-dynamic"
9584 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009585 SunOS/5*) case $CC in
9586 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009587 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009588 then
9589 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009590 fi;;
9591 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009592 CYGWIN*)
9593 if test $enable_shared = "no"
9594 then
9595 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9596 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009597 QNX*)
9598 # -Wl,-E causes the symbols to be added to the dynamic
9599 # symbol table so that they can be found when a module
9600 # is loaded. -N 2048K causes the stack size to be set
9601 # to 2048 kilobytes so that the stack doesn't overflow
9602 # when running test_compile.py.
9603 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009604 VxWorks*)
9605 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009606 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9609$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009610
Michael W. Hudson54241132001-12-07 15:38:26 +00009611
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009612
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9614$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009615if test ! "$LIBRARY" = "$LDLIBRARY"
9616then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009617 case $ac_sys_system in
9618 CYGWIN*)
9619 # Cygwin needs CCSHARED when building extension DLLs
9620 # but not when building the interpreter DLL.
9621 CFLAGSFORSHARED='';;
9622 *)
9623 CFLAGSFORSHARED='$(CCSHARED)'
9624 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9627$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009628
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009629# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9630# library (with --enable-shared).
9631# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009632# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9633# if it is not required, since it creates a dependency of the shared library
9634# to LIBS. This, in turn, means that applications linking the shared libpython
9635# don't need to link LIBS explicitly. The default should be only changed
9636# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9639$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009640case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009641 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009642 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009643esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9645$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009646
9647
Guido van Rossum627b2d71993-12-24 10:39:16 +00009648# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9650$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009651if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009652 $as_echo_n "(cached) " >&6
9653else
9654 ac_check_lib_save_LIBS=$LIBS
9655LIBS="-lsendfile $LIBS"
9656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9657/* end confdefs.h. */
9658
9659/* Override any GCC internal prototype to avoid an error.
9660 Use char because int might match the return type of a GCC
9661 builtin and then its argument prototype would still apply. */
9662#ifdef __cplusplus
9663extern "C"
9664#endif
9665char sendfile ();
9666int
9667main ()
9668{
9669return sendfile ();
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674if ac_fn_c_try_link "$LINENO"; then :
9675 ac_cv_lib_sendfile_sendfile=yes
9676else
9677 ac_cv_lib_sendfile_sendfile=no
9678fi
9679rm -f core conftest.err conftest.$ac_objext \
9680 conftest$ac_exeext conftest.$ac_ext
9681LIBS=$ac_check_lib_save_LIBS
9682fi
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9684$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009686 cat >>confdefs.h <<_ACEOF
9687#define HAVE_LIBSENDFILE 1
9688_ACEOF
9689
9690 LIBS="-lsendfile $LIBS"
9691
9692fi
9693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9695$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009696if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704/* Override any GCC internal prototype to avoid an error.
9705 Use char because int might match the return type of a GCC
9706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707#ifdef __cplusplus
9708extern "C"
9709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009710char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ;
9716 return 0;
9717}
9718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009724rm -f core conftest.err conftest.$ac_objext \
9725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9729$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009730if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 cat >>confdefs.h <<_ACEOF
9732#define HAVE_LIBDL 1
9733_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009735 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009737fi
9738 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9740$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009741if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009743else
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009745LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749/* Override any GCC internal prototype to avoid an error.
9750 Use char because int might match the return type of a GCC
9751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef __cplusplus
9753extern "C"
9754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009755char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009756int
9757main ()
9758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009766else
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009769rm -f core conftest.err conftest.$ac_objext \
9770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9774$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009775if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 cat >>confdefs.h <<_ACEOF
9777#define HAVE_LIBDLD 1
9778_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009779
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009780 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009781
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009782fi
9783 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009784
Michael Felt0d3ccb42017-12-30 22:39:20 +01009785# checks for uuid.h location
9786for ac_header in uuid/uuid.h uuid.h
9787do :
9788 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9789ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9790if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9791 cat >>confdefs.h <<_ACEOF
9792#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9793_ACEOF
9794
9795fi
9796
9797done
9798
9799
Berker Peksag9a10ff42017-11-08 23:09:16 +03009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9801$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9803/* end confdefs.h. */
9804#include <uuid/uuid.h>
9805int
9806main ()
9807{
9808
9809#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009810void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009811#endif
9812
9813 ;
9814 return 0;
9815}
9816_ACEOF
9817if ac_fn_c_try_compile "$LINENO"; then :
9818
9819$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9820
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9822$as_echo "yes" >&6; }
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826
9827fi
9828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9829
Michael Felt0d3ccb42017-12-30 22:39:20 +01009830# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009831# FreeBSD and OpenBSD provides support as well
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9833$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h. */
9836#include <uuid.h>
9837int
9838main ()
9839{
9840
9841#ifndef uuid_create
9842void *x = uuid_create
9843#endif
9844
9845 ;
9846 return 0;
9847}
9848_ACEOF
9849if ac_fn_c_try_compile "$LINENO"; then :
9850
9851$as_echo "#define HAVE_UUID_CREATE 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
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009862# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9863# stream in big-endian byte-order
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9865$as_echo_n "checking for uuid_enc_be... " >&6; }
9866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9867/* end confdefs.h. */
9868#include <uuid.h>
9869int
9870main ()
9871{
9872
9873#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009874void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009875#endif
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881if ac_fn_c_try_compile "$LINENO"; then :
9882
9883$as_echo "#define HAVE_UUID_ENC_BE 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 Storchaka9e78dc22017-11-11 19:18:28 +02009894# 'Real Time' functions on Solaris
9895# posix4 on Solaris 2.6
9896# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009898$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009899if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009901else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009902 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906/* Override any GCC internal prototype to avoid an error.
9907 Use char because int might match the return type of a GCC
9908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009909#ifdef __cplusplus
9910extern "C"
9911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009912char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009913int
9914main ()
9915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 ;
9918 return 0;
9919}
9920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921for ac_lib in '' pthread rt posix4; do
9922 if test -z "$ac_lib"; then
9923 ac_res="none required"
9924 else
9925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009931rm -f core conftest.err conftest.$ac_objext \
9932 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009933 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936done
Victor Stinnere0be4232011-10-25 13:06:09 +02009937if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939else
9940 ac_cv_search_sem_init=no
9941fi
9942rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009943LIBS=$ac_func_search_save_LIBS
9944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9946$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009950
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009951fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009952
Martin v. Löwis519adae2003-09-20 10:47:47 +00009953
Martin v. Löwis19d17342003-06-14 21:03:05 +00009954# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9956$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009957if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959else
9960 ac_check_lib_save_LIBS=$LIBS
9961LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965/* Override any GCC internal prototype to avoid an error.
9966 Use char because int might match the return type of a GCC
9967 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009968#ifdef __cplusplus
9969extern "C"
9970#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009971char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009972int
9973main ()
9974{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009976 ;
9977 return 0;
9978}
9979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009981 ac_cv_lib_intl_textdomain=yes
9982else
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009987LIBS=$ac_check_lib_save_LIBS
9988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9990$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992
Matthias Kloseb9621712010-04-24 17:59:49 +00009993$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009994
Brett Cannonc6d936e2009-06-07 20:09:53 +00009995 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996fi
9997
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009998
9999# checks for system dependent C++ extensions support
10000case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10002$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010005
Georg Brandl59e87bd2011-02-15 19:48:59 +000010006 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010007int
10008main ()
10009{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010010loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ;
10012 return 0;
10013}
Matthias Kloseb159a552010-04-25 21:00:44 +000010014
Martin v. Löwis11437992002-04-12 09:54:03 +000010015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010017
Matthias Kloseb159a552010-04-25 21:00:44 +000010018
Matthias Kloseb9621712010-04-24 17:59:49 +000010019$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010020
Matthias Kloseb159a552010-04-25 21:00:44 +000010021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010022$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010023
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010024else
Matthias Kloseb159a552010-04-25 21:00:44 +000010025
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010027$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010028
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010030rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010031 conftest$ac_exeext conftest.$ac_ext
10032# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10033# of the AIX system used to build/package Python executable. This tag serves
10034# as a baseline for bdist module packages
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10036$as_echo_n "checking for the system builddate... " >&6; }
10037 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10038
10039cat >>confdefs.h <<_ACEOF
10040#define AIX_BUILDDATE $AIX_BUILDDATE
10041_ACEOF
10042
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10044$as_echo "$AIX_BUILDDATE" >&6; }
10045 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010046 *) ;;
10047esac
10048
Christian Heimes985ecdc2013-11-20 11:46:18 +010010049# check for systems that require aligned memory access
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10051$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010052if ${ac_cv_aligned_required+:} false; then :
10053 $as_echo_n "(cached) " >&6
10054else
10055 if test "$cross_compiling" = yes; then :
10056 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010057else
10058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10059/* end confdefs.h. */
10060
10061int main()
10062{
10063 char s[16];
10064 int i, *p1, *p2;
10065 for (i=0; i < 16; i++)
10066 s[i] = i;
10067 p1 = (int*)(s+1);
10068 p2 = (int*)(s+2);
10069 if (*p1 == *p2)
10070 return 1;
10071 return 0;
10072}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010073_ACEOF
10074if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010075 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010076else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010077 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010078fi
10079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10080 conftest.$ac_objext conftest.beam conftest.$ac_ext
10081fi
10082
10083
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010084fi
10085
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10087$as_echo "$ac_cv_aligned_required" >&6; }
10088if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010089
10090$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10091
10092fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010093
10094# str, bytes and memoryview hash algorithm
10095
10096
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10098$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10099
10100# Check whether --with-hash_algorithm was given.
10101if test "${with_hash_algorithm+set}" = set; then :
10102 withval=$with_hash_algorithm;
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10104$as_echo "$withval" >&6; }
10105case "$withval" in
10106 siphash24)
10107 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10108
10109 ;;
10110 fnv)
10111 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10112
10113 ;;
10114 *)
10115 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10116 ;;
10117esac
10118
10119else
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10121$as_echo "default" >&6; }
10122fi
10123
10124
Charles-François Natalid30b0222014-05-08 23:08:51 +010010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10126$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10127
10128# Check whether --with-address_sanitizer was given.
10129if test "${with_address_sanitizer+set}" = set; then :
10130 withval=$with_address_sanitizer;
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10132$as_echo "$withval" >&6; }
10133BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10134LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010135# ASan works by controlling memory allocation, our own malloc interferes.
10136with_pymalloc="no"
10137
10138else
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10145$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10146
10147# Check whether --with-memory_sanitizer was given.
10148if test "${with_memory_sanitizer+set}" = set; then :
10149 withval=$with_memory_sanitizer;
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10151$as_echo "$withval" >&6; }
10152BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10153LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10154# MSan works by controlling memory allocation, our own malloc interferes.
10155with_pymalloc="no"
10156
10157else
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160fi
10161
10162
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10164$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10165
10166# Check whether --with-undefined_behavior_sanitizer was given.
10167if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10168 withval=$with_undefined_behavior_sanitizer;
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10170$as_echo "$withval" >&6; }
10171BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10172LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010173
10174else
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
10177fi
10178
10179
Guido van Rossum70c7f481998-03-26 18:44:10 +000010180# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10182$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010183if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010185else
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010187LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191/* Override any GCC internal prototype to avoid an error.
10192 Use char because int might match the return type of a GCC
10193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010194#ifdef __cplusplus
10195extern "C"
10196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010197char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010198int
10199main ()
10200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ;
10203 return 0;
10204}
10205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010208else
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211rm -f core conftest.err conftest.$ac_objext \
10212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010213LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10216$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010217if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010218 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010219fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010220 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10222$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010223if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010225else
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010227LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231/* Override any GCC internal prototype to avoid an error.
10232 Use char because int might match the return type of a GCC
10233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010234#ifdef __cplusplus
10235extern "C"
10236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010237char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010238int
10239main ()
10240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010248else
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251rm -f core conftest.err conftest.$ac_objext \
10252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10256$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010257if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010258 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010259fi
10260 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10263$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010266if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10269$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010270LIBS="$withval $LIBS"
10271
10272else
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275fi
10276
Guido van Rossum7f43da71994-08-01 12:15:30 +000010277
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010278
10279
10280
10281
10282
10283
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010284if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10285 if test -n "$ac_tool_prefix"; then
10286 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10287set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
10290if ${ac_cv_path_PKG_CONFIG+:} false; then :
10291 $as_echo_n "(cached) " >&6
10292else
10293 case $PKG_CONFIG in
10294 [\\/]* | ?:[\\/]*)
10295 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10296 ;;
10297 *)
10298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10299for as_dir in $PATH
10300do
10301 IFS=$as_save_IFS
10302 test -z "$as_dir" && as_dir=.
10303 for ac_exec_ext in '' $ac_executable_extensions; do
10304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10305 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10307 break 2
10308 fi
10309done
10310 done
10311IFS=$as_save_IFS
10312
10313 ;;
10314esac
10315fi
10316PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10317if test -n "$PKG_CONFIG"; then
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10319$as_echo "$PKG_CONFIG" >&6; }
10320else
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
10323fi
10324
10325
10326fi
10327if test -z "$ac_cv_path_PKG_CONFIG"; then
10328 ac_pt_PKG_CONFIG=$PKG_CONFIG
10329 # Extract the first word of "pkg-config", so it can be a program name with args.
10330set dummy pkg-config; ac_word=$2
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10332$as_echo_n "checking for $ac_word... " >&6; }
10333if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10334 $as_echo_n "(cached) " >&6
10335else
10336 case $ac_pt_PKG_CONFIG in
10337 [\\/]* | ?:[\\/]*)
10338 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10339 ;;
10340 *)
10341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10342for as_dir in $PATH
10343do
10344 IFS=$as_save_IFS
10345 test -z "$as_dir" && as_dir=.
10346 for ac_exec_ext in '' $ac_executable_extensions; do
10347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10348 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10350 break 2
10351 fi
10352done
10353 done
10354IFS=$as_save_IFS
10355
10356 ;;
10357esac
10358fi
10359ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10360if test -n "$ac_pt_PKG_CONFIG"; then
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10362$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10363else
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368 if test "x$ac_pt_PKG_CONFIG" = x; then
10369 PKG_CONFIG=""
10370 else
10371 case $cross_compiling:$ac_tool_warned in
10372yes:)
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10374$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10375ac_tool_warned=yes ;;
10376esac
10377 PKG_CONFIG=$ac_pt_PKG_CONFIG
10378 fi
10379else
10380 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10381fi
10382
10383fi
10384if test -n "$PKG_CONFIG"; then
10385 _pkg_min_version=0.9.0
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10387$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10388 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10390$as_echo "yes" >&6; }
10391 else
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
10394 PKG_CONFIG=""
10395 fi
10396fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010397
10398# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10400$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010401
10402# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010403if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010404 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010405else
10406 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010407fi
10408
10409
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10411$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010412
10413# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10415$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010416
10417# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010418if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010419 withval=$with_system_ffi;
10420fi
10421
10422
Zachary Waref40d4dd2016-09-17 01:25:24 -050010423if test "$ac_sys_system" = "Darwin"
10424then
10425 case "$with_system_ffi" in
10426 "")
10427 with_system_ffi="no"
10428 ;;
10429 yes|no)
10430 ;;
10431 *)
10432 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10433 ;;
10434 esac
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10436$as_echo "$with_system_ffi" >&6; }
10437else
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10439$as_echo "yes" >&6; }
10440 if test "$with_system_ffi" != ""
10441 then
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10443$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10444 fi
10445 with_system_ffi="yes"
10446fi
Zachary Ware935043d2016-09-09 17:01:21 -070010447
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010448if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010449 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10450else
10451 LIBFFI_INCLUDEDIR=""
10452fi
10453
10454
Stefan Krah60187b52012-03-23 19:06:27 +010010455# Check for use of the system libmpdec library
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10457$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10458
10459# Check whether --with-system_libmpdec was given.
10460if test "${with_system_libmpdec+set}" = set; then :
10461 withval=$with_system_libmpdec;
10462else
10463 with_system_libmpdec="no"
10464fi
10465
10466
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10468$as_echo "$with_system_libmpdec" >&6; }
10469
Benjamin Peterson076ed002010-10-31 17:11:02 +000010470# Check for support for loadable sqlite extensions
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10472$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10473# Check whether --enable-loadable-sqlite-extensions was given.
10474if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10475 enableval=$enable_loadable_sqlite_extensions;
10476else
10477 enable_loadable_sqlite_extensions="no"
10478fi
10479
10480
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10482$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10483
Ned Deilyd819b932013-09-06 01:07:05 -070010484# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10485
10486
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10488$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10489
10490# Check whether --with-tcltk-includes was given.
10491if test "${with_tcltk_includes+set}" = set; then :
10492 withval=$with_tcltk_includes;
10493else
10494 with_tcltk_includes="default"
10495fi
10496
10497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10498$as_echo "$with_tcltk_includes" >&6; }
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10500$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10501
10502# Check whether --with-tcltk-libs was given.
10503if test "${with_tcltk_libs+set}" = set; then :
10504 withval=$with_tcltk_libs;
10505else
10506 with_tcltk_libs="default"
10507fi
10508
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10510$as_echo "$with_tcltk_libs" >&6; }
10511if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10512then
10513 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10514 then
10515 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10516 fi
10517 TCLTK_INCLUDES=""
10518 TCLTK_LIBS=""
10519else
10520 TCLTK_INCLUDES="$with_tcltk_includes"
10521 TCLTK_LIBS="$with_tcltk_libs"
10522fi
10523
Matthias Klose55708cc2009-04-30 08:06:49 +000010524# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10526$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010527
10528# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010530 withval=$with_dbmliborder;
10531if test x$with_dbmliborder = xyes
10532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010533as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010534else
10535 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10536 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10537 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010538 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010539 fi
10540 done
10541fi
10542fi
10543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10545$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010546
Martin v. Löwis11437992002-04-12 09:54:03 +000010547# Templates for things AC_DEFINEd more than once.
10548# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010549
10550
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010551if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010552then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010553 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010555
10556 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010557 if test "$ac_sys_system" = "SunOS"; then
10558 CFLAGS="$CFLAGS -D_REENTRANT"
10559 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010560elif test "$ac_cv_kpthread" = "yes"
10561then
10562 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010563 if test "$ac_cv_cxx_thread" = "yes"; then
10564 CXX="$CXX -Kpthread"
10565 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010566 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010567elif test "$ac_cv_kthread" = "yes"
10568then
10569 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010570 if test "$ac_cv_cxx_thread" = "yes"; then
10571 CXX="$CXX -Kthread"
10572 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010573 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574elif test "$ac_cv_pthread" = "yes"
10575then
10576 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010577 if test "$ac_cv_cxx_thread" = "yes"; then
10578 CXX="$CXX -pthread"
10579 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010581else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010582 if test ! -z "$withval" -a -d "$withval"
10583 then LDFLAGS="$LDFLAGS -L$withval"
10584 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585
10586 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010587 # define _POSIX_THREADS in unistd.h. Some apparently don't
10588 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10590$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010592/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010593
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010594#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010595#ifdef _POSIX_THREADS
10596yes
10597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
10599_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010602 unistd_defines_pthreads=yes
10603else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010604 unistd_defines_pthreads=no
10605fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010606rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10609$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010612
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010613 # Just looking for pthread_create in libpthread is not enough:
10614 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10615 # So we really have to include pthread.h, and then link.
10616 _libs=$LIBS
10617 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10619$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010622
10623#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010624#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010625
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010626void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010627int
10628main ()
10629{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010630
10631pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ;
10633 return 0;
10634}
10635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10639$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010640 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010641
Guido van Rossum02a1c402000-02-25 19:26:31 +000010642else
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010644 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010645 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010646if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010648 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010649
Guido van Rossumad678af1998-10-02 14:42:15 +000010650else
Guido van Rossumad678af1998-10-02 14:42:15 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10653$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010654if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010658LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662/* Override any GCC internal prototype to avoid an error.
10663 Use char because int might match the return type of a GCC
10664 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010665#ifdef __cplusplus
10666extern "C"
10667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010668char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010669int
10670main ()
10671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 ;
10674 return 0;
10675}
10676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010679else
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010682rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010684LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10687$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010688if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010690 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010691 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010692
Greg Steinadf63d62000-07-05 10:38:09 +000010693else
Greg Steinadf63d62000-07-05 10:38:09 +000010694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10696$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010697if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010699else
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010701LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705/* Override any GCC internal prototype to avoid an error.
10706 Use char because int might match the return type of a GCC
10707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708#ifdef __cplusplus
10709extern "C"
10710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010711char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010712int
10713main ()
10714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 ;
10717 return 0;
10718}
10719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010725rm -f core conftest.err conftest.$ac_objext \
10726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010727LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10730$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010731if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010732
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010733 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010734 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010735
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010736else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10739$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010740if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010742else
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010744LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748/* Override any GCC internal prototype to avoid an error.
10749 Use char because int might match the return type of a GCC
10750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751#ifdef __cplusplus
10752extern "C"
10753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010754char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010755int
10756main ()
10757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ;
10760 return 0;
10761}
10762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010768rm -f core conftest.err conftest.$ac_objext \
10769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010770LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10773$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010774if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010775
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010776 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010777 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010778
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010779else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10782$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010783if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010785else
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010787LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791/* Override any GCC internal prototype to avoid an error.
10792 Use char because int might match the return type of a GCC
10793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010794#ifdef __cplusplus
10795extern "C"
10796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010797char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010798int
10799main ()
10800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010802 ;
10803 return 0;
10804}
10805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010808else
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010811rm -f core conftest.err conftest.$ac_objext \
10812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010813LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10816$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010817if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010818
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010819 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010820 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010821
Guido van Rossumb93a8621998-05-07 13:27:32 +000010822else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010823
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010824 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10825
Guido van Rossum2d38f911996-06-26 19:47:01 +000010826fi
10827
Guido van Rossum627b2d71993-12-24 10:39:16 +000010828
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010829fi
10830
Guido van Rossum0be3e491997-05-22 20:33:33 +000010831fi
10832
Guido van Rossum49545951997-12-02 19:28:29 +000010833fi
10834
Guido van Rossumb93a8621998-05-07 13:27:32 +000010835fi
10836
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010838rm -f core conftest.err conftest.$ac_objext \
10839 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10842$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010843if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010845else
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010847LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010851/* Override any GCC internal prototype to avoid an error.
10852 Use char because int might match the return type of a GCC
10853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010854#ifdef __cplusplus
10855extern "C"
10856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010857char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010858int
10859main ()
10860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ;
10863 return 0;
10864}
10865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010866if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010867 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010868else
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010871rm -f core conftest.err conftest.$ac_objext \
10872 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010873LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10876$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010877if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010878
Martin v. Löwis130fb172001-07-19 11:00:41 +000010879 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010880
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881fi
10882
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010883
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010885
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010886if test "$posix_threads" = "yes"; then
10887 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010890
10891 fi
10892
10893 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10894 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010895 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010897
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010898 ;;
10899 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010901
10902 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010903 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010904$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010905
10906 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010907 esac
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10910$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010911 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913else
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010915 ac_cv_pthread_system_supported=no
10916else
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010918/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010919
10920 #include <stdio.h>
10921 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010922 void *foo(void *parm) {
10923 return NULL;
10924 }
10925 main() {
10926 pthread_attr_t attr;
10927 pthread_t id;
10928 if (pthread_attr_init(&attr)) exit(-1);
10929 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10930 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10931 exit(0);
10932 }
10933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010934if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010935 ac_cv_pthread_system_supported=yes
10936else
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010941fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943
Guido van Rossum627b2d71993-12-24 10:39:16 +000010944fi
10945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10947$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010948 if test "$ac_cv_pthread_system_supported" = "yes"; then
10949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010951
10952 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 for ac_func in pthread_sigmask
10954do :
10955 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010956if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010957 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010958#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010959_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010960 case $ac_sys_system in
10961 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010964
10965 ;;
10966 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010967fi
10968done
10969
pdoxe14679c2017-10-05 00:01:56 -070010970 for ac_func in pthread_getcpuclockid
10971do :
10972 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10973if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10974 cat >>confdefs.h <<_ACEOF
10975#define HAVE_PTHREAD_GETCPUCLOCKID 1
10976_ACEOF
10977
10978fi
10979done
10980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010981fi
10982
10983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10987$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10993$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010994 ipv6=no
10995 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10997$as_echo "yes" >&6; }
10998 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999
11000 ipv6=yes
11001 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003else
Martin v. Löwis11437992002-04-12 09:54:03 +000011004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011007 /* AF_INET6 available check */
11008#include <sys/types.h>
11009#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011010int
11011main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011012{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011013int domain = AF_INET6;
11014 ;
11015 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016}
Martin v. Löwis11437992002-04-12 09:54:03 +000011017_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011018if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11021$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011022 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011023
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011024else
Matthias Kloseb159a552010-04-25 21:00:44 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011029
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011033if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11035$as_echo_n "checking if RFC2553 API is available... " >&6; }
11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011038
11039 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011040#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011041int
11042main ()
11043{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011044struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011045 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 ;
11047 return 0;
11048}
Matthias Kloseb159a552010-04-25 21:00:44 +000011049
Martin v. Löwis11437992002-04-12 09:54:03 +000011050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011052
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011054$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011055 ipv6=yes
11056
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011057else
Matthias Kloseb159a552010-04-25 21:00:44 +000011058
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011061 ipv6=no
11062
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011065fi
11066
11067if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011069
11070fi
11071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072fi
11073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074
11075ipv6type=unknown
11076ipv6lib=none
11077ipv6trylibc=no
11078
11079if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11081$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011082 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11083 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011084 case $i in
11085 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011087/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089#include <netinet/in.h>
11090#ifdef IPV6_INRIA_VERSION
11091yes
11092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011093_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011096 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011098rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099
11100 ;;
11101 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011104
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105#include <netinet/in.h>
11106#ifdef __KAME__
11107yes
11108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011109_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112 ipv6type=$i;
11113 ipv6lib=inet6
11114 ipv6libdir=/usr/local/v6/lib
11115 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011117rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118
11119 ;;
11120 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011123
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124#include <features.h>
11125#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11126yes
11127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131 ipv6type=$i;
11132 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011134rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135
11136 ;;
11137 linux-inet6)
11138 if test -d /usr/inet6; then
11139 ipv6type=$i
11140 ipv6lib=inet6
11141 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011142 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143 fi
11144 ;;
11145 solaris)
11146 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011147 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148 ipv6type=$i
11149 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150 fi
11151 fi
11152 ;;
11153 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011155/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011156
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157#include <sys/param.h>
11158#ifdef _TOSHIBA_INET6
11159yes
11160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011161_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011164 ipv6type=$i;
11165 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011166 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011168rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011169
11170 ;;
11171 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175#include </usr/local/v6/include/sys/v6config.h>
11176#ifdef __V6D__
11177yes
11178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182 ipv6type=$i;
11183 ipv6lib=v6;
11184 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011185 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011187rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188
11189 ;;
11190 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011192/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011194#include <sys/param.h>
11195#ifdef _ZETA_MINAMI_INET6
11196yes
11197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011201 ipv6type=$i;
11202 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011203 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011204fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011205rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011206
11207 ;;
11208 esac
11209 if test "$ipv6type" != "unknown"; then
11210 break
11211 fi
11212 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11214$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215fi
11216
11217if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11218 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11219 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11220 echo "using lib$ipv6lib"
11221 else
11222 if test $ipv6trylibc = "yes"; then
11223 echo "using libc"
11224 else
11225 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11226 echo "You need to fetch lib$ipv6lib.a from appropriate"
11227 echo 'ipv6 kit and compile beforehand.'
11228 exit 1
11229 fi
11230 fi
11231fi
11232
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11234$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236/* end confdefs.h. */
11237 /* CAN_RAW_FD_FRAMES available check */
11238#include <linux/can/raw.h>
11239int
11240main ()
11241{
11242int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247if ac_fn_c_try_compile "$LINENO"; then :
11248
11249
11250$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11251
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11253$as_echo "yes" >&6; }
11254
11255else
11256
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
11259
11260fi
11261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11262
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011263# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11265$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269 withval=$with_doc_strings;
11270fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011271
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011272
11273if test -z "$with_doc_strings"
11274then with_doc_strings="yes"
11275fi
11276if test "$with_doc_strings" != "no"
11277then
11278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011280
11281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11283$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011284
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011285# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11287$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011290if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 withval=$with_pymalloc;
11292fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011293
Neil Schemenauera35c6882001-02-27 04:45:05 +000011294
Neil Schemenauer16c22972002-03-22 15:34:49 +000011295if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011296then
11297 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011298fi
11299if test "$with_pymalloc" != "no"
11300then
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011303
11304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11306$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011307
Nick Coghlan6ea41862017-06-11 13:16:15 +100011308# Check for --with-c-locale-coercion
11309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11310$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11311
11312# Check whether --with-c-locale-coercion was given.
11313if test "${with_c_locale_coercion+set}" = set; then :
11314 withval=$with_c_locale_coercion;
11315fi
11316
11317
11318if test -z "$with_c_locale_coercion"
11319then
11320 with_c_locale_coercion="yes"
11321fi
11322if test "$with_c_locale_coercion" != "no"
11323then
11324
11325$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11326
11327fi
11328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11329$as_echo "$with_c_locale_coercion" >&6; }
11330
Benjamin Peterson05159c42009-12-03 03:01:27 +000011331# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11333$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011334
11335# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011336if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011337 withval=$with_valgrind;
11338else
11339 with_valgrind=no
11340fi
11341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11343$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011344if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 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 +020011346if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011349
11350else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011351 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011352
11353fi
11354
11355
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011356 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011357fi
11358
Łukasz Langaa785c872016-09-09 17:37:37 -070011359# Check for DTrace support
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11361$as_echo_n "checking for --with-dtrace... " >&6; }
11362
11363# Check whether --with-dtrace was given.
11364if test "${with_dtrace+set}" = set; then :
11365 withval=$with_dtrace;
11366else
11367 with_dtrace=no
11368fi
11369
11370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11371$as_echo "$with_dtrace" >&6; }
11372
11373
11374
11375
11376
11377DTRACE=
11378DFLAGS=
11379DTRACE_HEADERS=
11380DTRACE_OBJS=
11381
11382if test "$with_dtrace" = "yes"
11383then
11384 # Extract the first word of "dtrace", so it can be a program name with args.
11385set dummy dtrace; ac_word=$2
11386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11387$as_echo_n "checking for $ac_word... " >&6; }
11388if ${ac_cv_path_DTRACE+:} false; then :
11389 $as_echo_n "(cached) " >&6
11390else
11391 case $DTRACE in
11392 [\\/]* | ?:[\\/]*)
11393 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11394 ;;
11395 *)
11396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11397for as_dir in $PATH
11398do
11399 IFS=$as_save_IFS
11400 test -z "$as_dir" && as_dir=.
11401 for ac_exec_ext in '' $ac_executable_extensions; do
11402 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11403 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11405 break 2
11406 fi
11407done
11408 done
11409IFS=$as_save_IFS
11410
11411 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11412 ;;
11413esac
11414fi
11415DTRACE=$ac_cv_path_DTRACE
11416if test -n "$DTRACE"; then
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11418$as_echo "$DTRACE" >&6; }
11419else
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
11422fi
11423
11424
11425 if test "$DTRACE" = "not found"; then
11426 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11427 fi
11428
11429$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11430
11431 DTRACE_HEADERS="Include/pydtrace_probes.h"
11432
11433 # On OS X, DTrace providers do not need to be explicitly compiled and
11434 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11435 # generation flag '-G'. We check for presence of this flag, rather than
11436 # hardcoding support by OS, in the interest of robustness.
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11438$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11439if ${ac_cv_dtrace_link+:} false; then :
11440 $as_echo_n "(cached) " >&6
11441else
11442 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011443 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011444 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11445 ac_cv_dtrace_link=yes
11446
11447fi
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11449$as_echo "$ac_cv_dtrace_link" >&6; }
11450 if test "$ac_cv_dtrace_link" = "yes"; then
11451 DTRACE_OBJS="Python/pydtrace.o"
11452 fi
11453fi
11454
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011455# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011456
Guido van Rossum98935bf2001-09-05 19:13:16 +000011457DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011458
Guido van Rossume97ee181999-12-20 21:27:22 +000011459# the dlopen() function means we might want to use dynload_shlib.o. some
11460# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011461for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011462do :
11463 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011464if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011466#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011467_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011468
Guido van Rossume97ee181999-12-20 21:27:22 +000011469fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011470done
Guido van Rossume97ee181999-12-20 21:27:22 +000011471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
Guido van Rossume97ee181999-12-20 21:27:22 +000011473# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11474# loading of modules.
11475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11477$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011478if test -z "$DYNLOADFILE"
11479then
11480 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011481 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11482 if test "$ac_cv_func_dlopen" = yes
11483 then DYNLOADFILE="dynload_shlib.o"
11484 else DYNLOADFILE="dynload_aix.o"
11485 fi
11486 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011487 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011488 *)
11489 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11490 # out any dynamic loading
11491 if test "$ac_cv_func_dlopen" = yes
11492 then DYNLOADFILE="dynload_shlib.o"
11493 else DYNLOADFILE="dynload_stub.o"
11494 fi
11495 ;;
11496 esac
11497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11499$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011500if test "$DYNLOADFILE" != "dynload_stub.o"
11501then
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011504
11505fi
11506
Neil Schemenauer4e425612001-06-19 15:44:15 +000011507# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11508
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11511$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011512if test -z "$MACHDEP_OBJS"
11513then
Jack Jansene578a632001-08-15 01:27:14 +000011514 MACHDEP_OBJS=$extra_machdep_objs
11515else
11516 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011517fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011518if test -z "$MACHDEP_OBJS"; then
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11520$as_echo "none" >&6; }
11521else
11522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11523$as_echo "$MACHDEP_OBJS" >&6; }
11524fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011525
Guido van Rossum627b2d71993-12-24 10:39:16 +000011526# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011527for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011528 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11529 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011530 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011531 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011532 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011533 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011534 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011535 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011536 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011537 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011538 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011539 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011540 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11541 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011542 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011543 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011544 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011545 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11546 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011547 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011548 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011549 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011550 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011551 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011552do :
11553 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11554ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011555if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011557#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011558_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011560fi
11561done
11562
Michael W. Hudson54241132001-12-07 15:38:26 +000011563
Benjamin Peterson40caa052018-09-12 15:52:40 -070011564# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11565# links. Some libc implementations have a stub lchmod implementation that always
11566# returns an error.
11567if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011568 for ac_func in lchmod
11569do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011570 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11571if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011572 cat >>confdefs.h <<_ACEOF
11573#define HAVE_LCHMOD 1
11574_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011575
11576fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011577done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011578
11579fi
11580
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011581ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11582 #include <dirent.h>
11583"
11584if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11585
11586$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11587
11588fi
11589
11590
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011591# For some functions, having a definition is not sufficient, since
11592# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11594$as_echo_n "checking for chroot... " >&6; }
11595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598int
11599main ()
11600{
11601void *x=chroot
11602 ;
11603 return 0;
11604}
11605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609
Matthias Kloseb159a552010-04-25 21:00:44 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011615
11616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11619$as_echo_n "checking for link... " >&6; }
11620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011621/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011622#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011623int
11624main ()
11625{
11626void *x=link
11627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011634
Matthias Kloseb159a552010-04-25 21:00:44 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011640
11641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11644$as_echo_n "checking for symlink... " >&6; }
11645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011647#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011648int
11649main ()
11650{
11651void *x=symlink
11652 ;
11653 return 0;
11654}
11655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011659
Matthias Kloseb159a552010-04-25 21:00:44 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011662else
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11664$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011665
11666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11669$as_echo_n "checking for fchdir... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011671/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011672#include <unistd.h>
11673int
11674main ()
11675{
11676void *x=fchdir
11677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011684
Matthias Kloseb159a552010-04-25 21:00:44 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011690
11691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11694$as_echo_n "checking for fsync... " >&6; }
11695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011697#include <unistd.h>
11698int
11699main ()
11700{
11701void *x=fsync
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011709
Matthias Kloseb159a552010-04-25 21:00:44 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011715
11716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11719$as_echo_n "checking for fdatasync... " >&6; }
11720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011721/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011722#include <unistd.h>
11723int
11724main ()
11725{
11726void *x=fdatasync
11727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011734
Matthias Kloseb159a552010-04-25 21:00:44 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011740
11741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11744$as_echo_n "checking for epoll... " >&6; }
11745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011746/* end confdefs.h. */
11747#include <sys/epoll.h>
11748int
11749main ()
11750{
11751void *x=epoll_create
11752 ;
11753 return 0;
11754}
11755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011756if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011757
Matthias Kloseb9621712010-04-24 17:59:49 +000011758$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011759
Matthias Kloseb159a552010-04-25 21:00:44 +000011760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011761$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11764$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011765
11766fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11769$as_echo_n "checking for epoll_create1... " >&6; }
11770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11771/* end confdefs.h. */
11772#include <sys/epoll.h>
11773int
11774main ()
11775{
11776void *x=epoll_create1
11777 ;
11778 return 0;
11779}
11780_ACEOF
11781if ac_fn_c_try_compile "$LINENO"; then :
11782
11783$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11784
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11786$as_echo "yes" >&6; }
11787else
11788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11789$as_echo "no" >&6; }
11790
11791fi
11792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11794$as_echo_n "checking for kqueue... " >&6; }
11795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011796/* end confdefs.h. */
11797
11798#include <sys/types.h>
11799#include <sys/event.h>
11800
11801int
11802main ()
11803{
11804int x=kqueue()
11805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011812
Matthias Kloseb159a552010-04-25 21:00:44 +000011813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011818
11819fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11822$as_echo_n "checking for prlimit... " >&6; }
11823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11824/* end confdefs.h. */
11825
11826#include <sys/time.h>
11827#include <sys/resource.h>
11828
11829int
11830main ()
11831{
11832void *x=prlimit
11833 ;
11834 return 0;
11835}
11836_ACEOF
11837if ac_fn_c_try_compile "$LINENO"; then :
11838
11839$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11840
11841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11842$as_echo "yes" >&6; }
11843else
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11845$as_echo "no" >&6; }
11846
11847fi
11848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11849
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11851$as_echo_n "checking for memfd_create... " >&6; }
11852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853/* end confdefs.h. */
11854
11855#ifdef HAVE_SYS_MMAN_H
11856#include <sys/mman.h>
11857#endif
11858#ifdef HAVE_SYS_MEMFD_H
11859#include <sys/memfd.h>
11860#endif
11861
11862int
11863main ()
11864{
11865void *x=memfd_create
11866 ;
11867 return 0;
11868}
11869_ACEOF
11870if ac_fn_c_try_compile "$LINENO"; then :
11871
11872$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11873
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11875$as_echo "yes" >&6; }
11876else
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
11879
11880fi
11881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11882
Martin v. Löwisd5843682002-11-21 20:41:28 +000011883# On some systems (eg. FreeBSD 5), we would find a definition of the
11884# functions ctermid_r, setgroups in the library, but no prototype
11885# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11886# address to avoid compiler warnings and potential miscompilations
11887# because of the missing prototypes.
11888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11890$as_echo_n "checking for ctermid_r... " >&6; }
11891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011893
Martin v. Löwisd5843682002-11-21 20:41:28 +000011894#include <stdio.h>
11895
Martin v. Löwisd5843682002-11-21 20:41:28 +000011896int
11897main ()
11898{
11899void* p = ctermid_r
11900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011907
Matthias Kloseb159a552010-04-25 21:00:44 +000011908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11912$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011913
11914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11916
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11918$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011920 $as_echo_n "(cached) " >&6
11921else
11922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011923/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011924#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011925int
11926main ()
11927{
11928void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011929
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011930 ;
11931 return 0;
11932}
11933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011934if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011935 ac_cv_flock_decl=yes
11936else
11937 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011938
11939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011941
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011942fi
11943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11944$as_echo "$ac_cv_flock_decl" >&6; }
11945if test "x${ac_cv_flock_decl}" = xyes; then
11946 for ac_func in flock
11947do :
11948 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011949if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011950 cat >>confdefs.h <<_ACEOF
11951#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011952_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011953
Antoine Pitroua3000072010-09-07 14:52:42 +000011954else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011956$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011957if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011958 $as_echo_n "(cached) " >&6
11959else
11960 ac_check_lib_save_LIBS=$LIBS
11961LIBS="-lbsd $LIBS"
11962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11963/* end confdefs.h. */
11964
11965/* Override any GCC internal prototype to avoid an error.
11966 Use char because int might match the return type of a GCC
11967 builtin and then its argument prototype would still apply. */
11968#ifdef __cplusplus
11969extern "C"
11970#endif
11971char flock ();
11972int
11973main ()
11974{
11975return flock ();
11976 ;
11977 return 0;
11978}
11979_ACEOF
11980if ac_fn_c_try_link "$LINENO"; then :
11981 ac_cv_lib_bsd_flock=yes
11982else
11983 ac_cv_lib_bsd_flock=no
11984fi
11985rm -f core conftest.err conftest.$ac_objext \
11986 conftest$ac_exeext conftest.$ac_ext
11987LIBS=$ac_check_lib_save_LIBS
11988fi
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11990$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011991if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011992 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011993
11994
11995$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11996
11997
11998fi
11999
12000
12001fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012002done
12003
Antoine Pitroua3000072010-09-07 14:52:42 +000012004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12007$as_echo_n "checking for getpagesize... " >&6; }
12008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012010
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012011#include <unistd.h>
12012
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012013int
12014main ()
12015{
12016void* p = getpagesize
12017 ;
12018 return 0;
12019}
12020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012024
Matthias Kloseb159a552010-04-25 21:00:44 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012026$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012027else
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12029$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012030
12031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012033
Victor Stinner984890f2011-11-24 13:53:38 +010012034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12035$as_echo_n "checking for broken unsetenv... " >&6; }
12036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12037/* end confdefs.h. */
12038
12039#include <stdlib.h>
12040
12041int
12042main ()
12043{
12044int res = unsetenv("DUMMY")
12045 ;
12046 return 0;
12047}
12048_ACEOF
12049if ac_fn_c_try_compile "$LINENO"; then :
12050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12051$as_echo "no" >&6; }
12052else
12053
12054$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12055
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12057$as_echo "yes" >&6; }
12058
12059fi
12060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12061
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012062for ac_prog in true
12063do
12064 # Extract the first word of "$ac_prog", so it can be a program name with args.
12065set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12067$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012068if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012070else
12071 if test -n "$TRUE"; then
12072 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12073else
12074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12075for as_dir in $PATH
12076do
12077 IFS=$as_save_IFS
12078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012081 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 $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 +000012083 break 2
12084 fi
12085done
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012088
12089fi
12090fi
12091TRUE=$ac_cv_prog_TRUE
12092if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12094$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012098fi
12099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012100
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012101 test -n "$TRUE" && break
12102done
12103test -n "$TRUE" || TRUE="/bin/true"
12104
12105
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12107$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110else
12111 ac_check_lib_save_LIBS=$LIBS
12112LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116/* Override any GCC internal prototype to avoid an error.
12117 Use char because int might match the return type of a GCC
12118 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012119#ifdef __cplusplus
12120extern "C"
12121#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012122char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012123int
12124main ()
12125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012132 ac_cv_lib_c_inet_aton=yes
12133else
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136rm -f core conftest.err conftest.$ac_objext \
12137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012138LIBS=$ac_check_lib_save_LIBS
12139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12141$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012143 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12146$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012147if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149else
12150 ac_check_lib_save_LIBS=$LIBS
12151LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012153/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155/* Override any GCC internal prototype to avoid an error.
12156 Use char because int might match the return type of a GCC
12157 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012158#ifdef __cplusplus
12159extern "C"
12160#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012161char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012162int
12163main ()
12164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012171 ac_cv_lib_resolv_inet_aton=yes
12172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012175rm -f core conftest.err conftest.$ac_objext \
12176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012177LIBS=$ac_check_lib_save_LIBS
12178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12180$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012182 cat >>confdefs.h <<_ACEOF
12183#define HAVE_LIBRESOLV 1
12184_ACEOF
12185
12186 LIBS="-lresolv $LIBS"
12187
12188fi
12189
12190
12191fi
12192
12193
Christian Heimesd0764e22007-12-04 15:00:33 +000012194# On Tru64, chflags seems to be present, but calling it will
12195# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12197$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012202 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012205/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012206
Christian Heimesd0764e22007-12-04 15:00:33 +000012207#include <sys/stat.h>
12208#include <unistd.h>
12209int main(int argc, char*argv[])
12210{
12211 if(chflags(argv[0], 0) != 0)
12212 return 1;
12213 return 0;
12214}
Ned Deily3eb67d52011-06-28 00:00:28 -070012215
Christian Heimesd0764e22007-12-04 15:00:33 +000012216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012218 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012224fi
12225
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12229$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012230if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012233 ac_cv_have_chflags="yes"
12234else
12235 ac_cv_have_chflags="no"
12236fi
12237
12238fi
12239if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012240
Matthias Kloseb9621712010-04-24 17:59:49 +000012241$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012242
12243fi
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12246$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012251 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012252else
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012254/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012255
Christian Heimesd0764e22007-12-04 15:00:33 +000012256#include <sys/stat.h>
12257#include <unistd.h>
12258int main(int argc, char*argv[])
12259{
12260 if(lchflags(argv[0], 0) != 0)
12261 return 1;
12262 return 0;
12263}
Ned Deily3eb67d52011-06-28 00:00:28 -070012264
Christian Heimesd0764e22007-12-04 15:00:33 +000012265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012267 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012273fi
12274
12275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12278$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012279if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012282 ac_cv_have_lchflags="yes"
12283else
12284 ac_cv_have_lchflags="no"
12285fi
12286
12287fi
12288if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012289
Matthias Kloseb9621712010-04-24 17:59:49 +000012290$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012291
12292fi
12293
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012294case $ac_sys_system/$ac_sys_release in
12295Darwin/*)
12296 _CUR_CFLAGS="${CFLAGS}"
12297 _CUR_LDFLAGS="${LDFLAGS}"
12298 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12299 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12300 ;;
12301esac
12302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12304$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012305if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012307else
12308 ac_check_lib_save_LIBS=$LIBS
12309LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012311/* end confdefs.h. */
12312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313/* Override any GCC internal prototype to avoid an error.
12314 Use char because int might match the return type of a GCC
12315 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012316#ifdef __cplusplus
12317extern "C"
12318#endif
12319char inflateCopy ();
12320int
12321main ()
12322{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012329 ac_cv_lib_z_inflateCopy=yes
12330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012333rm -f core conftest.err conftest.$ac_objext \
12334 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012335LIBS=$ac_check_lib_save_LIBS
12336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12338$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012339if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012342
12343fi
12344
12345
12346case $ac_sys_system/$ac_sys_release in
12347Darwin/*)
12348 CFLAGS="${_CUR_CFLAGS}"
12349 LDFLAGS="${_CUR_LDFLAGS}"
12350 ;;
12351esac
12352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12354$as_echo_n "checking for hstrerror... " >&6; }
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012357
Martin v. Löwise9416172003-05-03 10:12:45 +000012358#include <netdb.h>
12359
Martin v. Löwise9416172003-05-03 10:12:45 +000012360int
12361main ()
12362{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012363void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012364 ;
12365 return 0;
12366}
12367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012371
Matthias Kloseb159a552010-04-25 21:00:44 +000012372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012374else
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012377
12378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012379rm -f core conftest.err conftest.$ac_objext \
12380 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12383$as_echo_n "checking for inet_aton... " >&6; }
12384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012386
Martin v. Löwis86d66262006-02-17 08:40:11 +000012387#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012388#include <sys/socket.h>
12389#include <netinet/in.h>
12390#include <arpa/inet.h>
12391
Martin v. Löwise9416172003-05-03 10:12:45 +000012392int
12393main ()
12394{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012395void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012403
Matthias Kloseb159a552010-04-25 21:00:44 +000012404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012406else
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012409
12410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012411rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413
Matthias Kloseb9621712010-04-24 17:59:49 +000012414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12415$as_echo_n "checking for inet_pton... " >&6; }
12416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012418
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012419#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012420#include <sys/socket.h>
12421#include <netinet/in.h>
12422#include <arpa/inet.h>
12423
Martin v. Löwise9416172003-05-03 10:12:45 +000012424int
12425main ()
12426{
12427void* p = inet_pton
12428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012435
Matthias Kloseb159a552010-04-25 21:00:44 +000012436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012437$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12440$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012441
12442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012444
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012445# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12447$as_echo_n "checking for setgroups... " >&6; }
12448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012450
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012451#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012452#ifdef HAVE_GRP_H
12453#include <grp.h>
12454#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012455
Martin v. Löwisd5843682002-11-21 20:41:28 +000012456int
12457main ()
12458{
12459void* p = setgroups
12460 ;
12461 return 0;
12462}
12463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012467
Matthias Kloseb159a552010-04-25 21:00:44 +000012468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012469$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012470else
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12472$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012473
12474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012477# check for openpty and forkpty
12478
12479for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012480do :
12481 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012482if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012485_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012486
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12489$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012490if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498/* Override any GCC internal prototype to avoid an error.
12499 Use char because int might match the return type of a GCC
12500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012501#ifdef __cplusplus
12502extern "C"
12503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012504char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
12507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012518rm -f core conftest.err conftest.$ac_objext \
12519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012520LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12523$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012524if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012526 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012527else
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12529$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012532else
12533 ac_check_lib_save_LIBS=$LIBS
12534LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012536/* end confdefs.h. */
12537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538/* Override any GCC internal prototype to avoid an error.
12539 Use char because int might match the return type of a GCC
12540 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012541#ifdef __cplusplus
12542extern "C"
12543#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012544char openpty ();
12545int
12546main ()
12547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012549 ;
12550 return 0;
12551}
12552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012554 ac_cv_lib_bsd_openpty=yes
12555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012560LIBS=$ac_check_lib_save_LIBS
12561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12563$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012564if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012566 LIBS="$LIBS -lbsd"
12567fi
12568
12569
12570fi
12571
Fred Drake8cef4cf2000-06-28 16:40:38 +000012572
12573fi
12574done
12575
12576for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012577do :
12578 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012579if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012583
Fred Drake8cef4cf2000-06-28 16:40:38 +000012584else
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12586$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012587if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012589else
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012591LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595/* Override any GCC internal prototype to avoid an error.
12596 Use char because int might match the return type of a GCC
12597 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012598#ifdef __cplusplus
12599extern "C"
12600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012601char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012602int
12603main ()
12604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 ;
12607 return 0;
12608}
12609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012610if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012612else
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012615rm -f core conftest.err conftest.$ac_objext \
12616 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012617LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12620$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012621if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012623 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012624else
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12626$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012627if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012629else
12630 ac_check_lib_save_LIBS=$LIBS
12631LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012633/* end confdefs.h. */
12634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635/* Override any GCC internal prototype to avoid an error.
12636 Use char because int might match the return type of a GCC
12637 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012638#ifdef __cplusplus
12639extern "C"
12640#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012641char forkpty ();
12642int
12643main ()
12644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012646 ;
12647 return 0;
12648}
12649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012651 ac_cv_lib_bsd_forkpty=yes
12652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012655rm -f core conftest.err conftest.$ac_objext \
12656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012657LIBS=$ac_check_lib_save_LIBS
12658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12660$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012661if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012663 LIBS="$LIBS -lbsd"
12664fi
12665
12666
12667fi
12668
Fred Drake8cef4cf2000-06-28 16:40:38 +000012669
12670fi
12671done
12672
Jack Jansendd19cf82001-12-06 22:36:17 +000012673
Michael W. Hudson54241132001-12-07 15:38:26 +000012674# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012675for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012676do :
12677 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12678ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012679if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012682_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012685done
12686
Michael W. Hudson54241132001-12-07 15:38:26 +000012687
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012688ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012689if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012690 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012691
Martin v. Löwis1142de32002-03-29 16:28:31 +000012692else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012694 *" dup2.$ac_objext "* ) ;;
12695 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012697esac
12698
Martin v. Löwis1142de32002-03-29 16:28:31 +000012699fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012700
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012701ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012702if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012703 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12704
12705else
12706 case " $LIBOBJS " in
12707 *" strdup.$ac_objext "* ) ;;
12708 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12709 ;;
12710esac
12711
12712fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012713
12714
12715for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012716do :
12717 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012718if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012723/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012725int
12726main ()
12727{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ;
12730 return 0;
12731}
12732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012736
Guido van Rossum627b2d71993-12-24 10:39:16 +000012737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012739
Guido van Rossum627b2d71993-12-24 10:39:16 +000012740fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012741done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012742
Jack Jansen150753c2003-03-29 22:07:47 +000012743for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012744do :
12745 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012746if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012747 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012752#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012753int
12754main ()
12755{
12756setpgrp(0,0);
12757 ;
12758 return 0;
12759}
12760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012764
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012767
12768fi
12769done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012770
Michael W. Hudson54241132001-12-07 15:38:26 +000012771
Gregory P. Smith387512c2018-12-30 15:42:32 -080012772# We search for both crypt and crypt_r as one or the other may be defined
12773# This gets us our -lcrypt in LIBS when required on the target platform.
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12775$as_echo_n "checking for library containing crypt... " >&6; }
12776if ${ac_cv_search_crypt+:} false; then :
12777 $as_echo_n "(cached) " >&6
12778else
12779 ac_func_search_save_LIBS=$LIBS
12780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12781/* end confdefs.h. */
12782
12783/* Override any GCC internal prototype to avoid an error.
12784 Use char because int might match the return type of a GCC
12785 builtin and then its argument prototype would still apply. */
12786#ifdef __cplusplus
12787extern "C"
12788#endif
12789char crypt ();
12790int
12791main ()
12792{
12793return crypt ();
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798for ac_lib in '' crypt; do
12799 if test -z "$ac_lib"; then
12800 ac_res="none required"
12801 else
12802 ac_res=-l$ac_lib
12803 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12804 fi
12805 if ac_fn_c_try_link "$LINENO"; then :
12806 ac_cv_search_crypt=$ac_res
12807fi
12808rm -f core conftest.err conftest.$ac_objext \
12809 conftest$ac_exeext
12810 if ${ac_cv_search_crypt+:} false; then :
12811 break
12812fi
12813done
12814if ${ac_cv_search_crypt+:} false; then :
12815
12816else
12817 ac_cv_search_crypt=no
12818fi
12819rm conftest.$ac_ext
12820LIBS=$ac_func_search_save_LIBS
12821fi
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12823$as_echo "$ac_cv_search_crypt" >&6; }
12824ac_res=$ac_cv_search_crypt
12825if test "$ac_res" != no; then :
12826 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12827
12828fi
12829
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12831$as_echo_n "checking for library containing crypt_r... " >&6; }
12832if ${ac_cv_search_crypt_r+:} false; then :
12833 $as_echo_n "(cached) " >&6
12834else
12835 ac_func_search_save_LIBS=$LIBS
12836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12837/* end confdefs.h. */
12838
12839/* Override any GCC internal prototype to avoid an error.
12840 Use char because int might match the return type of a GCC
12841 builtin and then its argument prototype would still apply. */
12842#ifdef __cplusplus
12843extern "C"
12844#endif
12845char crypt_r ();
12846int
12847main ()
12848{
12849return crypt_r ();
12850 ;
12851 return 0;
12852}
12853_ACEOF
12854for ac_lib in '' crypt; do
12855 if test -z "$ac_lib"; then
12856 ac_res="none required"
12857 else
12858 ac_res=-l$ac_lib
12859 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12860 fi
12861 if ac_fn_c_try_link "$LINENO"; then :
12862 ac_cv_search_crypt_r=$ac_res
12863fi
12864rm -f core conftest.err conftest.$ac_objext \
12865 conftest$ac_exeext
12866 if ${ac_cv_search_crypt_r+:} false; then :
12867 break
12868fi
12869done
12870if ${ac_cv_search_crypt_r+:} false; then :
12871
12872else
12873 ac_cv_search_crypt_r=no
12874fi
12875rm conftest.$ac_ext
12876LIBS=$ac_func_search_save_LIBS
12877fi
12878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12879$as_echo "$ac_cv_search_crypt_r" >&6; }
12880ac_res=$ac_cv_search_crypt_r
12881if test "$ac_res" != no; then :
12882 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12883
12884fi
12885
12886
12887ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12888if test "x$ac_cv_func_crypt_r" = xyes; then :
12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12890/* end confdefs.h. */
12891
12892#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12893#include <crypt.h>
12894
12895int
12896main ()
12897{
12898
12899struct crypt_data d;
12900char *r = crypt_r("", "", &d);
12901
12902 ;
12903 return 0;
12904}
12905_ACEOF
12906if ac_fn_c_try_compile "$LINENO"; then :
12907
12908$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12909
12910fi
12911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12912
12913fi
12914
12915
Victor Stinnere0be4232011-10-25 13:06:09 +020012916for ac_func in clock_gettime
12917do :
12918 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12919if test "x$ac_cv_func_clock_gettime" = xyes; then :
12920 cat >>confdefs.h <<_ACEOF
12921#define HAVE_CLOCK_GETTIME 1
12922_ACEOF
12923
12924else
12925
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12927$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12928if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12929 $as_echo_n "(cached) " >&6
12930else
12931 ac_check_lib_save_LIBS=$LIBS
12932LIBS="-lrt $LIBS"
12933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934/* end confdefs.h. */
12935
12936/* Override any GCC internal prototype to avoid an error.
12937 Use char because int might match the return type of a GCC
12938 builtin and then its argument prototype would still apply. */
12939#ifdef __cplusplus
12940extern "C"
12941#endif
12942char clock_gettime ();
12943int
12944main ()
12945{
12946return clock_gettime ();
12947 ;
12948 return 0;
12949}
12950_ACEOF
12951if ac_fn_c_try_link "$LINENO"; then :
12952 ac_cv_lib_rt_clock_gettime=yes
12953else
12954 ac_cv_lib_rt_clock_gettime=no
12955fi
12956rm -f core conftest.err conftest.$ac_objext \
12957 conftest$ac_exeext conftest.$ac_ext
12958LIBS=$ac_check_lib_save_LIBS
12959fi
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12961$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12962if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12963
Victor Stinner7efb8332014-08-29 15:41:08 +020012964 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012965 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12966
12967
12968$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12969
12970
12971fi
12972
12973
12974fi
12975done
12976
12977
12978for ac_func in clock_getres
12979do :
12980 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12981if test "x$ac_cv_func_clock_getres" = xyes; then :
12982 cat >>confdefs.h <<_ACEOF
12983#define HAVE_CLOCK_GETRES 1
12984_ACEOF
12985
12986else
12987
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12989$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12990if ${ac_cv_lib_rt_clock_getres+:} false; then :
12991 $as_echo_n "(cached) " >&6
12992else
12993 ac_check_lib_save_LIBS=$LIBS
12994LIBS="-lrt $LIBS"
12995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996/* end confdefs.h. */
12997
12998/* Override any GCC internal prototype to avoid an error.
12999 Use char because int might match the return type of a GCC
13000 builtin and then its argument prototype would still apply. */
13001#ifdef __cplusplus
13002extern "C"
13003#endif
13004char clock_getres ();
13005int
13006main ()
13007{
13008return clock_getres ();
13009 ;
13010 return 0;
13011}
13012_ACEOF
13013if ac_fn_c_try_link "$LINENO"; then :
13014 ac_cv_lib_rt_clock_getres=yes
13015else
13016 ac_cv_lib_rt_clock_getres=no
13017fi
13018rm -f core conftest.err conftest.$ac_objext \
13019 conftest$ac_exeext conftest.$ac_ext
13020LIBS=$ac_check_lib_save_LIBS
13021fi
13022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13023$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13024if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13025
13026 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13027
13028
13029fi
13030
13031
13032fi
13033done
13034
13035
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013036for ac_func in clock_settime
13037do :
13038 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13039if test "x$ac_cv_func_clock_settime" = xyes; then :
13040 cat >>confdefs.h <<_ACEOF
13041#define HAVE_CLOCK_SETTIME 1
13042_ACEOF
13043
13044else
13045
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13047$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13048if ${ac_cv_lib_rt_clock_settime+:} false; then :
13049 $as_echo_n "(cached) " >&6
13050else
13051 ac_check_lib_save_LIBS=$LIBS
13052LIBS="-lrt $LIBS"
13053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054/* end confdefs.h. */
13055
13056/* Override any GCC internal prototype to avoid an error.
13057 Use char because int might match the return type of a GCC
13058 builtin and then its argument prototype would still apply. */
13059#ifdef __cplusplus
13060extern "C"
13061#endif
13062char clock_settime ();
13063int
13064main ()
13065{
13066return clock_settime ();
13067 ;
13068 return 0;
13069}
13070_ACEOF
13071if ac_fn_c_try_link "$LINENO"; then :
13072 ac_cv_lib_rt_clock_settime=yes
13073else
13074 ac_cv_lib_rt_clock_settime=no
13075fi
13076rm -f core conftest.err conftest.$ac_objext \
13077 conftest$ac_exeext conftest.$ac_ext
13078LIBS=$ac_check_lib_save_LIBS
13079fi
13080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13081$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13082if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13083
13084 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13085
13086
13087fi
13088
13089
13090fi
13091done
13092
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13095$as_echo_n "checking for major... " >&6; }
13096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013098
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013099#if defined(MAJOR_IN_MKDEV)
13100#include <sys/mkdev.h>
13101#elif defined(MAJOR_IN_SYSMACROS)
13102#include <sys/sysmacros.h>
13103#else
13104#include <sys/types.h>
13105#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013106
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013107int
13108main ()
13109{
13110
13111 makedev(major(0),minor(0));
13112
13113 ;
13114 return 0;
13115}
13116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013117if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013118
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13123$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013124
13125else
Skip Montanaro6dead952003-09-25 14:50:04 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13128$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013129
13130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013131rm -f core conftest.err conftest.$ac_objext \
13132 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013133
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013134# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013135# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13137$as_echo_n "checking for getaddrinfo... " >&6; }
13138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013140
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013141#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013142#include <sys/socket.h>
13143#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013144#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145
Martin v. Löwis11437992002-04-12 09:54:03 +000013146int
13147main ()
13148{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013149getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 ;
13151 return 0;
13152}
13153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013154if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013155 have_getaddrinfo=yes
13156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013159rm -f core conftest.err conftest.$ac_objext \
13160 conftest$ac_exeext conftest.$ac_ext
13161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13162$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013163if test $have_getaddrinfo = yes
13164then
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13166$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013167 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013171
13172if test "${enable_ipv6+set}" = set; then
13173 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13174else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013176fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013179/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180
Stefan Krah19c21392012-11-22 23:47:32 +010013181#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182#include <sys/types.h>
13183#include <netdb.h>
13184#include <string.h>
13185#include <sys/socket.h>
13186#include <netinet/in.h>
13187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013188int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013189{
13190 int passive, gaierr, inet4 = 0, inet6 = 0;
13191 struct addrinfo hints, *ai, *aitop;
13192 char straddr[INET6_ADDRSTRLEN], strport[16];
13193
13194 for (passive = 0; passive <= 1; passive++) {
13195 memset(&hints, 0, sizeof(hints));
13196 hints.ai_family = AF_UNSPEC;
13197 hints.ai_flags = passive ? AI_PASSIVE : 0;
13198 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013199 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13201 (void)gai_strerror(gaierr);
13202 goto bad;
13203 }
13204 for (ai = aitop; ai; ai = ai->ai_next) {
13205 if (ai->ai_addr == NULL ||
13206 ai->ai_addrlen == 0 ||
13207 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13208 straddr, sizeof(straddr), strport, sizeof(strport),
13209 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13210 goto bad;
13211 }
13212 switch (ai->ai_family) {
13213 case AF_INET:
13214 if (strcmp(strport, "54321") != 0) {
13215 goto bad;
13216 }
13217 if (passive) {
13218 if (strcmp(straddr, "0.0.0.0") != 0) {
13219 goto bad;
13220 }
13221 } else {
13222 if (strcmp(straddr, "127.0.0.1") != 0) {
13223 goto bad;
13224 }
13225 }
13226 inet4++;
13227 break;
13228 case AF_INET6:
13229 if (strcmp(strport, "54321") != 0) {
13230 goto bad;
13231 }
13232 if (passive) {
13233 if (strcmp(straddr, "::") != 0) {
13234 goto bad;
13235 }
13236 } else {
13237 if (strcmp(straddr, "::1") != 0) {
13238 goto bad;
13239 }
13240 }
13241 inet6++;
13242 break;
13243 case AF_UNSPEC:
13244 goto bad;
13245 break;
13246 default:
13247 /* another family support? */
13248 break;
13249 }
13250 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013251 freeaddrinfo(aitop);
13252 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253 }
13254
13255 if (!(inet4 == 0 || inet4 == 2))
13256 goto bad;
13257 if (!(inet6 == 0 || inet6 == 2))
13258 goto bad;
13259
13260 if (aitop)
13261 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013262 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263
13264 bad:
13265 if (aitop)
13266 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268}
13269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013271if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013272 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273else
Matthias Kloseb9621712010-04-24 17:59:49 +000013274 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013279
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013280fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13285$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13286
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013287if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288then
13289 if test $ipv6 = yes
13290 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291 echo 'Fatal: You must get working getaddrinfo() function.'
13292 echo ' or you can specify "--disable-ipv6"'.
13293 exit 1
13294 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013295else
Martin v. Löwis11437992002-04-12 09:54:03 +000013296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013298
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013299fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013300
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013301for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013302do :
13303 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013304if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013307_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309fi
13310done
13311
Michael W. Hudson54241132001-12-07 15:38:26 +000013312
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13315$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013316if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321#include <sys/types.h>
13322#include <sys/time.h>
13323#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
Martin v. Löwis11437992002-04-12 09:54:03 +000013325int
13326main ()
13327{
13328if ((struct tm *) 0)
13329return 0;
13330 ;
13331 return 0;
13332}
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13342$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013343if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346
13347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13350$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013351if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356#include <sys/types.h>
13357#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
Martin v. Löwis11437992002-04-12 09:54:03 +000013359int
13360main ()
13361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362struct tm tm;
13363 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 ;
13366 return 0;
13367}
13368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370 ac_cv_struct_tm=time.h
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13377$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013378if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381
13382fi
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384ac_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 +000013385#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387"
Victor Stinnere0be4232011-10-25 13:06:09 +020013388if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
13390cat >>confdefs.h <<_ACEOF
13391#define HAVE_STRUCT_TM_TM_ZONE 1
13392_ACEOF
13393
13394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400
13401else
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13403"
Victor Stinnere0be4232011-10-25 13:06:09 +020013404if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408fi
13409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013411#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412_ACEOF
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13415$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013416if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418else
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013420/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013421#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422#if !HAVE_DECL_TZNAME
13423extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Martin v. Löwis11437992002-04-12 09:54:03 +000013426int
13427main ()
13428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ;
13431 return 0;
13432}
13433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013435 ac_cv_var_tzname=yes
13436else
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013439rm -f core conftest.err conftest.$ac_objext \
13440 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13443$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013444 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013448 fi
13449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451ac_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 +020013452if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
13454cat >>confdefs.h <<_ACEOF
13455#define HAVE_STRUCT_STAT_ST_RDEV 1
13456_ACEOF
13457
13458
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461ac_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 +020013462if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464cat >>confdefs.h <<_ACEOF
13465#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13466_ACEOF
13467
13468
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013469fi
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471ac_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 +020013472if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013473
13474cat >>confdefs.h <<_ACEOF
13475#define HAVE_STRUCT_STAT_ST_FLAGS 1
13476_ACEOF
13477
13478
13479fi
13480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481ac_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 +020013482if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013483
13484cat >>confdefs.h <<_ACEOF
13485#define HAVE_STRUCT_STAT_ST_GEN 1
13486_ACEOF
13487
13488
13489fi
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491ac_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 +020013492if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013493
13494cat >>confdefs.h <<_ACEOF
13495#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13496_ACEOF
13497
13498
13499fi
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501ac_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 +020013502if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013503
Martin v. Löwis11437992002-04-12 09:54:03 +000013504cat >>confdefs.h <<_ACEOF
13505#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13506_ACEOF
13507
13508
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013509fi
13510
Stefan Krah267b6392016-04-26 01:09:18 +020013511ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13512 #include <sys/types.h>
13513 #include <pwd.h>
13514
13515"
13516if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13517
13518cat >>confdefs.h <<_ACEOF
13519#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13520_ACEOF
13521
13522
13523fi
13524ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13525 #include <sys/types.h>
13526 #include <pwd.h>
13527
13528"
13529if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13530
13531cat >>confdefs.h <<_ACEOF
13532#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13533_ACEOF
13534
13535
13536fi
13537
Zachary Ware6a6967e2016-10-01 00:47:27 -050013538# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13539ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13540"
13541if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13542
13543cat >>confdefs.h <<_ACEOF
13544#define HAVE_SIGINFO_T_SI_BAND 1
13545_ACEOF
13546
13547
13548fi
13549
Michael W. Hudson54241132001-12-07 15:38:26 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13552$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013553if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555else
Matthias Kloseb159a552010-04-25 21:00:44 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013558/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013559#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013560int
13561main ()
13562{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ;
13565 return 0;
13566}
13567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569 ac_cv_header_time_altzone=yes
13570else
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575fi
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13578$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582
13583fi
13584
Guido van Rossumda88dad1995-01-26 00:46:29 +000013585was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13587$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013589/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013590
13591#include <sys/types.h>
13592#include <sys/select.h>
13593#include <sys/time.h>
13594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595int
13596main ()
13597{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013598;
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 ;
13600 return 0;
13601}
13602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013608 was_it_defined=yes
13609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13613$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13616$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013617if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619else
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013621/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013622#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013623int
13624main ()
13625{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 ;
13628 return 0;
13629}
13630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013632 ac_cv_struct_addrinfo=yes
13633else
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13637fi
13638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13640$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013644
13645fi
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13648$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013649if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013651else
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013654
13655# include <sys/types.h>
13656# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013657int
13658main ()
13659{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013660struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013661 ;
13662 return 0;
13663}
13664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013666 ac_cv_struct_sockaddr_storage=yes
13667else
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13671fi
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13674$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013675if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013678
13679fi
13680
Christian Heimesdffa3942016-09-05 23:54:41 +020013681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13682$as_echo_n "checking for sockaddr_alg... " >&6; }
13683if ${ac_cv_struct_sockaddr_alg+:} false; then :
13684 $as_echo_n "(cached) " >&6
13685else
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687/* end confdefs.h. */
13688
13689# include <sys/types.h>
13690# include <sys/socket.h>
13691# include <linux/if_alg.h>
13692int
13693main ()
13694{
13695struct sockaddr_alg s
13696 ;
13697 return 0;
13698}
13699_ACEOF
13700if ac_fn_c_try_compile "$LINENO"; then :
13701 ac_cv_struct_sockaddr_alg=yes
13702else
13703 ac_cv_struct_sockaddr_alg=no
13704fi
13705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706fi
13707
13708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13709$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13710if test $ac_cv_struct_sockaddr_alg = yes; then
13711
13712$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13713
13714fi
13715
Guido van Rossum627b2d71993-12-24 10:39:16 +000013716# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13719$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013720if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013725$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013726int
13727main ()
13728{
13729static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013730test_array [0] = 0;
13731return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013732
13733 ;
13734 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013735}
Martin v. Löwis11437992002-04-12 09:54:03 +000013736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013737if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013738 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13745$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013748
13749fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13752$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013753if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013757/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013758
Martin v. Löwis11437992002-04-12 09:54:03 +000013759int
13760main ()
13761{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013762
Martin v. Löwis11437992002-04-12 09:54:03 +000013763#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013764 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013766 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768 char const *const *pcpcc;
13769 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 /* NEC SVR4.0.2 mips cc rejects this. */
13771 struct point {int x, y;};
13772 static struct point const zero = {0,0};
13773 /* AIX XL C 1.02.0.0 rejects this.
13774 It does not let you subtract one const X* pointer from another in
13775 an arm of an if-expression whose if-part is not a constant
13776 expression */
13777 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780 ++pcpcc;
13781 ppc = (char**) pcpcc;
13782 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013783 { /* SCO 3.2v4 cc rejects this sort of thing. */
13784 char tx;
13785 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 }
13791 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13792 int x[] = {25, 17};
13793 const int *foo = &x[0];
13794 ++foo;
13795 }
13796 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13797 typedef const int *iptr;
13798 iptr p = 0;
13799 ++p;
13800 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013801 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013803 struct s { int j; const int *ap[3]; } bx;
13804 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 }
13806 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13807 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013808 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013811#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ;
13814 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815}
Martin v. Löwis11437992002-04-12 09:54:03 +000013816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818 ac_cv_c_const=yes
13819else
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13825$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013829
13830fi
13831
Michael W. Hudson54241132001-12-07 15:38:26 +000013832
Guido van Rossumda88dad1995-01-26 00:46:29 +000013833works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13835$as_echo_n "checking for working signed char... " >&6; }
13836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013837/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839int
13840main ()
13841{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ;
13844 return 0;
13845}
13846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013847if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013848 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013849else
Skip Montanaro6dead952003-09-25 14:50:04 +000013850
Matthias Kloseb9621712010-04-24 17:59:49 +000013851$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013852
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013853
Guido van Rossum7f43da71994-08-01 12:15:30 +000013854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13857$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013858
Guido van Rossumda88dad1995-01-26 00:46:29 +000013859have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13861$as_echo_n "checking for prototypes... " >&6; }
13862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013863/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013864int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013865int
13866main ()
13867{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 ;
13870 return 0;
13871}
13872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
Matthias Kloseb9621712010-04-24 17:59:49 +000013875$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
Matthias Kloseb159a552010-04-25 21:00:44 +000013877 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13881$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882
Guido van Rossumda88dad1995-01-26 00:46:29 +000013883works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13885$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013887/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013888
13889#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013890int foo(int x, ...) {
13891 va_list va;
13892 va_start(va, x);
13893 va_arg(va, int);
13894 va_arg(va, char *);
13895 va_arg(va, double);
13896 return 0;
13897}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013898
Martin v. Löwis11437992002-04-12 09:54:03 +000013899int
13900main ()
13901{
Guido van Rossum90eea071996-08-30 20:58:57 +000013902return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ;
13904 return 0;
13905}
13906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013907if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
13909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013912 works=yes
13913
Guido van Rossum627b2d71993-12-24 10:39:16 +000013914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13917$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918
Martin v. Löwisd6320502004-08-12 13:45:08 +000013919# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13921$as_echo_n "checking for socketpair... " >&6; }
13922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013923/* end confdefs.h. */
13924
13925#include <sys/types.h>
13926#include <sys/socket.h>
13927
13928int
13929main ()
13930{
13931void *x=socketpair
13932 ;
13933 return 0;
13934}
13935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013939
Matthias Kloseb159a552010-04-25 21:00:44 +000013940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13944$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013945
13946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013948
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013949# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13951$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013953/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013954#include <sys/types.h>
13955#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013956int
13957main ()
13958{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013959struct sockaddr x;
13960x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 ;
13962 return 0;
13963}
13964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013965if ac_fn_c_try_compile "$LINENO"; then :
13966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13967$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013970
13971else
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13973$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013974
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013977
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013978# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
13980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013982if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13987$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988 OLD_CFLAGS=$CFLAGS
13989 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013991/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013992
13993# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995int
13996main ()
13997{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013998
13999 char *name;
14000 struct hostent *he, *res;
14001 char buffer[2048];
14002 int buflen = 2048;
14003 int h_errnop;
14004
14005 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
14007 ;
14008 return 0;
14009}
14010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014014
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14019$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014020
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014021else
Skip Montanaro6dead952003-09-25 14:50:04 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14024$as_echo "no" >&6; }
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14026$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014028/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014031
Martin v. Löwis11437992002-04-12 09:54:03 +000014032int
14033main ()
14034{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035
14036 char *name;
14037 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014038 char buffer[2048];
14039 int buflen = 2048;
14040 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014041
Matthias Kloseb159a552010-04-25 21:00:44 +000014042 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
14044 ;
14045 return 0;
14046}
14047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014051
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
Matthias Kloseb159a552010-04-25 21:00:44 +000014053$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14056$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058else
Skip Montanaro6dead952003-09-25 14:50:04 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14063$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14065/* end confdefs.h. */
14066
14067# include <netdb.h>
14068
14069int
14070main ()
14071{
14072
14073 char *name;
14074 struct hostent *he;
14075 struct hostent_data data;
14076
14077 (void) gethostbyname_r(name, he, &data);
14078
14079 ;
14080 return 0;
14081}
14082_ACEOF
14083if ac_fn_c_try_compile "$LINENO"; then :
14084
14085 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14086
14087
14088$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14089
14090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14091$as_echo "yes" >&6; }
14092
14093else
14094
14095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14096$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014097
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014106 CFLAGS=$OLD_CFLAGS
14107
14108else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 for ac_func in gethostbyname
14111do :
14112 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014113if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014115#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014116_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014117
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014118fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014119done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014120
Michael W. Hudson54241132001-12-07 15:38:26 +000014121
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014122fi
14123
Michael W. Hudson54241132001-12-07 15:38:26 +000014124
14125
14126
14127
14128
14129
Guido van Rossum627b2d71993-12-24 10:39:16 +000014130# checks for system services
14131# (none yet)
14132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014134ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014135if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014136
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014137else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14139$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014140if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014142else
Martin v. Löwis11437992002-04-12 09:54:03 +000014143 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014144LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148/* Override any GCC internal prototype to avoid an error.
14149 Use char because int might match the return type of a GCC
14150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014151#ifdef __cplusplus
14152extern "C"
14153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014154char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014155int
14156main ()
14157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 ;
14160 return 0;
14161}
14162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014165else
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014168rm -f core conftest.err conftest.$ac_objext \
14169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014170LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14173$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014174if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 cat >>confdefs.h <<_ACEOF
14176#define HAVE_LIBIEEE 1
14177_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014178
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014179 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014180
Guido van Rossum627b2d71993-12-24 10:39:16 +000014181fi
14182
Michael W. Hudson54241132001-12-07 15:38:26 +000014183
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014184fi
14185
Michael W. Hudson54241132001-12-07 15:38:26 +000014186
Guido van Rossum7f43da71994-08-01 12:15:30 +000014187# check for --with-libm=...
14188
Guido van Rossum563e7081996-09-10 18:20:48 +000014189case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014190Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014191*) LIBM=-lm
14192esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14194$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014199if test "$withval" = no
14200then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14202$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014203elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014204then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14206$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014207else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014208fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14211$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212fi
14213
Guido van Rossum7f43da71994-08-01 12:15:30 +000014214
14215# check for --with-libc=...
14216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14218$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014220# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014221if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014223if test "$withval" = no
14224then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14226$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014227elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014228then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14230$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014231else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014232fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014233else
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14235$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236fi
14237
Guido van Rossum7f43da71994-08-01 12:15:30 +000014238
Stefan Krah1919b7e2012-03-21 18:25:23 +010014239# **************************************
14240# * Check for gcc x64 inline assembler *
14241# **************************************
14242
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14244$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14246/* end confdefs.h. */
14247
14248int
14249main ()
14250{
14251
14252 __asm__ __volatile__ ("movq %rcx, %rax");
14253
14254 ;
14255 return 0;
14256}
14257_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014258if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014259 have_gcc_asm_for_x64=yes
14260else
14261 have_gcc_asm_for_x64=no
14262fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014263rm -f core conftest.err conftest.$ac_objext \
14264 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14266$as_echo "$have_gcc_asm_for_x64" >&6; }
14267if test "$have_gcc_asm_for_x64" = yes
14268then
14269
14270$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14271
14272fi
14273
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014274# **************************************************
14275# * Check for various properties of floating point *
14276# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014277
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14279$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14280if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014282else
14283
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014284
14285ax_cv_c_float_words_bigendian=unknown
14286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287/* end confdefs.h. */
14288
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014289
14290double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14291
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014292
14293_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014294if ac_fn_c_try_compile "$LINENO"; then :
14295
14296
14297if grep noonsees conftest.$ac_objext >/dev/null ; then
14298 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014299fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014300if grep seesnoon conftest.$ac_objext >/dev/null ; then
14301 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14302 ax_cv_c_float_words_bigendian=no
14303 else
14304 ax_cv_c_float_words_bigendian=unknown
14305 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014306fi
14307
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308
14309fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014311fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14313$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014314
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014315case $ax_cv_c_float_words_bigendian in
14316 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014317
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014318$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14319 ;;
14320 no)
14321 ;;
14322 *)
14323 as_fn_error $? "
14324
14325Unknown float word ordering. You need to manually preset
14326ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14327
14328 " "$LINENO" 5 ;;
14329esac
14330
14331
14332if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014333then
14334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014336
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014337elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014338then
14339
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014340$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14341
14342else
14343 # Some ARM platforms use a mixed-endian representation for doubles.
14344 # While Python doesn't currently have full support for these platforms
14345 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14346 # conversions work.
14347 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14348 # or little, then it must be this?
14349
Matthias Kloseb9621712010-04-24 17:59:49 +000014350$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014351
14352fi
14353
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014354# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014355# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014356# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014357# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014358# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014359# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014360
14361# This inline assembler syntax may also work for suncc and icc,
14362# so we try it on all platforms.
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14365$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014367/* end confdefs.h. */
14368
14369int
14370main ()
14371{
14372
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014373 unsigned short cw;
14374 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14375 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014376
14377 ;
14378 return 0;
14379}
14380_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014381if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014382 have_gcc_asm_for_x87=yes
14383else
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014385fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014386rm -f core conftest.err conftest.$ac_objext \
14387 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14389$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014390if test "$have_gcc_asm_for_x87" = yes
14391then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014394
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14398$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400/* end confdefs.h. */
14401
14402int
14403main ()
14404{
14405
14406 unsigned int fpcr;
14407 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14408 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14409
14410 ;
14411 return 0;
14412}
14413_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014414if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014415 have_gcc_asm_for_mc68881=yes
14416else
14417 have_gcc_asm_for_mc68881=no
14418fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014419rm -f core conftest.err conftest.$ac_objext \
14420 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14422$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14423if test "$have_gcc_asm_for_mc68881" = yes
14424then
14425
14426$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14427
14428fi
14429
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014430# Detect whether system arithmetic is subject to x87-style double
14431# rounding issues. The result of this test has little meaning on non
14432# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14433# mode is round-to-nearest and double rounding issues are present, and
14434# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14436$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014437# $BASECFLAGS may affect the result
14438ac_save_cc="$CC"
14439CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014440if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014441 ac_cv_x87_double_rounding=no
14442else
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014444/* end confdefs.h. */
14445
14446#include <stdlib.h>
14447#include <math.h>
14448int main() {
14449 volatile double x, y, z;
14450 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14451 x = 0.99999999999999989; /* 1-2**-53 */
14452 y = 1./x;
14453 if (y != 1.)
14454 exit(0);
14455 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14456 x = 1e16;
14457 y = 2.99999;
14458 z = x + y;
14459 if (z != 1e16+4.)
14460 exit(0);
14461 /* both tests show evidence of double rounding */
14462 exit(1);
14463}
14464
14465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014466if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014467 ac_cv_x87_double_rounding=no
14468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014473fi
14474
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014475CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14477$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014478if test "$ac_cv_x87_double_rounding" = yes
14479then
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014482
14483fi
14484
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014485# ************************************
14486# * Check for mathematical functions *
14487# ************************************
14488
14489LIBS_SAVE=$LIBS
14490LIBS="$LIBS $LIBM"
14491
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014492for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14493do :
14494 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14495ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014496if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014497 cat >>confdefs.h <<_ACEOF
14498#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14499_ACEOF
14500
14501fi
14502done
14503
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014504for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014505do :
14506 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14507ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014508if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014509 cat >>confdefs.h <<_ACEOF
14510#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14511_ACEOF
14512
14513fi
14514done
14515
14516ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14517"
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014519 ac_have_decl=1
14520else
14521 ac_have_decl=0
14522fi
14523
14524cat >>confdefs.h <<_ACEOF
14525#define HAVE_DECL_ISINF $ac_have_decl
14526_ACEOF
14527ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14528"
Victor Stinnere0be4232011-10-25 13:06:09 +020014529if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014530 ac_have_decl=1
14531else
14532 ac_have_decl=0
14533fi
14534
14535cat >>confdefs.h <<_ACEOF
14536#define HAVE_DECL_ISNAN $ac_have_decl
14537_ACEOF
14538ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14539"
Victor Stinnere0be4232011-10-25 13:06:09 +020014540if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014541 ac_have_decl=1
14542else
14543 ac_have_decl=0
14544fi
14545
14546cat >>confdefs.h <<_ACEOF
14547#define HAVE_DECL_ISFINITE $ac_have_decl
14548_ACEOF
14549
14550
Mark Dickinsona614f042009-11-28 12:48:43 +000014551# For multiprocessing module, check that sem_open
14552# actually works. For FreeBSD versions <= 7.2,
14553# the kernel module that provides POSIX semaphores
14554# isn't loaded by default, so an attempt to call
14555# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14557$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014558if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014562 ac_cv_posix_semaphores_enabled=yes
14563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014565/* end confdefs.h. */
14566
14567#include <unistd.h>
14568#include <fcntl.h>
14569#include <stdio.h>
14570#include <semaphore.h>
14571#include <sys/stat.h>
14572
14573int main(void) {
14574 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14575 if (a == SEM_FAILED) {
14576 perror("sem_open");
14577 return 1;
14578 }
14579 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014580 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014581 return 0;
14582}
14583
14584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014585if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014586 ac_cv_posix_semaphores_enabled=yes
14587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014592fi
14593
14594
Mark Dickinsona614f042009-11-28 12:48:43 +000014595fi
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14598$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014599if test $ac_cv_posix_semaphores_enabled = no
14600then
14601
Matthias Kloseb9621712010-04-24 17:59:49 +000014602$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014603
14604fi
14605
Mark Dickinson10683072009-04-18 21:18:19 +000014606# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14608$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014609if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014611else
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014613 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014614else
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014616/* end confdefs.h. */
14617
14618#include <unistd.h>
14619#include <fcntl.h>
14620#include <stdio.h>
14621#include <semaphore.h>
14622#include <sys/stat.h>
14623
14624int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014625 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014626 int count;
14627 int res;
14628 if(a==SEM_FAILED){
14629 perror("sem_open");
14630 return 1;
14631
14632 }
14633 res = sem_getvalue(a, &count);
14634 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014635 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014636 return res==-1 ? 1 : 0;
14637}
14638
Mark Dickinson10683072009-04-18 21:18:19 +000014639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014640if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014641 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14646 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014647fi
14648
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014650fi
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14653$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014654if test $ac_cv_broken_sem_getvalue = yes
14655then
14656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014658
14659fi
14660
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014661ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14662"
14663if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14664 ac_have_decl=1
14665else
14666 ac_have_decl=0
14667fi
14668
14669cat >>confdefs.h <<_ACEOF
14670#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14671_ACEOF
14672ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14673"
14674if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14675 ac_have_decl=1
14676else
14677 ac_have_decl=0
14678fi
14679
14680cat >>confdefs.h <<_ACEOF
14681#define HAVE_DECL_RTLD_NOW $ac_have_decl
14682_ACEOF
14683ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14684"
14685if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14686 ac_have_decl=1
14687else
14688 ac_have_decl=0
14689fi
14690
14691cat >>confdefs.h <<_ACEOF
14692#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14693_ACEOF
14694ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14695"
14696if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14697 ac_have_decl=1
14698else
14699 ac_have_decl=0
14700fi
14701
14702cat >>confdefs.h <<_ACEOF
14703#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14704_ACEOF
14705ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14706"
14707if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14708 ac_have_decl=1
14709else
14710 ac_have_decl=0
14711fi
14712
14713cat >>confdefs.h <<_ACEOF
14714#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14715_ACEOF
14716ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14717"
14718if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14719 ac_have_decl=1
14720else
14721 ac_have_decl=0
14722fi
14723
14724cat >>confdefs.h <<_ACEOF
14725#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14726_ACEOF
14727ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14728"
14729if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14730 ac_have_decl=1
14731else
14732 ac_have_decl=0
14733fi
14734
14735cat >>confdefs.h <<_ACEOF
14736#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14737_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014738ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14739"
14740if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14741 ac_have_decl=1
14742else
14743 ac_have_decl=0
14744fi
14745
14746cat >>confdefs.h <<_ACEOF
14747#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14748_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014749
14750
Mark Dickinsonbd792642009-03-18 20:06:12 +000014751# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14753$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014754# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014755if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014756 enableval=$enable_big_digits; case $enable_big_digits in
14757yes)
14758 enable_big_digits=30 ;;
14759no)
14760 enable_big_digits=15 ;;
1476115|30)
14762 ;;
14763*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014764 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 +000014765esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14767$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014768
14769cat >>confdefs.h <<_ACEOF
14770#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14771_ACEOF
14772
14773
14774else
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14776$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014777fi
14778
14779
Guido van Rossumef2255b2000-03-10 22:30:29 +000014780# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014781ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
14784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014787 wchar_h="yes"
14788
Guido van Rossumef2255b2000-03-10 22:30:29 +000014789else
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014791
14792fi
14793
Michael W. Hudson54241132001-12-07 15:38:26 +000014794
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014796# determine wchar_t size
14797if test "$wchar_h" = yes
14798then
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14802# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14804$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014805if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14809"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
Martin v. Löwis11437992002-04-12 09:54:03 +000014811else
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 if test "$ac_cv_type_wchar_t" = yes; then
14813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014815as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014816See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 else
14818 ac_cv_sizeof_wchar_t=0
14819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014821
Martin v. Löwis11437992002-04-12 09:54:03 +000014822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14824$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825
14826
14827
Martin v. Löwis11437992002-04-12 09:54:03 +000014828cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014829#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014830_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014831
Michael W. Hudson54241132001-12-07 15:38:26 +000014832
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014833fi
14834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14836$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014837have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014839/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014840
14841#include <tcl.h>
14842#if TCL_UTF_MAX != 6
14843# error "NOT UCS4_TCL"
14844#endif
14845int
14846main ()
14847{
14848
14849 ;
14850 return 0;
14851}
14852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014854
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014857
14858 have_ucs4_tcl=yes
14859
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14863$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014864
Skip Montanaro6dead952003-09-25 14:50:04 +000014865# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014866if test "$wchar_h" = yes
14867then
14868 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14870$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014871 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014873else
14874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014876 ac_cv_wchar_t_signed=yes
14877else
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014879/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014880
14881 #include <wchar.h>
14882 int main()
14883 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014884 /* Success: exit code 0 */
14885 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014886 }
14887
14888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014889if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014890 ac_cv_wchar_t_signed=yes
14891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014896fi
14897
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014898fi
14899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14901$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902fi
14903
Michael Osipov3738fad2018-08-24 18:17:19 +020014904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14905$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014906# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014907if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014908 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014909then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
Michael Osipov3738fad2018-08-24 18:17:19 +020014913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14914$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014915else
Michael Osipov3738fad2018-08-24 18:17:19 +020014916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14917$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014918fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014919
14920# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14922$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014923if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925else
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 ac_cv_c_bigendian=unknown
14927 # See if we're dealing with a universal compiler.
14928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14929/* end confdefs.h. */
14930#ifndef __APPLE_CC__
14931 not a universal capable compiler
14932 #endif
14933 typedef int dummy;
14934
Skip Montanaro6dead952003-09-25 14:50:04 +000014935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014936if ac_fn_c_try_compile "$LINENO"; then :
14937
14938 # Check for potential -arch flags. It is not universal unless
14939 # there are at least two -arch flags with different values.
14940 ac_arch=
14941 ac_prev=
14942 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14943 if test -n "$ac_prev"; then
14944 case $ac_word in
14945 i?86 | x86_64 | ppc | ppc64)
14946 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14947 ac_arch=$ac_word
14948 else
14949 ac_cv_c_bigendian=universal
14950 break
14951 fi
14952 ;;
14953 esac
14954 ac_prev=
14955 elif test "x$ac_word" = "x-arch"; then
14956 ac_prev=arch
14957 fi
14958 done
14959fi
14960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14961 if test $ac_cv_c_bigendian = unknown; then
14962 # See if sys/param.h defines the BYTE_ORDER macro.
14963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014964/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014965#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014967
Martin v. Löwis11437992002-04-12 09:54:03 +000014968int
14969main ()
14970{
Matthias Kloseb9621712010-04-24 17:59:49 +000014971#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14972 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14973 && LITTLE_ENDIAN)
14974 bogus endian macros
14975 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014976
14977 ;
14978 return 0;
14979}
14980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014981if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014982 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014985#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014986 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014987
Martin v. Löwis11437992002-04-12 09:54:03 +000014988int
14989main ()
14990{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014991#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 not big endian
14993 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014994
14995 ;
14996 return 0;
14997}
14998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014999if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015000 ac_cv_c_bigendian=yes
15001else
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015005fi
15006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15007 fi
15008 if test $ac_cv_c_bigendian = unknown; then
15009 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015012#include <limits.h>
15013
Martin v. Löwis11437992002-04-12 09:54:03 +000015014int
15015main ()
15016{
Matthias Kloseb9621712010-04-24 17:59:49 +000015017#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15018 bogus endian macros
15019 #endif
15020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ;
15022 return 0;
15023}
15024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if ac_fn_c_try_compile "$LINENO"; then :
15026 # It does; now see whether it defined to _BIG_ENDIAN or not.
15027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028/* end confdefs.h. */
15029#include <limits.h>
15030
15031int
15032main ()
15033{
15034#ifndef _BIG_ENDIAN
15035 not big endian
15036 #endif
15037
15038 ;
15039 return 0;
15040}
15041_ACEOF
15042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15048fi
15049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15050 fi
15051 if test $ac_cv_c_bigendian = unknown; then
15052 # Compile a test program.
15053 if test "$cross_compiling" = yes; then :
15054 # Try to guess by grepping values from an object file.
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
15057short int ascii_mm[] =
15058 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15059 short int ascii_ii[] =
15060 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15061 int use_ascii (int i) {
15062 return ascii_mm[i] + ascii_ii[i];
15063 }
15064 short int ebcdic_ii[] =
15065 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15066 short int ebcdic_mm[] =
15067 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15068 int use_ebcdic (int i) {
15069 return ebcdic_mm[i] + ebcdic_ii[i];
15070 }
15071 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072
Matthias Kloseb9621712010-04-24 17:59:49 +000015073int
15074main ()
15075{
15076return use_ascii (foo) == use_ebcdic (foo);
15077 ;
15078 return 0;
15079}
15080_ACEOF
15081if ac_fn_c_try_compile "$LINENO"; then :
15082 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15083 ac_cv_c_bigendian=yes
15084 fi
15085 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15086 if test "$ac_cv_c_bigendian" = unknown; then
15087 ac_cv_c_bigendian=no
15088 else
15089 # finding both strings is unlikely to happen, but who knows?
15090 ac_cv_c_bigendian=unknown
15091 fi
15092 fi
15093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015095else
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015097/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015099int
15100main ()
15101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 /* Are we little or big endian? From Harbison&Steele. */
15104 union
15105 {
15106 long int l;
15107 char c[sizeof (long int)];
15108 } u;
15109 u.l = 1;
15110 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111
15112 ;
15113 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015114}
Martin v. Löwis11437992002-04-12 09:54:03 +000015115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015116if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015117 ac_cv_c_bigendian=no
15118else
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15128$as_echo "$ac_cv_c_bigendian" >&6; }
15129 case $ac_cv_c_bigendian in #(
15130 yes)
15131 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15132;; #(
15133 no)
15134 ;; #(
15135 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 ;; #(
15140 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015141 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015142 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015144
Michael W. Hudson54241132001-12-07 15:38:26 +000015145
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015146# ABI version string for Python extension modules. This appears between the
15147# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15148# from the following attributes which affect the ABI of this Python build (in
15149# this order):
15150#
15151# * The Python implementation (always 'cpython-' for us)
15152# * The major and minor version numbers
15153# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015154#
15155# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015156# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15157# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015158#
15159# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15160# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015161
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15163$as_echo_n "checking ABIFLAGS... " >&6; }
15164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15165$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15167$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015168SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15170$as_echo "$SOABI" >&6; }
15171
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015172# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15173if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015174 # Similar to SOABI but remove "d" flag from ABIFLAGS
15175
15176 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15177
15178cat >>confdefs.h <<_ACEOF
15179#define ALT_SOABI "${ALT_SOABI}"
15180_ACEOF
15181
15182fi
15183
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015184
15185case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015186 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015187 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15188 *)
15189 EXT_SUFFIX=${SHLIB_SUFFIX};;
15190esac
15191
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15193$as_echo_n "checking LDVERSION... " >&6; }
15194LDVERSION='$(VERSION)$(ABIFLAGS)'
15195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15196$as_echo "$LDVERSION" >&6; }
15197
E. M. Brayc994c8f2019-05-24 17:33:47 +020015198# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015199
E. M. Brayb1fc4172019-05-24 18:39:39 +020015200if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015201 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015202else
15203 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015204fi
15205
doko@python.org87421192013-01-26 11:39:31 +010015206
doko@ubuntu.com55532312016-06-14 08:55:19 +020015207if test x$PLATFORM_TRIPLET = x; then
15208 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15209else
15210 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15211fi
doko@python.org87421192013-01-26 11:39:31 +010015212
15213
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015214# Check whether right shifting a negative integer extends the sign bit
15215# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15217$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015218if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015223 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015224else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015226/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015227
15228int main()
15229{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015230 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015231}
15232
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015234if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015235 ac_cv_rshift_extends_sign=yes
15236else
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15240 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015241fi
15242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243fi
15244
Matthias Kloseb9621712010-04-24 17:59:49 +000015245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15246$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015247if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015248then
Martin v. Löwis11437992002-04-12 09:54:03 +000015249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015251
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015252fi
15253
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015254# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15256$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015257if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015259else
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015263#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015264int
15265main ()
15266{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015267
15268 FILE *f = fopen("/dev/null", "r");
15269 flockfile(f);
15270 getc_unlocked(f);
15271 funlockfile(f);
15272
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ;
15274 return 0;
15275}
15276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015277if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015278 ac_cv_have_getc_unlocked=yes
15279else
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 ac_cv_have_getc_unlocked=no
15281fi
15282rm -f core conftest.err conftest.$ac_objext \
15283 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285
Matthias Kloseb9621712010-04-24 17:59:49 +000015286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15287$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015288if test "$ac_cv_have_getc_unlocked" = yes
15289then
Martin v. Löwis11437992002-04-12 09:54:03 +000015290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015292
15293fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015294
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015295# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015296# save the value of LIBS so we don't actually link Python with readline
15297LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015298
Gregory P. Smith18820942008-09-07 06:24:49 +000015299# On some systems we need to link readline to a termcap compatible
15300# library. NOTE: Keep the precedence of listed libraries synchronised
15301# with setup.py.
15302py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15304$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015305for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015306 if test -z "$py_libtermcap"; then
15307 READLINE_LIBS="-lreadline"
15308 else
15309 READLINE_LIBS="-lreadline -l$py_libtermcap"
15310 fi
15311 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015313/* end confdefs.h. */
15314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315/* Override any GCC internal prototype to avoid an error.
15316 Use char because int might match the return type of a GCC
15317 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015318#ifdef __cplusplus
15319extern "C"
15320#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015321char readline ();
15322int
15323main ()
15324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015326 ;
15327 return 0;
15328}
15329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015330if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015331 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015333rm -f core conftest.err conftest.$ac_objext \
15334 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015335 if test $py_cv_lib_readline = yes; then
15336 break
15337 fi
15338done
15339# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15340#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015341if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15343$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015344else
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15346$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015349
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015350fi
15351
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015352# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015354/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015355#include <readline/readline.h>
15356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015357if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015358 have_readline=yes
15359else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015360 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015361
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015362fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015363rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015364if test $have_readline = yes
15365then
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015367/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015368#include <readline/readline.h>
15369
15370_ACEOF
15371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015373
Matthias Kloseb9621712010-04-24 17:59:49 +000015374$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015375
15376fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015377rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015380/* end confdefs.h. */
15381#include <readline/readline.h>
15382
15383_ACEOF
15384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015388
15389fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015390rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015391
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015392fi
15393
Martin v. Löwis0daad592001-09-30 21:09:59 +000015394# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15396$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015397if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015399else
Martin v. Löwis11437992002-04-12 09:54:03 +000015400 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015401LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015405/* Override any GCC internal prototype to avoid an error.
15406 Use char because int might match the return type of a GCC
15407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015408#ifdef __cplusplus
15409extern "C"
15410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015411char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015412int
15413main ()
15414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ;
15417 return 0;
15418}
15419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015422else
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015425rm -f core conftest.err conftest.$ac_objext \
15426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015427LIBS=$ac_check_lib_save_LIBS
15428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15430$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015431if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015434
Martin v. Löwis0daad592001-09-30 21:09:59 +000015435fi
15436
Michael W. Hudson54241132001-12-07 15:38:26 +000015437
Thomas Wouters89d996e2007-09-08 17:39:28 +000015438# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15440$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015441if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015443else
15444 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015445LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015447/* end confdefs.h. */
15448
15449/* Override any GCC internal prototype to avoid an error.
15450 Use char because int might match the return type of a GCC
15451 builtin and then its argument prototype would still apply. */
15452#ifdef __cplusplus
15453extern "C"
15454#endif
15455char rl_completion_display_matches_hook ();
15456int
15457main ()
15458{
15459return rl_completion_display_matches_hook ();
15460 ;
15461 return 0;
15462}
15463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015464if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015465 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15466else
Matthias Kloseb9621712010-04-24 17:59:49 +000015467 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015469rm -f core conftest.err conftest.$ac_objext \
15470 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015471LIBS=$ac_check_lib_save_LIBS
15472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15474$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015475if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015476
Matthias Kloseb9621712010-04-24 17:59:49 +000015477$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015478
15479fi
15480
15481
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015482# also in 4.0, but not in editline
15483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15484$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15485if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15486 $as_echo_n "(cached) " >&6
15487else
15488 ac_check_lib_save_LIBS=$LIBS
15489LIBS="-lreadline $READLINE_LIBS $LIBS"
15490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15491/* end confdefs.h. */
15492
15493/* Override any GCC internal prototype to avoid an error.
15494 Use char because int might match the return type of a GCC
15495 builtin and then its argument prototype would still apply. */
15496#ifdef __cplusplus
15497extern "C"
15498#endif
15499char rl_resize_terminal ();
15500int
15501main ()
15502{
15503return rl_resize_terminal ();
15504 ;
15505 return 0;
15506}
15507_ACEOF
15508if ac_fn_c_try_link "$LINENO"; then :
15509 ac_cv_lib_readline_rl_resize_terminal=yes
15510else
15511 ac_cv_lib_readline_rl_resize_terminal=no
15512fi
15513rm -f core conftest.err conftest.$ac_objext \
15514 conftest$ac_exeext conftest.$ac_ext
15515LIBS=$ac_check_lib_save_LIBS
15516fi
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15518$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15519if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15520
15521$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15522
15523fi
15524
15525
Martin v. Löwis0daad592001-09-30 21:09:59 +000015526# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15528$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015531else
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015533LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537/* Override any GCC internal prototype to avoid an error.
15538 Use char because int might match the return type of a GCC
15539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015540#ifdef __cplusplus
15541extern "C"
15542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015543char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015544int
15545main ()
15546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 ;
15549 return 0;
15550}
15551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015553 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015557rm -f core conftest.err conftest.$ac_objext \
15558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015559LIBS=$ac_check_lib_save_LIBS
15560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15562$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015563if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015566
Guido van Rossum353ae582001-07-10 16:45:32 +000015567fi
15568
Jack Jansendd19cf82001-12-06 22:36:17 +000015569
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015570# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572/* end confdefs.h. */
15573#include <readline/readline.h>
15574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015575if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015576 have_readline=yes
15577else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015578 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015579
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015580fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015581rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015582if test $have_readline = yes
15583then
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015585/* end confdefs.h. */
15586#include <readline/readline.h>
15587
15588_ACEOF
15589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015593
15594fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015595rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015596
15597fi
15598
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15600$as_echo_n "checking for append_history in -lreadline... " >&6; }
15601if ${ac_cv_lib_readline_append_history+:} false; then :
15602 $as_echo_n "(cached) " >&6
15603else
15604 ac_check_lib_save_LIBS=$LIBS
15605LIBS="-lreadline $READLINE_LIBS $LIBS"
15606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15607/* end confdefs.h. */
15608
15609/* Override any GCC internal prototype to avoid an error.
15610 Use char because int might match the return type of a GCC
15611 builtin and then its argument prototype would still apply. */
15612#ifdef __cplusplus
15613extern "C"
15614#endif
15615char append_history ();
15616int
15617main ()
15618{
15619return append_history ();
15620 ;
15621 return 0;
15622}
15623_ACEOF
15624if ac_fn_c_try_link "$LINENO"; then :
15625 ac_cv_lib_readline_append_history=yes
15626else
15627 ac_cv_lib_readline_append_history=no
15628fi
15629rm -f core conftest.err conftest.$ac_objext \
15630 conftest$ac_exeext conftest.$ac_ext
15631LIBS=$ac_check_lib_save_LIBS
15632fi
15633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15634$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15635if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15636
15637$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15638
15639fi
15640
15641
Martin v. Löwis82bca632006-02-10 20:49:30 +000015642# End of readline checks: restore LIBS
15643LIBS=$LIBS_no_readline
15644
Matthias Kloseb9621712010-04-24 17:59:49 +000015645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15646$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015647if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015649else
Martin v. Löwis11437992002-04-12 09:54:03 +000015650
Matthias Kloseb9621712010-04-24 17:59:49 +000015651if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015652 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015655/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015656
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015657#include <stdlib.h>
15658#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015659int main()
15660{
15661 int val1 = nice(1);
15662 if (val1 != -1 && val1 == nice(2))
15663 exit(0);
15664 exit(1);
15665}
15666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015668if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015669 ac_cv_broken_nice=yes
15670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015675fi
15676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677fi
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15680$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015681if test "$ac_cv_broken_nice" = yes
15682then
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015685
15686fi
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15689$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015690if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015692else
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015694 ac_cv_broken_poll=no
15695else
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015697/* end confdefs.h. */
15698
15699#include <poll.h>
15700
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015701int main()
15702{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015703 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015704 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015705
15706 close (42);
15707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015708 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015709 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015710 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015711 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015712 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015713 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015714 return 1;
15715}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015716
15717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015718if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015719 ac_cv_broken_poll=yes
15720else
Matthias Kloseb9621712010-04-24 17:59:49 +000015721 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015727fi
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15730$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015731if test "$ac_cv_broken_poll" = yes
15732then
15733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015735
15736fi
15737
Martin v. Löwis1d459062005-03-14 21:23:33 +000015738# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15740$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015741if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015743else
15744
Matthias Kloseb9621712010-04-24 17:59:49 +000015745if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015746 ac_cv_working_tzset=no
15747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015749/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015750
15751#include <stdlib.h>
15752#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015753#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015754
15755#if HAVE_TZNAME
15756extern char *tzname[];
15757#endif
15758
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015759int main()
15760{
Brett Cannon18367812003-09-19 00:59:16 +000015761 /* Note that we need to ensure that not only does tzset(3)
15762 do 'something' with localtime, but it works as documented
15763 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015764 This includes making sure that tzname is set properly if
15765 tm->tm_zone does not exist since it is the alternative way
15766 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015767
15768 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015769 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015770 */
15771
Martin v. Löwis1d459062005-03-14 21:23:33 +000015772 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015773 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15774
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015775 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015776 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015777 if (localtime(&groundhogday)->tm_hour != 0)
15778 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015779#if HAVE_TZNAME
15780 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15781 if (strcmp(tzname[0], "UTC") ||
15782 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15783 exit(1);
15784#endif
Brett Cannon18367812003-09-19 00:59:16 +000015785
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015786 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015787 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015788 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015789 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015790#if HAVE_TZNAME
15791 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15792 exit(1);
15793#endif
Brett Cannon18367812003-09-19 00:59:16 +000015794
15795 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15796 tzset();
15797 if (localtime(&groundhogday)->tm_hour != 11)
15798 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015799#if HAVE_TZNAME
15800 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15801 exit(1);
15802#endif
15803
15804#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015805 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15806 exit(1);
15807 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15808 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015809#endif
Brett Cannon18367812003-09-19 00:59:16 +000015810
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015811 exit(0);
15812}
15813
15814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015815if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015816 ac_cv_working_tzset=yes
15817else
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015822fi
15823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824fi
15825
Matthias Kloseb9621712010-04-24 17:59:49 +000015826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15827$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015828if test "$ac_cv_working_tzset" = yes
15829then
15830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015832
15833fi
15834
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015835# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15837$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015838if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015840else
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015842/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015843#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015844int
15845main ()
15846{
15847
15848struct stat st;
15849st.st_mtim.tv_nsec = 1;
15850
15851 ;
15852 return 0;
15853}
15854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015856 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015857else
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15861fi
15862
Matthias Kloseb9621712010-04-24 17:59:49 +000015863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15864$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015865if test "$ac_cv_stat_tv_nsec" = yes
15866then
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015869
15870fi
15871
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015872# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15874$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015875if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015877else
Matthias Kloseb9621712010-04-24 17:59:49 +000015878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015879/* end confdefs.h. */
15880#include <sys/stat.h>
15881int
15882main ()
15883{
15884
15885struct stat st;
15886st.st_mtimespec.tv_nsec = 1;
15887
15888 ;
15889 return 0;
15890}
15891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015892if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015893 ac_cv_stat_tv_nsec2=yes
15894else
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15898fi
15899
Matthias Kloseb9621712010-04-24 17:59:49 +000015900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15901$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015902if test "$ac_cv_stat_tv_nsec2" = yes
15903then
15904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015906
15907fi
15908
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015909# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015910ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015911if test "$cross_compiling" = no; then
15912 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15913fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015914
15915for ac_header in curses.h ncurses.h
15916do :
15917 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15918ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15919if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15920 cat >>confdefs.h <<_ACEOF
15921#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15922_ACEOF
15923
15924fi
15925
15926done
15927
15928
15929# On Solaris, term.h requires curses.h
15930for ac_header in term.h
15931do :
15932 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15933#ifdef HAVE_CURSES_H
15934#include <curses.h>
15935#endif
15936
15937"
15938if test "x$ac_cv_header_term_h" = xyes; then :
15939 cat >>confdefs.h <<_ACEOF
15940#define HAVE_TERM_H 1
15941_ACEOF
15942
15943fi
15944
15945done
15946
15947
Jack Jansen666b1e72001-10-31 12:11:48 +000015948# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15950$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015951if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015953else
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015955/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015956#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015957int
15958main ()
15959{
Jack Jansen666b1e72001-10-31 12:11:48 +000015960
15961 int rtn;
15962 rtn = mvwdelch(0,0,0);
15963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ;
15965 return 0;
15966}
15967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015968if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015969 ac_cv_mvwdelch_is_expression=yes
15970else
Matthias Kloseb9621712010-04-24 17:59:49 +000015971 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15974fi
15975
Matthias Kloseb9621712010-04-24 17:59:49 +000015976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15977$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015978
15979if test "$ac_cv_mvwdelch_is_expression" = yes
15980then
Martin v. Löwis11437992002-04-12 09:54:03 +000015981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015983
15984fi
15985
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015986# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15987# structs since version 5.7. If the macro is defined as zero before including
15988# [n]curses.h, ncurses will expose fields of the structs regardless of the
15989# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15991$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015992if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015993 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015994else
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015996/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015997
15998 #define NCURSES_OPAQUE 0
15999 #include <curses.h>
16000
Martin v. Löwis11437992002-04-12 09:54:03 +000016001int
16002main ()
16003{
Jack Jansen666b1e72001-10-31 12:11:48 +000016004
16005 WINDOW *w;
16006 w->_flags = 0;
16007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 ;
16009 return 0;
16010}
16011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016012if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016013 ac_cv_window_has_flags=yes
16014else
Matthias Kloseb9621712010-04-24 17:59:49 +000016015 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16018fi
16019
Matthias Kloseb9621712010-04-24 17:59:49 +000016020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16021$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016022
Jack Jansen666b1e72001-10-31 12:11:48 +000016023
16024if test "$ac_cv_window_has_flags" = yes
16025then
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
Matthias Kloseb9621712010-04-24 17:59:49 +000016027$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016028
16029fi
16030
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16032$as_echo_n "checking for is_pad... " >&6; }
16033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16034/* end confdefs.h. */
16035#include <curses.h>
16036int
16037main ()
16038{
16039
16040#ifndef is_pad
16041void *x=is_pad
16042#endif
16043
16044 ;
16045 return 0;
16046}
16047_ACEOF
16048if ac_fn_c_try_compile "$LINENO"; then :
16049
16050$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16051
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16053$as_echo "yes" >&6; }
16054else
16055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16056$as_echo "no" >&6; }
16057
16058fi
16059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16060
Matthias Kloseb9621712010-04-24 17:59:49 +000016061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16062$as_echo_n "checking for is_term_resized... " >&6; }
16063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016064/* end confdefs.h. */
16065#include <curses.h>
16066int
16067main ()
16068{
16069void *x=is_term_resized
16070 ;
16071 return 0;
16072}
16073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016077
Matthias Kloseb159a552010-04-25 21:00:44 +000016078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016079$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016080else
Matthias Kloseb9621712010-04-24 17:59:49 +000016081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16082$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016083
16084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16086
Matthias Kloseb9621712010-04-24 17:59:49 +000016087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16088$as_echo_n "checking for resize_term... " >&6; }
16089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016090/* end confdefs.h. */
16091#include <curses.h>
16092int
16093main ()
16094{
16095void *x=resize_term
16096 ;
16097 return 0;
16098}
16099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016100if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016101
Matthias Kloseb9621712010-04-24 17:59:49 +000016102$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016103
Matthias Kloseb159a552010-04-25 21:00:44 +000016104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016105$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016106else
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16108$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016109
16110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16112
Matthias Kloseb9621712010-04-24 17:59:49 +000016113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16114$as_echo_n "checking for resizeterm... " >&6; }
16115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016116/* end confdefs.h. */
16117#include <curses.h>
16118int
16119main ()
16120{
16121void *x=resizeterm
16122 ;
16123 return 0;
16124}
16125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016126if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016127
Matthias Kloseb9621712010-04-24 17:59:49 +000016128$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016129
Matthias Kloseb159a552010-04-25 21:00:44 +000016130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016131$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016132else
Matthias Kloseb9621712010-04-24 17:59:49 +000016133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16134$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016135
16136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016138
16139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16140$as_echo_n "checking for immedok... " >&6; }
16141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16142/* end confdefs.h. */
16143#include <curses.h>
16144int
16145main ()
16146{
16147
16148#ifndef immedok
16149void *x=immedok
16150#endif
16151
16152 ;
16153 return 0;
16154}
16155_ACEOF
16156if ac_fn_c_try_compile "$LINENO"; then :
16157
16158$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16159
16160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16161$as_echo "yes" >&6; }
16162else
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16164$as_echo "no" >&6; }
16165
16166fi
16167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16168
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16170$as_echo_n "checking for syncok... " >&6; }
16171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172/* end confdefs.h. */
16173#include <curses.h>
16174int
16175main ()
16176{
16177
16178#ifndef syncok
16179void *x=syncok
16180#endif
16181
16182 ;
16183 return 0;
16184}
16185_ACEOF
16186if ac_fn_c_try_compile "$LINENO"; then :
16187
16188$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16189
16190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16191$as_echo "yes" >&6; }
16192else
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16194$as_echo "no" >&6; }
16195
16196fi
16197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16198
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16200$as_echo_n "checking for wchgat... " >&6; }
16201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16202/* end confdefs.h. */
16203#include <curses.h>
16204int
16205main ()
16206{
16207
16208#ifndef wchgat
16209void *x=wchgat
16210#endif
16211
16212 ;
16213 return 0;
16214}
16215_ACEOF
16216if ac_fn_c_try_compile "$LINENO"; then :
16217
16218$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16219
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16221$as_echo "yes" >&6; }
16222else
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16224$as_echo "no" >&6; }
16225
16226fi
16227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16228
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16230$as_echo_n "checking for filter... " >&6; }
16231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232/* end confdefs.h. */
16233#include <curses.h>
16234int
16235main ()
16236{
16237
16238#ifndef filter
16239void *x=filter
16240#endif
16241
16242 ;
16243 return 0;
16244}
16245_ACEOF
16246if ac_fn_c_try_compile "$LINENO"; then :
16247
16248$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16249
16250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16251$as_echo "yes" >&6; }
16252else
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16254$as_echo "no" >&6; }
16255
16256fi
16257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16258
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16260$as_echo_n "checking for has_key... " >&6; }
16261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16262/* end confdefs.h. */
16263#include <curses.h>
16264int
16265main ()
16266{
16267
16268#ifndef has_key
16269void *x=has_key
16270#endif
16271
16272 ;
16273 return 0;
16274}
16275_ACEOF
16276if ac_fn_c_try_compile "$LINENO"; then :
16277
16278$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16279
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16281$as_echo "yes" >&6; }
16282else
16283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16284$as_echo "no" >&6; }
16285
16286fi
16287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16288
16289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16290$as_echo_n "checking for typeahead... " >&6; }
16291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16292/* end confdefs.h. */
16293#include <curses.h>
16294int
16295main ()
16296{
16297
16298#ifndef typeahead
16299void *x=typeahead
16300#endif
16301
16302 ;
16303 return 0;
16304}
16305_ACEOF
16306if ac_fn_c_try_compile "$LINENO"; then :
16307
16308$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16309
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16311$as_echo "yes" >&6; }
16312else
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16314$as_echo "no" >&6; }
16315
16316fi
16317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16318
16319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16320$as_echo_n "checking for use_env... " >&6; }
16321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16322/* end confdefs.h. */
16323#include <curses.h>
16324int
16325main ()
16326{
16327
16328#ifndef use_env
16329void *x=use_env
16330#endif
16331
16332 ;
16333 return 0;
16334}
16335_ACEOF
16336if ac_fn_c_try_compile "$LINENO"; then :
16337
16338$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16339
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16341$as_echo "yes" >&6; }
16342else
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16344$as_echo "no" >&6; }
16345
16346fi
16347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016348# last curses configure check
16349CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016350
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16352$as_echo "$as_me: checking for device files" >&6;}
16353
16354if test "x$cross_compiling" = xyes; then
16355 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16357$as_echo_n "checking for /dev/ptmx... " >&6; }
16358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16359$as_echo "not set" >&6; }
16360 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16361 fi
16362 if test "${ac_cv_file__dev_ptc+set}" != set; then
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16364$as_echo_n "checking for /dev/ptc... " >&6; }
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16366$as_echo "not set" >&6; }
16367 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16368 fi
16369fi
16370
Matthias Kloseb9621712010-04-24 17:59:49 +000016371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16372$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016373if ${ac_cv_file__dev_ptmx+:} false; then :
16374 $as_echo_n "(cached) " >&6
16375else
16376 test "$cross_compiling" = yes &&
16377 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16378if test -r "/dev/ptmx"; then
16379 ac_cv_file__dev_ptmx=yes
16380else
16381 ac_cv_file__dev_ptmx=no
16382fi
16383fi
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16385$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16386if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016387
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016388fi
16389
16390if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016391
Matthias Kloseb9621712010-04-24 17:59:49 +000016392$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016393
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16396$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016397if ${ac_cv_file__dev_ptc+:} false; then :
16398 $as_echo_n "(cached) " >&6
16399else
16400 test "$cross_compiling" = yes &&
16401 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16402if test -r "/dev/ptc"; then
16403 ac_cv_file__dev_ptc=yes
16404else
16405 ac_cv_file__dev_ptc=no
16406fi
16407fi
16408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16409$as_echo "$ac_cv_file__dev_ptc" >&6; }
16410if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016411
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016412fi
16413
16414if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016415
Matthias Kloseb9621712010-04-24 17:59:49 +000016416$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016417
Neal Norwitz865400f2003-03-21 01:42:58 +000016418fi
16419
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016420if test $ac_sys_system = Darwin
16421then
16422 LIBS="$LIBS -framework CoreFoundation"
16423fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016424
Matthias Kloseb9621712010-04-24 17:59:49 +000016425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16426$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016427if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016428 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016429else
Matthias Kloseb9621712010-04-24 17:59:49 +000016430 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016431 ac_cv_have_size_t_format="cross -- assuming yes"
16432
Thomas Wouters477c8d52006-05-27 19:21:47 +000016433else
Matthias Kloseb9621712010-04-24 17:59:49 +000016434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016435/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016436
Thomas Wouters477c8d52006-05-27 19:21:47 +000016437#include <stdio.h>
16438#include <stddef.h>
16439#include <string.h>
16440
Christian Heimes2c181612007-12-17 20:04:13 +000016441#ifdef HAVE_SYS_TYPES_H
16442#include <sys/types.h>
16443#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016444
16445#ifdef HAVE_SSIZE_T
16446typedef ssize_t Py_ssize_t;
16447#elif SIZEOF_VOID_P == SIZEOF_LONG
16448typedef long Py_ssize_t;
16449#else
16450typedef int Py_ssize_t;
16451#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016452
Christian Heimes2c181612007-12-17 20:04:13 +000016453int main()
16454{
16455 char buffer[256];
16456
Thomas Wouters477c8d52006-05-27 19:21:47 +000016457 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16458 return 1;
16459
Thomas Wouters89f507f2006-12-13 04:49:30 +000016460 if (strcmp(buffer, "123"))
16461 return 1;
16462
16463 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16464 return 1;
16465
16466 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016467 return 1;
16468
16469 return 0;
16470}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016471
Thomas Wouters477c8d52006-05-27 19:21:47 +000016472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016473if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016474 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016475else
Matthias Kloseb9621712010-04-24 17:59:49 +000016476 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016480fi
16481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16484$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016485if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016486
Matthias Kloseb9621712010-04-24 17:59:49 +000016487$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016488
16489fi
16490
Matthias Kloseb9621712010-04-24 17:59:49 +000016491ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016492#ifdef HAVE_SYS_TYPES_H
16493#include <sys/types.h>
16494#endif
16495#ifdef HAVE_SYS_SOCKET_H
16496#include <sys/socket.h>
16497#endif
16498
Matthias Kloseb9621712010-04-24 17:59:49 +000016499"
Victor Stinnere0be4232011-10-25 13:06:09 +020016500if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016501
Martin v. Löwis11437992002-04-12 09:54:03 +000016502else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016503
Matthias Kloseb9621712010-04-24 17:59:49 +000016504$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016505
16506fi
16507
Michael W. Hudson54241132001-12-07 15:38:26 +000016508
Matthias Kloseb9621712010-04-24 17:59:49 +000016509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16510$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016511if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016513else
Matthias Kloseb9621712010-04-24 17:59:49 +000016514 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016515 ac_cv_broken_mbstowcs=no
16516else
Matthias Kloseb9621712010-04-24 17:59:49 +000016517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016518/* end confdefs.h. */
16519
Stefan Krah19c21392012-11-22 23:47:32 +010016520#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016521#include<stdlib.h>
16522int main() {
16523 size_t len = -1;
16524 const char *str = "text";
16525 len = mbstowcs(NULL, str, 0);
16526 return (len != 4);
16527}
16528
16529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016530if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016531 ac_cv_broken_mbstowcs=no
16532else
Matthias Kloseb9621712010-04-24 17:59:49 +000016533 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016537fi
16538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016539fi
16540
Matthias Kloseb9621712010-04-24 17:59:49 +000016541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16542$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016543if test "$ac_cv_broken_mbstowcs" = yes
16544then
16545
Matthias Kloseb9621712010-04-24 17:59:49 +000016546$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016547
16548fi
16549
Antoine Pitroub52ec782009-01-25 16:34:23 +000016550# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16552$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016553
16554# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016555if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016556 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016557if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016558then
16559
Matthias Kloseb9621712010-04-24 17:59:49 +000016560$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016561
Matthias Kloseb9621712010-04-24 17:59:49 +000016562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16563$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016564fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016565if test "$withval" = no
16566then
16567
16568$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16569
Matthias Kloseb9621712010-04-24 17:59:49 +000016570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16571$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016572fi
16573
Antoine Pitrou042b1282010-08-13 21:15:58 +000016574else
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16576$as_echo "no value specified" >&6; }
16577fi
16578
Antoine Pitroub52ec782009-01-25 16:34:23 +000016579
Matthias Kloseb17289e2012-03-15 19:51:34 +010016580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16581$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16582if ${ac_cv_computed_gotos+:} false; then :
16583 $as_echo_n "(cached) " >&6
16584else
16585 if test "$cross_compiling" = yes; then :
16586 if test "${with_computed_gotos+set}" = set; then
16587 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16588 else
16589 ac_cv_computed_gotos=no
16590 fi
16591else
16592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593/* end confdefs.h. */
16594
16595int main(int argc, char **argv)
16596{
16597 static void *targets[1] = { &&LABEL1 };
16598 goto LABEL2;
16599LABEL1:
16600 return 0;
16601LABEL2:
16602 goto *targets[0];
16603 return 1;
16604}
16605
16606_ACEOF
16607if ac_fn_c_try_run "$LINENO"; then :
16608 ac_cv_computed_gotos=yes
16609else
16610 ac_cv_computed_gotos=no
16611fi
16612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16613 conftest.$ac_objext conftest.beam conftest.$ac_ext
16614fi
16615
16616fi
16617
16618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16619$as_echo "$ac_cv_computed_gotos" >&6; }
16620case "$ac_cv_computed_gotos" in yes*)
16621
16622$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16623
16624esac
16625
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016626case $ac_sys_system in
16627AIX*)
16628
16629$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16630 ;;
16631esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016632
Michael W. Hudson54241132001-12-07 15:38:26 +000016633
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016634
16635
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016636for h in `(cd $srcdir;echo Python/thread_*.h)`
16637do
16638 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16639done
16640
Michael W. Hudson54241132001-12-07 15:38:26 +000016641
Victor Stinner21a74a92019-04-11 22:28:12 +020016642SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16644$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016645for dir in $SRCDIRS; do
16646 if test ! -d $dir; then
16647 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016648 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016649done
Matthias Kloseb9621712010-04-24 17:59:49 +000016650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16651$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016652
Stefan Krah1919b7e2012-03-21 18:25:23 +010016653# Availability of -O2:
16654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16655$as_echo_n "checking for -O2... " >&6; }
16656saved_cflags="$CFLAGS"
16657CFLAGS="-O2"
16658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659/* end confdefs.h. */
16660
16661int
16662main ()
16663{
16664
16665
16666 ;
16667 return 0;
16668}
16669_ACEOF
16670if ac_fn_c_try_compile "$LINENO"; then :
16671 have_O2=yes
16672else
16673 have_O2=no
16674fi
16675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16677$as_echo "$have_O2" >&6; }
16678CFLAGS="$saved_cflags"
16679
16680# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16681# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16683$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16684saved_cflags="$CFLAGS"
16685CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16686if test "$have_O2" = no; then
16687 CFLAGS=""
16688fi
16689if test "$cross_compiling" = yes; then :
16690 have_glibc_memmove_bug=undefined
16691else
16692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16693/* end confdefs.h. */
16694
16695#include <stdio.h>
16696#include <stdlib.h>
16697#include <string.h>
16698void foo(void *p, void *q) { memmove(p, q, 19); }
16699int main() {
16700 char a[32] = "123456789000000000";
16701 foo(&a[9], a);
16702 if (strcmp(a, "123456789123456789000000000") != 0)
16703 return 1;
16704 foo(a, &a[9]);
16705 if (strcmp(a, "123456789000000000") != 0)
16706 return 1;
16707 return 0;
16708}
16709
16710_ACEOF
16711if ac_fn_c_try_run "$LINENO"; then :
16712 have_glibc_memmove_bug=no
16713else
16714 have_glibc_memmove_bug=yes
16715fi
16716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16717 conftest.$ac_objext conftest.beam conftest.$ac_ext
16718fi
16719
16720CFLAGS="$saved_cflags"
16721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16722$as_echo "$have_glibc_memmove_bug" >&6; }
16723if test "$have_glibc_memmove_bug" = yes; then
16724
16725$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16726
16727fi
16728
16729if test "$have_gcc_asm_for_x87" = yes; then
16730 # Some versions of gcc miscompile inline asm:
16731 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16732 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16733 case $CC in
16734 *gcc*)
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16736$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16737 saved_cflags="$CFLAGS"
16738 CFLAGS="-O2"
16739 if test "$cross_compiling" = yes; then :
16740 have_ipa_pure_const_bug=undefined
16741else
16742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16743/* end confdefs.h. */
16744
16745 __attribute__((noinline)) int
16746 foo(int *p) {
16747 int r;
16748 asm ( "movl \$6, (%1)\n\t"
16749 "xorl %0, %0\n\t"
16750 : "=r" (r) : "r" (p) : "memory"
16751 );
16752 return r;
16753 }
16754 int main() {
16755 int p = 8;
16756 if ((foo(&p) ? : p) != 6)
16757 return 1;
16758 return 0;
16759 }
16760
16761_ACEOF
16762if ac_fn_c_try_run "$LINENO"; then :
16763 have_ipa_pure_const_bug=no
16764else
16765 have_ipa_pure_const_bug=yes
16766fi
16767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16768 conftest.$ac_objext conftest.beam conftest.$ac_ext
16769fi
16770
16771 CFLAGS="$saved_cflags"
16772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16773$as_echo "$have_ipa_pure_const_bug" >&6; }
16774 if test "$have_ipa_pure_const_bug" = yes; then
16775
16776$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16777
16778 fi
16779 ;;
16780 esac
16781fi
16782
Victor Stinner4f5366e2015-01-09 02:13:19 +010016783# Check for stdatomic.h
16784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16785$as_echo_n "checking for stdatomic.h... " >&6; }
16786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16787/* end confdefs.h. */
16788
16789
16790 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016791 atomic_int int_var;
16792 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016793 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016794 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16795 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16796 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016797 return 0;
16798 }
16799
16800
16801_ACEOF
16802if ac_fn_c_try_link "$LINENO"; then :
16803 have_stdatomic_h=yes
16804else
16805 have_stdatomic_h=no
16806fi
16807rm -f core conftest.err conftest.$ac_objext \
16808 conftest$ac_exeext conftest.$ac_ext
16809
16810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16811$as_echo "$have_stdatomic_h" >&6; }
16812
16813if test "$have_stdatomic_h" = yes; then
16814
16815$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16816
16817fi
16818
16819# Check for GCC >= 4.7 __atomic builtins
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16821$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16823/* end confdefs.h. */
16824
16825
16826 volatile int val = 1;
16827 int main() {
16828 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16829 return 0;
16830 }
16831
16832
16833_ACEOF
16834if ac_fn_c_try_link "$LINENO"; then :
16835 have_builtin_atomic=yes
16836else
16837 have_builtin_atomic=no
16838fi
16839rm -f core conftest.err conftest.$ac_objext \
16840 conftest$ac_exeext conftest.$ac_ext
16841
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16843$as_echo "$have_builtin_atomic" >&6; }
16844
16845if test "$have_builtin_atomic" = yes; then
16846
16847$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16848
16849fi
16850
Ned Deily322f5ba2013-11-21 23:01:59 -080016851# ensurepip option
16852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16853$as_echo_n "checking for ensurepip... " >&6; }
16854
16855# Check whether --with-ensurepip was given.
16856if test "${with_ensurepip+set}" = set; then :
16857 withval=$with_ensurepip;
16858else
16859 with_ensurepip=upgrade
16860fi
16861
16862case $with_ensurepip in #(
16863 yes|upgrade) :
16864 ENSUREPIP=upgrade ;; #(
16865 install) :
16866 ENSUREPIP=install ;; #(
16867 no) :
16868 ENSUREPIP=no ;; #(
16869 *) :
16870 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16871esac
16872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16873$as_echo "$ENSUREPIP" >&6; }
16874
16875
Victor Stinner35a97c02015-03-08 02:59:09 +010016876# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16878$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16880/* end confdefs.h. */
16881
16882
16883 #include <dirent.h>
16884
16885 int main() {
16886 struct dirent entry;
16887 return entry.d_type == DT_UNKNOWN;
16888 }
16889
16890
16891_ACEOF
16892if ac_fn_c_try_link "$LINENO"; then :
16893 have_dirent_d_type=yes
16894else
16895 have_dirent_d_type=no
16896fi
16897rm -f core conftest.err conftest.$ac_objext \
16898 conftest$ac_exeext conftest.$ac_ext
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16900$as_echo "$have_dirent_d_type" >&6; }
16901
16902if test "$have_dirent_d_type" = yes; then
16903
16904$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16905
16906fi
16907
Victor Stinner9eb57c52015-03-19 22:21:49 +010016908# check if the Linux getrandom() syscall is available
16909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16910$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16912/* end confdefs.h. */
16913
16914
Victor Stinner1b80b242016-04-12 22:34:58 +020016915 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016916 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016917 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016918
16919 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016920 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016921 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016922 const int flags = GRND_NONBLOCK;
16923 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016924 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016925 return 0;
16926 }
16927
16928
16929_ACEOF
16930if ac_fn_c_try_link "$LINENO"; then :
16931 have_getrandom_syscall=yes
16932else
16933 have_getrandom_syscall=no
16934fi
16935rm -f core conftest.err conftest.$ac_objext \
16936 conftest$ac_exeext conftest.$ac_ext
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16938$as_echo "$have_getrandom_syscall" >&6; }
16939
16940if test "$have_getrandom_syscall" = yes; then
16941
16942$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16943
16944fi
16945
Victor Stinner3abf44e2015-09-18 15:38:37 +020016946# check if the getrandom() function is available
16947# the test was written for the Solaris function of <sys/random.h>
16948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16949$as_echo_n "checking for the getrandom() function... " >&6; }
16950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16951/* end confdefs.h. */
16952
16953
16954 #include <sys/random.h>
16955
16956 int main() {
16957 char buffer[1];
16958 const size_t buflen = sizeof(buffer);
16959 const int flags = 0;
16960 /* ignore the result, Python checks for ENOSYS at runtime */
16961 (void)getrandom(buffer, buflen, flags);
16962 return 0;
16963 }
16964
16965
16966_ACEOF
16967if ac_fn_c_try_link "$LINENO"; then :
16968 have_getrandom=yes
16969else
16970 have_getrandom=no
16971fi
16972rm -f core conftest.err conftest.$ac_objext \
16973 conftest$ac_exeext conftest.$ac_ext
16974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16975$as_echo "$have_getrandom" >&6; }
16976
16977if test "$have_getrandom" = yes; then
16978
16979$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16980
16981fi
16982
Neil Schemenauer5741c452019-02-08 10:48:46 -080016983# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16984# shm_* may only be available if linking against librt
16985save_LIBS="$LIBS"
16986save_includes_default="$ac_includes_default"
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16988$as_echo_n "checking for library containing shm_open... " >&6; }
16989if ${ac_cv_search_shm_open+:} false; then :
16990 $as_echo_n "(cached) " >&6
16991else
16992 ac_func_search_save_LIBS=$LIBS
16993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16994/* end confdefs.h. */
16995
16996/* Override any GCC internal prototype to avoid an error.
16997 Use char because int might match the return type of a GCC
16998 builtin and then its argument prototype would still apply. */
16999#ifdef __cplusplus
17000extern "C"
17001#endif
17002char shm_open ();
17003int
17004main ()
17005{
17006return shm_open ();
17007 ;
17008 return 0;
17009}
17010_ACEOF
17011for ac_lib in '' rt; do
17012 if test -z "$ac_lib"; then
17013 ac_res="none required"
17014 else
17015 ac_res=-l$ac_lib
17016 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17017 fi
17018 if ac_fn_c_try_link "$LINENO"; then :
17019 ac_cv_search_shm_open=$ac_res
17020fi
17021rm -f core conftest.err conftest.$ac_objext \
17022 conftest$ac_exeext
17023 if ${ac_cv_search_shm_open+:} false; then :
17024 break
17025fi
17026done
17027if ${ac_cv_search_shm_open+:} false; then :
17028
17029else
17030 ac_cv_search_shm_open=no
17031fi
17032rm conftest.$ac_ext
17033LIBS=$ac_func_search_save_LIBS
17034fi
17035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17036$as_echo "$ac_cv_search_shm_open" >&6; }
17037ac_res=$ac_cv_search_shm_open
17038if test "$ac_res" != no; then :
17039 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17040
17041fi
17042
17043if test "$ac_cv_search_shm_open" = "-lrt"; then
17044
17045$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17046
17047fi
17048for ac_header in sys/mman.h
17049do :
17050 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17051if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17052 cat >>confdefs.h <<_ACEOF
17053#define HAVE_SYS_MMAN_H 1
17054_ACEOF
17055
17056fi
17057
17058done
17059
17060# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17061ac_includes_default="\
17062${ac_includes_default}
17063#ifndef __cplusplus
17064# ifdef HAVE_SYS_MMAN_H
17065# include <sys/mman.h>
17066# endif
17067#endif
17068"
17069for ac_func in shm_open shm_unlink
17070do :
17071 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17072ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17073if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17074 cat >>confdefs.h <<_ACEOF
17075#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17076_ACEOF
17077
17078fi
17079done
17080
17081# we don't want to link with librt always, restore LIBS
17082LIBS="$save_LIBS"
17083ac_includes_default="$save_includes_default"
17084
Christian Heimesff5be6e2018-01-20 13:19:21 +010017085# Check for usable OpenSSL
17086
17087 found=false
17088
17089# Check whether --with-openssl was given.
17090if test "${with_openssl+set}" = set; then :
17091 withval=$with_openssl;
17092 case "$withval" in
17093 "" | y | ye | yes | n | no)
17094 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17095 ;;
17096 *) ssldirs="$withval"
17097 ;;
17098 esac
17099
17100else
17101
17102 # if pkg-config is installed and openssl has installed a .pc file,
17103 # then use that information and don't search ssldirs
17104 if test -n "$ac_tool_prefix"; then
17105 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17106set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17108$as_echo_n "checking for $ac_word... " >&6; }
17109if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17110 $as_echo_n "(cached) " >&6
17111else
17112 if test -n "$PKG_CONFIG"; then
17113 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17114else
17115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17116for as_dir in $PATH
17117do
17118 IFS=$as_save_IFS
17119 test -z "$as_dir" && as_dir=.
17120 for ac_exec_ext in '' $ac_executable_extensions; do
17121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17122 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17124 break 2
17125 fi
17126done
17127 done
17128IFS=$as_save_IFS
17129
17130fi
17131fi
17132PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17133if test -n "$PKG_CONFIG"; then
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17135$as_echo "$PKG_CONFIG" >&6; }
17136else
17137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17138$as_echo "no" >&6; }
17139fi
17140
17141
17142fi
17143if test -z "$ac_cv_prog_PKG_CONFIG"; then
17144 ac_ct_PKG_CONFIG=$PKG_CONFIG
17145 # Extract the first word of "pkg-config", so it can be a program name with args.
17146set dummy pkg-config; ac_word=$2
17147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17148$as_echo_n "checking for $ac_word... " >&6; }
17149if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17150 $as_echo_n "(cached) " >&6
17151else
17152 if test -n "$ac_ct_PKG_CONFIG"; then
17153 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17154else
17155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17156for as_dir in $PATH
17157do
17158 IFS=$as_save_IFS
17159 test -z "$as_dir" && as_dir=.
17160 for ac_exec_ext in '' $ac_executable_extensions; do
17161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17162 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17164 break 2
17165 fi
17166done
17167 done
17168IFS=$as_save_IFS
17169
17170fi
17171fi
17172ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17173if test -n "$ac_ct_PKG_CONFIG"; then
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17175$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17176else
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17178$as_echo "no" >&6; }
17179fi
17180
17181 if test "x$ac_ct_PKG_CONFIG" = x; then
17182 PKG_CONFIG=""
17183 else
17184 case $cross_compiling:$ac_tool_warned in
17185yes:)
17186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17188ac_tool_warned=yes ;;
17189esac
17190 PKG_CONFIG=$ac_ct_PKG_CONFIG
17191 fi
17192else
17193 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17194fi
17195
17196 if test x"$PKG_CONFIG" != x""; then
17197 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17198 if test $? = 0; then
17199 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17200 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17201 found=true
17202 fi
17203 fi
17204
17205 # no such luck; use some default ssldirs
17206 if ! $found; then
17207 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17208 fi
17209
17210
17211fi
17212
17213
17214
17215 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17216 # an 'openssl' subdirectory
17217
17218 if ! $found; then
17219 OPENSSL_INCLUDES=
17220 for ssldir in $ssldirs; do
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17222$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17223 if test -f "$ssldir/include/openssl/ssl.h"; then
17224 OPENSSL_INCLUDES="-I$ssldir/include"
17225 OPENSSL_LDFLAGS="-L$ssldir/lib"
17226 OPENSSL_LIBS="-lssl -lcrypto"
17227 found=true
17228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17229$as_echo "yes" >&6; }
17230 break
17231 else
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17233$as_echo "no" >&6; }
17234 fi
17235 done
17236
17237 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17238 # it will just work!
17239 fi
17240
17241 # try the preprocessor and linker with our new flags,
17242 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17243
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17245$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17246 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17247 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17248
17249 save_LIBS="$LIBS"
17250 save_LDFLAGS="$LDFLAGS"
17251 save_CPPFLAGS="$CPPFLAGS"
17252 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17253 LIBS="$OPENSSL_LIBS $LIBS"
17254 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17256/* end confdefs.h. */
17257#include <openssl/ssl.h>
17258int
17259main ()
17260{
17261SSL_new(NULL)
17262 ;
17263 return 0;
17264}
17265_ACEOF
17266if ac_fn_c_try_link "$LINENO"; then :
17267
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17269$as_echo "yes" >&6; }
17270 have_openssl=yes
17271
17272else
17273
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17275$as_echo "no" >&6; }
17276 have_openssl=no
17277
17278fi
17279rm -f core conftest.err conftest.$ac_objext \
17280 conftest$ac_exeext conftest.$ac_ext
17281 CPPFLAGS="$save_CPPFLAGS"
17282 LDFLAGS="$save_LDFLAGS"
17283 LIBS="$save_LIBS"
17284
17285
17286
17287
17288
17289
17290if test "$have_openssl" = yes; then
17291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17292$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17293
17294 save_LIBS="$LIBS"
17295 save_LDFLAGS="$LDFLAGS"
17296 save_CPPFLAGS="$CPPFLAGS"
17297 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17298 LIBS="$OPENSSL_LIBS $LIBS"
17299 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17300
17301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302/* end confdefs.h. */
17303
17304 #include <openssl/x509_vfy.h>
17305
17306int
17307main ()
17308{
17309
17310 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17311 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17312 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17313 X509_VERIFY_PARAM_set_hostflags(p, 0);
17314
17315 ;
17316 return 0;
17317}
17318
17319_ACEOF
17320if ac_fn_c_try_link "$LINENO"; then :
17321
17322 ac_cv_has_x509_verify_param_set1_host=yes
17323
17324else
17325
17326 ac_cv_has_x509_verify_param_set1_host=no
17327
17328fi
17329rm -f core conftest.err conftest.$ac_objext \
17330 conftest$ac_exeext conftest.$ac_ext
17331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17332$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17333 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17334
17335$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17336
17337 fi
17338
17339 CPPFLAGS="$save_CPPFLAGS"
17340 LDFLAGS="$save_LDFLAGS"
17341 LIBS="$save_LIBS"
17342fi
17343
Christian Heimes892d66e2018-01-29 14:10:18 +010017344# ssl module default cipher suite string
17345
17346
17347
17348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17349$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17350
17351# Check whether --with-ssl-default-suites was given.
17352if test "${with_ssl_default_suites+set}" = set; then :
17353 withval=$with_ssl_default_suites;
17354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17355$as_echo "$withval" >&6; }
17356case "$withval" in
17357 python)
17358 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17359
17360 ;;
17361 openssl)
17362 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17363
17364 ;;
17365 *)
17366 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17367
17368 cat >>confdefs.h <<_ACEOF
17369#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17370_ACEOF
17371
17372 ;;
17373esac
17374
17375else
17376
17377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17378$as_echo "python" >&6; }
17379$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17380
17381
17382fi
17383
17384
17385
Guido van Rossum627b2d71993-12-24 10:39:16 +000017386# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017387ac_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 +000017388
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017389ac_config_files="$ac_config_files Modules/ld_so_aix"
17390
Martin v. Löwis11437992002-04-12 09:54:03 +000017391cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017392# This file is a shell script that caches the results of configure
17393# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017394# scripts and configure runs, see configure's option --config-cache.
17395# It is not useful on other systems. If it contains results you don't
17396# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017397#
Martin v. Löwis11437992002-04-12 09:54:03 +000017398# config.status only pays attention to the cache file if you give it
17399# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017400#
Skip Montanaro6dead952003-09-25 14:50:04 +000017401# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017402# loading this file, other *unset* `ac_cv_foo' will be assigned the
17403# following values.
17404
17405_ACEOF
17406
Guido van Rossumf78abae1997-01-21 22:02:36 +000017407# The following way of writing the cache mishandles newlines in values,
17408# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017410# Ultrix sh set writes to stderr and can't be redirected directly,
17411# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412(
17413 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17414 eval ac_val=\$$ac_var
17415 case $ac_val in #(
17416 *${as_nl}*)
17417 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17419$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 esac
17421 case $ac_var in #(
17422 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17424 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 esac ;;
17426 esac
17427 done
17428
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17431 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 # `set' does not quote correctly, so add quotes: double-quote
17433 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017434 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017435 "s/'/'\\\\''/g;
17436 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017438 *)
17439 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017441 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442 esac |
17443 sort
17444) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17450 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17452 :end' >>confcache
17453if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17454 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017455 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017456 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17457$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017458 if test ! -f "$cache_file" || test -h "$cache_file"; then
17459 cat confcache >"$cache_file"
17460 else
17461 case $cache_file in #(
17462 */* | ?:*)
17463 mv -f confcache "$cache_file"$$ &&
17464 mv -f "$cache_file"$$ "$cache_file" ;; #(
17465 *)
17466 mv -f confcache "$cache_file" ;;
17467 esac
17468 fi
17469 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017470 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017471 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17472$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017473 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017474fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017475rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017476
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017477test "x$prefix" = xNONE && prefix=$ac_default_prefix
17478# Let make expand exec_prefix.
17479test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017480
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017481DEFS=-DHAVE_CONFIG_H
17482
Skip Montanaro6dead952003-09-25 14:50:04 +000017483ac_libobjs=
17484ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017485U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017486for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17487 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017489 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17491 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017492 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17493 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017494done
17495LIBOBJS=$ac_libobjs
17496
17497LTLIBOBJS=$ac_ltlibobjs
17498
17499
Martin v. Löwis11437992002-04-12 09:54:03 +000017500
Matthias Kloseb9621712010-04-24 17:59:49 +000017501
Victor Stinnere0be4232011-10-25 13:06:09 +020017502: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017503ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017504ac_clean_files_save=$ac_clean_files
17505ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017506{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17507$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17508as_write_fail=0
17509cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017510#! $SHELL
17511# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017512# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017513# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017514# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017515
Martin v. Löwis11437992002-04-12 09:54:03 +000017516debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017517ac_cs_recheck=false
17518ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017519
Matthias Kloseb9621712010-04-24 17:59:49 +000017520SHELL=\${CONFIG_SHELL-$SHELL}
17521export SHELL
17522_ASEOF
17523cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17524## -------------------- ##
17525## M4sh Initialization. ##
17526## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017528# Be more Bourne compatible
17529DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017530if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 emulate sh
17532 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017534 # is contrary to our usage. Disable this feature.
17535 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017537else
Matthias Kloseb9621712010-04-24 17:59:49 +000017538 case `(set -o) 2>/dev/null` in #(
17539 *posix*) :
17540 set -o posix ;; #(
17541 *) :
17542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017544fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017545
17546
Matthias Kloseb9621712010-04-24 17:59:49 +000017547as_nl='
17548'
17549export as_nl
17550# Printing a long string crashes Solaris 7 /usr/bin/printf.
17551as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17552as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17553as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17554# Prefer a ksh shell builtin over an external printf program on Solaris,
17555# but without wasting forks for bash or zsh.
17556if test -z "$BASH_VERSION$ZSH_VERSION" \
17557 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17558 as_echo='print -r --'
17559 as_echo_n='print -rn --'
17560elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17561 as_echo='printf %s\n'
17562 as_echo_n='printf %s'
17563else
17564 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17565 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17566 as_echo_n='/usr/ucb/echo -n'
17567 else
17568 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17569 as_echo_n_body='eval
17570 arg=$1;
17571 case $arg in #(
17572 *"$as_nl"*)
17573 expr "X$arg" : "X\\(.*\\)$as_nl";
17574 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17575 esac;
17576 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17577 '
17578 export as_echo_n_body
17579 as_echo_n='sh -c $as_echo_n_body as_echo'
17580 fi
17581 export as_echo_body
17582 as_echo='sh -c $as_echo_body as_echo'
17583fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017584
17585# The user is always right.
17586if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017587 PATH_SEPARATOR=:
17588 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17589 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17590 PATH_SEPARATOR=';'
17591 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594
17595# IFS
17596# We need space, tab and new line, in precisely that order. Quoting is
17597# there to prevent editors from complaining about space-tab.
17598# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17599# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600IFS=" "" $as_nl"
17601
17602# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017603as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017604case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 *[\\/]* ) as_myself=$0 ;;
17606 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017607for as_dir in $PATH
17608do
17609 IFS=$as_save_IFS
17610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017611 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615 ;;
17616esac
17617# We did not find ourselves, most probably we were run as `sh COMMAND'
17618# in which case we are not to be found in the path.
17619if test "x$as_myself" = x; then
17620 as_myself=$0
17621fi
17622if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017623 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17624 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625fi
17626
Matthias Kloseb9621712010-04-24 17:59:49 +000017627# Unset variables that we do not need and which cause bugs (e.g. in
17628# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17629# suppresses any "Segmentation fault" message there. '((' could
17630# trigger a bug in pdksh 5.2.14.
17631for as_var in BASH_ENV ENV MAIL MAILPATH
17632do eval test x\${$as_var+set} = xset \
17633 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634done
17635PS1='$ '
17636PS2='> '
17637PS4='+ '
17638
17639# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017640LC_ALL=C
17641export LC_ALL
17642LANGUAGE=C
17643export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644
Matthias Kloseb9621712010-04-24 17:59:49 +000017645# CDPATH.
17646(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17647
17648
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017649# as_fn_error STATUS ERROR [LINENO LOG_FD]
17650# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017651# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17652# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017653# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017654as_fn_error ()
17655{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017656 as_status=$1; test $as_status -eq 0 && as_status=1
17657 if test "$4"; then
17658 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17659 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017660 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017661 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017662 as_fn_exit $as_status
17663} # as_fn_error
17664
17665
17666# as_fn_set_status STATUS
17667# -----------------------
17668# Set $? to STATUS, without forking.
17669as_fn_set_status ()
17670{
17671 return $1
17672} # as_fn_set_status
17673
17674# as_fn_exit STATUS
17675# -----------------
17676# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17677as_fn_exit ()
17678{
17679 set +e
17680 as_fn_set_status $1
17681 exit $1
17682} # as_fn_exit
17683
17684# as_fn_unset VAR
17685# ---------------
17686# Portably unset VAR.
17687as_fn_unset ()
17688{
17689 { eval $1=; unset $1;}
17690}
17691as_unset=as_fn_unset
17692# as_fn_append VAR VALUE
17693# ----------------------
17694# Append the text in VALUE to the end of the definition contained in VAR. Take
17695# advantage of any shell optimizations that allow amortized linear growth over
17696# repeated appends, instead of the typical quadratic growth present in naive
17697# implementations.
17698if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17699 eval 'as_fn_append ()
17700 {
17701 eval $1+=\$2
17702 }'
17703else
17704 as_fn_append ()
17705 {
17706 eval $1=\$$1\$2
17707 }
17708fi # as_fn_append
17709
17710# as_fn_arith ARG...
17711# ------------------
17712# Perform arithmetic evaluation on the ARGs, and store the result in the
17713# global $as_val. Take advantage of shells that can avoid forks. The arguments
17714# must be portable across $(()) and expr.
17715if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17716 eval 'as_fn_arith ()
17717 {
17718 as_val=$(( $* ))
17719 }'
17720else
17721 as_fn_arith ()
17722 {
17723 as_val=`expr "$@" || test $? -eq 1`
17724 }
17725fi # as_fn_arith
17726
17727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728if expr a : '\(a\)' >/dev/null 2>&1 &&
17729 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17730 as_expr=expr
17731else
17732 as_expr=false
17733fi
17734
17735if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17736 as_basename=basename
17737else
17738 as_basename=false
17739fi
17740
Matthias Kloseb9621712010-04-24 17:59:49 +000017741if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17742 as_dirname=dirname
17743else
17744 as_dirname=false
17745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747as_me=`$as_basename -- "$0" ||
17748$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17749 X"$0" : 'X\(//\)$' \| \
17750 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017751$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 sed '/^.*\/\([^/][^/]*\)\/*$/{
17753 s//\1/
17754 q
17755 }
17756 /^X\/\(\/\/\)$/{
17757 s//\1/
17758 q
17759 }
17760 /^X\/\(\/\).*/{
17761 s//\1/
17762 q
17763 }
17764 s/.*/./; q'`
17765
Matthias Kloseb9621712010-04-24 17:59:49 +000017766# Avoid depending upon Character Ranges.
17767as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17768as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17769as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17770as_cr_digits='0123456789'
17771as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772
17773ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017774case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 xy) ECHO_C='\c';;
17779 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17780 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 esac;;
17782*)
17783 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017785
Martin v. Löwis11437992002-04-12 09:54:03 +000017786rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787if test -d conf$$.dir; then
17788 rm -f conf$$.dir/conf$$.file
17789else
17790 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017791 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017793if (echo >conf$$.file) 2>/dev/null; then
17794 if ln -s conf$$.file conf$$ 2>/dev/null; then
17795 as_ln_s='ln -s'
17796 # ... but there are two gotchas:
17797 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17798 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017799 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017800 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017801 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017802 elif ln conf$$.file conf$$ 2>/dev/null; then
17803 as_ln_s=ln
17804 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017805 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017807else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017808 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17811rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017812
Matthias Kloseb9621712010-04-24 17:59:49 +000017813
17814# as_fn_mkdir_p
17815# -------------
17816# Create "$as_dir" as a directory, including parents if necessary.
17817as_fn_mkdir_p ()
17818{
17819
17820 case $as_dir in #(
17821 -*) as_dir=./$as_dir;;
17822 esac
17823 test -d "$as_dir" || eval $as_mkdir_p || {
17824 as_dirs=
17825 while :; do
17826 case $as_dir in #(
17827 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17828 *) as_qdir=$as_dir;;
17829 esac
17830 as_dirs="'$as_qdir' $as_dirs"
17831 as_dir=`$as_dirname -- "$as_dir" ||
17832$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17833 X"$as_dir" : 'X\(//\)[^/]' \| \
17834 X"$as_dir" : 'X\(//\)$' \| \
17835 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17836$as_echo X"$as_dir" |
17837 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17838 s//\1/
17839 q
17840 }
17841 /^X\(\/\/\)[^/].*/{
17842 s//\1/
17843 q
17844 }
17845 /^X\(\/\/\)$/{
17846 s//\1/
17847 q
17848 }
17849 /^X\(\/\).*/{
17850 s//\1/
17851 q
17852 }
17853 s/.*/./; q'`
17854 test -d "$as_dir" && break
17855 done
17856 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017857 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017858
17859
17860} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017861if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017862 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017863else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017864 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017865 as_mkdir_p=false
17866fi
17867
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017868
17869# as_fn_executable_p FILE
17870# -----------------------
17871# Test if FILE is an executable regular file.
17872as_fn_executable_p ()
17873{
17874 test -f "$1" && test -x "$1"
17875} # as_fn_executable_p
17876as_test_x='test -x'
17877as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
17879# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017880as_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 +000017881
17882# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017883as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017884
17885
Martin v. Löwis11437992002-04-12 09:54:03 +000017886exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017887## ----------------------------------- ##
17888## Main body of $CONFIG_STATUS script. ##
17889## ----------------------------------- ##
17890_ASEOF
17891test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017892
Matthias Kloseb9621712010-04-24 17:59:49 +000017893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17894# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017895# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896# values after options handling.
17897ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017898This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017899generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
17901 CONFIG_FILES = $CONFIG_FILES
17902 CONFIG_HEADERS = $CONFIG_HEADERS
17903 CONFIG_LINKS = $CONFIG_LINKS
17904 CONFIG_COMMANDS = $CONFIG_COMMANDS
17905 $ $0 $@
17906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907on `(hostname || uname -n) 2>/dev/null | sed 1q`
17908"
17909
Martin v. Löwis11437992002-04-12 09:54:03 +000017910_ACEOF
17911
Matthias Kloseb9621712010-04-24 17:59:49 +000017912case $ac_config_files in *"
17913"*) set x $ac_config_files; shift; ac_config_files=$*;;
17914esac
17915
17916case $ac_config_headers in *"
17917"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17918esac
17919
17920
17921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017922# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017923config_files="$ac_config_files"
17924config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017927
Matthias Kloseb9621712010-04-24 17:59:49 +000017928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017929ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017930\`$as_me' instantiates files and other configuration actions
17931from templates according to the current configuration. Unless the files
17932and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017933
Matthias Kloseb9621712010-04-24 17:59:49 +000017934Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017935
17936 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017938 --config print configuration, then exit
17939 -q, --quiet, --silent
17940 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 -d, --debug don't remove temporary files
17942 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017943 --file=FILE[:TEMPLATE]
17944 instantiate the configuration file FILE
17945 --header=FILE[:TEMPLATE]
17946 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017947
17948Configuration files:
17949$config_files
17950
17951Configuration headers:
17952$config_headers
17953
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017954Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17958ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017959ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017960python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017961configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017962 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017963
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017964Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017965This config.status script is free software; the Free Software Foundation
17966gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967
17968ac_pwd='$ac_pwd'
17969srcdir='$srcdir'
17970INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017971MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017972test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017973_ACEOF
17974
Matthias Kloseb9621712010-04-24 17:59:49 +000017975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17976# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017977ac_need_defaults=:
17978while test $# != 0
17979do
17980 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017981 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17983 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017984 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017986 --*=)
17987 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17988 ac_optarg=
17989 ac_shift=:
17990 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017992 ac_option=$1
17993 ac_optarg=$2
17994 ac_shift=shift
17995 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 esac
17997
Skip Montanaro6dead952003-09-25 14:50:04 +000017998 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018000 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18001 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018003 $as_echo "$ac_cs_version"; exit ;;
18004 --config | --confi | --conf | --con | --co | --c )
18005 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 debug=: ;;
18008 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018009 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 case $ac_optarg in
18011 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018012 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018013 esac
18014 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 ac_need_defaults=false;;
18016 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018017 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018018 case $ac_optarg in
18019 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18020 esac
18021 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018022 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023 --he | --h)
18024 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018025 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018026Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018028 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018029 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18030 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18031 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018032
18033 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018034 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018035Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018036
Matthias Kloseb9621712010-04-24 17:59:49 +000018037 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018039
18040 esac
18041 shift
18042done
18043
Skip Montanaro6dead952003-09-25 14:50:04 +000018044ac_configure_extra_args=
18045
18046if $ac_cs_silent; then
18047 exec 6>/dev/null
18048 ac_configure_extra_args="$ac_configure_extra_args --silent"
18049fi
18050
18051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018053if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018054 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018055 shift
18056 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18057 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018059 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018060fi
18061
Martin v. Löwis11437992002-04-12 09:54:03 +000018062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064exec 5>>config.log
18065{
18066 echo
18067 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18068## Running $as_me. ##
18069_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018070 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018076
Matthias Kloseb9621712010-04-24 17:59:49 +000018077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078
18079# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018080for ac_config_target in $ac_config_targets
18081do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 case $ac_config_target in
18083 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18084 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18085 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018086 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18087 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018089 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018090 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018091 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018092 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093
Victor Stinnere0be4232011-10-25 13:06:09 +020018094 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018095 esac
18096done
18097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098
Martin v. Löwis11437992002-04-12 09:54:03 +000018099# If the user did not use the arguments to specify the items to instantiate,
18100# then the envvar interface is used. Set only those that are not.
18101# We use the long form for the default assignment because of an extremely
18102# bizarre bug on SunOS 4.1.3.
18103if $ac_need_defaults; then
18104 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18105 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18106fi
18107
Skip Montanaro6dead952003-09-25 14:50:04 +000018108# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018110# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111# Hook for its removal unless debugging.
18112# Note that there is a small window in which the directory will not be cleaned:
18113# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018114$debug ||
18115{
Victor Stinnere0be4232011-10-25 13:06:09 +020018116 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018118 : "${ac_tmp:=$tmp}"
18119 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018121 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018122}
Martin v. Löwis11437992002-04-12 09:54:03 +000018123# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018124
Martin v. Löwis11437992002-04-12 09:54:03 +000018125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018127 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018128} ||
18129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130 tmp=./conf$$-$RANDOM
18131 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018132} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018133ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018134
Matthias Kloseb9621712010-04-24 17:59:49 +000018135# Set up the scripts for CONFIG_FILES section.
18136# No need to generate them if there are no CONFIG_FILES.
18137# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018139
Matthias Kloseb9621712010-04-24 17:59:49 +000018140
18141ac_cr=`echo X | tr X '\015'`
18142# On cygwin, bash can eat \r inside `` if the user requested igncr.
18143# But we know of no other shell where ac_cr would be empty at this
18144# point, so we can use a bashism as a fallback.
18145if test "x$ac_cr" = x; then
18146 eval ac_cr=\$\'\\r\'
18147fi
18148ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18149if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018150 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018151else
18152 ac_cs_awk_cr=$ac_cr
18153fi
18154
Victor Stinnere0be4232011-10-25 13:06:09 +020018155echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018156_ACEOF
18157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158
Matthias Kloseb9621712010-04-24 17:59:49 +000018159{
18160 echo "cat >conf$$subs.awk <<_ACEOF" &&
18161 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18162 echo "_ACEOF"
18163} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018164 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18165ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166ac_delim='%!_!# '
18167for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018168 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018169 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170
Matthias Kloseb9621712010-04-24 17:59:49 +000018171 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18172 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173 break
18174 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018175 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176 else
18177 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018178 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179done
Matthias Kloseb9621712010-04-24 17:59:49 +000018180rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181
Matthias Kloseb9621712010-04-24 17:59:49 +000018182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018183cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018185sed -n '
18186h
18187s/^/S["/; s/!.*/"]=/
18188p
18189g
18190s/^[^!]*!//
18191:repl
18192t repl
18193s/'"$ac_delim"'$//
18194t delim
18195:nl
18196h
18197s/\(.\{148\}\)..*/\1/
18198t more1
18199s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18200p
18201n
18202b repl
18203:more1
18204s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18205p
18206g
18207s/.\{148\}//
18208t nl
18209:delim
18210h
18211s/\(.\{148\}\)..*/\1/
18212t more2
18213s/["\\]/\\&/g; s/^/"/; s/$/"/
18214p
18215b
18216:more2
18217s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18218p
18219g
18220s/.\{148\}//
18221t delim
18222' <conf$$subs.awk | sed '
18223/^[^""]/{
18224 N
18225 s/\n//
18226}
18227' >>$CONFIG_STATUS || ac_write_fail=1
18228rm -f conf$$subs.awk
18229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18230_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018231cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 for (key in S) S_is_set[key] = 1
18233 FS = ""
18234
18235}
18236{
18237 line = $ 0
18238 nfields = split(line, field, "@")
18239 substed = 0
18240 len = length(field[1])
18241 for (i = 2; i < nfields; i++) {
18242 key = field[i]
18243 keylen = length(key)
18244 if (S_is_set[key]) {
18245 value = S[key]
18246 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18247 len += length(value) + length(field[++i])
18248 substed = 1
18249 } else
18250 len += 1 + keylen
18251 }
18252
18253 print line
18254}
18255
18256_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18259if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18260 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18261else
18262 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018263fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018264 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018265_ACEOF
18266
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018267# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18268# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018269# trailing colons and then remove the whole line if VPATH becomes empty
18270# (actually we leave an empty line to preserve line numbers).
18271if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018272 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18273h
18274s///
18275s/^/:/
18276s/[ ]*$/:/
18277s/:\$(srcdir):/:/g
18278s/:\${srcdir}:/:/g
18279s/:@srcdir@:/:/g
18280s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018281s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018282x
18283s/\(=[ ]*\).*/\1/
18284G
18285s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286s/^[^=]*=[ ]*$//
18287}'
18288fi
18289
Matthias Kloseb9621712010-04-24 17:59:49 +000018290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018291fi # test -n "$CONFIG_FILES"
18292
Matthias Kloseb9621712010-04-24 17:59:49 +000018293# Set up the scripts for CONFIG_HEADERS section.
18294# No need to generate them if there are no CONFIG_HEADERS.
18295# This happens for instance with `./config.status Makefile'.
18296if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018297cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018298BEGIN {
18299_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300
Matthias Kloseb9621712010-04-24 17:59:49 +000018301# Transform confdefs.h into an awk script `defines.awk', embedded as
18302# here-document in config.status, that substitutes the proper values into
18303# config.h.in to produce config.h.
18304
18305# Create a delimiter string that does not exist in confdefs.h, to ease
18306# handling of long lines.
18307ac_delim='%!_!# '
18308for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018309 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18310 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018311 break
18312 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018313 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018314 else
18315 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18316 fi
18317done
18318
18319# For the awk script, D is an array of macro values keyed by name,
18320# likewise P contains macro parameters if any. Preserve backslash
18321# newline sequences.
18322
18323ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18324sed -n '
18325s/.\{148\}/&'"$ac_delim"'/g
18326t rset
18327:rset
18328s/^[ ]*#[ ]*define[ ][ ]*/ /
18329t def
18330d
18331:def
18332s/\\$//
18333t bsnl
18334s/["\\]/\\&/g
18335s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18336D["\1"]=" \3"/p
18337s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18338d
18339:bsnl
18340s/["\\]/\\&/g
18341s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18342D["\1"]=" \3\\\\\\n"\\/p
18343t cont
18344s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18345t cont
18346d
18347:cont
18348n
18349s/.\{148\}/&'"$ac_delim"'/g
18350t clear
18351:clear
18352s/\\$//
18353t bsnlc
18354s/["\\]/\\&/g; s/^/"/; s/$/"/p
18355d
18356:bsnlc
18357s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18358b cont
18359' <confdefs.h | sed '
18360s/'"$ac_delim"'/"\\\
18361"/g' >>$CONFIG_STATUS || ac_write_fail=1
18362
18363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18364 for (key in D) D_is_set[key] = 1
18365 FS = ""
18366}
18367/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18368 line = \$ 0
18369 split(line, arg, " ")
18370 if (arg[1] == "#") {
18371 defundef = arg[2]
18372 mac1 = arg[3]
18373 } else {
18374 defundef = substr(arg[1], 2)
18375 mac1 = arg[2]
18376 }
18377 split(mac1, mac2, "(") #)
18378 macro = mac2[1]
18379 prefix = substr(line, 1, index(line, defundef) - 1)
18380 if (D_is_set[macro]) {
18381 # Preserve the white space surrounding the "#".
18382 print prefix "define", macro P[macro] D[macro]
18383 next
18384 } else {
18385 # Replace #undef with comments. This is necessary, for example,
18386 # in the case of _POSIX_SOURCE, which is predefined and required
18387 # on some systems where configure will not decide to define it.
18388 if (defundef == "undef") {
18389 print "/*", prefix defundef, macro, "*/"
18390 next
18391 }
18392 }
18393}
18394{ print }
18395_ACAWK
18396_ACEOF
18397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018398 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018399fi # test -n "$CONFIG_HEADERS"
18400
18401
18402eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18403shift
18404for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405do
18406 case $ac_tag in
18407 :[FHLC]) ac_mode=$ac_tag; continue;;
18408 esac
18409 case $ac_mode$ac_tag in
18410 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018411 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 :[FH]-) ac_tag=-:-;;
18413 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18414 esac
18415 ac_save_IFS=$IFS
18416 IFS=:
18417 set x $ac_tag
18418 IFS=$ac_save_IFS
18419 shift
18420 ac_file=$1
18421 shift
18422
18423 case $ac_mode in
18424 :L) ac_source=$1;;
18425 :[FH])
18426 ac_file_inputs=
18427 for ac_f
18428 do
18429 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018430 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431 *) # Look for the file first in the build tree, then in the source tree
18432 # (if the path is not absolute). The absolute path cannot be DOS-style,
18433 # because $ac_f cannot contain `:'.
18434 test -f "$ac_f" ||
18435 case $ac_f in
18436 [\\/$]*) false;;
18437 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18438 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018439 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018441 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18442 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443 done
18444
18445 # Let's still pretend it is `configure' which instantiates (i.e., don't
18446 # use $as_me), people would be surprised to read:
18447 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018448 configure_input='Generated from '`
18449 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18450 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 if test x"$ac_file" != x-; then
18452 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018453 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18454$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018456 # Neutralize special characters interpreted by sed in replacement strings.
18457 case $configure_input in #(
18458 *\&* | *\|* | *\\* )
18459 ac_sed_conf_input=`$as_echo "$configure_input" |
18460 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18461 *) ac_sed_conf_input=$configure_input;;
18462 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463
18464 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018465 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18466 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467 esac
18468 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 esac
18470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018472$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018473 X"$ac_file" : 'X\(//\)[^/]' \| \
18474 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018475 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018476$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18478 s//\1/
18479 q
18480 }
18481 /^X\(\/\/\)[^/].*/{
18482 s//\1/
18483 q
18484 }
18485 /^X\(\/\/\)$/{
18486 s//\1/
18487 q
18488 }
18489 /^X\(\/\).*/{
18490 s//\1/
18491 q
18492 }
18493 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018494 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 ac_builddir=.
18496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497case "$ac_dir" in
18498.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18499*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018500 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018502 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 case $ac_top_builddir_sub in
18504 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18505 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18506 esac ;;
18507esac
18508ac_abs_top_builddir=$ac_pwd
18509ac_abs_builddir=$ac_pwd$ac_dir_suffix
18510# for backward compatibility:
18511ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018512
18513case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018515 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516 ac_top_srcdir=$ac_top_builddir_sub
18517 ac_abs_top_srcdir=$ac_pwd ;;
18518 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520 ac_top_srcdir=$srcdir
18521 ac_abs_top_srcdir=$srcdir ;;
18522 *) # Relative name.
18523 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18524 ac_top_srcdir=$ac_top_build_prefix$srcdir
18525 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018526esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018528
Martin v. Löwis11437992002-04-12 09:54:03 +000018529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530 case $ac_mode in
18531 :F)
18532 #
18533 # CONFIG_FILE
18534 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018535
18536 case $INSTALL in
18537 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018538 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018539 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018540 ac_MKDIR_P=$MKDIR_P
18541 case $MKDIR_P in
18542 [\\/$]* | ?:[\\/]* ) ;;
18543 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18544 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018545_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546
Matthias Kloseb9621712010-04-24 17:59:49 +000018547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548# If the template does not know about datarootdir, expand it.
18549# FIXME: This hack should be removed a few years after 2.60.
18550ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018551ac_sed_dataroot='
18552/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018553 p
18554 q
18555}
18556/@datadir@/p
18557/@docdir@/p
18558/@infodir@/p
18559/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018560/@mandir@/p'
18561case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562*datarootdir*) ac_datarootdir_seen=yes;;
18563*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18565$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018567cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568 ac_datarootdir_hack='
18569 s&@datadir@&$datadir&g
18570 s&@docdir@&$docdir&g
18571 s&@infodir@&$infodir&g
18572 s&@localedir@&$localedir&g
18573 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018574 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575esac
18576_ACEOF
18577
18578# Neutralize VPATH when `$srcdir' = `.'.
18579# Shell code in configure.ac might set extrasub.
18580# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018581cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18582ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018583$extrasub
18584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018585cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018586:t
18587/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018588s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018590s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018591s&@srcdir@&$ac_srcdir&;t t
18592s&@abs_srcdir@&$ac_abs_srcdir&;t t
18593s&@top_srcdir@&$ac_top_srcdir&;t t
18594s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18595s&@builddir@&$ac_builddir&;t t
18596s&@abs_builddir@&$ac_abs_builddir&;t t
18597s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18598s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018599s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018601"
Victor Stinnere0be4232011-10-25 13:06:09 +020018602eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18603 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018606 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18607 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18608 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018610which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018611$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018612which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018613
Victor Stinnere0be4232011-10-25 13:06:09 +020018614 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018615 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018616 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18617 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018618 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018619 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620 ;;
18621 :H)
18622 #
18623 # CONFIG_HEADER
18624 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018626 {
18627 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018628 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18629 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018630 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018631 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018632 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18633$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018635 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018636 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018637 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 fi
18639 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018640 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018641 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018642 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018646
18647 esac
18648
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018649
18650 case $ac_file$ac_mode in
18651 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18652
18653 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654done # for ac_tag
18655
Guido van Rossum627b2d71993-12-24 10:39:16 +000018656
Matthias Kloseb9621712010-04-24 17:59:49 +000018657as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018658_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018659ac_clean_files=$ac_clean_files_save
18660
Matthias Kloseb9621712010-04-24 17:59:49 +000018661test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018662 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018663
Martin v. Löwis11437992002-04-12 09:54:03 +000018664
18665# configure is writing to config.log, and then calls config.status.
18666# config.status does its own redirection, appending to config.log.
18667# Unfortunately, on DOS this fails, as config.log is still kept open
18668# by configure, so config.status won't be able to write to it; its
18669# output is simply discarded. So we exec the FD to /dev/null,
18670# effectively closing config.log, so it can be properly (re)opened and
18671# appended to by config.status. When coming back to configure, we
18672# need to make the FD available again.
18673if test "$no_create" != yes; then
18674 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018675 ac_config_status_args=
18676 test "$silent" = yes &&
18677 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018678 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018679 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018680 exec 5>>config.log
18681 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18682 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018683 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018684fi
18685if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18687$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018688fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018689
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018690
Christian Heimes75ed8902013-11-20 01:11:18 +010018691echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018692if test ! -f Modules/Setup.local
18693then
18694 echo "# Edit this file for local setup changes" >Modules/Setup.local
18695fi
18696
Christian Heimes75ed8902013-11-20 01:11:18 +010018697echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018698$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018699 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018700 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018701mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018702
18703if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18704 echo "" >&6
18705 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018706 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 +000018707 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018708 echo "" >&6
18709 echo "" >&6
18710fi
18711