blob: 25f9de9fbbb80e3966a6547453268d2997a71812 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
684target_os
685target_vendor
686target_cpu
687target
688LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700689PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700690DEF_MAKE_RULE
691DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000693LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100694MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000695INSTALL_DATA
696INSTALL_SCRIPT
697INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200698ac_ct_READELF
699READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000700ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000703GNULD
704LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000705LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000706RUNSHARED
707INSTSONAME
708LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000709PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000710BLDLIBRARY
711DLLLIBRARY
712LDLIBRARY
713LIBRARY
714BUILDEXEEXT
715EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200716NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200717MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200718PLATFORM_TRIPLET
719MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200720ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721MAINCC
722CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700723SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200724GREP
725CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000726OBJEXT
727EXEEXT
728ac_ct_CC
729CPPFLAGS
730LDFLAGS
731CFLAGS
732CC
733EXPORT_MACOSX_DEPLOYMENT_TARGET
734CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200735_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000736MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000737FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800739FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000740FRAMEWORKALTINSTALLLAST
741FRAMEWORKALTINSTALLFIRST
742FRAMEWORKINSTALLLAST
743FRAMEWORKINSTALLFIRST
744PYTHONFRAMEWORKINSTALLDIR
745PYTHONFRAMEWORKPREFIX
746PYTHONFRAMEWORKDIR
747PYTHONFRAMEWORKIDENTIFIER
748PYTHONFRAMEWORK
749LIPO_32BIT_FLAGS
750ARCH_RUN_32BIT
751UNIVERSALSDK
752CONFIG_ARGS
753SOVERSION
754VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200755PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200756PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100757host_os
758host_vendor
759host_cpu
760host
761build_os
762build_vendor
763build_cpu
764build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500765HAS_GIT
766GITBRANCH
767GITTAG
768GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400769BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000770target_alias
771host_alias
772build_alias
773LIBS
774ECHO_T
775ECHO_N
776ECHO_C
777DEFS
778mandir
779localedir
780libdir
781psdir
782pdfdir
783dvidir
784htmldir
785infodir
786docdir
787oldincludedir
788includedir
Benjamin Petersonbed04b62019-09-09 05:13:00 -0700789runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000790localstatedir
791sharedstatedir
792sysconfdir
793datadir
794datarootdir
795libexecdir
796sbindir
797bindir
798program_transform_name
799prefix
800exec_prefix
801PACKAGE_URL
802PACKAGE_BUGREPORT
803PACKAGE_STRING
804PACKAGE_VERSION
805PACKAGE_TARNAME
806PACKAGE_NAME
807PATH_SEPARATOR
808SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000809ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000810ac_user_opts='
811enable_option_checking
812enable_universalsdk
813with_universal_archs
814with_framework_name
815enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200821with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200822with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000823enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700824with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100825with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100826with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800827with_memory_sanitizer
828with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_libs
830with_system_expat
831with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100832with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000833enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700834with_tcltk_includes
835with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000837enable_ipv6
838with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000840with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700842with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_libm
844with_libc
845enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800847with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100848with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100849with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000850'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 ac_precious_vars='build_alias
852host_alias
853target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100854MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855CC
856CFLAGS
857LDFLAGS
858LIBS
859CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800860CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700861PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800862PKG_CONFIG
863PKG_CONFIG_PATH
864PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865
Guido van Rossum627b2d71993-12-24 10:39:16 +0000866
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868ac_init_help=
869ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000870ac_unrecognized_opts=
871ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872# The variables have the same names as the options, with
873# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000874cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877no_recursion=
878prefix=NONE
879program_prefix=NONE
880program_suffix=NONE
881program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886x_includes=NONE
887x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000888
889# Installation directory options.
890# These are left unexpanded so users can "make install exec_prefix=/foo"
891# and all the variables that are supposed to be based on exec_prefix
892# by default will actually change.
893# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895bindir='${exec_prefix}/bin'
896sbindir='${exec_prefix}/sbin'
897libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898datarootdir='${prefix}/share'
899datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900sysconfdir='${prefix}/etc'
901sharedstatedir='${prefix}/com'
902localstatedir='${prefix}/var'
Benjamin Petersonbed04b62019-09-09 05:13:00 -0700903runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904includedir='${prefix}/include'
905oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
907infodir='${datarootdir}/info'
908htmldir='${docdir}'
909dvidir='${docdir}'
910pdfdir='${docdir}'
911psdir='${docdir}'
912libdir='${exec_prefix}/lib'
913localedir='${datarootdir}/locale'
914mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 # If the previous option needs an argument, assign it.
921 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 ac_prev=
924 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000925 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200928 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
929 *=) ac_optarg= ;;
930 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933 # Accept the important Cygnus configure options, so we can diagnose typos.
934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 case $ac_dashdash$ac_option in
936 --)
937 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -bindir | --bindir | --bindi | --bind | --bin | --bi)
940 ac_prev=bindir ;;
941 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 -cache-file | --cache-file | --cache-fil | --cache-fi \
950 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
951 ac_prev=cache_file ;;
952 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
953 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 cache_file=$ac_optarg ;;
955
956 --config-cache | -C)
957 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000964 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
965 | --dataroo | --dataro | --datar)
966 ac_prev=datarootdir ;;
967 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
968 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
969 datarootdir=$ac_optarg ;;
970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200975 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000976 ac_useropt_orig=$ac_useropt
977 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
978 case $ac_user_opts in
979 *"
980"enable_$ac_useropt"
981"*) ;;
982 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
983 ac_unrecognized_sep=', ';;
984 esac
985 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000986
987 -docdir | --docdir | --docdi | --doc | --do)
988 ac_prev=docdir ;;
989 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
990 docdir=$ac_optarg ;;
991
992 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
993 ac_prev=dvidir ;;
994 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
995 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001000 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001001 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001002 ac_useropt_orig=$ac_useropt
1003 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1004 case $ac_user_opts in
1005 *"
1006"enable_$ac_useropt"
1007"*) ;;
1008 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1009 ac_unrecognized_sep=', ';;
1010 esac
1011 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1014 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1015 | --exec | --exe | --ex)
1016 ac_prev=exec_prefix ;;
1017 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1018 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1019 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023 # Obsolete; use --with-gas.
1024 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 -help | --help | --hel | --he | -h)
1027 ac_init_help=long ;;
1028 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1029 ac_init_help=recursive ;;
1030 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1031 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001038 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1039 ac_prev=htmldir ;;
1040 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1041 | --ht=*)
1042 htmldir=$ac_optarg ;;
1043
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044 -includedir | --includedir | --includedi | --included | --include \
1045 | --includ | --inclu | --incl | --inc)
1046 ac_prev=includedir ;;
1047 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1048 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -infodir | --infodir | --infodi | --infod | --info | --inf)
1052 ac_prev=infodir ;;
1053 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libdir | --libdir | --libdi | --libd)
1057 ac_prev=libdir ;;
1058 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1062 | --libexe | --libex | --libe)
1063 ac_prev=libexecdir ;;
1064 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1065 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 -localedir | --localedir | --localedi | --localed | --locale)
1069 ac_prev=localedir ;;
1070 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1071 localedir=$ac_optarg ;;
1072
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075 ac_prev=localstatedir ;;
1076 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001077 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
1080 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1081 ac_prev=mandir ;;
1082 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 # Obsolete; use --without-fp.
1087 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 no_create=yes ;;
1092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1094 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1095 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1098 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1099 | --oldin | --oldi | --old | --ol | --o)
1100 ac_prev=oldincludedir ;;
1101 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1102 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1103 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1107 ac_prev=prefix ;;
1108 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1112 | --program-pre | --program-pr | --program-p)
1113 ac_prev=program_prefix ;;
1114 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1115 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1119 | --program-suf | --program-su | --program-s)
1120 ac_prev=program_suffix ;;
1121 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1122 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -program-transform-name | --program-transform-name \
1126 | --program-transform-nam | --program-transform-na \
1127 | --program-transform-n | --program-transform- \
1128 | --program-transform | --program-transfor \
1129 | --program-transfo | --program-transf \
1130 | --program-trans | --program-tran \
1131 | --progr-tra | --program-tr | --program-t)
1132 ac_prev=program_transform_name ;;
1133 -program-transform-name=* | --program-transform-name=* \
1134 | --program-transform-nam=* | --program-transform-na=* \
1135 | --program-transform-n=* | --program-transform-=* \
1136 | --program-transform=* | --program-transfor=* \
1137 | --program-transfo=* | --program-transf=* \
1138 | --program-trans=* | --program-tran=* \
1139 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001142 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1143 ac_prev=pdfdir ;;
1144 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1145 pdfdir=$ac_optarg ;;
1146
1147 -psdir | --psdir | --psdi | --psd | --ps)
1148 ac_prev=psdir ;;
1149 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1150 psdir=$ac_optarg ;;
1151
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1153 | -silent | --silent | --silen | --sile | --sil)
1154 silent=yes ;;
1155
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001156 -runstatedir | --runstatedir | --runstatedi | --runstated \
1157 | --runstate | --runstat | --runsta | --runst | --runs \
1158 | --run | --ru | --r)
1159 ac_prev=runstatedir ;;
1160 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1161 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1162 | --run=* | --ru=* | --r=*)
1163 runstatedir=$ac_optarg ;;
1164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1166 ac_prev=sbindir ;;
1167 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1168 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
1171 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1172 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1173 | --sharedst | --shareds | --shared | --share | --shar \
1174 | --sha | --sh)
1175 ac_prev=sharedstatedir ;;
1176 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1177 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1178 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1179 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 -site | --site | --sit)
1183 ac_prev=site ;;
1184 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1188 ac_prev=srcdir ;;
1189 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1193 | --syscon | --sysco | --sysc | --sys | --sy)
1194 ac_prev=sysconfdir ;;
1195 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1196 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1205 verbose=yes ;;
1206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 -version | --version | --versio | --versi | --vers | -V)
1208 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
1226 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001230 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001231 ac_useropt_orig=$ac_useropt
1232 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1233 case $ac_user_opts in
1234 *"
1235"with_$ac_useropt"
1236"*) ;;
1237 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1238 ac_unrecognized_sep=', ';;
1239 esac
1240 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242 --x)
1243 # Obsolete; use --with-x.
1244 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
1246 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1247 | --x-incl | --x-inc | --x-in | --x-i)
1248 ac_prev=x_includes ;;
1249 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1250 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252
1253 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1254 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1255 ac_prev=x_libraries ;;
1256 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1257 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1261Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ;;
1263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 *=*)
1265 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1266 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 case $ac_envvar in #(
1268 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 export $ac_envvar ;;
1273
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001274 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001279 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 ;;
1281
1282 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283done
1284
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288fi
1289
Matthias Kloseb9621712010-04-24 17:59:49 +00001290if test -n "$ac_unrecognized_opts"; then
1291 case $enable_option_checking in
1292 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1295 esac
1296fi
1297
1298# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1300 datadir sysconfdir sharedstatedir localstatedir includedir \
1301 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001302 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001305 # Remove trailing slashes.
1306 case $ac_val in
1307 */ )
1308 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1309 eval $ac_var=\$ac_val;;
1310 esac
1311 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 [\\/$]* | ?:[\\/]* ) continue;;
1314 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001316 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001317done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Martin v. Löwis11437992002-04-12 09:54:03 +00001319# There might be people who depend on the old broken behavior: `$host'
1320# used to hold the argument of --host etc.
1321# FIXME: To remove some day.
1322build=$build_alias
1323host=$host_alias
1324target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326# FIXME: To remove some day.
1327if test "x$host_alias" != x; then
1328 if test "x$build_alias" = x; then
1329 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 elif test "x$build_alias" != "x$host_alias"; then
1331 cross_compiling=yes
1332 fi
1333fi
1334
1335ac_tool_prefix=
1336test -n "$host_alias" && ac_tool_prefix=$host_alias-
1337
1338test "$silent" = yes && exec 6>/dev/null
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341ac_pwd=`pwd` && test -n "$ac_pwd" &&
1342ac_ls_di=`ls -di .` &&
1343ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001344 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001346 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347
1348
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349# Find the source files, if location was not specified.
1350if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001353 ac_confdir=`$as_dirname -- "$as_myself" ||
1354$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1355 X"$as_myself" : 'X\(//\)[^/]' \| \
1356 X"$as_myself" : 'X\(//\)$' \| \
1357 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1358$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)[^/].*/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\/\)$/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\).*/{
1372 s//\1/
1373 q
1374 }
1375 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001376 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378 srcdir=..
1379 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001380else
1381 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383if test ! -r "$srcdir/$ac_unique_file"; then
1384 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1388ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001389 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390 pwd)`
1391# When building in place, set srcdir=.
1392if test "$ac_abs_confdir" = "$ac_pwd"; then
1393 srcdir=.
1394fi
1395# Remove unnecessary trailing slashes from srcdir.
1396# Double slashes in file names in object file debugging info
1397# mess up M-x gdb in Emacs.
1398case $srcdir in
1399*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1400esac
1401for ac_var in $ac_precious_vars; do
1402 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1403 eval ac_env_${ac_var}_value=\$${ac_var}
1404 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1405 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1406done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408#
1409# Report the --help message.
1410#
1411if test "$ac_init_help" = "long"; then
1412 # Omit some internal or obsolete options to make the list less imposing.
1413 # This message is too long to be a string in the A/UX 3.1 sh.
1414 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001415\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417Usage: $0 [OPTION]... [VAR=VALUE]...
1418
1419To assign environment variables (e.g., CC, CFLAGS...), specify them as
1420VAR=VALUE. See below for descriptions of some of the useful variables.
1421
1422Defaults for the options are specified in brackets.
1423
1424Configuration:
1425 -h, --help display this help and exit
1426 --help=short display options specific to this package
1427 --help=recursive display the short help of all the included packages
1428 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001429 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 --cache-file=FILE cache test results in FILE [disabled]
1431 -C, --config-cache alias for \`--cache-file=config.cache'
1432 -n, --no-create do not create output files
1433 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1434
Martin v. Löwis11437992002-04-12 09:54:03 +00001435Installation directories:
1436 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
1441By default, \`make install' will install all the files in
1442\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1443an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1444for instance \`--prefix=\$HOME'.
1445
1446For better control, use the options below.
1447
1448Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 --bindir=DIR user executables [EPREFIX/bin]
1450 --sbindir=DIR system admin executables [EPREFIX/sbin]
1451 --libexecdir=DIR program executables [EPREFIX/libexec]
1452 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1453 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1454 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001455 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 --libdir=DIR object code libraries [EPREFIX/lib]
1457 --includedir=DIR C header files [PREFIX/include]
1458 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1459 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1460 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1461 --infodir=DIR info documentation [DATAROOTDIR/info]
1462 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1463 --mandir=DIR man documentation [DATAROOTDIR/man]
1464 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1465 --htmldir=DIR html documentation [DOCDIR]
1466 --dvidir=DIR dvi documentation [DOCDIR]
1467 --pdfdir=DIR pdf documentation [DOCDIR]
1468 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001469_ACEOF
1470
1471 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001472
1473System types:
1474 --build=BUILD configure for building on BUILD [guessed]
1475 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001476 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001477_ACEOF
1478fi
1479
1480if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001481 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001482 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001483 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 cat <<\_ACEOF
1485
1486Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1489 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001490 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001491 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --enable-framework[=INSTALLDIR]
1493 Build (MacOSX|Darwin) framework
1494 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001495 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001496 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1497 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001498 --enable-loadable-sqlite-extensions
1499 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --enable-ipv6 Enable ipv6 (with ipv4) support
1501 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001502 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001503 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
1505Optional Packages:
1506 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1507 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001508 --with-universal-archs=ARCH
1509 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001510 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1511 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001512 --with-framework-name=FRAMEWORK
1513 specify an alternate name of the framework built
1514 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-cxx-main=<compiler>
1516 compile main() and link python executable with C++
1517 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-suffix=.exe set executable suffix
1519 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001520 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001521 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001522 --with-lto Enable Link Time Optimization in any build. Disabled
1523 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001524 --with-hash-algorithm=[fnv|siphash24]
1525 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001526 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001527 enable AddressSanitizer (asan)
1528 --with-memory-sanitizer enable MemorySanitizer (msan)
1529 --with-undefined-behavior-sanitizer
1530 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001532 --with-system-expat build pyexpat module using an installed expat
1533 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001534 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001535 --with-system-libmpdec build _decimal module using an installed libmpdec
1536 library
Ned Deilyd819b932013-09-06 01:07:05 -07001537 --with-tcltk-includes='-I...'
1538 override search for Tcl and Tk include files
1539 --with-tcltk-libs='-L...'
1540 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001541 --with-dbmliborder=db1:db2:...
1542 order to check db backends for dbm. Valid value is a
1543 colon separated string with the backend names
1544 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001545 --with(out)-doc-strings disable/enable documentation strings
1546 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001547 --with(out)-c-locale-coercion
1548 disable/enable C locale coercion to a UTF-8 based
1549 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001550 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001551 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001552 --with-libm=STRING math library
1553 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001554 --with(out)-computed-gotos
1555 Use computed gotos in evaluation loop (enabled by
1556 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001557 --with(out)-ensurepip=[=upgrade]
1558 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001559 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001560 --with-ssl-default-suites=[python|openssl|STRING]
1561 Override default cipher suites string, python: use
1562 Python's preferred selection (default), openssl:
1563 leave OpenSSL's defaults untouched, STRING: use a
1564 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001567 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 CC C compiler command
1569 CFLAGS C compiler flags
1570 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1571 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001573 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001576 PROFILE_TASK
1577 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001578 PKG_CONFIG path to pkg-config utility
1579 PKG_CONFIG_PATH
1580 directories to add to pkg-config's search path
1581 PKG_CONFIG_LIBDIR
1582 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001583
1584Use these variables to override the choices made by `configure' or to help
1585it to find libraries and programs with nonstandard names/locations.
1586
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001587Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001590fi
1591
1592if test "$ac_init_help" = "recursive"; then
1593 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 test -d "$ac_dir" ||
1596 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1597 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_builddir=.
1599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600case "$ac_dir" in
1601.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1602*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001603 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 case $ac_top_builddir_sub in
1607 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1608 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1609 esac ;;
1610esac
1611ac_abs_top_builddir=$ac_pwd
1612ac_abs_builddir=$ac_pwd$ac_dir_suffix
1613# for backward compatibility:
1614ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
1616case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 ac_top_srcdir=$ac_top_builddir_sub
1620 ac_abs_top_srcdir=$ac_pwd ;;
1621 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001622 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 ac_top_srcdir=$srcdir
1624 ac_abs_top_srcdir=$srcdir ;;
1625 *) # Relative name.
1626 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1627 ac_top_srcdir=$ac_top_build_prefix$srcdir
1628 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001629esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632 cd "$ac_dir" || { ac_status=$?; continue; }
1633 # Check for guested configure.
1634 if test -f "$ac_srcdir/configure.gnu"; then
1635 echo &&
1636 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1637 elif test -f "$ac_srcdir/configure"; then
1638 echo &&
1639 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 fi || ac_status=$?
1643 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 done
1645fi
1646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001647test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001648if $ac_init_version; then
1649 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001650python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001651generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001653Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001654This configure script is free software; the Free Software Foundation
1655gives unlimited permission to copy, distribute and modify it.
1656_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001659
1660## ------------------------ ##
1661## Autoconf initialization. ##
1662## ------------------------ ##
1663
1664# ac_fn_c_try_compile LINENO
1665# --------------------------
1666# Try to compile conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_compile ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 rm -f conftest.$ac_objext
1671 if { { ac_try="$ac_compile"
1672case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675esac
1676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677$as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_compile") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } && {
1687 test -z "$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 } && test -s conftest.$ac_objext; then :
1690 ac_retval=0
1691else
1692 $as_echo "$as_me: failed program was:" >&5
1693sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=1
1696fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001698 as_fn_set_status $ac_retval
1699
1700} # ac_fn_c_try_compile
1701
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001702# ac_fn_c_try_cpp LINENO
1703# ----------------------
1704# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1705ac_fn_c_try_cpp ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 if { { ac_try="$ac_cpp conftest.$ac_ext"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1716 ac_status=$?
1717 if test -s conftest.err; then
1718 grep -v '^ *+' conftest.err >conftest.er1
1719 cat conftest.er1 >&5
1720 mv -f conftest.er1 conftest.err
1721 fi
1722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723 test $ac_status = 0; } > conftest.i && {
1724 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1725 test ! -s conftest.err
1726 }; then :
1727 ac_retval=0
1728else
1729 $as_echo "$as_me: failed program was:" >&5
1730sed 's/^/| /' conftest.$ac_ext >&5
1731
1732 ac_retval=1
1733fi
1734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1735 as_fn_set_status $ac_retval
1736
1737} # ac_fn_c_try_cpp
1738
Matthias Kloseb9621712010-04-24 17:59:49 +00001739# ac_fn_c_try_link LINENO
1740# -----------------------
1741# Try to link conftest.$ac_ext, and return whether this succeeded.
1742ac_fn_c_try_link ()
1743{
1744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745 rm -f conftest.$ac_objext conftest$ac_exeext
1746 if { { ac_try="$ac_link"
1747case "(($ac_try" in
1748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749 *) ac_try_echo=$ac_try;;
1750esac
1751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752$as_echo "$ac_try_echo"; } >&5
1753 (eval "$ac_link") 2>conftest.err
1754 ac_status=$?
1755 if test -s conftest.err; then
1756 grep -v '^ *+' conftest.err >conftest.er1
1757 cat conftest.er1 >&5
1758 mv -f conftest.er1 conftest.err
1759 fi
1760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761 test $ac_status = 0; } && {
1762 test -z "$ac_c_werror_flag" ||
1763 test ! -s conftest.err
1764 } && test -s conftest$ac_exeext && {
1765 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001766 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 }; then :
1768 ac_retval=0
1769else
1770 $as_echo "$as_me: failed program was:" >&5
1771sed 's/^/| /' conftest.$ac_ext >&5
1772
1773 ac_retval=1
1774fi
1775 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1776 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1777 # interfere with the next link command; also delete a directory that is
1778 # left behind by Apple's compiler. We do this before executing the actions.
1779 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001780 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 as_fn_set_status $ac_retval
1782
1783} # ac_fn_c_try_link
1784
Matthias Kloseb9621712010-04-24 17:59:49 +00001785# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1786# -------------------------------------------------------
1787# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1788# the include files in INCLUDES and setting the cache variable VAR
1789# accordingly.
1790ac_fn_c_check_header_mongrel ()
1791{
1792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001793 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1795$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001796if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001797 $as_echo_n "(cached) " >&6
1798fi
1799eval ac_res=\$$3
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1801$as_echo "$ac_res" >&6; }
1802else
1803 # Is the header compilable?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1805$as_echo_n "checking $2 usability... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_compile "$LINENO"; then :
1812 ac_header_compiler=yes
1813else
1814 ac_header_compiler=no
1815fi
1816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1818$as_echo "$ac_header_compiler" >&6; }
1819
1820# Is the header present?
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1822$as_echo_n "checking $2 presence... " >&6; }
1823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825#include <$2>
1826_ACEOF
1827if ac_fn_c_try_cpp "$LINENO"; then :
1828 ac_header_preproc=yes
1829else
1830 ac_header_preproc=no
1831fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001832rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1834$as_echo "$ac_header_preproc" >&6; }
1835
1836# So? What about this header?
1837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1838 yes:no: )
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1840$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1842$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1843 ;;
1844 no:yes:* )
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1846$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1848$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1850$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1852$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001855( $as_echo "## --------------------------------------- ##
1856## Report this to https://bugs.python.org/ ##
1857## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001858 ) | sed "s/^/$as_me: WARNING: /" >&2
1859 ;;
1860esac
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1862$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001863if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001864 $as_echo_n "(cached) " >&6
1865else
1866 eval "$3=\$ac_header_compiler"
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
1871fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001873
1874} # ac_fn_c_check_header_mongrel
1875
1876# ac_fn_c_try_run LINENO
1877# ----------------------
1878# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1879# that executables *can* be run.
1880ac_fn_c_try_run ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 if { { ac_try="$ac_link"
1884case "(($ac_try" in
1885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1886 *) ac_try_echo=$ac_try;;
1887esac
1888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1889$as_echo "$ac_try_echo"; } >&5
1890 (eval "$ac_link") 2>&5
1891 ac_status=$?
1892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1893 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1894 { { case "(($ac_try" in
1895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1896 *) ac_try_echo=$ac_try;;
1897esac
1898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1899$as_echo "$ac_try_echo"; } >&5
1900 (eval "$ac_try") 2>&5
1901 ac_status=$?
1902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1903 test $ac_status = 0; }; }; then :
1904 ac_retval=0
1905else
1906 $as_echo "$as_me: program exited with status $ac_status" >&5
1907 $as_echo "$as_me: failed program was:" >&5
1908sed 's/^/| /' conftest.$ac_ext >&5
1909
1910 ac_retval=$ac_status
1911fi
1912 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001913 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001914 as_fn_set_status $ac_retval
1915
1916} # ac_fn_c_try_run
1917
1918# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1919# -------------------------------------------------------
1920# Tests whether HEADER exists and can be compiled using the include files in
1921# INCLUDES, setting the cache variable VAR accordingly.
1922ac_fn_c_check_header_compile ()
1923{
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001927if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 $as_echo_n "(cached) " >&6
1929else
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$4
1933#include <$2>
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 eval "$3=yes"
1937else
1938 eval "$3=no"
1939fi
1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1941fi
1942eval ac_res=\$$3
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1944$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001945 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001946
1947} # ac_fn_c_check_header_compile
1948
Matthias Kloseb9621712010-04-24 17:59:49 +00001949# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1950# -------------------------------------------
1951# Tests whether TYPE exists after having included INCLUDES, setting cache
1952# variable VAR accordingly.
1953ac_fn_c_check_type ()
1954{
1955 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1957$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001958if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 $as_echo_n "(cached) " >&6
1960else
1961 eval "$3=no"
1962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$4
1965int
1966main ()
1967{
1968if (sizeof ($2))
1969 return 0;
1970 ;
1971 return 0;
1972}
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
1979main ()
1980{
1981if (sizeof (($2)))
1982 return 0;
1983 ;
1984 return 0;
1985}
1986_ACEOF
1987if ac_fn_c_try_compile "$LINENO"; then :
1988
1989else
1990 eval "$3=yes"
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993fi
1994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1995fi
1996eval ac_res=\$$3
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001999 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002000
2001} # ac_fn_c_check_type
2002
Matthias Kloseb9621712010-04-24 17:59:49 +00002003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_lo=0 ac_mid=0
2029 while :; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=$ac_mid; break
2046else
2047 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2048 if test $ac_lo -le $ac_mid; then
2049 ac_lo= ac_hi=
2050 break
2051 fi
2052 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055 done
2056else
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=-1 ac_mid=-1
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002081test_array [0] = 0;
2082return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_lo=$ac_mid; break
2090else
2091 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2092 if test $ac_mid -le $ac_hi; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
2100else
2101 ac_lo= ac_hi=
2102fi
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106# Binary search between lo and hi bounds.
2107while test "x$ac_lo" != "x$ac_hi"; do
2108 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002116test_array [0] = 0;
2117return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_hi=$ac_mid
2125else
2126 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129done
2130case $ac_lo in #((
2131?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2132'') ac_retval=1 ;;
2133esac
2134 else
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138static long int longval () { return $2; }
2139static unsigned long int ulongval () { return $2; }
2140#include <stdio.h>
2141#include <stdlib.h>
2142int
2143main ()
2144{
2145
2146 FILE *f = fopen ("conftest.val", "w");
2147 if (! f)
2148 return 1;
2149 if (($2) < 0)
2150 {
2151 long int i = longval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%ld", i);
2155 }
2156 else
2157 {
2158 unsigned long int i = ulongval ();
2159 if (i != ($2))
2160 return 1;
2161 fprintf (f, "%lu", i);
2162 }
2163 /* Do not output a trailing newline, as this causes \r\n confusion
2164 on some platforms. */
2165 return ferror (f) || fclose (f) != 0;
2166
2167 ;
2168 return 0;
2169}
2170_ACEOF
2171if ac_fn_c_try_run "$LINENO"; then :
2172 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2173else
2174 ac_retval=1
2175fi
2176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2177 conftest.$ac_objext conftest.beam conftest.$ac_ext
2178rm -f conftest.val
2179
2180 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002181 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002182 as_fn_set_status $ac_retval
2183
2184} # ac_fn_c_compute_int
2185
2186# ac_fn_c_check_func LINENO FUNC VAR
2187# ----------------------------------
2188# Tests whether FUNC exists, setting the cache variable VAR accordingly
2189ac_fn_c_check_func ()
2190{
2191 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002194if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002195 $as_echo_n "(cached) " >&6
2196else
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2201#define $2 innocuous_$2
2202
2203/* System header to define __stub macros and hopefully few prototypes,
2204 which can conflict with char $2 (); below.
2205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2206 <limits.h> exists even on freestanding compilers. */
2207
2208#ifdef __STDC__
2209# include <limits.h>
2210#else
2211# include <assert.h>
2212#endif
2213
2214#undef $2
2215
2216/* Override any GCC internal prototype to avoid an error.
2217 Use char because int might match the return type of a GCC
2218 builtin and then its argument prototype would still apply. */
2219#ifdef __cplusplus
2220extern "C"
2221#endif
2222char $2 ();
2223/* The GNU C library defines this for functions which it implements
2224 to always fail with ENOSYS. Some functions are actually named
2225 something starting with __ and the normal name is an alias. */
2226#if defined __stub_$2 || defined __stub___$2
2227choke me
2228#endif
2229
2230int
2231main ()
2232{
2233return $2 ();
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_link "$LINENO"; then :
2239 eval "$3=yes"
2240else
2241 eval "$3=no"
2242fi
2243rm -f core conftest.err conftest.$ac_objext \
2244 conftest$ac_exeext conftest.$ac_ext
2245fi
2246eval ac_res=\$$3
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2248$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002250
2251} # ac_fn_c_check_func
2252
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002253# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2254# ---------------------------------------------
2255# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2256# accordingly.
2257ac_fn_c_check_decl ()
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 as_decl_name=`echo $2|sed 's/ *(.*//'`
2261 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2263$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2264if eval \${$3+:} false; then :
2265 $as_echo_n "(cached) " >&6
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$4
2270int
2271main ()
2272{
2273#ifndef $as_decl_name
2274#ifdef __cplusplus
2275 (void) $as_decl_use;
2276#else
2277 (void) $as_decl_name;
2278#endif
2279#endif
2280
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 eval "$3=yes"
2287else
2288 eval "$3=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
2295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2296
2297} # ac_fn_c_check_decl
2298
Matthias Kloseb9621712010-04-24 17:59:49 +00002299# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2300# ----------------------------------------------------
2301# Tries to find if the field MEMBER exists in type AGGR, after including
2302# INCLUDES, setting cache variable VAR accordingly.
2303ac_fn_c_check_member ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2307$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002308if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (sizeof ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 eval "$4=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348fi
2349eval ac_res=\$$4
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002353
2354} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002356This file contains any messages produced by compilers while
2357running configure, to aid debugging if configure makes a mistake.
2358
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002359It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002360generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
2362 $ $0 $@
2363
2364_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002366{
2367cat <<_ASUNAME
2368## --------- ##
2369## Platform. ##
2370## --------- ##
2371
2372hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2373uname -m = `(uname -m) 2>/dev/null || echo unknown`
2374uname -r = `(uname -r) 2>/dev/null || echo unknown`
2375uname -s = `(uname -s) 2>/dev/null || echo unknown`
2376uname -v = `(uname -v) 2>/dev/null || echo unknown`
2377
2378/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2379/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2380
2381/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2382/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2383/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002385/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2386/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2387/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2388
2389_ASUNAME
2390
2391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2392for as_dir in $PATH
2393do
2394 IFS=$as_save_IFS
2395 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 $as_echo "PATH: $as_dir"
2397 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002399
2400} >&5
2401
2402cat >&5 <<_ACEOF
2403
2404
2405## ----------- ##
2406## Core tests. ##
2407## ----------- ##
2408
2409_ACEOF
2410
2411
2412# Keep a trace of the command line.
2413# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002414# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002415# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002416# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002417ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002418ac_configure_args0=
2419ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002420ac_must_keep_next=false
2421for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002422do
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 for ac_arg
2424 do
2425 case $ac_arg in
2426 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2427 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2428 | -silent | --silent | --silen | --sile | --sil)
2429 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 esac
2433 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002438 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002440 case $ac_arg in
2441 *=* | --config-cache | -C | -disable-* | --disable-* \
2442 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2443 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2444 | -with-* | --with-* | -without-* | --without-* | --x)
2445 case "$ac_configure_args0 " in
2446 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2447 esac
2448 ;;
2449 -* ) ac_must_keep_next=true ;;
2450 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 ;;
2454 esac
2455 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002456done
Matthias Kloseb9621712010-04-24 17:59:49 +00002457{ ac_configure_args0=; unset ac_configure_args0;}
2458{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002459
2460# When interrupted or exit'd, cleanup temporary files, and complete
2461# config.log. We remove comments because anyway the quotes in there
2462# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463# WARNING: Use '\'' to represent an apostrophe within the trap.
2464# 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 +00002465trap 'exit_status=$?
2466 # Save into config.log some information that might help in debugging.
2467 {
2468 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002469
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002470 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002471## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002472## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 echo
2474 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475(
2476 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2477 eval ac_val=\$$ac_var
2478 case $ac_val in #(
2479 *${as_nl}*)
2480 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2482$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac
2484 case $ac_var in #(
2485 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2487 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac ;;
2489 esac
2490 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2493 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 "s/'\''/'\''\\\\'\'''\''/g;
2496 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2497 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002498 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002500 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac |
2502 sort
2503)
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002505
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002507## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_vars
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519
2520 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 echo
2525 for ac_var in $ac_subst_files
2526 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 eval ac_val=\$$ac_var
2528 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 done | sort
2533 echo
2534 fi
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002538## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002539## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 echo
2543 fi
2544 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 $as_echo "$as_me: caught signal $ac_signal"
2546 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 rm -f core *.core core.conftest.* &&
2549 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002552for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002554done
2555ac_signal=0
2556
2557# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002559
Matthias Kloseb9621712010-04-24 17:59:49 +00002560$as_echo "/* confdefs.h */" > confdefs.h
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562# Predefined preprocessor variables.
2563
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_NAME "$PACKAGE_NAME"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_VERSION "$PACKAGE_VERSION"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_STRING "$PACKAGE_STRING"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2582_ACEOF
2583
Matthias Kloseb9621712010-04-24 17:59:49 +00002584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_URL "$PACKAGE_URL"
2586_ACEOF
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588
2589# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002590# Prefer an explicitly selected file to automatically selected ones.
2591ac_site_file1=NONE
2592ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594 # We do not want a PATH search for config.site.
2595 case $CONFIG_SITE in #((
2596 -*) ac_site_file1=./$CONFIG_SITE;;
2597 */*) ac_site_file1=$CONFIG_SITE;;
2598 *) ac_site_file1=./$CONFIG_SITE;;
2599 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 ac_site_file1=$prefix/share/config.site
2602 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603else
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 ac_site_file1=$ac_default_prefix/share/config.site
2605 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002607for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608do
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 test "x$ac_site_file" = xNONE && continue
2610 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2612$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614 . "$ac_site_file" \
2615 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2617as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002618See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619 fi
2620done
2621
2622if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 # Some versions of bash will fail to source /dev/null (special files
2624 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2625 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2627$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2630 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 esac
2632 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633else
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2635$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 >$cache_file
2637fi
2638
2639# Check that the precious variables saved in the cache have kept the same
2640# value.
2641ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2644 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2646 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 case $ac_old_set,$ac_new_set in
2648 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2650$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 +00002651 ac_cache_corrupted=: ;;
2652 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2654$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 ac_cache_corrupted=: ;;
2656 ,);;
2657 *)
2658 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 # differences in whitespace do not lead to failure.
2660 ac_old_val_w=`echo x $ac_old_val`
2661 ac_new_val_w=`echo x $ac_new_val`
2662 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2664$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2665 ac_cache_corrupted=:
2666 else
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2668$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2669 eval $ac_var=\$ac_old_val
2670 fi
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2672$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2674$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 fi;;
2676 esac
2677 # Pass precious variables to config.status.
2678 if test "$ac_new_set" = set; then
2679 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 *) ac_arg=$ac_var=$ac_new_val ;;
2682 esac
2683 case " $ac_configure_args " in
2684 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
2688done
2689if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2693$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002694 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002696## -------------------- ##
2697## Main body of script. ##
2698## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699
Guido van Rossum7f43da71994-08-01 12:15:30 +00002700ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002702ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2703ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2704ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705
Guido van Rossum627b2d71993-12-24 10:39:16 +00002706
Michael W. Hudson54241132001-12-07 15:38:26 +00002707
Trent Nelson4d4ec652012-10-16 08:51:24 -04002708
Christian Heimesff5be6e2018-01-20 13:19:21 +01002709
2710
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002711if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002712 # If we're building out-of-tree, we need to make sure the following
2713 # resources get picked up before their $srcdir counterparts.
2714 # Objects/ -> typeslots.inc
2715 # Include/ -> Python-ast.h, graminit.h
2716 # Python/ -> importlib.h
2717 # (A side effect of this is that these resources will automatically be
2718 # regenerated when building out-of-tree, regardless of whether or not
2719 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2720 # off.)
2721 BASECPPFLAGS="-IObjects -IInclude -IPython"
2722else
2723 BASECPPFLAGS=""
2724fi
2725
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726
2727
2728
2729
Victor Stinner9ed34a82017-05-02 22:35:58 +02002730if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732# Extract the first word of "git", so it can be a program name with args.
2733set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2735$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737 $as_echo_n "(cached) " >&6
2738else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 if test -n "$HAS_GIT"; then
2740 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741else
2742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2743for as_dir in $PATH
2744do
2745 IFS=$as_save_IFS
2746 test -z "$as_dir" && as_dir=.
2747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2751 break 2
2752 fi
2753done
2754 done
2755IFS=$as_save_IFS
2756
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758fi
2759fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760HAS_GIT=$ac_cv_prog_HAS_GIT
2761if test -n "$HAS_GIT"; then
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2763$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764else
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2766$as_echo "no" >&6; }
2767fi
2768
2769
2770else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002771HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002772fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002773if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774then
Xiang Zhang4c855572018-08-20 22:36:19 +08002775 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2776 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2777 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002778else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002779 GITVERSION=""
2780 GITTAG=""
2781 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002782fi
2783
2784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002785ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002786
2787
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002788ac_aux_dir=
2789for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2790 if test -f "$ac_dir/install-sh"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/install-sh -c"
2793 break
2794 elif test -f "$ac_dir/install.sh"; then
2795 ac_aux_dir=$ac_dir
2796 ac_install_sh="$ac_aux_dir/install.sh -c"
2797 break
2798 elif test -f "$ac_dir/shtool"; then
2799 ac_aux_dir=$ac_dir
2800 ac_install_sh="$ac_aux_dir/shtool install -c"
2801 break
2802 fi
2803done
2804if test -z "$ac_aux_dir"; then
2805 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2806fi
2807
2808# These three variables are undocumented and unsupported,
2809# and are intended to be withdrawn in a future Autoconf release.
2810# They can cause serious problems if a builder's source tree is in a directory
2811# whose full name contains unusual characters.
2812ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2813ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2814ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2815
2816
2817# Make sure we can run config.sub.
2818$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2819 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2820
2821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2822$as_echo_n "checking build system type... " >&6; }
2823if ${ac_cv_build+:} false; then :
2824 $as_echo_n "(cached) " >&6
2825else
2826 ac_build_alias=$build_alias
2827test "x$ac_build_alias" = x &&
2828 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2829test "x$ac_build_alias" = x &&
2830 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2831ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2832 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2833
2834fi
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2836$as_echo "$ac_cv_build" >&6; }
2837case $ac_cv_build in
2838*-*-*) ;;
2839*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2840esac
2841build=$ac_cv_build
2842ac_save_IFS=$IFS; IFS='-'
2843set x $ac_cv_build
2844shift
2845build_cpu=$1
2846build_vendor=$2
2847shift; shift
2848# Remember, the first character of IFS is used to create $*,
2849# except with old shells:
2850build_os=$*
2851IFS=$ac_save_IFS
2852case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2853
2854
2855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2856$as_echo_n "checking host system type... " >&6; }
2857if ${ac_cv_host+:} false; then :
2858 $as_echo_n "(cached) " >&6
2859else
2860 if test "x$host_alias" = x; then
2861 ac_cv_host=$ac_cv_build
2862else
2863 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2864 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2865fi
2866
2867fi
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2869$as_echo "$ac_cv_host" >&6; }
2870case $ac_cv_host in
2871*-*-*) ;;
2872*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2873esac
2874host=$ac_cv_host
2875ac_save_IFS=$IFS; IFS='-'
2876set x $ac_cv_host
2877shift
2878host_cpu=$1
2879host_vendor=$2
2880shift; shift
2881# Remember, the first character of IFS is used to create $*,
2882# except with old shells:
2883host_os=$*
2884IFS=$ac_save_IFS
2885case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2886
2887
2888
doko@python.orga10e4a92013-01-25 18:45:12 +01002889
2890
Ned Deilyfcbc2462014-08-22 13:32:49 -07002891# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2892rm -f pybuilddir.txt
2893
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894for ac_prog in python$PACKAGE_VERSION python3 python
2895do
2896 # Extract the first word of "$ac_prog", so it can be a program name with args.
2897set dummy $ac_prog; ac_word=$2
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2899$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002900if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002901 $as_echo_n "(cached) " >&6
2902else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002903 if test -n "$PYTHON_FOR_REGEN"; then
2904 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002905else
2906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2907for as_dir in $PATH
2908do
2909 IFS=$as_save_IFS
2910 test -z "$as_dir" && as_dir=.
2911 for ac_exec_ext in '' $ac_executable_extensions; do
2912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2915 break 2
2916 fi
2917done
2918 done
2919IFS=$as_save_IFS
2920
2921fi
2922fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002923PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2924if test -n "$PYTHON_FOR_REGEN"; then
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2926$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927else
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2929$as_echo "no" >&6; }
2930fi
2931
2932
Victor Stinnera5c62a82017-05-03 18:21:48 +02002933 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002934done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002935test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002936
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002937
2938
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002939if test "$cross_compiling" = yes; then
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2941$as_echo_n "checking for python interpreter for cross build... " >&6; }
2942 if test -z "$PYTHON_FOR_BUILD"; then
2943 for interp in python$PACKAGE_VERSION python3 python; do
2944 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002945 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 +02002946 break
2947 fi
2948 interp=
2949 done
2950 if test x$interp = x; then
2951 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2952 fi
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2954$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002955 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 +02002956 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002957elif test "$cross_compiling" = maybe; then
2958 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002959else
2960 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2961fi
2962
2963
Martin v. Löwis11437992002-04-12 09:54:03 +00002964
Benjamin Petersond23f8222009-04-05 19:13:16 +00002965if test "$prefix" != "/"; then
2966 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2967fi
2968
2969
Martin v. Löwis11437992002-04-12 09:54:03 +00002970
2971
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002972# We don't use PACKAGE_ variables, and they cause conflicts
2973# with other autoconf-based packages that include Python.h
2974grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2975rm confdefs.h
2976mv confdefs.h.new confdefs.h
2977
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002978
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002979VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002980
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002981# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002982
2983SOVERSION=1.0
2984
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002985# The later defininition of _XOPEN_SOURCE disables certain features
2986# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002989
2990
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002996
2997
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2999# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3000# them.
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003003
3004
Martin v. Löwisd6320502004-08-12 13:45:08 +00003005# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3007# them.
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003010
3011
3012
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003013define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003015# Arguments passed to configure.
3016
3017CONFIG_ARGS="$ac_configure_args"
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3020$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003022if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003023 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 case $enableval in
3025 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003026 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003027 # information
3028 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003029 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003031 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3032 if test ! -d "${enableval}"
3033 then
3034 enableval=/
3035 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
3039 case $enableval in
3040 no)
3041 UNIVERSALSDK=
3042 enable_universalsdk=
3043 ;;
3044 *)
3045 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 if test ! -d "${UNIVERSALSDK}"
3047 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003048 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 ;;
3051 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054else
3055
3056 UNIVERSALSDK=
3057 enable_universalsdk=
3058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061if test -n "${UNIVERSALSDK}"
3062then
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3064$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065else
Matthias Kloseb9621712010-04-24 17:59:49 +00003066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3067$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deily87adb6e2013-10-18 21:09:56 -07003072ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003073
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074# For backward compatibility reasons we prefer to select '32-bit' if available,
3075# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077if test "`uname -s`" = "Darwin"
3078then
3079 if test -n "${UNIVERSALSDK}"
3080 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003081 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003082 then
3083 UNIVERSAL_ARCHS="intel"
3084 fi
3085 fi
3086fi
3087
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3090$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
3092# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003093if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095 UNIVERSAL_ARCHS="$withval"
3096
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097fi
3098
Ned Deily87adb6e2013-10-18 21:09:56 -07003099if test -n "${UNIVERSALSDK}"
3100then
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3102$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3103else
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105$as_echo "no" >&6; }
3106fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003107
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108
3109# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003111 withval=$with_framework_name;
3112 PYTHONFRAMEWORK=${withval}
3113 PYTHONFRAMEWORKDIR=${withval}.framework
3114 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3115
3116else
3117
3118 PYTHONFRAMEWORK=Python
3119 PYTHONFRAMEWORKDIR=Python.framework
3120 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3121
3122fi
3123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003125if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003127 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003128 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003129 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 esac
3131 case $enableval in
3132 no)
3133 PYTHONFRAMEWORK=
3134 PYTHONFRAMEWORKDIR=no-framework
3135 PYTHONFRAMEWORKPREFIX=
3136 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137 FRAMEWORKINSTALLFIRST=
3138 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 FRAMEWORKALTINSTALLFIRST=
3140 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003141 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 if test "x${prefix}" = "xNONE"; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003148 ;;
3149 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003151 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003152 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003153 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003154 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3155 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003156 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 if test "x${prefix}" = "xNONE" ; then
3160 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003161
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 else
3163 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3164 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003165
3166 case "${enableval}" in
3167 /System*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 if test "${prefix}" = "NONE" ; then
3170 # See below
3171 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3172 fi
3173 ;;
3174
3175 /Library*)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178
3179 */Library/Frameworks)
3180 MDIR="`dirname "${enableval}"`"
3181 MDIR="`dirname "${MDIR}"`"
3182 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3183
3184 if test "${prefix}" = "NONE"; then
3185 # User hasn't specified the
3186 # --prefix option, but wants to install
3187 # the framework in a non-default location,
3188 # ensure that the compatibility links get
3189 # installed relative to that prefix as well
3190 # instead of in /usr/local.
3191 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3192 fi
3193 ;;
3194
3195 *)
3196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3197 ;;
3198 esac
3199
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003202 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003208 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3209
3210 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3211
Jack Jansene578a632001-08-15 01:27:14 +00003212 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Guido van Rossum563e7081996-09-10 18:20:48 +00003214else
Martin v. Löwis11437992002-04-12 09:54:03 +00003215
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003218 PYTHONFRAMEWORKPREFIX=
3219 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220 FRAMEWORKINSTALLFIRST=
3221 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 FRAMEWORKALTINSTALLFIRST=
3223 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003224 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225 if test "x${prefix}" = "xNONE" ; then
3226 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3227 else
3228 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3229 fi
Jack Jansene578a632001-08-15 01:27:14 +00003230 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233fi
3234
Thomas Wouters477c8d52006-05-27 19:21:47 +00003235
3236
Michael W. Hudson54241132001-12-07 15:38:26 +00003237
3238
3239
3240
Jack Jansene578a632001-08-15 01:27:14 +00003241
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242
3243
3244
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003245
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003246
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003248
3249cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003250#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003251_ACEOF
3252
3253
Jack Jansene578a632001-08-15 01:27:14 +00003254##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003255## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003256## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003257##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258# Set name for machine-dependent library files
3259
Matthias Kloseb9621712010-04-24 17:59:49 +00003260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3261$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262if test -z "$MACHDEP"
3263then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 # avoid using uname for cross builds
3265 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003266 # ac_sys_system and ac_sys_release are used for setting
3267 # a lot of different things including 'define_xopen_source'
3268 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003269 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003270 *-*-linux-android*)
3271 ac_sys_system=Linux-android
3272 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 *-*-linux*)
3274 ac_sys_system=Linux
3275 ;;
3276 *-*-cygwin*)
3277 ac_sys_system=Cygwin
3278 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003279 *-*-vxworks*)
3280 ac_sys_system=VxWorks
3281 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 *)
3283 # for now, limit cross builds to known configurations
3284 MACHDEP="unknown"
3285 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3286 esac
3287 ac_sys_release=
3288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003290 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003291 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003292 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003294 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 fi
3297 ac_md_system=`echo $ac_sys_system |
3298 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3299 ac_md_release=`echo $ac_sys_release |
3300 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3301 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003302
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003304 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003305 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003306 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003307 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003308 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003309 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003310fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3312$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003313
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003314
3315if test "$cross_compiling" = yes; then
3316 case "$host" in
3317 *-*-linux*)
3318 case "$host_cpu" in
3319 arm*)
3320 _host_cpu=arm
3321 ;;
3322 *)
3323 _host_cpu=$host_cpu
3324 esac
3325 ;;
3326 *-*-cygwin*)
3327 _host_cpu=
3328 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003329 *-*-vxworks*)
3330 _host_cpu=$host_cpu
3331 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003332 *)
3333 # for now, limit cross builds to known configurations
3334 MACHDEP="unknown"
3335 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3336 esac
3337 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3338fi
3339
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003340# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3341# disable features if it is defined, without any means to access these
3342# features as extensions. For these systems, we skip the definition of
3343# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3344# some feature, make sure there is no alternative way to access this
3345# feature. Also, when using wildcards, make sure you have verified the
3346# need for not defining _XOPEN_SOURCE on all systems matching the
3347# wildcard, and that the wildcard does not include future systems
3348# (which may remove their limitations).
3349case $ac_sys_system/$ac_sys_release in
3350 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3351 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003352 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003353 # In addition, Stefan Krah confirms that issue #1244610 exists through
3354 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003355 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003356 define_xopen_source=no
3357 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3358 # also defined. This can be overridden by defining _BSD_SOURCE
3359 # As this has a different meaning on Linux, only define it on OpenBSD
3360
Matthias Kloseb9621712010-04-24 17:59:49 +00003361$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003362
3363 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003364 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003365 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3366 # also defined. This can be overridden by defining _BSD_SOURCE
3367 # As this has a different meaning on Linux, only define it on OpenBSD
3368
Matthias Kloseb9621712010-04-24 17:59:49 +00003369$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003370
3371 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003372 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3373 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3374 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003375 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 +00003376 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003377 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3378 # request to enable features supported by the standard as a request
3379 # to disable features not supported by the standard. The best way
3380 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3381 # entirely and define __EXTENSIONS__ instead.
3382 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003383 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003384 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3385 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003386 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003387 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003388 define_xopen_source=no;;
3389 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003390 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003391 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003392 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003393 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3394 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3395 # identifies itself as Darwin/7.*
3396 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3397 # disables platform specific features beyond repair.
3398 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3399 # has no effect, don't bother defining them
3400 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003401 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003402 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003403 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003404 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3405 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3406 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003407 AIX/4)
3408 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003409 AIX/5)
3410 if test `uname -r` -eq 1; then
3411 define_xopen_source=no
3412 fi
3413 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003414 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3415 # defining NI_NUMERICHOST.
3416 QNX/6.3.2)
3417 define_xopen_source=no
3418 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003419 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3420 # in network headers still using system V types.
3421 VxWorks/*)
3422 define_xopen_source=no
3423 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003425esac
3426
3427if test $define_xopen_source = yes
3428then
Victor Stinner14d098d2011-09-07 22:29:43 +02003429 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003430
Victor Stinner14d098d2011-09-07 22:29:43 +02003431$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003432
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
3434 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3435 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3436 # several APIs are not declared. Since this is also needed in some
3437 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
Matthias Kloseb9621712010-04-24 17:59:49 +00003439$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003440
3441
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003442
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003443$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003444
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003445fi
3446
Christian Heimes647cd872013-12-07 23:39:33 +01003447# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3448case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003449 hp*|HP*)
3450 define_stdc_a1=yes;;
3451 *)
3452 define_stdc_a1=no;;
3453esac
3454
3455if test $define_stdc_a1 = yes
3456then
Christian Heimes647cd872013-12-07 23:39:33 +01003457
3458$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3459
Christian Heimesb02bcae2013-12-08 15:21:08 +01003460fi
Christian Heimes647cd872013-12-07 23:39:33 +01003461
Jack Jansen6b08a402004-06-03 12:41:45 +00003462# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3463# it may influence the way we can build extensions, so distutils
3464# needs to check it
3465
Thomas Wouters477c8d52006-05-27 19:21:47 +00003466
Jack Jansen6b08a402004-06-03 12:41:45 +00003467CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003468EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003469
Guido van Rossum627b2d71993-12-24 10:39:16 +00003470# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003471
3472# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3473# for debug/optimization stuff. BASECFLAGS is for flags that are required
3474# just to get things to compile and link. Users are free to override OPT
3475# when running configure or make. The build should not break if they do.
3476# BASECFLAGS should generally not be messed with, however.
3477
Guido van Rossum8b131c51995-03-09 14:10:13 +00003478# If the user switches compilers, we can't believe the cache
3479if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3480then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003481 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003482(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003483fi
3484
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003485# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3486# when the compiler supports them, but we don't always want -O2, and
3487# we set -g later.
3488if test -z "$CFLAGS"; then
3489 CFLAGS=
3490fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491
3492if test "$ac_sys_system" = "Darwin"
3493then
3494 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003495 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496 # information
3497 if test -z "${CC}"
3498 then
3499 found_gcc=
3500 found_clang=
3501 as_save_IFS=$IFS; IFS=:
3502 for as_dir in $PATH
3503 do
3504 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003505 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003507 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508 fi
3509 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003510 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003512 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513 fi
3514 fi
3515 done
3516 IFS=$as_save_IFS
3517
3518 if test -n "$found_gcc" -a -n "$found_clang"
3519 then
3520 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3521 then
3522 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3523$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3524 CC="$found_clang"
3525 CXX="$found_clang++"
3526 fi
3527
3528
3529 elif test -z "$found_gcc" -a -n "$found_clang"
3530 then
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3532$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3533 CC="$found_clang"
3534 CXX="$found_clang++"
3535
3536 elif test -z "$found_gcc" -a -z "$found_clang"
3537 then
3538 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3539 if test -n "${found_clang}"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3542$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3543 CC="${found_clang}"
3544 CXX="`/usr/bin/xcrun -find clang++`"
3545
3546 # else: use default behaviour
3547 fi
3548 fi
3549 fi
3550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003551ac_ext=c
3552ac_cpp='$CPP $CPPFLAGS'
3553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3555ac_compiler_gnu=$ac_cv_c_compiler_gnu
3556if test -n "$ac_tool_prefix"; then
3557 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3558set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3560$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003561if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003563else
3564 if test -n "$CC"; then
3565 ac_cv_prog_CC="$CC" # Let the user override the test.
3566else
Martin v. Löwis11437992002-04-12 09:54:03 +00003567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568for as_dir in $PATH
3569do
3570 IFS=$as_save_IFS
3571 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 $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 +00003576 break 2
3577 fi
3578done
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003581
Jack Jansendd19cf82001-12-06 22:36:17 +00003582fi
3583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003584CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003585if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3587$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003588else
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3590$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591fi
3592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595if test -z "$ac_cv_prog_CC"; then
3596 ac_ct_CC=$CC
3597 # Extract the first word of "gcc", so it can be a program name with args.
3598set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3600$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003601if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003603else
3604 if test -n "$ac_ct_CC"; then
3605 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3606else
3607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3608for as_dir in $PATH
3609do
3610 IFS=$as_save_IFS
3611 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $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 +00003616 break 2
3617 fi
3618done
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003621
3622fi
3623fi
3624ac_ct_CC=$ac_cv_prog_ac_ct_CC
3625if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3627$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003628else
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3630$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003631fi
3632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633 if test "x$ac_ct_CC" = x; then
3634 CC=""
3635 else
3636 case $cross_compiling:$ac_tool_warned in
3637yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640ac_tool_warned=yes ;;
3641esac
3642 CC=$ac_ct_CC
3643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
3645 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003646fi
3647
Jack Jansendd19cf82001-12-06 22:36:17 +00003648if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649 if test -n "$ac_tool_prefix"; then
3650 # 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 +00003651set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003654if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003656else
3657 if test -n "$CC"; then
3658 ac_cv_prog_CC="$CC" # Let the user override the test.
3659else
Martin v. Löwis11437992002-04-12 09:54:03 +00003660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $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 +00003669 break 2
3670 fi
3671done
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003674
3675fi
3676fi
3677CC=$ac_cv_prog_CC
3678if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3680$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681else
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684fi
3685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688fi
3689if test -z "$CC"; then
3690 # Extract the first word of "cc", so it can be a program name with args.
3691set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3693$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003694if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 if test -n "$CC"; then
3698 ac_cv_prog_CC="$CC" # Let the user override the test.
3699else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3709 ac_prog_rejected=yes
3710 continue
3711 fi
3712 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 $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 +00003714 break 2
3715 fi
3716done
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003719
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720if test $ac_prog_rejected = yes; then
3721 # We found a bogon in the path, so make sure we never use it.
3722 set dummy $ac_cv_prog_CC
3723 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 # We chose a different compiler from the bogus one.
3726 # However, it has the same basename, so the bogon will be chosen
3727 # first if we set CC to just the basename; use the full file name.
3728 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003729 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 fi
3731fi
3732fi
3733fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003734CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3737$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738else
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3740$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741fi
3742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745if test -z "$CC"; then
3746 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 do
3749 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3750set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003753if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760for as_dir in $PATH
3761do
3762 IFS=$as_save_IFS
3763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 $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 +00003768 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003769 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003770done
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
3774fi
3775fi
3776CC=$ac_cv_prog_CC
3777if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3779$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003780else
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3782$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003783fi
3784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 test -n "$CC" && break
3787 done
3788fi
3789if test -z "$CC"; then
3790 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003792do
3793 # Extract the first word of "$ac_prog", so it can be a program name with args.
3794set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003797if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
3800 if test -n "$ac_ct_CC"; then
3801 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3802else
3803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3804for as_dir in $PATH
3805do
3806 IFS=$as_save_IFS
3807 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $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 +00003812 break 2
3813 fi
3814done
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818fi
3819fi
3820ac_ct_CC=$ac_cv_prog_ac_ct_CC
3821if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3823$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 test -n "$ac_ct_CC" && break
3831done
Michael W. Hudson54241132001-12-07 15:38:26 +00003832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 if test "x$ac_ct_CC" = x; then
3834 CC=""
3835 else
3836 case $cross_compiling:$ac_tool_warned in
3837yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003838{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3839$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840ac_tool_warned=yes ;;
3841esac
3842 CC=$ac_ct_CC
3843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
3845
3846fi
3847
3848
Matthias Kloseb9621712010-04-24 17:59:49 +00003849test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003851as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003852See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853
3854# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003855$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3856set X $ac_compile
3857ac_compiler=$2
3858for ac_option in --version -v -V -qversion; do
3859 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860case "(($ac_try" in
3861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3862 *) ac_try_echo=$ac_try;;
3863esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3865$as_echo "$ac_try_echo"; } >&5
3866 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 if test -s conftest.err; then
3869 sed '10a\
3870... rest of stderr output deleted ...
3871 10q' conftest.err >conftest.er1
3872 cat conftest.er1 >&5
3873 fi
3874 rm -f conftest.er1 conftest.err
3875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3876 test $ac_status = 0; }
3877done
Martin v. Löwis11437992002-04-12 09:54:03 +00003878
Matthias Kloseb9621712010-04-24 17:59:49 +00003879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003880/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882int
3883main ()
3884{
3885
3886 ;
3887 return 0;
3888}
3889_ACEOF
3890ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003891ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003892# Try to create an executable without -o first, disregard a.out.
3893# It will help us diagnose broken compilers, and finding out an intuition
3894# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3896$as_echo_n "checking whether the C compiler works... " >&6; }
3897ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3898
3899# The possible output files:
3900ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902ac_rmfiles=
3903for ac_file in $ac_files
3904do
3905 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003906 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3908 esac
3909done
3910rm -f $ac_rmfiles
3911
Matthias Kloseb9621712010-04-24 17:59:49 +00003912if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913case "(($ac_try" in
3914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915 *) ac_try_echo=$ac_try;;
3916esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3918$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3922 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3924# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3925# in a Makefile. We should not override ac_cv_exeext if it was cached,
3926# so that the user can short-circuit this test for compilers unknown to
3927# Autoconf.
3928for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003929do
3930 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003933 ;;
3934 [ab].out )
3935 # We found the default executable, but exeext='' is most
3936 # certainly right.
3937 break;;
3938 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 then :; else
3941 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3942 fi
3943 # We set ac_cv_exeext here because the later test for it is not
3944 # safe: cross compilers may not add the suffix if given an `-o'
3945 # argument, so we may need to know it at that point already.
3946 # Even if this section looks crufty: it has the advantage of
3947 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003948 break;;
3949 * )
3950 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 esac
3952done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953test "$ac_cv_exeext" = no && ac_cv_exeext=
3954
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003955else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 ac_file=''
3957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003958if test -z "$ac_file"; then :
3959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3960$as_echo "no" >&6; }
3961$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003962sed 's/^/| /' conftest.$ac_ext >&5
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003966as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003967See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003968else
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3970$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3973$as_echo_n "checking for C compiler default output file name... " >&6; }
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3975$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003976ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3981$as_echo_n "checking for suffix of executables... " >&6; }
3982if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983case "(($ac_try" in
3984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3985 *) ac_try_echo=$ac_try;;
3986esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003987eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3988$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3992 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3994# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3995# work properly (i.e., refer to `conftest.exe'), while it won't with
3996# `rm'.
3997for ac_file in conftest.exe conftest conftest.*; do
3998 test -f "$ac_file" || continue
3999 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4002 break;;
4003 * ) break;;
4004 esac
4005done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006else
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004009as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004010See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004012rm -f conftest conftest$ac_cv_exeext
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4014$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015
4016rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004017EXEEXT=$ac_cv_exeext
4018ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4020/* end confdefs.h. */
4021#include <stdio.h>
4022int
4023main ()
4024{
4025FILE *f = fopen ("conftest.out", "w");
4026 return ferror (f) || fclose (f) != 0;
4027
4028 ;
4029 return 0;
4030}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004032ac_clean_files="$ac_clean_files conftest.out"
4033# Check that the compiler produces executables we can run. If not, either
4034# the compiler is broken, or we cross compile.
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4036$as_echo_n "checking whether we are cross compiling... " >&6; }
4037if test "$cross_compiling" != yes; then
4038 { { ac_try="$ac_link"
4039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
4043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
4045 (eval "$ac_link") 2>&5
4046 ac_status=$?
4047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }
4049 if { ac_try='./conftest$ac_cv_exeext'
4050 { { case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4055$as_echo "$ac_try_echo"; } >&5
4056 (eval "$ac_try") 2>&5
4057 ac_status=$?
4058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059 test $ac_status = 0; }; }; then
4060 cross_compiling=no
4061 else
4062 if test "$cross_compiling" = maybe; then
4063 cross_compiling=yes
4064 else
4065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004067as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004068If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004069See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 fi
4071 fi
4072fi
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4074$as_echo "$cross_compiling" >&6; }
4075
4076rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4077ac_clean_files=$ac_clean_files_save
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4079$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004080if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo_n "(cached) " >&6
4082else
4083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004084/* end confdefs.h. */
4085
4086int
4087main ()
4088{
4089
4090 ;
4091 return 0;
4092}
4093_ACEOF
4094rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004095if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004096case "(($ac_try" in
4097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4098 *) ac_try_echo=$ac_try;;
4099esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4101$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4105 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106 for ac_file in conftest.o conftest.obj conftest.*; do
4107 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004110 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4111 break;;
4112 esac
4113done
4114else
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004116sed 's/^/| /' conftest.$ac_ext >&5
4117
Matthias Kloseb9621712010-04-24 17:59:49 +00004118{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004120as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004122fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004123rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4126$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127OBJEXT=$ac_cv_objext
4128ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4130$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004131if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004133else
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004136
Martin v. Löwis11437992002-04-12 09:54:03 +00004137int
4138main ()
4139{
4140#ifndef __GNUC__
4141 choke me
4142#endif
4143
4144 ;
4145 return 0;
4146}
4147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 ac_compiler_gnu=yes
4150else
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004154ac_cv_c_compiler_gnu=$ac_compiler_gnu
4155
4156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4158$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4159if test $ac_compiler_gnu = yes; then
4160 GCC=yes
4161else
4162 GCC=
4163fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004164ac_test_CFLAGS=${CFLAGS+set}
4165ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4167$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004168if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004170else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004171 ac_save_c_werror_flag=$ac_c_werror_flag
4172 ac_c_werror_flag=yes
4173 ac_cv_prog_cc_g=no
4174 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178int
4179main ()
4180{
4181
4182 ;
4183 return 0;
4184}
4185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004186if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004187 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188else
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 CFLAGS=""
4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191/* end confdefs.h. */
4192
4193int
4194main ()
4195{
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202
Matthias Kloseb9621712010-04-24 17:59:49 +00004203else
4204 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207/* end confdefs.h. */
4208
4209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4225 ac_c_werror_flag=$ac_save_c_werror_flag
4226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4228$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004229if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004231elif test $ac_cv_prog_cc_g = yes; then
4232 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004233 CFLAGS="-g -O2"
4234 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004235 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236 fi
4237else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004238 if test "$GCC" = yes; then
4239 CFLAGS="-O2"
4240 else
4241 CFLAGS=
4242 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4245$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004246if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004248else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004250ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004252/* end confdefs.h. */
4253#include <stdarg.h>
4254#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004255struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4257struct buf { int x; };
4258FILE * (*rcsopen) (struct buf *, struct stat *, int);
4259static char *e (p, i)
4260 char **p;
4261 int i;
4262{
4263 return p[i];
4264}
4265static char *f (char * (*g) (char **, int), char **p, ...)
4266{
4267 char *s;
4268 va_list v;
4269 va_start (v,p);
4270 s = g (p, va_arg (v,int));
4271 va_end (v);
4272 return s;
4273}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004274
4275/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4276 function prototypes and stuff, but not '\xHH' hex character constants.
4277 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4280 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004282int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4285 inside strings and character constants. */
4286#define FOO(x) 'x'
4287int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4288
Skip Montanaro6dead952003-09-25 14:50:04 +00004289int test (int i, double x);
4290struct s1 {int (*f) (int a);};
4291struct s2 {int (*f) (double a);};
4292int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4293int argc;
4294char **argv;
4295int
4296main ()
4297{
4298return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4299 ;
4300 return 0;
4301}
4302_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4304 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004305do
4306 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310rm -f core conftest.err conftest.$ac_objext
4311 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004312done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314CC=$ac_save_CC
4315
4316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317# AC_CACHE_VAL
4318case "x$ac_cv_prog_cc_c89" in
4319 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4321$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4324$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004325 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4328$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004329esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004330if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004331
Matthias Kloseb9621712010-04-24 17:59:49 +00004332fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004333
Martin v. Löwis11437992002-04-12 09:54:03 +00004334ac_ext=c
4335ac_cpp='$CPP $CPPFLAGS'
4336ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4337ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4338ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004340ac_ext=c
4341ac_cpp='$CPP $CPPFLAGS'
4342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4344ac_compiler_gnu=$ac_cv_c_compiler_gnu
4345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4346$as_echo_n "checking how to run the C preprocessor... " >&6; }
4347# On Suns, sometimes $CPP names a directory.
4348if test -n "$CPP" && test -d "$CPP"; then
4349 CPP=
4350fi
4351if test -z "$CPP"; then
4352 if ${ac_cv_prog_CPP+:} false; then :
4353 $as_echo_n "(cached) " >&6
4354else
4355 # Double quotes because CPP needs to be expanded
4356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4357 do
4358 ac_preproc_ok=false
4359for ac_c_preproc_warn_flag in '' yes
4360do
4361 # Use a header file that comes with gcc, so configuring glibc
4362 # with a fresh cross-compiler works.
4363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4364 # <limits.h> exists even on freestanding compilers.
4365 # On the NeXT, cc -E runs the code through the compiler's parser,
4366 # not just through cpp. "Syntax error" is here to catch this case.
4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4368/* end confdefs.h. */
4369#ifdef __STDC__
4370# include <limits.h>
4371#else
4372# include <assert.h>
4373#endif
4374 Syntax error
4375_ACEOF
4376if ac_fn_c_try_cpp "$LINENO"; then :
4377
4378else
4379 # Broken: fails on valid input.
4380continue
4381fi
4382rm -f conftest.err conftest.i conftest.$ac_ext
4383
4384 # OK, works on sane cases. Now check whether nonexistent headers
4385 # can be detected and how.
4386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4387/* end confdefs.h. */
4388#include <ac_nonexistent.h>
4389_ACEOF
4390if ac_fn_c_try_cpp "$LINENO"; then :
4391 # Broken: success on invalid input.
4392continue
4393else
4394 # Passes both tests.
4395ac_preproc_ok=:
4396break
4397fi
4398rm -f conftest.err conftest.i conftest.$ac_ext
4399
4400done
4401# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4402rm -f conftest.i conftest.err conftest.$ac_ext
4403if $ac_preproc_ok; then :
4404 break
4405fi
4406
4407 done
4408 ac_cv_prog_CPP=$CPP
4409
4410fi
4411 CPP=$ac_cv_prog_CPP
4412else
4413 ac_cv_prog_CPP=$CPP
4414fi
4415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4416$as_echo "$CPP" >&6; }
4417ac_preproc_ok=false
4418for ac_c_preproc_warn_flag in '' yes
4419do
4420 # Use a header file that comes with gcc, so configuring glibc
4421 # with a fresh cross-compiler works.
4422 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4423 # <limits.h> exists even on freestanding compilers.
4424 # On the NeXT, cc -E runs the code through the compiler's parser,
4425 # not just through cpp. "Syntax error" is here to catch this case.
4426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4427/* end confdefs.h. */
4428#ifdef __STDC__
4429# include <limits.h>
4430#else
4431# include <assert.h>
4432#endif
4433 Syntax error
4434_ACEOF
4435if ac_fn_c_try_cpp "$LINENO"; then :
4436
4437else
4438 # Broken: fails on valid input.
4439continue
4440fi
4441rm -f conftest.err conftest.i conftest.$ac_ext
4442
4443 # OK, works on sane cases. Now check whether nonexistent headers
4444 # can be detected and how.
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446/* end confdefs.h. */
4447#include <ac_nonexistent.h>
4448_ACEOF
4449if ac_fn_c_try_cpp "$LINENO"; then :
4450 # Broken: success on invalid input.
4451continue
4452else
4453 # Passes both tests.
4454ac_preproc_ok=:
4455break
4456fi
4457rm -f conftest.err conftest.i conftest.$ac_ext
4458
4459done
4460# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4461rm -f conftest.i conftest.err conftest.$ac_ext
4462if $ac_preproc_ok; then :
4463
4464else
4465 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4467as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4468See \`config.log' for more details" "$LINENO" 5; }
4469fi
4470
4471ac_ext=c
4472ac_cpp='$CPP $CPPFLAGS'
4473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4475ac_compiler_gnu=$ac_cv_c_compiler_gnu
4476
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4478$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4479if ${ac_cv_path_GREP+:} false; then :
4480 $as_echo_n "(cached) " >&6
4481else
4482 if test -z "$GREP"; then
4483 ac_path_GREP_found=false
4484 # Loop through the user's path and test for each of PROGNAME-LIST
4485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4486for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4487do
4488 IFS=$as_save_IFS
4489 test -z "$as_dir" && as_dir=.
4490 for ac_prog in grep ggrep; do
4491 for ac_exec_ext in '' $ac_executable_extensions; do
4492 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4493 as_fn_executable_p "$ac_path_GREP" || continue
4494# Check for GNU ac_path_GREP and select it if it is found.
4495 # Check for GNU $ac_path_GREP
4496case `"$ac_path_GREP" --version 2>&1` in
4497*GNU*)
4498 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4499*)
4500 ac_count=0
4501 $as_echo_n 0123456789 >"conftest.in"
4502 while :
4503 do
4504 cat "conftest.in" "conftest.in" >"conftest.tmp"
4505 mv "conftest.tmp" "conftest.in"
4506 cp "conftest.in" "conftest.nl"
4507 $as_echo 'GREP' >> "conftest.nl"
4508 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4509 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4510 as_fn_arith $ac_count + 1 && ac_count=$as_val
4511 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4512 # Best one so far, save it but keep looking for a better one
4513 ac_cv_path_GREP="$ac_path_GREP"
4514 ac_path_GREP_max=$ac_count
4515 fi
4516 # 10*(2^10) chars as input seems more than enough
4517 test $ac_count -gt 10 && break
4518 done
4519 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4520esac
4521
4522 $ac_path_GREP_found && break 3
4523 done
4524 done
4525 done
4526IFS=$as_save_IFS
4527 if test -z "$ac_cv_path_GREP"; then
4528 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4529 fi
4530else
4531 ac_cv_path_GREP=$GREP
4532fi
4533
4534fi
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4536$as_echo "$ac_cv_path_GREP" >&6; }
4537 GREP="$ac_cv_path_GREP"
4538
4539
Łukasz Langaa785c872016-09-09 17:37:37 -07004540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4541$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4542if ${ac_cv_path_SED+:} false; then :
4543 $as_echo_n "(cached) " >&6
4544else
4545 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4546 for ac_i in 1 2 3 4 5 6 7; do
4547 ac_script="$ac_script$as_nl$ac_script"
4548 done
4549 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4550 { ac_script=; unset ac_script;}
4551 if test -z "$SED"; then
4552 ac_path_SED_found=false
4553 # Loop through the user's path and test for each of PROGNAME-LIST
4554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557 IFS=$as_save_IFS
4558 test -z "$as_dir" && as_dir=.
4559 for ac_prog in sed gsed; do
4560 for ac_exec_ext in '' $ac_executable_extensions; do
4561 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4562 as_fn_executable_p "$ac_path_SED" || continue
4563# Check for GNU ac_path_SED and select it if it is found.
4564 # Check for GNU $ac_path_SED
4565case `"$ac_path_SED" --version 2>&1` in
4566*GNU*)
4567 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4568*)
4569 ac_count=0
4570 $as_echo_n 0123456789 >"conftest.in"
4571 while :
4572 do
4573 cat "conftest.in" "conftest.in" >"conftest.tmp"
4574 mv "conftest.tmp" "conftest.in"
4575 cp "conftest.in" "conftest.nl"
4576 $as_echo '' >> "conftest.nl"
4577 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4578 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4579 as_fn_arith $ac_count + 1 && ac_count=$as_val
4580 if test $ac_count -gt ${ac_path_SED_max-0}; then
4581 # Best one so far, save it but keep looking for a better one
4582 ac_cv_path_SED="$ac_path_SED"
4583 ac_path_SED_max=$ac_count
4584 fi
4585 # 10*(2^10) chars as input seems more than enough
4586 test $ac_count -gt 10 && break
4587 done
4588 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4589esac
4590
4591 $ac_path_SED_found && break 3
4592 done
4593 done
4594 done
4595IFS=$as_save_IFS
4596 if test -z "$ac_cv_path_SED"; then
4597 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4598 fi
4599else
4600 ac_cv_path_SED=$SED
4601fi
4602
4603fi
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4605$as_echo "$ac_cv_path_SED" >&6; }
4606 SED="$ac_cv_path_SED"
4607 rm -f conftest.sed
4608
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004609
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
4611
Matthias Kloseb9621712010-04-24 17:59:49 +00004612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4613$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004615# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004616if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004617 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004618
4619 case $withval in
4620 no) with_cxx_main=no
4621 MAINCC='$(CC)';;
4622 yes) with_cxx_main=yes
4623 MAINCC='$(CXX)';;
4624 *) with_cxx_main=yes
4625 MAINCC=$withval
4626 if test -z "$CXX"
4627 then
4628 CXX=$withval
4629 fi;;
4630 esac
4631else
4632
4633 with_cxx_main=no
4634 MAINCC='$(CC)'
4635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004636fi
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4639$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
4641preset_cxx="$CXX"
4642if test -z "$CXX"
4643then
4644 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004645 gcc) if test -n "$ac_tool_prefix"; then
4646 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4647set dummy ${ac_tool_prefix}g++; ac_word=$2
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
4650if ${ac_cv_path_CXX+:} false; then :
4651 $as_echo_n "(cached) " >&6
4652else
4653 case $CXX in
4654 [\\/]* | ?:[\\/]*)
4655 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4656 ;;
4657 *)
4658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in notfound
4660do
4661 IFS=$as_save_IFS
4662 test -z "$as_dir" && as_dir=.
4663 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004665 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667 break 2
4668 fi
4669done
4670 done
4671IFS=$as_save_IFS
4672
4673 ;;
4674esac
4675fi
4676CXX=$ac_cv_path_CXX
4677if test -n "$CXX"; then
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4679$as_echo "$CXX" >&6; }
4680else
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686fi
4687if test -z "$ac_cv_path_CXX"; then
4688 ac_pt_CXX=$CXX
4689 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4692$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004693if ${ac_cv_path_ac_pt_CXX+:} false; then :
4694 $as_echo_n "(cached) " >&6
4695else
4696 case $ac_pt_CXX in
4697 [\\/]* | ?:[\\/]*)
4698 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4699 ;;
4700 *)
4701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in notfound
4703do
4704 IFS=$as_save_IFS
4705 test -z "$as_dir" && as_dir=.
4706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4710 break 2
4711 fi
4712done
4713 done
4714IFS=$as_save_IFS
4715
4716 ;;
4717esac
4718fi
4719ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4720if test -n "$ac_pt_CXX"; then
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4722$as_echo "$ac_pt_CXX" >&6; }
4723else
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4725$as_echo "no" >&6; }
4726fi
4727
4728 if test "x$ac_pt_CXX" = x; then
4729 CXX="g++"
4730 else
4731 case $cross_compiling:$ac_tool_warned in
4732yes:)
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4735ac_tool_warned=yes ;;
4736esac
4737 CXX=$ac_pt_CXX
4738 fi
4739else
4740 CXX="$ac_cv_path_CXX"
4741fi
4742 ;;
4743 cc) if test -n "$ac_tool_prefix"; then
4744 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4745set dummy ${ac_tool_prefix}c++; ac_word=$2
4746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4747$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004748if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004750else
4751 case $CXX in
4752 [\\/]* | ?:[\\/]*)
4753 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4754 ;;
4755 *)
4756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757for as_dir in notfound
4758do
4759 IFS=$as_save_IFS
4760 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765 break 2
4766 fi
4767done
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004769IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771 ;;
4772esac
4773fi
4774CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004775if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4777$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004778else
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004782
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004783
4784fi
4785if test -z "$ac_cv_path_CXX"; then
4786 ac_pt_CXX=$CXX
4787 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 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 +00004797 ;;
4798 *)
4799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in notfound
4801do
4802 IFS=$as_save_IFS
4803 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808 break 2
4809 fi
4810done
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004812IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 ;;
4815esac
4816fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4818if test -n "$ac_pt_CXX"; then
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4820$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004821else
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004825
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 if test "x$ac_pt_CXX" = x; then
4827 CXX="c++"
4828 else
4829 case $cross_compiling:$ac_tool_warned in
4830yes:)
4831{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4833ac_tool_warned=yes ;;
4834esac
4835 CXX=$ac_pt_CXX
4836 fi
4837else
4838 CXX="$ac_cv_path_CXX"
4839fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841 clang|*/clang) if test -n "$ac_tool_prefix"; then
4842 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4843set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4845$as_echo_n "checking for $ac_word... " >&6; }
4846if ${ac_cv_path_CXX+:} false; then :
4847 $as_echo_n "(cached) " >&6
4848else
4849 case $CXX in
4850 [\\/]* | ?:[\\/]*)
4851 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4852 ;;
4853 *)
4854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855for as_dir in notfound
4856do
4857 IFS=$as_save_IFS
4858 test -z "$as_dir" && as_dir=.
4859 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004861 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4863 break 2
4864 fi
4865done
4866 done
4867IFS=$as_save_IFS
4868
Ned Deilycbfb9a52012-06-23 16:02:19 -07004869 ;;
4870esac
4871fi
4872CXX=$ac_cv_path_CXX
4873if test -n "$CXX"; then
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4875$as_echo "$CXX" >&6; }
4876else
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878$as_echo "no" >&6; }
4879fi
4880
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004881
4882fi
4883if test -z "$ac_cv_path_CXX"; then
4884 ac_pt_CXX=$CXX
4885 # Extract the first word of "clang++", so it can be a program name with args.
4886set dummy clang++; ac_word=$2
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4888$as_echo_n "checking for $ac_word... " >&6; }
4889if ${ac_cv_path_ac_pt_CXX+:} false; then :
4890 $as_echo_n "(cached) " >&6
4891else
4892 case $ac_pt_CXX in
4893 [\\/]* | ?:[\\/]*)
4894 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4895 ;;
4896 *)
4897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4898for as_dir in notfound
4899do
4900 IFS=$as_save_IFS
4901 test -z "$as_dir" && as_dir=.
4902 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4906 break 2
4907 fi
4908done
4909 done
4910IFS=$as_save_IFS
4911
4912 ;;
4913esac
4914fi
4915ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4916if test -n "$ac_pt_CXX"; then
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4918$as_echo "$ac_pt_CXX" >&6; }
4919else
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4921$as_echo "no" >&6; }
4922fi
4923
4924 if test "x$ac_pt_CXX" = x; then
4925 CXX="clang++"
4926 else
4927 case $cross_compiling:$ac_tool_warned in
4928yes:)
4929{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4930$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4931ac_tool_warned=yes ;;
4932esac
4933 CXX=$ac_pt_CXX
4934 fi
4935else
4936 CXX="$ac_cv_path_CXX"
4937fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004938 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004939 icc|*/icc) if test -n "$ac_tool_prefix"; then
4940 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4941set dummy ${ac_tool_prefix}icpc; ac_word=$2
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943$as_echo_n "checking for $ac_word... " >&6; }
4944if ${ac_cv_path_CXX+:} false; then :
4945 $as_echo_n "(cached) " >&6
4946else
4947 case $CXX in
4948 [\\/]* | ?:[\\/]*)
4949 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4950 ;;
4951 *)
4952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in notfound
4954do
4955 IFS=$as_save_IFS
4956 test -z "$as_dir" && as_dir=.
4957 for ac_exec_ext in '' $ac_executable_extensions; do
4958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4959 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961 break 2
4962 fi
4963done
4964 done
4965IFS=$as_save_IFS
4966
4967 ;;
4968esac
4969fi
4970CXX=$ac_cv_path_CXX
4971if test -n "$CXX"; then
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4973$as_echo "$CXX" >&6; }
4974else
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980fi
4981if test -z "$ac_cv_path_CXX"; then
4982 ac_pt_CXX=$CXX
4983 # Extract the first word of "icpc", so it can be a program name with args.
4984set dummy icpc; ac_word=$2
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
4987if ${ac_cv_path_ac_pt_CXX+:} false; then :
4988 $as_echo_n "(cached) " >&6
4989else
4990 case $ac_pt_CXX in
4991 [\\/]* | ?:[\\/]*)
4992 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4993 ;;
4994 *)
4995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996for as_dir in notfound
4997do
4998 IFS=$as_save_IFS
4999 test -z "$as_dir" && as_dir=.
5000 for ac_exec_ext in '' $ac_executable_extensions; do
5001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5002 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5004 break 2
5005 fi
5006done
5007 done
5008IFS=$as_save_IFS
5009
5010 ;;
5011esac
5012fi
5013ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5014if test -n "$ac_pt_CXX"; then
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5016$as_echo "$ac_pt_CXX" >&6; }
5017else
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019$as_echo "no" >&6; }
5020fi
5021
5022 if test "x$ac_pt_CXX" = x; then
5023 CXX="icpc"
5024 else
5025 case $cross_compiling:$ac_tool_warned in
5026yes:)
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5028$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5029ac_tool_warned=yes ;;
5030esac
5031 CXX=$ac_pt_CXX
5032 fi
5033else
5034 CXX="$ac_cv_path_CXX"
5035fi
5036 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037 esac
5038 if test "$CXX" = "notfound"
5039 then
5040 CXX=""
5041 fi
5042fi
5043if test -z "$CXX"
5044then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005045 if test -n "$ac_tool_prefix"; then
5046 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5047 do
5048 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5049set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5051$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005052if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054else
5055 if test -n "$CXX"; then
5056 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5057else
5058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005064 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005065 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067 break 2
5068 fi
5069done
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072
5073fi
5074fi
5075CXX=$ac_cv_prog_CXX
5076if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5078$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005079else
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5081$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005082fi
5083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 test -n "$CXX" && break
5086 done
5087fi
5088if test -z "$CXX"; then
5089 ac_ct_CXX=$CXX
5090 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5091do
5092 # Extract the first word of "$ac_prog", so it can be a program name with args.
5093set dummy $ac_prog; ac_word=$2
5094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5095$as_echo_n "checking for $ac_word... " >&6; }
5096if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5097 $as_echo_n "(cached) " >&6
5098else
5099 if test -n "$ac_ct_CXX"; then
5100 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5101else
5102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5103for as_dir in $PATH
5104do
5105 IFS=$as_save_IFS
5106 test -z "$as_dir" && as_dir=.
5107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005109 ac_cv_prog_ac_ct_CXX="$ac_prog"
5110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5111 break 2
5112 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 done
5115IFS=$as_save_IFS
5116
5117fi
5118fi
5119ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5120if test -n "$ac_ct_CXX"; then
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5122$as_echo "$ac_ct_CXX" >&6; }
5123else
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
5126fi
5127
5128
5129 test -n "$ac_ct_CXX" && break
5130done
5131
5132 if test "x$ac_ct_CXX" = x; then
5133 CXX="notfound"
5134 else
5135 case $cross_compiling:$ac_tool_warned in
5136yes:)
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5139ac_tool_warned=yes ;;
5140esac
5141 CXX=$ac_ct_CXX
5142 fi
5143fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005144
5145 if test "$CXX" = "notfound"
5146 then
5147 CXX=""
5148 fi
5149fi
5150if test "$preset_cxx" != "$CXX"
5151then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005152 { $as_echo "$as_me:${as_lineno-$LINENO}:
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.
5156 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005157$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005158
5159 By default, distutils will build C++ extension modules with \"$CXX\".
5160 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005161 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162fi
5163
5164
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005165MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5166
5167
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5169$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5170cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005171#undef bfin
5172#undef cris
5173#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005174#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005175#undef hppa
5176#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005177#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005178#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005179#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005180#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005181#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005182#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005183 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005184#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005185# if defined(__x86_64__) && defined(__LP64__)
5186 x86_64-linux-gnu
5187# elif defined(__x86_64__) && defined(__ILP32__)
5188 x86_64-linux-gnux32
5189# elif defined(__i386__)
5190 i386-linux-gnu
5191# elif defined(__aarch64__) && defined(__AARCH64EL__)
5192# if defined(__ILP32__)
5193 aarch64_ilp32-linux-gnu
5194# else
5195 aarch64-linux-gnu
5196# endif
5197# elif defined(__aarch64__) && defined(__AARCH64EB__)
5198# if defined(__ILP32__)
5199 aarch64_be_ilp32-linux-gnu
5200# else
5201 aarch64_be-linux-gnu
5202# endif
5203# elif defined(__alpha__)
5204 alpha-linux-gnu
5205# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5206# if defined(__ARMEL__)
5207 arm-linux-gnueabihf
5208# else
5209 armeb-linux-gnueabihf
5210# endif
5211# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5212# if defined(__ARMEL__)
5213 arm-linux-gnueabi
5214# else
5215 armeb-linux-gnueabi
5216# endif
5217# elif defined(__hppa__)
5218 hppa-linux-gnu
5219# elif defined(__ia64__)
5220 ia64-linux-gnu
5221# elif defined(__m68k__) && !defined(__mcoldfire__)
5222 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005223# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5224# if _MIPS_SIM == _ABIO32
5225 mipsisa32r6el-linux-gnu
5226# elif _MIPS_SIM == _ABIN32
5227 mipsisa64r6el-linux-gnuabin32
5228# elif _MIPS_SIM == _ABI64
5229 mipsisa64r6el-linux-gnuabi64
5230# else
5231# error unknown platform triplet
5232# endif
5233# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5234# if _MIPS_SIM == _ABIO32
5235 mipsisa32r6-linux-gnu
5236# elif _MIPS_SIM == _ABIN32
5237 mipsisa64r6-linux-gnuabin32
5238# elif _MIPS_SIM == _ABI64
5239 mipsisa64r6-linux-gnuabi64
5240# else
5241# error unknown platform triplet
5242# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005243# elif defined(__mips_hard_float) && defined(_MIPSEL)
5244# if _MIPS_SIM == _ABIO32
5245 mipsel-linux-gnu
5246# elif _MIPS_SIM == _ABIN32
5247 mips64el-linux-gnuabin32
5248# elif _MIPS_SIM == _ABI64
5249 mips64el-linux-gnuabi64
5250# else
5251# error unknown platform triplet
5252# endif
5253# elif defined(__mips_hard_float)
5254# if _MIPS_SIM == _ABIO32
5255 mips-linux-gnu
5256# elif _MIPS_SIM == _ABIN32
5257 mips64-linux-gnuabin32
5258# elif _MIPS_SIM == _ABI64
5259 mips64-linux-gnuabi64
5260# else
5261# error unknown platform triplet
5262# endif
5263# elif defined(__or1k__)
5264 or1k-linux-gnu
5265# elif defined(__powerpc__) && defined(__SPE__)
5266 powerpc-linux-gnuspe
5267# elif defined(__powerpc64__)
5268# if defined(__LITTLE_ENDIAN__)
5269 powerpc64le-linux-gnu
5270# else
5271 powerpc64-linux-gnu
5272# endif
5273# elif defined(__powerpc__)
5274 powerpc-linux-gnu
5275# elif defined(__s390x__)
5276 s390x-linux-gnu
5277# elif defined(__s390__)
5278 s390-linux-gnu
5279# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5280 sh4-linux-gnu
5281# elif defined(__sparc__) && defined(__arch64__)
5282 sparc64-linux-gnu
5283# elif defined(__sparc__)
5284 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005285# elif defined(__riscv)
5286# if __riscv_xlen == 32
5287 riscv32-linux-gnu
5288# elif __riscv_xlen == 64
5289 riscv64-linux-gnu
5290# else
5291# error unknown platform triplet
5292# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293# else
5294# error unknown platform triplet
5295# endif
5296#elif defined(__FreeBSD_kernel__)
5297# if defined(__LP64__)
5298 x86_64-kfreebsd-gnu
5299# elif defined(__i386__)
5300 i386-kfreebsd-gnu
5301# else
5302# error unknown platform triplet
5303# endif
5304#elif defined(__gnu_hurd__)
5305 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005306#elif defined(__APPLE__)
5307 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005308#elif defined(__VXWORKS__)
5309 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310#else
5311# error unknown platform triplet
5312#endif
5313
5314EOF
5315
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005316if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005317 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5319$as_echo "$PLATFORM_TRIPLET" >&6; }
5320else
5321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5322$as_echo "none" >&6; }
5323fi
5324rm -f conftest.c conftest.out
5325
5326if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5327 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5328 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5329 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005330elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5331 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333
doko@ubuntu.com55532312016-06-14 08:55:19 +02005334if test x$MULTIARCH != x; then
5335 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5336fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005337
5338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5340$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5341save_LDFLAGS="$LDFLAGS"
5342LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005343
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5345/* end confdefs.h. */
5346
5347int
5348main ()
5349{
5350
5351 ;
5352 return 0;
5353}
5354_ACEOF
5355if ac_fn_c_try_link "$LINENO"; then :
5356 NO_AS_NEEDED="-Wl,--no-as-needed"
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5358$as_echo "yes" >&6; }
5359else
5360 NO_AS_NEEDED=""
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5362$as_echo "no" >&6; }
5363fi
5364rm -f core conftest.err conftest.$ac_objext \
5365 conftest$ac_exeext conftest.$ac_ext
5366LDFLAGS="$save_LDFLAGS"
5367
5368
5369
5370# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371
Matthias Kloseb9621712010-04-24 17:59:49 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5373$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005374if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376else
5377 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5378 then ac_cv_path_EGREP="$GREP -E"
5379 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 # Loop through the user's path and test for each of PROGNAME-LIST
5383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5385do
5386 IFS=$as_save_IFS
5387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 for ac_prog in egrep; do
5389 for ac_exec_ext in '' $ac_executable_extensions; do
5390 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005391 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005392# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 # Check for GNU $ac_path_EGREP
5394case `"$ac_path_EGREP" --version 2>&1` in
5395*GNU*)
5396 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5397*)
5398 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 while :
5401 do
5402 cat "conftest.in" "conftest.in" >"conftest.tmp"
5403 mv "conftest.tmp" "conftest.in"
5404 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5407 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5410 # Best one so far, save it but keep looking for a better one
5411 ac_cv_path_EGREP="$ac_path_EGREP"
5412 ac_path_EGREP_max=$ac_count
5413 fi
5414 # 10*(2^10) chars as input seems more than enough
5415 test $ac_count -gt 10 && break
5416 done
5417 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5418esac
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $ac_path_EGREP_found && break 3
5421 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005426 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 +00005427 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428else
5429 ac_cv_path_EGREP=$EGREP
5430fi
5431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 fi
5433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5435$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005437
5438
Matthias Kloseb9621712010-04-24 17:59:49 +00005439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5440$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005441if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $as_echo_n "(cached) " >&6
5443else
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005446#include <stdlib.h>
5447#include <stdarg.h>
5448#include <string.h>
5449#include <float.h>
5450
5451int
5452main ()
5453{
5454
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459if ac_fn_c_try_compile "$LINENO"; then :
5460 ac_cv_header_stdc=yes
5461else
5462 ac_cv_header_stdc=no
5463fi
5464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465
5466if test $ac_cv_header_stdc = yes; then
5467 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005471
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005472_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005476else
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005479rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
Matthias Kloseb9621712010-04-24 17:59:49 +00005481fi
5482
5483if test $ac_cv_header_stdc = yes; then
5484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486/* end confdefs.h. */
5487#include <stdlib.h>
5488
5489_ACEOF
5490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5491 $EGREP "free" >/dev/null 2>&1; then :
5492
5493else
5494 ac_cv_header_stdc=no
5495fi
5496rm -f conftest*
5497
5498fi
5499
5500if test $ac_cv_header_stdc = yes; then
5501 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5502 if test "$cross_compiling" = yes; then :
5503 :
5504else
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506/* end confdefs.h. */
5507#include <ctype.h>
5508#include <stdlib.h>
5509#if ((' ' & 0x0FF) == 0x020)
5510# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5511# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5512#else
5513# define ISLOWER(c) \
5514 (('a' <= (c) && (c) <= 'i') \
5515 || ('j' <= (c) && (c) <= 'r') \
5516 || ('s' <= (c) && (c) <= 'z'))
5517# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5518#endif
5519
5520#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5521int
5522main ()
5523{
5524 int i;
5525 for (i = 0; i < 256; i++)
5526 if (XOR (islower (i), ISLOWER (i))
5527 || toupper (i) != TOUPPER (i))
5528 return 2;
5529 return 0;
5530}
5531_ACEOF
5532if ac_fn_c_try_run "$LINENO"; then :
5533
5534else
5535 ac_cv_header_stdc=no
5536fi
5537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5538 conftest.$ac_objext conftest.beam conftest.$ac_ext
5539fi
5540
5541fi
5542fi
5543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5544$as_echo "$ac_cv_header_stdc" >&6; }
5545if test $ac_cv_header_stdc = yes; then
5546
5547$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5548
5549fi
5550
5551# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5552for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5553 inttypes.h stdint.h unistd.h
5554do :
5555 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5556ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5557"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005558if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 cat >>confdefs.h <<_ACEOF
5560#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5561_ACEOF
5562
5563fi
5564
5565done
5566
5567
5568
5569 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 +02005570if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 MINIX=yes
5572else
5573 MINIX=
5574fi
5575
5576
5577 if test "$MINIX" = yes; then
5578
5579$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5580
5581
5582$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5583
5584
5585$as_echo "#define _MINIX 1" >>confdefs.h
5586
5587 fi
5588
5589
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5591$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005592if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 $as_echo_n "(cached) " >&6
5594else
5595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596/* end confdefs.h. */
5597
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005598# define __EXTENSIONS__ 1
5599 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005600int
5601main ()
5602{
5603
5604 ;
5605 return 0;
5606}
5607_ACEOF
5608if ac_fn_c_try_compile "$LINENO"; then :
5609 ac_cv_safe_to_define___extensions__=yes
5610else
5611 ac_cv_safe_to_define___extensions__=no
5612fi
5613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5614fi
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5616$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5617 test $ac_cv_safe_to_define___extensions__ = yes &&
5618 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5619
5620 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5621
5622 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5623
5624 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5625
5626 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5627
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629
Xavier de Gaye95750b12016-07-09 11:05:42 +02005630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5631$as_echo_n "checking for the Android API level... " >&6; }
5632cat >> conftest.c <<EOF
5633#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005634android_api = __ANDROID_API__
5635arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005636#else
5637#error not Android
5638#endif
5639EOF
5640
5641if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005642 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5643 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5645$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005646 if test -z "$ANDROID_API_LEVEL"; then
5647 echo 'Fatal: you must define __ANDROID_API__'
5648 exit 1
5649 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005650
5651cat >>confdefs.h <<_ACEOF
5652#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5653_ACEOF
5654
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005655
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5657$as_echo_n "checking for the Android arm ABI... " >&6; }
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5659$as_echo "$_arm_arch" >&6; }
5660 if test "$_arm_arch" = 7; then
5661 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5662 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5663 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005664else
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5666$as_echo "not Android" >&6; }
5667fi
5668rm -f conftest.c conftest.out
5669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670# Check for unsupported systems
5671case $ac_sys_system/$ac_sys_release in
5672atheos*|Linux*/1*)
5673 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5674 echo See README for details.
5675 exit 1;;
5676esac
5677
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5680$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005683if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 withval=$with_suffix;
5685 case $withval in
5686 no) EXEEXT=;;
5687 yes) EXEEXT=.exe;;
5688 *) EXEEXT=$withval;;
5689 esac
5690fi
5691
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5693$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694
5695# Test whether we're running on a non-case-sensitive system, in which
5696# case we give a warning if no ext is given
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5699$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700if test ! -d CaseSensitiveTestDir; then
5701mkdir CaseSensitiveTestDir
5702fi
5703
5704if test -d casesensitivetestdir
5705then
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5707$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 BUILDEXEEXT=.exe
5709else
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 BUILDEXEEXT=$EXEEXT
5713fi
5714rmdir CaseSensitiveTestDir
5715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716case $ac_sys_system in
5717hp*|HP*)
5718 case $CC in
5719 cc|*/cc) CC="$CC -Ae";;
5720 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721esac
5722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5725$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726if test -z "$LIBRARY"
5727then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005728 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5731$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733# LDLIBRARY is the name of the library to link against (as opposed to the
5734# name of the library into which to insert object files). BLDLIBRARY is also
5735# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5736# is blank as the main program is not linked directly against LDLIBRARY.
5737# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5738# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5739# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5740# DLLLIBRARY is the shared (i.e., DLL) library.
5741#
5742# RUNSHARED is used to run shared python without installed libraries
5743#
5744# INSTSONAME is the name of the shared library that will be use to install
5745# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005746#
5747# LDVERSION is the shared library version number, normally the Python version
5748# with the ABI build flags appended.
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
5751
5752
5753
5754
5755
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757LDLIBRARY="$LIBRARY"
5758BLDLIBRARY='$(LDLIBRARY)'
5759INSTSONAME='$(LDLIBRARY)'
5760DLLLIBRARY=''
5761LDLIBRARYDIR=''
5762RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005763LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
5765# LINKCC is the command that links the python executable -- default is $(CC).
5766# If CXX is set, and if it is needed to link a main function that was
5767# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5768# python might then depend on the C++ runtime
5769# This is altered for AIX in order to build the export list before
5770# linking.
5771
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5773$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774if test -z "$LINKCC"
5775then
5776 LINKCC='$(PURIFY) $(MAINCC)'
5777 case $ac_sys_system in
5778 AIX*)
5779 exp_extra="\"\""
5780 if test $ac_sys_release -ge 5 -o \
5781 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5782 exp_extra="."
5783 fi
5784 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785 QNX*)
5786 # qcc must be used because the other compilers do not
5787 # support -N.
5788 LINKCC=qcc;;
5789 esac
5790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5792$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793
5794# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5795# make sure we default having it set to "no": this is used by
5796# distutils.unixccompiler to know if it should add --enable-new-dtags
5797# to linker command lines, and failing to detect GNU ld simply results
5798# in the same bahaviour as before.
5799
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5801$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802ac_prog=ld
5803if test "$GCC" = yes; then
5804 ac_prog=`$CC -print-prog-name=ld`
5805fi
5806case `"$ac_prog" -V 2>&1 < /dev/null` in
5807 *GNU*)
5808 GNULD=yes;;
5809 *)
5810 GNULD=no;;
5811esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5813$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5816$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005818if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 enableval=$enable_shared;
5820fi
5821
5822
5823if test -z "$enable_shared"
5824then
5825 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005826 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 enable_shared="yes";;
5828 *)
5829 enable_shared="no";;
5830 esac
5831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5833$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5836$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005838if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839 enableval=$enable_profiling;
5840fi
5841
5842if test "x$enable_profiling" = xyes; then
5843 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005844 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846/* end confdefs.h. */
5847int main() { return 0; }
5848_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849if ac_fn_c_try_link "$LINENO"; then :
5850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005852 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005854rm -f core conftest.err conftest.$ac_objext \
5855 conftest$ac_exeext conftest.$ac_ext
5856 CC="$ac_save_cc"
5857else
5858 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5861$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862
doko@ubuntu.comba015832012-06-30 16:52:05 +02005863if test "x$enable_profiling" = xyes; then
5864 BASECFLAGS="-pg $BASECFLAGS"
5865 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
5867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5869$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870
5871# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5872# library that we build, but we do not want to link against it (we
5873# will find it with a -framework option). For this reason there is an
5874# extra variable BLDLIBRARY against which Python and the extension
5875# modules are linked, BLDLIBRARY. This is normally the same as
5876# LDLIBRARY, but empty for MacOSX framework builds.
5877if test "$enable_framework"
5878then
5879 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005880 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 BLDLIBRARY=''
5882else
5883 BLDLIBRARY='$(LDLIBRARY)'
5884fi
5885
5886# Other platforms follow
5887if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005888 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
Matthias Kloseb9621712010-04-24 17:59:49 +00005890$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891
5892 case $ac_sys_system in
5893 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005894 LDLIBRARY='libpython$(LDVERSION).dll.a'
5895 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
5897 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).so'
5899 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005900 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005902 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005903 then
5904 PY3LIBRARY=libpython3.so
5905 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005907 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).so'
5909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005910 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005912 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005913 then
5914 PY3LIBRARY=libpython3.so
5915 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 hp*|HP*)
5918 case `uname -m` in
5919 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
5922 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ;;
5925 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).dylib'
5931 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005934 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005936 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005937 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
5939 esac
5940else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005941 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 case $ac_sys_system in
5943 CYGWIN*)
5944 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ;;
5947 esac
5948fi
5949
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005950if test "$cross_compiling" = yes; then
5951 RUNSHARED=
5952fi
5953
Matthias Kloseb9621712010-04-24 17:59:49 +00005954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5955$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005958if test -n "$ac_tool_prefix"; then
5959 for ac_prog in ar aal
5960 do
5961 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5962set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5964$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005965if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
5968 if test -n "$AR"; then
5969 ac_cv_prog_AR="$AR" # Let the user override the test.
5970else
5971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972for as_dir in $PATH
5973do
5974 IFS=$as_save_IFS
5975 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005978 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 break 2
5981 fi
5982done
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984IFS=$as_save_IFS
5985
5986fi
5987fi
5988AR=$ac_cv_prog_AR
5989if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5991$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992else
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
5997
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005998 test -n "$AR" && break
5999 done
6000fi
6001if test -z "$AR"; then
6002 ac_ct_AR=$AR
6003 for ac_prog in ar aal
6004do
6005 # Extract the first word of "$ac_prog", so it can be a program name with args.
6006set dummy $ac_prog; ac_word=$2
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008$as_echo_n "checking for $ac_word... " >&6; }
6009if ${ac_cv_prog_ac_ct_AR+:} false; then :
6010 $as_echo_n "(cached) " >&6
6011else
6012 if test -n "$ac_ct_AR"; then
6013 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6014else
6015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016for as_dir in $PATH
6017do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
6020 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 ac_cv_prog_ac_ct_AR="$ac_prog"
6023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6024 break 2
6025 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006027 done
6028IFS=$as_save_IFS
6029
6030fi
6031fi
6032ac_ct_AR=$ac_cv_prog_ac_ct_AR
6033if test -n "$ac_ct_AR"; then
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6035$as_echo "$ac_ct_AR" >&6; }
6036else
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
6039fi
6040
6041
6042 test -n "$ac_ct_AR" && break
6043done
6044
6045 if test "x$ac_ct_AR" = x; then
6046 AR="ar"
6047 else
6048 case $cross_compiling:$ac_tool_warned in
6049yes:)
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6052ac_tool_warned=yes ;;
6053esac
6054 AR=$ac_ct_AR
6055 fi
6056fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057
6058
6059# tweak ARFLAGS only if the user didn't set it on the command line
6060
6061if test -z "$ARFLAGS"
6062then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006063 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064fi
6065
doko@ubuntu.com58844492012-06-30 18:25:32 +02006066if test -n "$ac_tool_prefix"; then
6067 for ac_prog in readelf
6068 do
6069 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
6073if ${ac_cv_prog_READELF+:} false; then :
6074 $as_echo_n "(cached) " >&6
6075else
6076 if test -n "$READELF"; then
6077 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6078else
6079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
6084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006086 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6088 break 2
6089 fi
6090done
6091 done
6092IFS=$as_save_IFS
6093
6094fi
6095fi
6096READELF=$ac_cv_prog_READELF
6097if test -n "$READELF"; then
6098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6099$as_echo "$READELF" >&6; }
6100else
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
6103fi
6104
6105
6106 test -n "$READELF" && break
6107 done
6108fi
6109if test -z "$READELF"; then
6110 ac_ct_READELF=$READELF
6111 for ac_prog in readelf
6112do
6113 # Extract the first word of "$ac_prog", so it can be a program name with args.
6114set dummy $ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$ac_ct_READELF"; then
6121 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006130 ac_cv_prog_ac_ct_READELF="$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
6134done
6135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6141if test -n "$ac_ct_READELF"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6143$as_echo "$ac_ct_READELF" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$ac_ct_READELF" && break
6151done
6152
6153 if test "x$ac_ct_READELF" = x; then
6154 READELF=":"
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 READELF=$ac_ct_READELF
6163 fi
6164fi
6165
6166if test "$cross_compiling" = yes; then
6167 case "$READELF" in
6168 readelf|:)
6169 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6170 ;;
6171 esac
6172fi
6173
6174
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006177hp*|HP*)
6178 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179 if test -z "$INSTALL"
6180 then
6181 INSTALL="${srcdir}/install-sh -c"
6182 fi
6183esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184# Find a good install program. We prefer a C program (faster),
6185# so one script is as good as another. But avoid the broken or
6186# incompatible versions:
6187# SysV /etc/install, /usr/sbin/install
6188# SunOS /usr/etc/install
6189# IRIX /sbin/install
6190# AIX /bin/install
6191# AmigaOS /C/install, which installs bootblocks on floppy discs
6192# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6193# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6194# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6195# OS/2's system install, which has a completely different semantic
6196# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006197# Reject install programs that cannot install multiple files.
6198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6199$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006201if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203else
6204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207 IFS=$as_save_IFS
6208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 # Account for people who put trailing slashes in PATH elements.
6210case $as_dir/ in #((
6211 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214 /usr/ucb/* ) ;;
6215 *)
6216 # OSF1 and SCO ODT 3.0 have their own names for install.
6217 # Don't use installbsd from OSF since it installs stuff as root
6218 # by default.
6219 for ac_prog in ginstall scoinst install; do
6220 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006221 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222 if test $ac_prog = install &&
6223 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6224 # AIX install. It has an incompatible calling convention.
6225 :
6226 elif test $ac_prog = install &&
6227 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6228 # program-specific install script used by HP pwplus--don't use.
6229 :
6230 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006231 rm -rf conftest.one conftest.two conftest.dir
6232 echo one > conftest.one
6233 echo two > conftest.two
6234 mkdir conftest.dir
6235 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6236 test -s conftest.one && test -s conftest.two &&
6237 test -s conftest.dir/conftest.one &&
6238 test -s conftest.dir/conftest.two
6239 then
6240 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6241 break 3
6242 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243 fi
6244 fi
6245 done
6246 done
6247 ;;
6248esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006249
6250 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251IFS=$as_save_IFS
6252
Matthias Kloseb9621712010-04-24 17:59:49 +00006253rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254
6255fi
6256 if test "${ac_cv_path_install+set}" = set; then
6257 INSTALL=$ac_cv_path_install
6258 else
6259 # As a last resort, use the slow shell script. Don't cache a
6260 # value for INSTALL within a source directory, because that will
6261 # break other packages using the cache if that directory is
6262 # removed, or if the value is a relative name.
6263 INSTALL=$ac_install_sh
6264 fi
6265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6267$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268
6269# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6270# It thinks the first close brace ends the variable substitution.
6271test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6272
6273test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6274
6275test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6276
Matthias Klose93a0ef12012-03-15 18:08:34 +01006277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6278$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6279if test -z "$MKDIR_P"; then
6280 if ${ac_cv_path_mkdir+:} false; then :
6281 $as_echo_n "(cached) " >&6
6282else
6283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6285do
6286 IFS=$as_save_IFS
6287 test -z "$as_dir" && as_dir=.
6288 for ac_prog in mkdir gmkdir; do
6289 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006290 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006291 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6292 'mkdir (GNU coreutils) '* | \
6293 'mkdir (coreutils) '* | \
6294 'mkdir (fileutils) '4.1*)
6295 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6296 break 3;;
6297 esac
6298 done
6299 done
6300 done
6301IFS=$as_save_IFS
6302
6303fi
6304
6305 test -d ./--version && rmdir ./--version
6306 if test "${ac_cv_path_mkdir+set}" = set; then
6307 MKDIR_P="$ac_cv_path_mkdir -p"
6308 else
6309 # As a last resort, use the slow shell script. Don't cache a
6310 # value for MKDIR_P within a source directory, because that will
6311 # break other packages using the cache if that directory is
6312 # removed, or if the value is a relative name.
6313 MKDIR_P="$ac_install_sh -d"
6314 fi
6315fi
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6317$as_echo "$MKDIR_P" >&6; }
6318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319
6320# Not every filesystem supports hard links
6321
6322if test -z "$LN" ; then
6323 case $ac_sys_system in
6324 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 *) LN=ln;;
6326 esac
6327fi
6328
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006329# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006330
6331ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6335$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336
6337# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006338if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 withval=$with_pydebug;
6340if test "$withval" != no
6341then
6342
Matthias Kloseb9621712010-04-24 17:59:49 +00006343$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6346$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006348 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006349else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351fi
6352else
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6354$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355fi
6356
6357
Victor Stinnerf4e47032019-04-25 00:56:28 +02006358# Check for --with-trace-refs
6359# --with-trace-refs
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6361$as_echo_n "checking for --with-trace-refs... " >&6; }
6362
6363# Check whether --with-trace-refs was given.
6364if test "${with_trace_refs+set}" = set; then :
6365 withval=$with_trace_refs;
6366else
6367 with_trace_refs=no
6368fi
6369
6370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6371$as_echo "$with_trace_refs" >&6; }
6372
6373if test "$with_trace_refs" = "yes"
6374then
6375
6376$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6377
6378fi
6379
6380# Check for --with-assertions.
6381# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006382assertions='false'
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6384$as_echo_n "checking for --with-assertions... " >&6; }
6385
6386# Check whether --with-assertions was given.
6387if test "${with_assertions+set}" = set; then :
6388 withval=$with_assertions;
6389if test "$withval" != no
6390then
6391 assertions='true'
6392fi
6393fi
6394
6395if test "$assertions" = 'true'; then
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6397$as_echo "yes" >&6; }
6398elif test "$Py_DEBUG" = 'true'; then
6399 assertions='true'
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6401$as_echo "implied by --with-pydebug" >&6; }
6402else
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6404$as_echo "no" >&6; }
6405fi
6406
Brett Cannon63d98bc2016-09-06 17:12:40 -07006407# Enable optimization flags
6408
6409
6410Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6412$as_echo_n "checking for --enable-optimizations... " >&6; }
6413# Check whether --enable-optimizations was given.
6414if test "${enable_optimizations+set}" = set; then :
6415 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006416if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006417then
6418 Py_OPT='true'
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6420$as_echo "yes" >&6; };
6421else
6422 Py_OPT='false'
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; };
6425fi
6426else
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428$as_echo "no" >&6; }
6429fi
6430
6431if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006432 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6433 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006434 # 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 +00006435 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006436 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006437 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006438 DEF_MAKE_RULE="build_all"
6439else
6440 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006441 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006442 DEF_MAKE_RULE="all"
6443fi
6444
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006445
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6447$as_echo_n "checking PROFILE_TASK... " >&6; }
6448if test -z "$PROFILE_TASK"
6449then
6450 PROFILE_TASK='-m test --pgo'
6451fi
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6453$as_echo "$PROFILE_TASK" >&6; }
6454
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006455# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6456# normal names in the default $PATH (ie: Ubuntu). They exist under the
6457# non-suffixed name in their versioned llvm directory.
6458
6459llvm_bin_dir=''
6460llvm_path="${PATH}"
6461if test "${CC}" = "clang"
6462then
6463 clang_bin=`which clang`
6464 # Some systems install clang elsewhere as a symlink to the real path
6465 # which is where the related llvm tools are located.
6466 if test -L "${clang_bin}"
6467 then
6468 clang_dir=`dirname "${clang_bin}"`
6469 clang_bin=`readlink "${clang_bin}"`
6470 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6471 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6472 fi
6473fi
6474
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006475# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6477$as_echo_n "checking for --with-lto... " >&6; }
6478
6479# Check whether --with-lto was given.
6480if test "${with_lto+set}" = set; then :
6481 withval=$with_lto;
6482if test "$withval" != no
6483then
6484 Py_LTO='true'
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6486$as_echo "yes" >&6; };
6487else
6488 Py_LTO='false'
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; };
6491fi
6492else
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494$as_echo "no" >&6; }
6495fi
6496
6497if test "$Py_LTO" = 'true' ; then
6498 case $CC in
6499 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006500
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006502$as_echo_n "checking target system type... " >&6; }
6503if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006504 $as_echo_n "(cached) " >&6
6505else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006506 if test "x$target_alias" = x; then
6507 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006508else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006509 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6510 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6511fi
6512
6513fi
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6515$as_echo "$ac_cv_target" >&6; }
6516case $ac_cv_target in
6517*-*-*) ;;
6518*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6519esac
6520target=$ac_cv_target
6521ac_save_IFS=$IFS; IFS='-'
6522set x $ac_cv_target
6523shift
6524target_cpu=$1
6525target_vendor=$2
6526shift; shift
6527# Remember, the first character of IFS is used to create $*,
6528# except with old shells:
6529target_os=$*
6530IFS=$ac_save_IFS
6531case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6532
6533
6534# The aliases save the names the user supplied, while $host etc.
6535# will get canonicalized.
6536test -n "$target_alias" &&
6537 test "$program_prefix$program_suffix$program_transform_name" = \
6538 NONENONEs,x,x, &&
6539 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006540# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6541set dummy $target_alias-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_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_LLVM_AR="$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_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
6567 ;;
6568esac
6569fi
6570LLVM_AR=$ac_cv_path_LLVM_AR
6571if test -n "$LLVM_AR"; then
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6573$as_echo "$LLVM_AR" >&6; }
6574else
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
6579
6580if test -z "$ac_cv_path_LLVM_AR"; then
6581 if test "$build" = "$target"; then
6582 ac_pt_LLVM_AR=$LLVM_AR
6583 # Extract the first word of "llvm-ar", so it can be a program name with args.
6584set dummy llvm-ar; ac_word=$2
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586$as_echo_n "checking for $ac_word... " >&6; }
6587if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589else
6590 case $ac_pt_LLVM_AR in
6591 [\\/]* | ?:[\\/]*)
6592 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6593 ;;
6594 *)
6595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596for as_dir in ${llvm_path}
6597do
6598 IFS=$as_save_IFS
6599 test -z "$as_dir" && as_dir=.
6600 for ac_exec_ext in '' $ac_executable_extensions; do
6601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604 break 2
6605 fi
6606done
6607 done
6608IFS=$as_save_IFS
6609
6610 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6611 ;;
6612esac
6613fi
6614ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6615if test -n "$ac_pt_LLVM_AR"; then
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6617$as_echo "$ac_pt_LLVM_AR" >&6; }
6618else
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6620$as_echo "no" >&6; }
6621fi
6622
6623 LLVM_AR=$ac_pt_LLVM_AR
6624 else
6625 LLVM_AR="''"
6626 fi
6627else
6628 LLVM_AR="$ac_cv_path_LLVM_AR"
6629fi
6630
6631
6632 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6633 then
6634 LLVM_AR_FOUND="found"
6635 else
6636 LLVM_AR_FOUND="not-found"
6637 fi
6638 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6639 then
6640 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6641 if test -n "${found_llvm_ar}"
6642 then
6643 LLVM_AR='/usr/bin/xcrun llvm-ar'
6644 LLVM_AR_FOUND=found
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6646$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6647 fi
6648 fi
6649 if test $LLVM_AR_FOUND = not-found
6650 then
6651 LLVM_PROFR_ERR=yes
6652 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6653 else
6654 LLVM_AR_ERR=no
6655 fi
6656 AR="${LLVM_AR}"
6657 case $ac_sys_system in
6658 Darwin*)
6659 # Any changes made here should be reflected in the GCC+Darwin case below
6660 LTOFLAGS="-flto -Wl,-export_dynamic"
6661 ;;
6662 *)
6663 LTOFLAGS="-flto"
6664 ;;
6665 esac
6666 ;;
6667 *gcc*)
6668 case $ac_sys_system in
6669 Darwin*)
6670 LTOFLAGS="-flto -Wl,-export_dynamic"
6671 ;;
6672 *)
6673 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6674 ;;
6675 esac
6676 ;;
6677 esac
6678
6679 if test "$ac_cv_prog_cc_g" = "yes"
6680 then
6681 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6682 # to get debug symbols.
6683 LTOFLAGS="$LTOFLAGS -g"
6684 fi
6685
stratakisf92c7aa2018-12-04 15:54:01 +01006686 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006687 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006688fi
6689
6690# Enable PGO flags.
6691
6692
6693
6694
6695
6696
Gregory P. Smith799520c2016-09-07 16:10:00 -07006697# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6698set dummy $target_alias-llvm-profdata; ac_word=$2
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6700$as_echo_n "checking for $ac_word... " >&6; }
6701if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6702 $as_echo_n "(cached) " >&6
6703else
6704 case $LLVM_PROFDATA in
6705 [\\/]* | ?:[\\/]*)
6706 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6707 ;;
6708 *)
6709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006711do
6712 IFS=$as_save_IFS
6713 test -z "$as_dir" && as_dir=.
6714 for ac_exec_ext in '' $ac_executable_extensions; do
6715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006716 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718 break 2
6719 fi
6720done
6721 done
6722IFS=$as_save_IFS
6723
Gregory P. Smith799520c2016-09-07 16:10:00 -07006724 ;;
6725esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006726fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6728if test -n "$LLVM_PROFDATA"; then
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6730$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006731else
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6733$as_echo "no" >&6; }
6734fi
6735
6736
Gregory P. Smith799520c2016-09-07 16:10:00 -07006737if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6738 if test "$build" = "$target"; then
6739 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6740 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6741set dummy llvm-profdata; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6745 $as_echo_n "(cached) " >&6
6746else
6747 case $ac_pt_LLVM_PROFDATA in
6748 [\\/]* | ?:[\\/]*)
6749 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6750 ;;
6751 *)
6752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in ${llvm_path}
6754do
6755 IFS=$as_save_IFS
6756 test -z "$as_dir" && as_dir=.
6757 for ac_exec_ext in '' $ac_executable_extensions; do
6758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761 break 2
6762 fi
6763done
6764 done
6765IFS=$as_save_IFS
6766
6767 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6768 ;;
6769esac
6770fi
6771ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6772if test -n "$ac_pt_LLVM_PROFDATA"; then
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6774$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6775else
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
6778fi
6779
6780 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6781 else
6782 LLVM_PROFDATA="''"
6783 fi
6784else
6785 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6786fi
6787
6788
6789if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6790then
6791 LLVM_PROF_FOUND="found"
6792else
6793 LLVM_PROF_FOUND="not-found"
6794fi
6795if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6796then
6797 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6798 if test -n "${found_llvm_profdata}"
6799 then
6800 # llvm-profdata isn't directly in $PATH in some cases.
6801 # https://apple.stackexchange.com/questions/197053/
6802 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6803 LLVM_PROF_FOUND=found
6804 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6805$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6806 fi
6807fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808LLVM_PROF_ERR=no
6809case $CC in
6810 *clang*)
6811 # Any changes made here should be reflected in the GCC+Darwin case below
6812 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006814 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006815 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6816 if test $LLVM_PROF_FOUND = not-found
6817 then
6818 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006819 if test "${REQUIRE_PGO}" = "yes"
6820 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006821 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 -07006822 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006823 fi
6824 ;;
6825 *gcc*)
6826 case $ac_sys_system in
6827 Darwin*)
6828 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6829 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006831 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006832 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833 then
6834 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006835 if test "${REQUIRE_PGO}" = "yes"
6836 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006837 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 -07006838 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006839 fi
6840 ;;
6841 *)
6842 PGO_PROF_GEN_FLAG="-fprofile-generate"
6843 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6844 LLVM_PROF_MERGER="true"
6845 LLVM_PROF_FILE=""
6846 ;;
6847 esac
6848 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006849 *icc*)
6850 PGO_PROF_GEN_FLAG="-prof-gen"
6851 PGO_PROF_USE_FLAG="-prof-use"
6852 LLVM_PROF_MERGER="true"
6853 LLVM_PROF_FILE=""
6854 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006855esac
6856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6858# merged with this chunk of code?
6859
6860# Optimizer/debugger flags
6861# ------------------------
6862# (The following bit of code is complicated enough - please keep things
6863# indented properly. Just pretend you're editing Python code. ;-)
6864
6865# There are two parallel sets of case statements below, one that checks to
6866# see if OPT was set and one that does BASECFLAGS setting based upon
6867# compiler and platform. BASECFLAGS tweaks need to be made even if the
6868# user set OPT.
6869
Victor Stinner23a683a2019-04-12 21:27:37 +02006870case $CC in
6871 *clang*)
6872 cc_is_clang=1
6873 ;;
6874 *)
6875 if $CC --version 2>&1 | grep -q clang
6876 then
6877 cc_is_clang=1
6878 else
6879 cc_is_clang=
6880 fi
6881esac
6882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883# tweak OPT based on compiler and platform, only if the user didn't set
6884# it on the command line
6885
Victor Stinner9ed34a82017-05-02 22:35:58 +02006886
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006887if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888then
6889 case $GCC in
6890 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6892 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6893 WRAP="-fwrapv"
6894 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006895
Victor Stinner35f3d242017-04-21 12:35:24 +02006896 if test -n "${cc_is_clang}"
6897 then
6898 # Clang also needs -fwrapv
6899 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006900 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6901 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006902 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006903 fi
6904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905 case $ac_cv_prog_cc_g in
6906 yes)
6907 if test "$Py_DEBUG" = 'true' ; then
6908 # Optimization messes up debuggers, so turn it off for
6909 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006910 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006911 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006912 else
Victor Stinner28205b22017-04-21 11:24:34 +02006913 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006914 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 else
Victor Stinner28205b22017-04-21 11:24:34 +02006916 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917 fi
6918 ;;
6919 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006920 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921 ;;
6922 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924 case $ac_sys_system in
6925 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6926 ;;
6927 esac
6928 ;;
6929
6930 *)
6931 OPT="-O"
6932 ;;
6933 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934fi
6935
6936
6937
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006938
stratakiscf10a752018-12-19 18:19:01 +01006939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940# The -arch flags for universal builds on OSX
6941UNIVERSAL_ARCH_FLAGS=
6942
6943
6944# tweak BASECFLAGS based on compiler and platform
6945case $GCC in
6946yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006947 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006948
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6950$as_echo_n "checking for -Wextra... " >&6; }
6951 ac_save_cc="$CC"
6952 CC="$CC -Wextra -Werror"
6953 if ${ac_cv_extra_warnings+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955else
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6957/* end confdefs.h. */
6958
6959
6960int
6961main ()
6962{
6963
6964 ;
6965 return 0;
6966}
6967
6968_ACEOF
6969if ac_fn_c_try_compile "$LINENO"; then :
6970
6971 ac_cv_extra_warnings=yes
6972
6973else
6974
6975 ac_cv_extra_warnings=no
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6979fi
6980
6981 CC="$ac_save_cc"
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6983$as_echo "$ac_cv_extra_warnings" >&6; }
6984
6985 if test $ac_cv_extra_warnings = yes
6986 then
6987 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6988 fi
6989
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 # Python doesn't violate C99 aliasing rules, but older versions of
6991 # GCC produce warnings for legal Python code. Enable
6992 # -fno-strict-aliasing on versions of GCC that support but produce
6993 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6995$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996 ac_save_cc="$CC"
6997 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006998 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006999 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007004
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007006int
7007main ()
7008{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007009
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007010 ;
7011 return 0;
7012}
Matthias Kloseb159a552010-04-25 21:00:44 +00007013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007015if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007016
7017 CC="$ac_save_cc -fstrict-aliasing"
7018 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007020/* end confdefs.h. */
7021
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007022 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023int
7024main ()
7025{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007026double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027 ;
7028 return 0;
7029}
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007033
7034 ac_cv_no_strict_aliasing=no
7035
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007036else
Matthias Kloseb159a552010-04-25 21:00:44 +00007037
7038 ac_cv_no_strict_aliasing=yes
7039
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007040fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007042
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043else
Matthias Kloseb159a552010-04-25 21:00:44 +00007044
7045 ac_cv_no_strict_aliasing=no
7046
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007047fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007049fi
7050
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007051 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7054$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007055 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056 then
7057 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7058 fi
7059
Zachary Ware5af85642015-12-21 12:09:17 -06007060 # ICC doesn't recognize the option, but only emits a warning
7061 ## XXX does it emit an unused result warning and can it be disabled?
7062 case "$CC" in
7063 *icc*)
7064 ac_cv_disable_unused_result_warning=no
7065 ;;
7066 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7068$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7069 ac_save_cc="$CC"
7070 CC="$CC -Wunused-result -Werror"
7071 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007072 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007073 $as_echo_n "(cached) " >&6
7074else
7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076/* end confdefs.h. */
7077
7078
7079int
7080main ()
7081{
7082
7083 ;
7084 return 0;
7085}
7086
7087_ACEOF
7088if ac_fn_c_try_compile "$LINENO"; then :
7089
7090 ac_cv_disable_unused_result_warning=yes
7091
7092else
7093
7094 ac_cv_disable_unused_result_warning=no
7095
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098fi
7099
7100 CFLAGS="$save_CFLAGS"
7101 CC="$ac_save_cc"
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7103$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007104 ;;
7105 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007106
7107 if test $ac_cv_disable_unused_result_warning = yes
7108 then
7109 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007110 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7111 fi
7112
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7114$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7115 ac_save_cc="$CC"
7116 CC="$CC -Wunused-parameter -Werror"
7117 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7118 $as_echo_n "(cached) " >&6
7119else
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121/* end confdefs.h. */
7122
7123
7124int
7125main ()
7126{
7127
7128 ;
7129 return 0;
7130}
7131
7132_ACEOF
7133if ac_fn_c_try_compile "$LINENO"; then :
7134
7135 ac_cv_disable_unused_parameter_warning=yes
7136
7137else
7138
7139 ac_cv_disable_unused_parameter_warning=no
7140
7141fi
7142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7143fi
7144
7145 CC="$ac_save_cc"
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7147$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7148
7149 if test $ac_cv_disable_unused_parameter_warning = yes
7150 then
7151 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7152 fi
7153
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7155$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7156 ac_save_cc="$CC"
7157 CC="$CC -Wmissing-field-initializers -Werror"
7158 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7159 $as_echo_n "(cached) " >&6
7160else
7161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162/* end confdefs.h. */
7163
7164
7165int
7166main ()
7167{
7168
7169 ;
7170 return 0;
7171}
7172
7173_ACEOF
7174if ac_fn_c_try_compile "$LINENO"; then :
7175
7176 ac_cv_disable_missing_field_initializers=yes
7177
7178else
7179
7180 ac_cv_disable_missing_field_initializers=no
7181
7182fi
7183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7184fi
7185
7186 CC="$ac_save_cc"
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7188$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7189
7190 if test $ac_cv_disable_missing_field_initializers = yes
7191 then
7192 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007193 fi
7194
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7196$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7197 ac_save_cc="$CC"
7198 CC="$CC -Wsign-compare"
7199 save_CFLAGS="$CFLAGS"
7200 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7201 $as_echo_n "(cached) " >&6
7202else
7203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204/* end confdefs.h. */
7205
7206
7207int
7208main ()
7209{
7210
7211 ;
7212 return 0;
7213}
7214
7215_ACEOF
7216if ac_fn_c_try_compile "$LINENO"; then :
7217
7218 ac_cv_enable_sign_compare_warning=yes
7219
7220else
7221
7222 ac_cv_enable_sign_compare_warning=no
7223
7224fi
7225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7226fi
7227
7228 CFLAGS="$save_CFLAGS"
7229 CC="$ac_save_cc"
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7231$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7232
7233 if test $ac_cv_enable_sign_compare_warning = yes
7234 then
7235 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7236 fi
7237
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7239$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7240 ac_save_cc="$CC"
7241 CC="$CC -Wunreachable-code"
7242 save_CFLAGS="$CFLAGS"
7243 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7244 $as_echo_n "(cached) " >&6
7245else
7246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7247/* end confdefs.h. */
7248
7249
7250int
7251main ()
7252{
7253
7254 ;
7255 return 0;
7256}
7257
7258_ACEOF
7259if ac_fn_c_try_compile "$LINENO"; then :
7260
7261 ac_cv_enable_unreachable_code_warning=yes
7262
7263else
7264
7265 ac_cv_enable_unreachable_code_warning=no
7266
7267fi
7268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7269fi
7270
7271 CFLAGS="$save_CFLAGS"
7272 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007273
7274 # Don't enable unreachable code warning in debug mode, since it usually
7275 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007276 # Issue #24324: Unfortunately, the unreachable code warning does not work
7277 # correctly on gcc and has been silently removed from the compiler.
7278 # It is supported on clang but on OS X systems gcc may be an alias
7279 # for clang. Try to determine if the compiler is not really gcc and,
7280 # if so, only then enable the warning.
7281 if test $ac_cv_enable_unreachable_code_warning = yes && \
7282 test "$Py_DEBUG" != "true" && \
7283 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007284 then
7285 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007286 else
7287 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007288 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7290$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007291
INADA Naokie3364842018-06-05 20:40:53 +09007292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7293$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7294 ac_save_cc="$CC"
7295 CC="$CC -Werror -Wstrict-prototypes"
7296 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7297 $as_echo_n "(cached) " >&6
7298else
7299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7300/* end confdefs.h. */
7301
7302
7303int
7304main ()
7305{
7306
7307 ;
7308 return 0;
7309}
7310
7311_ACEOF
7312if ac_fn_c_try_compile "$LINENO"; then :
7313
7314 ac_cv_enable_strict_prototypes_warning=yes
7315
7316else
7317
7318 ac_cv_enable_strict_prototypes_warning=no
7319
7320fi
7321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7322fi
7323
7324 CC="$ac_save_cc"
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7326$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7327
7328 if test $ac_cv_enable_strict_prototypes_warning = yes
7329 then
7330 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7331 fi
7332
Victor Stinner193ee0a2017-02-06 14:24:00 +01007333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7334$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7335 ac_save_cc="$CC"
7336 CC="$CC -Werror=implicit-function-declaration"
7337 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7338 $as_echo_n "(cached) " >&6
7339else
7340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7341/* end confdefs.h. */
7342
7343
7344int
7345main ()
7346{
7347
7348 ;
7349 return 0;
7350}
7351
7352_ACEOF
7353if ac_fn_c_try_compile "$LINENO"; then :
7354
7355 ac_cv_enable_implicit_function_declaration_error=yes
7356
7357else
7358
7359 ac_cv_enable_implicit_function_declaration_error=no
7360
7361fi
7362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7363fi
7364
7365 CC="$ac_save_cc"
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7367$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7368
7369 if test $ac_cv_enable_implicit_function_declaration_error = yes
7370 then
7371 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7372 fi
7373
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7375 # support. Without this, treatment of subnormals doesn't follow
7376 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007377 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378 alpha*)
7379 BASECFLAGS="$BASECFLAGS -mieee"
7380 ;;
7381 esac
7382
7383 case $ac_sys_system in
7384 SCO_SV*)
7385 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7386 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007387
Ned Deily87adb6e2013-10-18 21:09:56 -07007388 Darwin*)
7389 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7390 # used to be here, but non-Apple gcc doesn't accept them.
7391 if test "${CC}" = gcc
7392 then
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007394$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007395 case "${UNIVERSALSDK}" in
7396 */MacOSX10.4u.sdk)
7397 # Build using 10.4 SDK, force usage of gcc when the
7398 # compiler is gcc, otherwise the user will get very
7399 # confusing error messages when building on OSX 10.6
7400 CC=gcc-4.0
7401 CPP=cpp-4.0
7402 ;;
7403 esac
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007405$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007406 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407
Ned Deily87adb6e2013-10-18 21:09:56 -07007408 if test "${enable_universalsdk}"
7409 then
7410 case "$UNIVERSAL_ARCHS" in
7411 32-bit)
7412 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7413 LIPO_32BIT_FLAGS=""
7414 ARCH_RUN_32BIT=""
7415 ;;
7416 64-bit)
7417 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7418 LIPO_32BIT_FLAGS=""
7419 ARCH_RUN_32BIT="true"
7420 ;;
7421 all)
7422 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7423 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7424 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7425 ;;
7426 intel)
7427 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7428 LIPO_32BIT_FLAGS="-extract i386"
7429 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7430 ;;
7431 intel-32)
7432 UNIVERSAL_ARCH_FLAGS="-arch i386"
7433 LIPO_32BIT_FLAGS=""
7434 ARCH_RUN_32BIT=""
7435 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007436 intel-64)
7437 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7438 LIPO_32BIT_FLAGS=""
7439 ARCH_RUN_32BIT="true"
7440 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 3-way)
7442 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7443 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7444 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7445 ;;
7446 *)
7447 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7448 ;;
7449 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 if test "${UNIVERSALSDK}" != "/"
7452 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007453 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7454 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007455 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007456 else
7457 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7458 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007459 fi
7460 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461
Ned Deily87adb6e2013-10-18 21:09:56 -07007462 # Calculate an appropriate deployment target for this build:
7463 # The deployment target value is used explicitly to enable certain
7464 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007465 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007466 # component of the string returned by distutils.get_platform().
7467 #
7468 # Use the value from:
7469 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7470 # 2. the operating system version of the build machine if >= 10.6
7471 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7472 # below to pick either 10.3, 10.4, or 10.5 as the target.
7473 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474
Ned Deily87adb6e2013-10-18 21:09:56 -07007475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7476$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007477 cur_target_major=`sw_vers -productVersion | \
7478 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7479 cur_target_minor=`sw_vers -productVersion | \
7480 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7481 cur_target="${cur_target_major}.${cur_target_minor}"
7482 if test ${cur_target_major} -eq 10 && \
7483 test ${cur_target_minor} -ge 3 && \
7484 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007485 then
Ned Deily36820b62014-06-25 13:44:22 -07007486 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007487 cur_target=10.3
7488 if test ${enable_universalsdk}
7489 then
7490 case "$UNIVERSAL_ARCHS" in
7491 all|3-way|intel|64-bit)
7492 # These configurations were first supported in 10.5
7493 cur_target='10.5'
7494 ;;
7495 esac
7496 else
7497 if test `/usr/bin/arch` = "i386"
7498 then
7499 # 10.4 was the first release to support Intel archs
7500 cur_target="10.4"
7501 fi
7502 fi
7503 fi
7504 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007505
Ned Deily87adb6e2013-10-18 21:09:56 -07007506 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7507 # environment with a value that is the same as what we'll use
7508 # in the Makefile to ensure that we'll get the same compiler
7509 # environment during configure and build time.
7510 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7511 export MACOSX_DEPLOYMENT_TARGET
7512 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7514$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007515
Ned Deily87adb6e2013-10-18 21:09:56 -07007516 # end of Darwin* tests
7517 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518 esac
7519 ;;
7520
7521*)
7522 case $ac_sys_system in
7523 OpenUNIX*|UnixWare*)
7524 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7525 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526 SCO_SV*)
7527 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7528 ;;
7529 esac
7530 ;;
7531esac
7532
Zachary Ware5af85642015-12-21 12:09:17 -06007533# ICC needs -fp-model strict or floats behave badly
7534case "$CC" in
7535*icc*)
7536 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7537 ;;
7538esac
7539
T. Woutersddbfa2c2017-05-23 01:30:49 +02007540if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541 :
7542else
7543 OPT="-DNDEBUG $OPT"
7544fi
7545
7546if test "$ac_arch_flags"
7547then
7548 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7549fi
7550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551# On some compilers, pthreads are available without further options
7552# (e.g. MacOS X). On some of these systems, the compiler will not
7553# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7554# So we have to see first whether pthreads are available without
7555# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7557$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007558if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560else
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562 ac_cv_pthread_is_default=no
7563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565/* end confdefs.h. */
7566
Stefan Krah7dba5942012-11-22 22:49:11 +01007567#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568#include <pthread.h>
7569
7570void* routine(void* p){return NULL;}
7571
7572int main(){
7573 pthread_t p;
7574 if(pthread_create(&p,NULL,routine,NULL)!=0)
7575 return 1;
7576 (void)pthread_detach(p);
7577 return 0;
7578}
7579
7580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582
7583 ac_cv_pthread_is_default=yes
7584 ac_cv_kthread=no
7585 ac_cv_pthread=no
7586
7587else
Matthias Kloseb9621712010-04-24 17:59:49 +00007588 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592fi
7593
7594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595fi
7596
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7598$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599
7600
7601if test $ac_cv_pthread_is_default = yes
7602then
7603 ac_cv_kpthread=no
7604else
7605# -Kpthread, if available, provides the right #defines
7606# and linker options to make pthread_create available
7607# Some compilers won't report that they do not support -Kpthread,
7608# so we need to run a program to see whether it really made the
7609# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7611$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007612if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614else
7615 ac_save_cc="$CC"
7616CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007617if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618 ac_cv_kpthread=no
7619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621/* end confdefs.h. */
7622
Stefan Krah7dba5942012-11-22 22:49:11 +01007623#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624#include <pthread.h>
7625
7626void* routine(void* p){return NULL;}
7627
7628int main(){
7629 pthread_t p;
7630 if(pthread_create(&p,NULL,routine,NULL)!=0)
7631 return 1;
7632 (void)pthread_detach(p);
7633 return 0;
7634}
7635
7636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007637if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638 ac_cv_kpthread=yes
7639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644fi
7645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646CC="$ac_save_cc"
7647fi
7648
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7650$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651fi
7652
7653if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7654then
7655# -Kthread, if available, provides the right #defines
7656# and linker options to make pthread_create available
7657# Some compilers won't report that they do not support -Kthread,
7658# so we need to run a program to see whether it really made the
7659# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7661$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007662if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664else
7665 ac_save_cc="$CC"
7666CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007667if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668 ac_cv_kthread=no
7669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671/* end confdefs.h. */
7672
Stefan Krah7dba5942012-11-22 22:49:11 +01007673#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674#include <pthread.h>
7675
7676void* routine(void* p){return NULL;}
7677
7678int main(){
7679 pthread_t p;
7680 if(pthread_create(&p,NULL,routine,NULL)!=0)
7681 return 1;
7682 (void)pthread_detach(p);
7683 return 0;
7684}
7685
7686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007687if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688 ac_cv_kthread=yes
7689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694fi
7695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696CC="$ac_save_cc"
7697fi
7698
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7700$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701fi
7702
7703if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7704then
7705# -pthread, if available, provides the right #defines
7706# and linker options to make pthread_create available
7707# Some compilers won't report that they do not support -pthread,
7708# so we need to run a program to see whether it really made the
7709# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7711$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007712if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714else
7715 ac_save_cc="$CC"
7716CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007717if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718 ac_cv_pthread=no
7719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721/* end confdefs.h. */
7722
Stefan Krah7dba5942012-11-22 22:49:11 +01007723#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724#include <pthread.h>
7725
7726void* routine(void* p){return NULL;}
7727
7728int main(){
7729 pthread_t p;
7730 if(pthread_create(&p,NULL,routine,NULL)!=0)
7731 return 1;
7732 (void)pthread_detach(p);
7733 return 0;
7734}
7735
7736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007737if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738 ac_cv_pthread=yes
7739else
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744fi
7745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746CC="$ac_save_cc"
7747fi
7748
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7750$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751fi
7752
7753# If we have set a CC compiler flag for thread support then
7754# check if it works for CXX, too.
7755ac_cv_cxx_thread=no
7756if test ! -z "$CXX"
7757then
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7759$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760ac_save_cxx="$CXX"
7761
7762if test "$ac_cv_kpthread" = "yes"
7763then
7764 CXX="$CXX -Kpthread"
7765 ac_cv_cxx_thread=yes
7766elif test "$ac_cv_kthread" = "yes"
7767then
7768 CXX="$CXX -Kthread"
7769 ac_cv_cxx_thread=yes
7770elif test "$ac_cv_pthread" = "yes"
7771then
7772 CXX="$CXX -pthread"
7773 ac_cv_cxx_thread=yes
7774fi
7775
7776if test $ac_cv_cxx_thread = yes
7777then
7778 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7779 $CXX -c conftest.$ac_ext 2>&5
7780 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7781 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7782 then
7783 ac_cv_cxx_thread=yes
7784 else
7785 ac_cv_cxx_thread=no
7786 fi
7787 rm -fr conftest*
7788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7790$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791fi
7792CXX="$ac_save_cxx"
7793
7794
7795# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7797$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007798if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800else
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802/* end confdefs.h. */
7803#include <stdlib.h>
7804#include <stdarg.h>
7805#include <string.h>
7806#include <float.h>
7807
7808int
7809main ()
7810{
7811
7812 ;
7813 return 0;
7814}
7815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007816if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817 ac_cv_header_stdc=yes
7818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7822
7823if test $ac_cv_header_stdc = yes; then
7824 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826/* end confdefs.h. */
7827#include <string.h>
7828
7829_ACEOF
7830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 $EGREP "memchr" >/dev/null 2>&1; then :
7832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833else
7834 ac_cv_header_stdc=no
7835fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007836rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837
7838fi
7839
7840if test $ac_cv_header_stdc = yes; then
7841 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843/* end confdefs.h. */
7844#include <stdlib.h>
7845
7846_ACEOF
7847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 $EGREP "free" >/dev/null 2>&1; then :
7849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850else
7851 ac_cv_header_stdc=no
7852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007853rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854
7855fi
7856
7857if test $ac_cv_header_stdc = yes; then
7858 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860 :
7861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863/* end confdefs.h. */
7864#include <ctype.h>
7865#include <stdlib.h>
7866#if ((' ' & 0x0FF) == 0x020)
7867# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7868# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7869#else
7870# define ISLOWER(c) \
7871 (('a' <= (c) && (c) <= 'i') \
7872 || ('j' <= (c) && (c) <= 'r') \
7873 || ('s' <= (c) && (c) <= 'z'))
7874# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7875#endif
7876
7877#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7878int
7879main ()
7880{
7881 int i;
7882 for (i = 0; i < 256; i++)
7883 if (XOR (islower (i), ISLOWER (i))
7884 || toupper (i) != TOUPPER (i))
7885 return 2;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_run "$LINENO"; then :
7890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896fi
7897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007898fi
7899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7901$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902if test $ac_cv_header_stdc = yes; then
7903
Matthias Kloseb9621712010-04-24 17:59:49 +00007904$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007905
7906fi
7907
stratakise768c862018-01-23 16:11:24 +01007908for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007909fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007910ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007911sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007912utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007913poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007914sys/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 +01007915sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007916sys/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 +01007917sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007918sys/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 -07007919libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007920linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007921sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007922do :
7923 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7924ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007925if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007927#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007928_ACEOF
7929
7930fi
7931
Guido van Rossum627b2d71993-12-24 10:39:16 +00007932done
7933
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007934ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007935for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7938$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007939if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007943/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944#include <sys/types.h>
7945#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007946
Martin v. Löwis11437992002-04-12 09:54:03 +00007947int
7948main ()
7949{
7950if ((DIR *) 0)
7951return 0;
7952 ;
7953 return 0;
7954}
7955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963eval ac_res=\$$as_ac_Header
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7965$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007966if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007968#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007969_ACEOF
7970
7971ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974done
7975# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7976if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7978$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007981else
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986/* Override any GCC internal prototype to avoid an error.
7987 Use char because int might match the return type of a GCC
7988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989#ifdef __cplusplus
7990extern "C"
7991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007992char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007993int
7994main ()
7995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ;
7998 return 0;
7999}
8000_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001for ac_lib in '' dir; do
8002 if test -z "$ac_lib"; then
8003 ac_res="none required"
8004 else
8005 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008006 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008013 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016done
Victor Stinnere0be4232011-10-25 13:06:09 +02008017if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019else
8020 ac_cv_search_opendir=no
8021fi
8022rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008023LIBS=$ac_func_search_save_LIBS
8024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8026$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008028if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008031fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Michael W. Hudson54241132001-12-07 15:38:26 +00008033else
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8035$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008036if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008038else
8039 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043/* Override any GCC internal prototype to avoid an error.
8044 Use char because int might match the return type of a GCC
8045 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008046#ifdef __cplusplus
8047extern "C"
8048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008049char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008050int
8051main ()
8052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 ;
8055 return 0;
8056}
8057_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058for ac_lib in '' x; do
8059 if test -z "$ac_lib"; then
8060 ac_res="none required"
8061 else
8062 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008063 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068rm -f core conftest.err conftest.$ac_objext \
8069 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008070 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073done
Victor Stinnere0be4232011-10-25 13:06:09 +02008074if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076else
8077 ac_cv_search_opendir=no
8078fi
8079rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008080LIBS=$ac_func_search_save_LIBS
8081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8083$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008085if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088fi
8089
8090fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008091
Matthias Kloseb9621712010-04-24 17:59:49 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8093$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008094if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008099#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008100int
8101main ()
8102{
8103return makedev(0, 0);
8104 ;
8105 return 0;
8106}
8107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008109 ac_cv_header_sys_types_h_makedev=yes
8110else
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113rm -f core conftest.err conftest.$ac_objext \
8114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008115
8116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8118$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008119
8120if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008121ac_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 +02008122if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008125
8126fi
8127
8128
8129
8130 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 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 +02008132if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008135
8136fi
8137
8138
8139 fi
8140fi
8141
Michael W. Hudson54241132001-12-07 15:38:26 +00008142
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008143# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8144# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8145SAVE_CFLAGS=$CFLAGS
8146CFLAGS="-std=c99 $CFLAGS"
8147for ac_header in bluetooth/bluetooth.h
8148do :
8149 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8150if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8151 cat >>confdefs.h <<_ACEOF
8152#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8153_ACEOF
8154
8155fi
8156
8157done
8158
8159CFLAGS=$SAVE_CFLAGS
8160
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008161# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8162for ac_header in net/if.h
8163do :
8164 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8165#ifdef STDC_HEADERS
8166# include <stdlib.h>
8167# include <stddef.h>
8168#else
8169# ifdef HAVE_STDLIB_H
8170# include <stdlib.h>
8171# endif
8172#endif
8173#ifdef HAVE_SYS_SOCKET_H
8174# include <sys/socket.h>
8175#endif
8176
8177"
Victor Stinnere0be4232011-10-25 13:06:09 +02008178if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008179 cat >>confdefs.h <<_ACEOF
8180#define HAVE_NET_IF_H 1
8181_ACEOF
8182
8183fi
8184
8185done
8186
8187
Martin v. Löwis11017b12006-01-14 18:12:57 +00008188# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008189for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008190do :
8191 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 +00008192#ifdef HAVE_ASM_TYPES_H
8193#include <asm/types.h>
8194#endif
8195#ifdef HAVE_SYS_SOCKET_H
8196#include <sys/socket.h>
8197#endif
8198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199"
Victor Stinnere0be4232011-10-25 13:06:09 +02008200if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008202#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008203_ACEOF
8204
8205fi
8206
8207done
8208
8209
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008210# On Linux, qrtr.h requires asm/types.h
8211for ac_header in linux/qrtr.h
8212do :
8213 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8214#ifdef HAVE_ASM_TYPES_H
8215#include <asm/types.h>
8216#endif
8217#ifdef HAVE_SYS_SOCKET_H
8218#include <sys/socket.h>
8219#endif
8220
8221"
8222if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8223 cat >>confdefs.h <<_ACEOF
8224#define HAVE_LINUX_QRTR_H 1
8225_ACEOF
8226
8227fi
8228
8229done
8230
8231
caaveryeffc12f2017-09-06 18:18:10 -04008232for ac_header in linux/vm_sockets.h
8233do :
8234 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8235#ifdef HAVE_SYS_SOCKET_H
8236#include <sys/socket.h>
8237#endif
8238
8239"
8240if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8241 cat >>confdefs.h <<_ACEOF
8242#define HAVE_LINUX_VM_SOCKETS_H 1
8243_ACEOF
8244
8245fi
8246
8247done
8248
8249
Charles-François Natali47413c12011-10-06 19:47:44 +02008250# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008251for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008252do :
8253 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8254ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8255#ifdef HAVE_SYS_SOCKET_H
8256#include <sys/socket.h>
8257#endif
8258
8259"
8260if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8261 cat >>confdefs.h <<_ACEOF
8262#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8263_ACEOF
8264
8265fi
8266
8267done
8268
8269
Guido van Rossum627b2d71993-12-24 10:39:16 +00008270# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008271was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8273$as_echo_n "checking for clock_t in time.h... " >&6; }
8274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008275/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008281 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008282else
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
8284
Matthias Kloseb9621712010-04-24 17:59:49 +00008285$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008286
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008287
Guido van Rossum627b2d71993-12-24 10:39:16 +00008288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008289rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8292$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008293
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8295$as_echo_n "checking for makedev... " >&6; }
8296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008297/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008298
Jesus Cea740f53a2010-04-28 11:35:30 +00008299#if defined(MAJOR_IN_MKDEV)
8300#include <sys/mkdev.h>
8301#elif defined(MAJOR_IN_SYSMACROS)
8302#include <sys/sysmacros.h>
8303#else
8304#include <sys/types.h>
8305#endif
8306
Neal Norwitz11690112002-07-30 01:08:28 +00008307int
8308main ()
8309{
Jesus Cea740f53a2010-04-28 11:35:30 +00008310
8311 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008312 ;
8313 return 0;
8314}
Matthias Kloseb159a552010-04-25 21:00:44 +00008315
Neal Norwitz11690112002-07-30 01:08:28 +00008316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008317if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008318 ac_cv_has_makedev=yes
8319else
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322rm -f core conftest.err conftest.$ac_objext \
8323 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8325$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008326if test "$ac_cv_has_makedev" = "yes"; then
8327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008329
8330fi
8331
Christian Heimes985ecdc2013-11-20 11:46:18 +01008332# byte swapping
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8334$as_echo_n "checking for le64toh... " >&6; }
8335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8336/* end confdefs.h. */
8337
8338#ifdef HAVE_ENDIAN_H
8339#include <endian.h>
8340#elif defined(HAVE_SYS_ENDIAN_H)
8341#include <sys/endian.h>
8342#endif
8343
8344int
8345main ()
8346{
8347
8348 le64toh(1)
8349 ;
8350 return 0;
8351}
8352
8353_ACEOF
8354if ac_fn_c_try_link "$LINENO"; then :
8355 ac_cv_has_le64toh=yes
8356else
8357 ac_cv_has_le64toh=no
8358fi
8359rm -f core conftest.err conftest.$ac_objext \
8360 conftest$ac_exeext conftest.$ac_ext
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8362$as_echo "$ac_cv_has_le64toh" >&6; }
8363if test "$ac_cv_has_le64toh" = "yes"; then
8364
8365$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8366
8367fi
8368
Martin v. Löwis399a6892002-10-04 10:22:02 +00008369use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008370# Don't use largefile support for GNU/Hurd
8371case $ac_sys_system in GNU*)
8372 use_lfs=no
8373esac
8374
Martin v. Löwis399a6892002-10-04 10:22:02 +00008375if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008376# Two defines needed to enable largefile support on various platforms
8377# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008378case $ac_sys_system/$ac_sys_release in
8379AIX*)
8380
8381$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8382
8383 ;;
8384esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
8388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008390
Martin v. Löwis399a6892002-10-04 10:22:02 +00008391fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008392
Guido van Rossum84e7b241996-08-19 21:59:00 +00008393# Add some code to confdefs.h so that the test for off_t works on SCO
8394cat >> confdefs.h <<\EOF
8395#if defined(SCO_DS)
8396#undef _OFF_T
8397#endif
8398EOF
8399
Guido van Rossumef2255b2000-03-10 22:30:29 +00008400# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008401ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008402if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008403
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008404else
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
8406cat >>confdefs.h <<_ACEOF
8407#define mode_t int
8408_ACEOF
8409
8410fi
8411
Matthias Kloseb9621712010-04-24 17:59:49 +00008412ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if test "x$ac_cv_type_off_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008419_ACEOF
8420
8421fi
8422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008424if test "x$ac_cv_type_pid_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
8429#define pid_t int
8430_ACEOF
8431
8432fi
8433
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008436#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008437_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008440if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008442else
Martin v. Löwis11437992002-04-12 09:54:03 +00008443
8444cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008446_ACEOF
8447
8448fi
8449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8451$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008457#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008458
8459_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008462 ac_cv_type_uid_t=yes
8463else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008464 ac_cv_type_uid_t=no
8465fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008466rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008467
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8470$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008471if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008472
Matthias Kloseb9621712010-04-24 17:59:49 +00008473$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
8475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008477
8478fi
8479
Mark Dickinson983bc162012-12-02 12:11:38 +00008480
Matthias Kloseb9621712010-04-24 17:59:49 +00008481ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008485
8486fi
8487
Stefan Krah1919b7e2012-03-21 18:25:23 +01008488ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8489if test "x$ac_cv_type___uint128_t" = xyes; then :
8490
8491$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8492
8493fi
8494
Jack Jansendd19cf82001-12-06 22:36:17 +00008495
Michael W. Hudson54241132001-12-07 15:38:26 +00008496# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008497# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498# The cast to long int works around a bug in the HP C Compiler
8499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8501# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8503$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008504if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008506else
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 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 +00008508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 if test "$ac_cv_type_int" = yes; then
8511 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8512$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008513as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008514See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 else
8516 ac_cv_sizeof_int=0
8517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8522$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523
8524
8525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008527#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008528_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008529
8530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531# The cast to long int works around a bug in the HP C Compiler
8532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8534# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8536$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008537if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 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 +00008541
Martin v. Löwis11437992002-04-12 09:54:03 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 if test "$ac_cv_type_long" = yes; then
8544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008546as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008547See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 else
8549 ac_cv_sizeof_long=0
8550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8555$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556
8557
8558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008560#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008561_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008562
8563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564# The cast to long int works around a bug in the HP C Compiler
8565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8567# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8569$as_echo_n "checking size of long long... " >&6; }
8570if ${ac_cv_sizeof_long_long+:} false; then :
8571 $as_echo_n "(cached) " >&6
8572else
8573 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8574
8575else
8576 if test "$ac_cv_type_long_long" = yes; then
8577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8579as_fn_error 77 "cannot compute sizeof (long long)
8580See \`config.log' for more details" "$LINENO" 5; }
8581 else
8582 ac_cv_sizeof_long_long=0
8583 fi
8584fi
8585
8586fi
8587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8588$as_echo "$ac_cv_sizeof_long_long" >&6; }
8589
8590
8591
8592cat >>confdefs.h <<_ACEOF
8593#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8594_ACEOF
8595
8596
8597# The cast to long int works around a bug in the HP C Compiler
8598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8600# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8602$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008603if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 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 +00008607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 if test "$ac_cv_type_void_p" = yes; then
8610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008612as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008613See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614 else
8615 ac_cv_sizeof_void_p=0
8616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8621$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622
8623
8624
Martin v. Löwis11437992002-04-12 09:54:03 +00008625cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008626#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008628
8629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630# The cast to long int works around a bug in the HP C Compiler
8631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8633# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8635$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008638else
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 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 +00008640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 if test "$ac_cv_type_short" = yes; then
8643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008645as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008646See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647 else
8648 ac_cv_sizeof_short=0
8649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8654$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655
8656
8657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008659#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008660_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008661
8662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663# The cast to long int works around a bug in the HP C Compiler
8664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8666# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8668$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008669if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008671else
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 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 +00008673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 if test "$ac_cv_type_float" = yes; then
8676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008678as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008679See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 else
8681 ac_cv_sizeof_float=0
8682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8687$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688
8689
8690
Martin v. Löwis11437992002-04-12 09:54:03 +00008691cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008692#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008693_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008694
8695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696# The cast to long int works around a bug in the HP C Compiler
8697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8701$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008702if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 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 +00008706
Martin v. Löwis11437992002-04-12 09:54:03 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 if test "$ac_cv_type_double" = yes; then
8709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008711as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008712See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713 else
8714 ac_cv_sizeof_double=0
8715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8720$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721
8722
8723
Martin v. Löwis11437992002-04-12 09:54:03 +00008724cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008725#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008726_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008727
8728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729# The cast to long int works around a bug in the HP C Compiler
8730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8732# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8734$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008735if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 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 +00008739
Martin v. Löwis11437992002-04-12 09:54:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 if test "$ac_cv_type_fpos_t" = yes; then
8742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008744as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008745See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746 else
8747 ac_cv_sizeof_fpos_t=0
8748 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750
Martin v. Löwis11437992002-04-12 09:54:03 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8753$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754
8755
8756
Martin v. Löwis11437992002-04-12 09:54:03 +00008757cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008758#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008759_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008760
Michael W. Hudson54241132001-12-07 15:38:26 +00008761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762# The cast to long int works around a bug in the HP C Compiler
8763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8765# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8767$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008768if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 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 +00008772
Martin v. Löwis18e16552006-02-15 17:27:45 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 if test "$ac_cv_type_size_t" = yes; then
8775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008777as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008778See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779 else
8780 ac_cv_sizeof_size_t=0
8781 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783
Martin v. Löwis18e16552006-02-15 17:27:45 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8786$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787
8788
8789
Martin v. Löwis18e16552006-02-15 17:27:45 +00008790cat >>confdefs.h <<_ACEOF
8791#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8792_ACEOF
8793
8794
Christian Heimes400adb02008-02-01 08:12:03 +00008795# The cast to long int works around a bug in the HP C Compiler
8796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8798# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8800$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008801if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008803else
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 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 +00008805
Christian Heimes400adb02008-02-01 08:12:03 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if test "$ac_cv_type_pid_t" = yes; then
8808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008810as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008811See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008812 else
8813 ac_cv_sizeof_pid_t=0
8814 fi
8815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816
Christian Heimes400adb02008-02-01 08:12:03 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8819$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008820
8821
8822
8823cat >>confdefs.h <<_ACEOF
8824#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8825_ACEOF
8826
8827
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008828# The cast to long int works around a bug in the HP C Compiler
8829# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8830# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8831# This bug is HP SR number 8606223364.
8832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8833$as_echo_n "checking size of uintptr_t... " >&6; }
8834if ${ac_cv_sizeof_uintptr_t+:} false; then :
8835 $as_echo_n "(cached) " >&6
8836else
8837 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8838
8839else
8840 if test "$ac_cv_type_uintptr_t" = yes; then
8841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8843as_fn_error 77 "cannot compute sizeof (uintptr_t)
8844See \`config.log' for more details" "$LINENO" 5; }
8845 else
8846 ac_cv_sizeof_uintptr_t=0
8847 fi
8848fi
8849
8850fi
8851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8852$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8853
8854
8855
8856cat >>confdefs.h <<_ACEOF
8857#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8858_ACEOF
8859
8860
Michael W. Hudson54241132001-12-07 15:38:26 +00008861
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008862
Eitan Adler3055c942018-05-15 22:58:09 -07008863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8864$as_echo_n "checking for long double... " >&6; }
8865if ${ac_cv_type_long_double+:} false; then :
8866 $as_echo_n "(cached) " >&6
8867else
8868 if test "$GCC" = yes; then
8869 ac_cv_type_long_double=yes
8870 else
8871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8872/* end confdefs.h. */
8873/* The Stardent Vistra knows sizeof (long double), but does
8874 not support it. */
8875 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008876int
8877main ()
8878{
Eitan Adler3055c942018-05-15 22:58:09 -07008879static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8880 sizeof (double) <= sizeof (long double))];
8881test_array [0] = 0;
8882return test_array [0];
8883
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008884 ;
8885 return 0;
8886}
8887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008888if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008889 ac_cv_type_long_double=yes
8890else
8891 ac_cv_type_long_double=no
8892fi
8893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8894 fi
8895fi
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8897$as_echo "$ac_cv_type_long_double" >&6; }
8898 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008899
Matthias Kloseb9621712010-04-24 17:59:49 +00008900$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008901
Eitan Adler3055c942018-05-15 22:58:09 -07008902 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008904# The cast to long int works around a bug in the HP C Compiler
8905# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8906# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8907# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8909$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008910if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 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 +00008914
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008915else
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 if test "$ac_cv_type_long_double" = yes; then
8917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008919as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008920See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008921 else
8922 ac_cv_sizeof_long_double=0
8923 fi
8924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008925
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8928$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008929
8930
8931
8932cat >>confdefs.h <<_ACEOF
8933#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8934_ACEOF
8935
8936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938# The cast to long int works around a bug in the HP C Compiler
8939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8941# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8943$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008944if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008946else
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 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 +00008948
Thomas Woutersb2137042007-02-01 18:02:27 +00008949else
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 if test "$ac_cv_type__Bool" = yes; then
8951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008953as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008954See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 else
8956 ac_cv_sizeof__Bool=0
8957 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008959
Thomas Woutersb2137042007-02-01 18:02:27 +00008960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8962$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963
8964
8965
Thomas Woutersb2137042007-02-01 18:02:27 +00008966cat >>confdefs.h <<_ACEOF
8967#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8968_ACEOF
8969
8970
Thomas Woutersb2137042007-02-01 18:02:27 +00008971
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972# The cast to long int works around a bug in the HP C Compiler
8973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8975# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8977$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008978if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980else
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982#ifdef HAVE_SYS_TYPES_H
8983#include <sys/types.h>
8984#endif
8985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$ac_cv_type_off_t" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008992as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008993See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994 else
8995 ac_cv_sizeof_off_t=0
8996 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9001$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003
9004
Martin v. Löwis11437992002-04-12 09:54:03 +00009005cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009007_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008
Michael W. Hudson54241132001-12-07 15:38:26 +00009009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009010
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9012$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009013if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009014 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009015
Matthias Kloseb9621712010-04-24 17:59:49 +00009016$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009017
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9019$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009020else
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9022$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009023fi
9024
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025# The cast to long int works around a bug in the HP C Compiler
9026# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9027# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9028# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9030$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009031if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033else
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035#ifdef HAVE_SYS_TYPES_H
9036#include <sys/types.h>
9037#endif
9038#ifdef HAVE_TIME_H
9039#include <time.h>
9040#endif
9041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 if test "$ac_cv_type_time_t" = yes; then
9046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009048as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009049See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009050 else
9051 ac_cv_sizeof_time_t=0
9052 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009054
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9057$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059
9060
Martin v. Löwis11437992002-04-12 09:54:03 +00009061cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009062#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009064
Michael W. Hudson54241132001-12-07 15:38:26 +00009065
9066
Trent Mick635f6fb2000-08-23 21:33:05 +00009067# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009068ac_save_cc="$CC"
9069if test "$ac_cv_kpthread" = "yes"
9070then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009071elif test "$ac_cv_kthread" = "yes"
9072then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009073elif test "$ac_cv_pthread" = "yes"
9074then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009075fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9078$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009079have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009081/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009082
9083 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009084int
9085main ()
9086{
Guido van Rossum12580492000-09-24 16:47:19 +00009087pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 ;
9089 return 0;
9090}
Matthias Kloseb159a552010-04-25 21:00:44 +00009091
Martin v. Löwis11437992002-04-12 09:54:03 +00009092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009093if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009094 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9098$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009099if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9103# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9105$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009106if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108else
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009110#ifdef HAVE_PTHREAD_H
9111#include <pthread.h>
9112#endif
9113
Matthias Kloseb9621712010-04-24 17:59:49 +00009114"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009116else
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 if test "$ac_cv_type_pthread_t" = yes; then
9118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009120as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009121See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009122 else
9123 ac_cv_sizeof_pthread_t=0
9124 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009126
Trent Mick635f6fb2000-08-23 21:33:05 +00009127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9129$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009131
9132
Martin v. Löwis11437992002-04-12 09:54:03 +00009133cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009134#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009136
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009137
Trent Mick635f6fb2000-08-23 21:33:05 +00009138fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009139
9140# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9141# This checking will be unnecessary after removing deprecated TLS API.
9142# The cast to long int works around a bug in the HP C Compiler
9143# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9144# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9145# This bug is HP SR number 8606223364.
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9147$as_echo_n "checking size of pthread_key_t... " >&6; }
9148if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9149 $as_echo_n "(cached) " >&6
9150else
9151 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9152"; then :
9153
9154else
9155 if test "$ac_cv_type_pthread_key_t" = yes; then
9156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9158as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9159See \`config.log' for more details" "$LINENO" 5; }
9160 else
9161 ac_cv_sizeof_pthread_key_t=0
9162 fi
9163fi
9164
9165fi
9166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9167$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9168
9169
9170
9171cat >>confdefs.h <<_ACEOF
9172#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9173_ACEOF
9174
9175
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9177$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9178if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9180/* end confdefs.h. */
9181#include <pthread.h>
9182int
9183main ()
9184{
9185pthread_key_t k; k * 1;
9186 ;
9187 return 0;
9188}
9189_ACEOF
9190if ac_fn_c_try_compile "$LINENO"; then :
9191 ac_pthread_key_t_is_arithmetic_type=yes
9192else
9193 ac_pthread_key_t_is_arithmetic_type=no
9194
9195fi
9196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9198$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9199 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9200
9201$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9202
9203 fi
9204else
9205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9206$as_echo "no" >&6; }
9207fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009208CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009209
Michael W. Hudson54241132001-12-07 15:38:26 +00009210
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009211case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009212 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009213 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9214 ;;
9215 Darwin/*)
9216 OTHER_LIBTOOL_OPT=""
9217 ;;
9218esac
9219
9220
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009221
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009222case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009223 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009224 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9225 if test "${enable_universalsdk}"; then
9226 :
9227 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009228 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009229 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009230 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009231 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009232 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009233 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009234 if test ${gcc_version} '<' 4.0
9235 then
9236 LIBTOOL_CRUFT="-lcc_dynamic"
9237 else
9238 LIBTOOL_CRUFT=""
9239 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009241 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009242else
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009244/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009245
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009246 #include <unistd.h>
9247 int main(int argc, char*argv[])
9248 {
9249 if (sizeof(long) == 4) {
9250 return 0;
9251 } else {
9252 return 1;
9253 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009254 }
9255
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009257if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009258 ac_osx_32bit=yes
9259else
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009264fi
9265
9266
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009268 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 i386)
9270 MACOSX_DEFAULT_ARCH="i386"
9271 ;;
9272 ppc)
9273 MACOSX_DEFAULT_ARCH="ppc"
9274 ;;
9275 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009276 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277 ;;
9278 esac
9279 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009280 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281 i386)
9282 MACOSX_DEFAULT_ARCH="x86_64"
9283 ;;
9284 ppc)
9285 MACOSX_DEFAULT_ARCH="ppc64"
9286 ;;
9287 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009288 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009289 ;;
9290 esac
9291
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009292 fi
9293
9294 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9299$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009300if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009301then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009302 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009304 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305
Matthias Kloseb9621712010-04-24 17:59:49 +00009306$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009307
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9309$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009310 if test $enable_shared = "yes"
9311 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009312 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 +00009313 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314else
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009317fi
9318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9320$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009321case $ac_sys_system/$ac_sys_release in
9322 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009325
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9327$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009328 ;;
9329 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009332 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009333esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
9338
9339
9340
Benjamin Peterson99f03762010-04-11 22:15:28 +00009341
Thomas Wouters477c8d52006-05-27 19:21:47 +00009342
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009343# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9344# -- usually .so, .sl on HP-UX, .dll on Cygwin
9345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9346$as_echo_n "checking the extension of shared libraries... " >&6; }
9347if test -z "$SHLIB_SUFFIX"; then
9348 case $ac_sys_system in
9349 hp*|HP*)
9350 case `uname -m` in
9351 ia64) SHLIB_SUFFIX=.so;;
9352 *) SHLIB_SUFFIX=.sl;;
9353 esac
9354 ;;
9355 CYGWIN*) SHLIB_SUFFIX=.dll;;
9356 *) SHLIB_SUFFIX=.so;;
9357 esac
9358fi
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9360$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009361
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009363# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009364# (Shared libraries in this instance are shared modules to be loaded into
9365# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9367$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009368if test -z "$LDSHARED"
9369then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009370 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009371 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009372 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009373 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009374 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009376 if test "$GCC" = "yes" ; then
9377 LDSHARED='$(CC) -shared'
9378 LDCXXSHARED='$(CXX) -shared'
9379 else
9380 LDSHARED='$(CC) -G'
9381 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009382 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009383 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009384 if test "$GCC" = "yes" ; then
9385 LDSHARED='$(CC) -shared'
9386 LDCXXSHARED='$(CXX) -shared'
9387 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009388 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009389 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009390 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009391 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009392 LDSHARED='$(CC) -bundle'
9393 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 if test "$enable_framework" ; then
9395 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009396 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9397 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009398 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009399 else
9400 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009401 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009402 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009403 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009404 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009405 LDSHARED='$(CC) -bundle'
9406 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009407 if test "$enable_framework" ; then
9408 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009409 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9410 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009411 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009412 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009413 # No framework, use the Python app as bundle-loader
9414 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009415 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009416 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009417 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009418 Darwin/*)
9419 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9420 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009421
Ned Deily36820b62014-06-25 13:44:22 -07009422 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9423 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9424 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9425 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9426 if test ${dep_target_major} -eq 10 && \
9427 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009428 then
Ned Deily36820b62014-06-25 13:44:22 -07009429 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009430 LDSHARED='$(CC) -bundle'
9431 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009432 if test "$enable_framework" ; then
9433 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009434 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9435 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009436 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009437 else
9438 # No framework, use the Python app as bundle-loader
9439 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9440 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009442 fi
Ned Deily36820b62014-06-25 13:44:22 -07009443 else
9444 # building for OS X 10.3 and later
9445 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9446 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9447 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009448 fi
9449 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009450 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 LDSHARED='$(CC) -shared'
9452 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009453 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009454 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009455 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009456 LDSHARED='$(CC) -shared'
9457 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009458 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009459 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009460 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009461 OpenBSD*)
9462 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9463 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009464 LDSHARED='$(CC) -shared $(CCSHARED)'
9465 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009466 else
9467 case `uname -r` in
9468 [01].* | 2.[0-7] | 2.[0-7].*)
9469 LDSHARED="ld -Bshareable ${LDFLAGS}"
9470 ;;
9471 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009472 LDSHARED='$(CC) -shared $(CCSHARED)'
9473 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009474 ;;
9475 esac
9476 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009477 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009478 LDSHARED='$(CC) -shared'
9479 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009480 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009481 if test "$GCC" = "yes" ; then
9482 LDSHARED='$(CC) -shared'
9483 LDCXXSHARED='$(CXX) -shared'
9484 else
9485 LDSHARED='$(CC) -G'
9486 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009487 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009488 SCO_SV*)
9489 LDSHARED='$(CC) -Wl,-G,-Bexport'
9490 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9491 CYGWIN*)
9492 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9493 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009494 *) LDSHARED="ld";;
9495 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9498$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009499LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009500BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009501# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009502# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9504$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009505if test -z "$CCSHARED"
9506then
Guido van Rossum07397971997-04-29 21:49:50 +00009507 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009508 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009509 then CCSHARED="-fPIC";
9510 elif test `uname -p` = sparc;
9511 then CCSHARED="-xcode=pic32";
9512 else CCSHARED="-Kpic";
9513 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009514 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009515 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009516 else CCSHARED="+z";
9517 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009518 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009519 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009520 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009521 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009522 if test "$GCC" = "yes"
9523 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009524 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009525 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009526 SCO_SV*)
9527 if test "$GCC" = "yes"
9528 then CCSHARED="-fPIC"
9529 else CCSHARED="-Kpic -belf"
9530 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009531 VxWorks*)
9532 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9536$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009537# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009538# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9540$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009541if test -z "$LINKFORSHARED"
9542then
Guido van Rossum07397971997-04-29 21:49:50 +00009543 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009544 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009545 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009546 LINKFORSHARED="-Wl,-E -Wl,+s";;
9547# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009548 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009549 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009550 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009552 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009553
9554 # Issue #18075: the default maximum stack size (8MBytes) is too
9555 # small for the default recursion limit. Increase the stack size
9556 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009557 # Note: This matches the value of THREAD_STACK_SIZE in
9558 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009559 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9560
Jack Jansene578a632001-08-15 01:27:14 +00009561 if test "$enable_framework"
9562 then
Jack Jansenda49e192005-01-07 13:08:22 +00009563 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009564 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009565 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009566 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009567 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009568 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009569 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009570 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9571 then
9572 LINKFORSHARED="-Wl,--export-dynamic"
9573 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009574 SunOS/5*) case $CC in
9575 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009576 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009577 then
9578 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009579 fi;;
9580 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009581 CYGWIN*)
9582 if test $enable_shared = "no"
9583 then
9584 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9585 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009586 QNX*)
9587 # -Wl,-E causes the symbols to be added to the dynamic
9588 # symbol table so that they can be found when a module
9589 # is loaded. -N 2048K causes the stack size to be set
9590 # to 2048 kilobytes so that the stack doesn't overflow
9591 # when running test_compile.py.
9592 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009593 VxWorks*)
9594 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009595 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9598$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009599
Michael W. Hudson54241132001-12-07 15:38:26 +00009600
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009601
Matthias Kloseb9621712010-04-24 17:59:49 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9603$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009604if test ! "$LIBRARY" = "$LDLIBRARY"
9605then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009606 case $ac_sys_system in
9607 CYGWIN*)
9608 # Cygwin needs CCSHARED when building extension DLLs
9609 # but not when building the interpreter DLL.
9610 CFLAGSFORSHARED='';;
9611 *)
9612 CFLAGSFORSHARED='$(CCSHARED)'
9613 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9616$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009617
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009618# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9619# library (with --enable-shared).
9620# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009621# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9622# if it is not required, since it creates a dependency of the shared library
9623# to LIBS. This, in turn, means that applications linking the shared libpython
9624# don't need to link LIBS explicitly. The default should be only changed
9625# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9628$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009629case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009630 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009631 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009632esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9634$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009635
9636
Guido van Rossum627b2d71993-12-24 10:39:16 +00009637# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9639$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009641 $as_echo_n "(cached) " >&6
9642else
9643 ac_check_lib_save_LIBS=$LIBS
9644LIBS="-lsendfile $LIBS"
9645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9646/* end confdefs.h. */
9647
9648/* Override any GCC internal prototype to avoid an error.
9649 Use char because int might match the return type of a GCC
9650 builtin and then its argument prototype would still apply. */
9651#ifdef __cplusplus
9652extern "C"
9653#endif
9654char sendfile ();
9655int
9656main ()
9657{
9658return sendfile ();
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663if ac_fn_c_try_link "$LINENO"; then :
9664 ac_cv_lib_sendfile_sendfile=yes
9665else
9666 ac_cv_lib_sendfile_sendfile=no
9667fi
9668rm -f core conftest.err conftest.$ac_objext \
9669 conftest$ac_exeext conftest.$ac_ext
9670LIBS=$ac_check_lib_save_LIBS
9671fi
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9673$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009674if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009675 cat >>confdefs.h <<_ACEOF
9676#define HAVE_LIBSENDFILE 1
9677_ACEOF
9678
9679 LIBS="-lsendfile $LIBS"
9680
9681fi
9682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9684$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9718$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 cat >>confdefs.h <<_ACEOF
9721#define HAVE_LIBDL 1
9722_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009724 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009725
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009726fi
9727 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9729$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009730if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009732else
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009734LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738/* Override any GCC internal prototype to avoid an error.
9739 Use char because int might match the return type of a GCC
9740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741#ifdef __cplusplus
9742extern "C"
9743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009744char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ;
9750 return 0;
9751}
9752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009755else
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009758rm -f core conftest.err conftest.$ac_objext \
9759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9763$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009764if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 cat >>confdefs.h <<_ACEOF
9766#define HAVE_LIBDLD 1
9767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009769 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009771fi
9772 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009773
Michael Felt0d3ccb42017-12-30 22:39:20 +01009774# checks for uuid.h location
9775for ac_header in uuid/uuid.h uuid.h
9776do :
9777 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9778ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9779if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9780 cat >>confdefs.h <<_ACEOF
9781#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9782_ACEOF
9783
9784fi
9785
9786done
9787
9788
Berker Peksag9a10ff42017-11-08 23:09:16 +03009789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9790$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9792/* end confdefs.h. */
9793#include <uuid/uuid.h>
9794int
9795main ()
9796{
9797
9798#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009799void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009800#endif
9801
9802 ;
9803 return 0;
9804}
9805_ACEOF
9806if ac_fn_c_try_compile "$LINENO"; then :
9807
9808$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9809
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9811$as_echo "yes" >&6; }
9812else
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815
9816fi
9817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9818
Michael Felt0d3ccb42017-12-30 22:39:20 +01009819# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009820# FreeBSD and OpenBSD provides support as well
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9822$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9824/* end confdefs.h. */
9825#include <uuid.h>
9826int
9827main ()
9828{
9829
9830#ifndef uuid_create
9831void *x = uuid_create
9832#endif
9833
9834 ;
9835 return 0;
9836}
9837_ACEOF
9838if ac_fn_c_try_compile "$LINENO"; then :
9839
9840$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9841
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9843$as_echo "yes" >&6; }
9844else
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846$as_echo "no" >&6; }
9847
9848fi
9849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9850
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009851# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9852# stream in big-endian byte-order
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9854$as_echo_n "checking for uuid_enc_be... " >&6; }
9855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856/* end confdefs.h. */
9857#include <uuid.h>
9858int
9859main ()
9860{
9861
9862#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009863void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009864#endif
9865
9866 ;
9867 return 0;
9868}
9869_ACEOF
9870if ac_fn_c_try_compile "$LINENO"; then :
9871
9872$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9873
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9875$as_echo "yes" >&6; }
9876else
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9878$as_echo "no" >&6; }
9879
9880fi
9881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9882
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009883# 'Real Time' functions on Solaris
9884# posix4 on Solaris 2.6
9885# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009887$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009888if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009890else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009891 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895/* Override any GCC internal prototype to avoid an error.
9896 Use char because int might match the return type of a GCC
9897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009898#ifdef __cplusplus
9899extern "C"
9900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009901char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009902int
9903main ()
9904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 ;
9907 return 0;
9908}
9909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910for ac_lib in '' pthread rt posix4; do
9911 if test -z "$ac_lib"; then
9912 ac_res="none required"
9913 else
9914 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920rm -f core conftest.err conftest.$ac_objext \
9921 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009922 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925done
Victor Stinnere0be4232011-10-25 13:06:09 +02009926if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928else
9929 ac_cv_search_sem_init=no
9930fi
9931rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009932LIBS=$ac_func_search_save_LIBS
9933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9935$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009937if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009939
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009940fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009941
Martin v. Löwis519adae2003-09-20 10:47:47 +00009942
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9945$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009946if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009948else
9949 ac_check_lib_save_LIBS=$LIBS
9950LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009952/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954/* Override any GCC internal prototype to avoid an error.
9955 Use char because int might match the return type of a GCC
9956 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009957#ifdef __cplusplus
9958extern "C"
9959#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009960char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009961int
9962main ()
9963{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009965 ;
9966 return 0;
9967}
9968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009969if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009970 ac_cv_lib_intl_textdomain=yes
9971else
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009974rm -f core conftest.err conftest.$ac_objext \
9975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009976LIBS=$ac_check_lib_save_LIBS
9977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9979$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009980if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009983
Brett Cannonc6d936e2009-06-07 20:09:53 +00009984 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009985fi
9986
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009987
9988# checks for system dependent C++ extensions support
9989case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9991$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009994
Georg Brandl59e87bd2011-02-15 19:48:59 +00009995 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009996int
9997main ()
9998{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009999loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 ;
10001 return 0;
10002}
Matthias Kloseb159a552010-04-25 21:00:44 +000010003
Martin v. Löwis11437992002-04-12 09:54:03 +000010004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010006
Matthias Kloseb159a552010-04-25 21:00:44 +000010007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010009
Matthias Kloseb159a552010-04-25 21:00:44 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010011$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010012
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010013else
Matthias Kloseb159a552010-04-25 21:00:44 +000010014
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010016$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010017
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010019rm -f core conftest.err conftest.$ac_objext \
10020 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010021 *) ;;
10022esac
10023
Christian Heimes985ecdc2013-11-20 11:46:18 +010010024# check for systems that require aligned memory access
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10026$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010027if ${ac_cv_aligned_required+:} false; then :
10028 $as_echo_n "(cached) " >&6
10029else
10030 if test "$cross_compiling" = yes; then :
10031 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010032else
10033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10034/* end confdefs.h. */
10035
10036int main()
10037{
10038 char s[16];
10039 int i, *p1, *p2;
10040 for (i=0; i < 16; i++)
10041 s[i] = i;
10042 p1 = (int*)(s+1);
10043 p2 = (int*)(s+2);
10044 if (*p1 == *p2)
10045 return 1;
10046 return 0;
10047}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010048_ACEOF
10049if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010050 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010051else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010052 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010053fi
10054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10055 conftest.$ac_objext conftest.beam conftest.$ac_ext
10056fi
10057
10058
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010059fi
10060
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10062$as_echo "$ac_cv_aligned_required" >&6; }
10063if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010064
10065$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10066
10067fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010068
10069# str, bytes and memoryview hash algorithm
10070
10071
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10073$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10074
10075# Check whether --with-hash_algorithm was given.
10076if test "${with_hash_algorithm+set}" = set; then :
10077 withval=$with_hash_algorithm;
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10079$as_echo "$withval" >&6; }
10080case "$withval" in
10081 siphash24)
10082 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10083
10084 ;;
10085 fnv)
10086 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10087
10088 ;;
10089 *)
10090 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10091 ;;
10092esac
10093
10094else
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10096$as_echo "default" >&6; }
10097fi
10098
10099
Charles-François Natalid30b0222014-05-08 23:08:51 +010010100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10101$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10102
10103# Check whether --with-address_sanitizer was given.
10104if test "${with_address_sanitizer+set}" = set; then :
10105 withval=$with_address_sanitizer;
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10107$as_echo "$withval" >&6; }
10108BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10109LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010110# ASan works by controlling memory allocation, our own malloc interferes.
10111with_pymalloc="no"
10112
10113else
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
10116fi
10117
10118
10119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10120$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10121
10122# Check whether --with-memory_sanitizer was given.
10123if test "${with_memory_sanitizer+set}" = set; then :
10124 withval=$with_memory_sanitizer;
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10126$as_echo "$withval" >&6; }
10127BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10128LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10129# MSan works by controlling memory allocation, our own malloc interferes.
10130with_pymalloc="no"
10131
10132else
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134$as_echo "no" >&6; }
10135fi
10136
10137
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10139$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10140
10141# Check whether --with-undefined_behavior_sanitizer was given.
10142if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10143 withval=$with_undefined_behavior_sanitizer;
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10145$as_echo "$withval" >&6; }
10146BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10147LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010148
10149else
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152fi
10153
10154
Guido van Rossum70c7f481998-03-26 18:44:10 +000010155# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10157$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010158if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010160else
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010162LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166/* Override any GCC internal prototype to avoid an error.
10167 Use char because int might match the return type of a GCC
10168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010169#ifdef __cplusplus
10170extern "C"
10171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010172char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010173int
10174main ()
10175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ;
10178 return 0;
10179}
10180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010183else
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010186rm -f core conftest.err conftest.$ac_objext \
10187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010188LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10191$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010192if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010193 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010194fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010195 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10197$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010198if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010200else
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010202LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206/* Override any GCC internal prototype to avoid an error.
10207 Use char because int might match the return type of a GCC
10208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010209#ifdef __cplusplus
10210extern "C"
10211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010212char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010213int
10214main ()
10215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010223else
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226rm -f core conftest.err conftest.$ac_objext \
10227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010228LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10231$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010232if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010233 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010234fi
10235 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010236
Matthias Kloseb9621712010-04-24 17:59:49 +000010237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10238$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010241if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10244$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010245LIBS="$withval $LIBS"
10246
10247else
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250fi
10251
Guido van Rossum7f43da71994-08-01 12:15:30 +000010252
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010253
10254
10255
10256
10257
10258
Victor Stinner23a683a2019-04-12 21:27:37 +020010259
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010260if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10261 if test -n "$ac_tool_prefix"; then
10262 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10263set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_PKG_CONFIG+:} false; then :
10267 $as_echo_n "(cached) " >&6
10268else
10269 case $PKG_CONFIG in
10270 [\\/]* | ?:[\\/]*)
10271 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10272 ;;
10273 *)
10274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277 IFS=$as_save_IFS
10278 test -z "$as_dir" && as_dir=.
10279 for ac_exec_ext in '' $ac_executable_extensions; do
10280 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283 break 2
10284 fi
10285done
10286 done
10287IFS=$as_save_IFS
10288
10289 ;;
10290esac
10291fi
10292PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10293if test -n "$PKG_CONFIG"; then
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10295$as_echo "$PKG_CONFIG" >&6; }
10296else
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302fi
10303if test -z "$ac_cv_path_PKG_CONFIG"; then
10304 ac_pt_PKG_CONFIG=$PKG_CONFIG
10305 # Extract the first word of "pkg-config", so it can be a program name with args.
10306set dummy pkg-config; ac_word=$2
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10308$as_echo_n "checking for $ac_word... " >&6; }
10309if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10310 $as_echo_n "(cached) " >&6
10311else
10312 case $ac_pt_PKG_CONFIG in
10313 [\\/]* | ?:[\\/]*)
10314 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10315 ;;
10316 *)
10317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318for as_dir in $PATH
10319do
10320 IFS=$as_save_IFS
10321 test -z "$as_dir" && as_dir=.
10322 for ac_exec_ext in '' $ac_executable_extensions; do
10323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326 break 2
10327 fi
10328done
10329 done
10330IFS=$as_save_IFS
10331
10332 ;;
10333esac
10334fi
10335ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10336if test -n "$ac_pt_PKG_CONFIG"; then
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10338$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10339else
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341$as_echo "no" >&6; }
10342fi
10343
10344 if test "x$ac_pt_PKG_CONFIG" = x; then
10345 PKG_CONFIG=""
10346 else
10347 case $cross_compiling:$ac_tool_warned in
10348yes:)
10349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10351ac_tool_warned=yes ;;
10352esac
10353 PKG_CONFIG=$ac_pt_PKG_CONFIG
10354 fi
10355else
10356 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10357fi
10358
10359fi
10360if test -n "$PKG_CONFIG"; then
10361 _pkg_min_version=0.9.0
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10363$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10364 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10366$as_echo "yes" >&6; }
10367 else
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
10370 PKG_CONFIG=""
10371 fi
10372fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010373
10374# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10376$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010377
10378# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010379if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010380 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010381else
10382 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010383fi
10384
10385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10387$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010388
10389# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10391$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010392
10393# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010395 withval=$with_system_ffi;
10396fi
10397
10398
Zachary Waref40d4dd2016-09-17 01:25:24 -050010399if test "$ac_sys_system" = "Darwin"
10400then
10401 case "$with_system_ffi" in
10402 "")
10403 with_system_ffi="no"
10404 ;;
10405 yes|no)
10406 ;;
10407 *)
10408 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10409 ;;
10410 esac
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10412$as_echo "$with_system_ffi" >&6; }
10413else
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10415$as_echo "yes" >&6; }
10416 if test "$with_system_ffi" != ""
10417 then
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10419$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10420 fi
10421 with_system_ffi="yes"
10422fi
Zachary Ware935043d2016-09-09 17:01:21 -070010423
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010424if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010425 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10426else
10427 LIBFFI_INCLUDEDIR=""
10428fi
10429
10430
Stefan Krah60187b52012-03-23 19:06:27 +010010431# Check for use of the system libmpdec library
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10433$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10434
10435# Check whether --with-system_libmpdec was given.
10436if test "${with_system_libmpdec+set}" = set; then :
10437 withval=$with_system_libmpdec;
10438else
10439 with_system_libmpdec="no"
10440fi
10441
10442
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10444$as_echo "$with_system_libmpdec" >&6; }
10445
Benjamin Peterson076ed002010-10-31 17:11:02 +000010446# Check for support for loadable sqlite extensions
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10448$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10449# Check whether --enable-loadable-sqlite-extensions was given.
10450if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10451 enableval=$enable_loadable_sqlite_extensions;
10452else
10453 enable_loadable_sqlite_extensions="no"
10454fi
10455
10456
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10458$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10459
Ned Deilyd819b932013-09-06 01:07:05 -070010460# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10461
10462
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10464$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10465
10466# Check whether --with-tcltk-includes was given.
10467if test "${with_tcltk_includes+set}" = set; then :
10468 withval=$with_tcltk_includes;
10469else
10470 with_tcltk_includes="default"
10471fi
10472
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10474$as_echo "$with_tcltk_includes" >&6; }
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10476$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10477
10478# Check whether --with-tcltk-libs was given.
10479if test "${with_tcltk_libs+set}" = set; then :
10480 withval=$with_tcltk_libs;
10481else
10482 with_tcltk_libs="default"
10483fi
10484
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10486$as_echo "$with_tcltk_libs" >&6; }
10487if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10488then
10489 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10490 then
10491 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10492 fi
10493 TCLTK_INCLUDES=""
10494 TCLTK_LIBS=""
10495else
10496 TCLTK_INCLUDES="$with_tcltk_includes"
10497 TCLTK_LIBS="$with_tcltk_libs"
10498fi
10499
Matthias Klose55708cc2009-04-30 08:06:49 +000010500# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10502$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010503
10504# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010505if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010506 withval=$with_dbmliborder;
10507if test x$with_dbmliborder = xyes
10508then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010509as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010510else
10511 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10512 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10513 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010514 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010515 fi
10516 done
10517fi
10518fi
10519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10521$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010522
Martin v. Löwis11437992002-04-12 09:54:03 +000010523# Templates for things AC_DEFINEd more than once.
10524# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010525
10526
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010527if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010528then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010529 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010531
10532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010533elif test "$ac_cv_kpthread" = "yes"
10534then
10535 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010536 if test "$ac_cv_cxx_thread" = "yes"; then
10537 CXX="$CXX -Kpthread"
10538 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010539 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010540elif test "$ac_cv_kthread" = "yes"
10541then
10542 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010543 if test "$ac_cv_cxx_thread" = "yes"; then
10544 CXX="$CXX -Kthread"
10545 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010546 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010547elif test "$ac_cv_pthread" = "yes"
10548then
10549 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010550 if test "$ac_cv_cxx_thread" = "yes"; then
10551 CXX="$CXX -pthread"
10552 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010554else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010555 if test ! -z "$withval" -a -d "$withval"
10556 then LDFLAGS="$LDFLAGS -L$withval"
10557 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010558
10559 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010560 # define _POSIX_THREADS in unistd.h. Some apparently don't
10561 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10563$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010566
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010567#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010568#ifdef _POSIX_THREADS
10569yes
10570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
10572_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010575 unistd_defines_pthreads=yes
10576else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010577 unistd_defines_pthreads=no
10578fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010579rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10582$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010585
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010586 # Just looking for pthread_create in libpthread is not enough:
10587 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10588 # So we really have to include pthread.h, and then link.
10589 _libs=$LIBS
10590 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10592$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010595
10596#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010597#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010598
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010599void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010600int
10601main ()
10602{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010603
10604pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ;
10606 return 0;
10607}
10608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10612$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010613 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010614
Guido van Rossum02a1c402000-02-25 19:26:31 +000010615else
Martin v. Löwis11437992002-04-12 09:54:03 +000010616
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010617 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010619if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010620
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010621 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010622
Guido van Rossumad678af1998-10-02 14:42:15 +000010623else
Guido van Rossumad678af1998-10-02 14:42:15 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10626$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010627if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010629else
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010631LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635/* Override any GCC internal prototype to avoid an error.
10636 Use char because int might match the return type of a GCC
10637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010638#ifdef __cplusplus
10639extern "C"
10640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010641char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010642int
10643main ()
10644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010652else
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010655rm -f core conftest.err conftest.$ac_objext \
10656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010657LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10660$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010661if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010662
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010663 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010664 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010665
Greg Steinadf63d62000-07-05 10:38:09 +000010666else
Greg Steinadf63d62000-07-05 10:38:09 +000010667
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10669$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010670if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010672else
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010674LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678/* Override any GCC internal prototype to avoid an error.
10679 Use char because int might match the return type of a GCC
10680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010681#ifdef __cplusplus
10682extern "C"
10683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010684char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010685int
10686main ()
10687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ;
10690 return 0;
10691}
10692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010695else
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010698rm -f core conftest.err conftest.$ac_objext \
10699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010700LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10703$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010704if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010705
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010706 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010707 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010708
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010709else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10712$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010713if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010715else
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010717LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721/* Override any GCC internal prototype to avoid an error.
10722 Use char because int might match the return type of a GCC
10723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010724#ifdef __cplusplus
10725extern "C"
10726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010727char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010728int
10729main ()
10730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ;
10733 return 0;
10734}
10735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010736if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010738else
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010741rm -f core conftest.err conftest.$ac_objext \
10742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010743LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10746$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010747if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010748
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010749 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010750 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010751
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010752else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10755$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010756if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010758else
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010760LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010764/* Override any GCC internal prototype to avoid an error.
10765 Use char because int might match the return type of a GCC
10766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010767#ifdef __cplusplus
10768extern "C"
10769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010770char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010771int
10772main ()
10773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ;
10776 return 0;
10777}
10778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010786LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10789$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010790if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010791
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010792 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010793 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010794
Guido van Rossumb93a8621998-05-07 13:27:32 +000010795else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010796
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010797 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10798
Guido van Rossum2d38f911996-06-26 19:47:01 +000010799fi
10800
Guido van Rossum627b2d71993-12-24 10:39:16 +000010801
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010802fi
10803
Guido van Rossum0be3e491997-05-22 20:33:33 +000010804fi
10805
Guido van Rossum49545951997-12-02 19:28:29 +000010806fi
10807
Guido van Rossumb93a8621998-05-07 13:27:32 +000010808fi
10809
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010811rm -f core conftest.err conftest.$ac_objext \
10812 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10815$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010816if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010818else
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010820LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010824/* Override any GCC internal prototype to avoid an error.
10825 Use char because int might match the return type of a GCC
10826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010827#ifdef __cplusplus
10828extern "C"
10829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010830char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010831int
10832main ()
10833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010835 ;
10836 return 0;
10837}
10838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010844rm -f core conftest.err conftest.$ac_objext \
10845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010846LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10849$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010850if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010851
Martin v. Löwis130fb172001-07-19 11:00:41 +000010852 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010853
Guido van Rossum627b2d71993-12-24 10:39:16 +000010854fi
10855
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010856
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010857fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010858
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859if test "$posix_threads" = "yes"; then
10860 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010863
10864 fi
10865
10866 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10867 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010868 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010871 ;;
10872 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010873$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010874
10875 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010876 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010878
10879 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010880 esac
10881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10883$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010884 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010886else
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010888 ac_cv_pthread_system_supported=no
10889else
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010891/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010892
10893 #include <stdio.h>
10894 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010895 void *foo(void *parm) {
10896 return NULL;
10897 }
10898 main() {
10899 pthread_attr_t attr;
10900 pthread_t id;
10901 if (pthread_attr_init(&attr)) exit(-1);
10902 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10903 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10904 exit(0);
10905 }
10906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010907if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010908 ac_cv_pthread_system_supported=yes
10909else
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010914fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916
Guido van Rossum627b2d71993-12-24 10:39:16 +000010917fi
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10920$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010921 if test "$ac_cv_pthread_system_supported" = "yes"; then
10922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010924
10925 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 for ac_func in pthread_sigmask
10927do :
10928 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010929if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010930 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010931#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010932_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010933 case $ac_sys_system in
10934 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010937
10938 ;;
10939 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010940fi
10941done
10942
pdoxe14679c2017-10-05 00:01:56 -070010943 for ac_func in pthread_getcpuclockid
10944do :
10945 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10946if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10947 cat >>confdefs.h <<_ACEOF
10948#define HAVE_PTHREAD_GETCPUCLOCKID 1
10949_ACEOF
10950
10951fi
10952done
10953
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010954fi
10955
10956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10960$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967 ipv6=no
10968 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10970$as_echo "yes" >&6; }
10971 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972
10973 ipv6=yes
10974 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976else
Martin v. Löwis11437992002-04-12 09:54:03 +000010977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010979/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980 /* AF_INET6 available check */
10981#include <sys/types.h>
10982#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010983int
10984main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010986int domain = AF_INET6;
10987 ;
10988 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989}
Martin v. Löwis11437992002-04-12 09:54:03 +000010990_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010991if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10994$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010996
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997else
Matthias Kloseb159a552010-04-25 21:00:44 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011006if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11008$as_echo_n "checking if RFC2553 API is available... " >&6; }
11009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011011
11012 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011013#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011014int
11015main ()
11016{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011017struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011018 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 ;
11020 return 0;
11021}
Matthias Kloseb159a552010-04-25 21:00:44 +000011022
Martin v. Löwis11437992002-04-12 09:54:03 +000011023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011024if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011025
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011028 ipv6=yes
11029
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011030else
Matthias Kloseb159a552010-04-25 21:00:44 +000011031
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011033$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011034 ipv6=no
11035
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011038fi
11039
11040if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011042
11043fi
11044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045fi
11046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011047
11048ipv6type=unknown
11049ipv6lib=none
11050ipv6trylibc=no
11051
11052if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11054$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011055 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11056 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057 case $i in
11058 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062#include <netinet/in.h>
11063#ifdef IPV6_INRIA_VERSION
11064yes
11065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011069 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072
11073 ;;
11074 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011076/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011077
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078#include <netinet/in.h>
11079#ifdef __KAME__
11080yes
11081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011082_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085 ipv6type=$i;
11086 ipv6lib=inet6
11087 ipv6libdir=/usr/local/v6/lib
11088 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011090rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091
11092 ;;
11093 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097#include <features.h>
11098#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11099yes
11100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011101_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104 ipv6type=$i;
11105 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011107rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108
11109 ;;
11110 linux-inet6)
11111 if test -d /usr/inet6; then
11112 ipv6type=$i
11113 ipv6lib=inet6
11114 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011115 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116 fi
11117 ;;
11118 solaris)
11119 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011120 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121 ipv6type=$i
11122 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123 fi
11124 fi
11125 ;;
11126 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130#include <sys/param.h>
11131#ifdef _TOSHIBA_INET6
11132yes
11133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011134_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137 ipv6type=$i;
11138 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011139 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011141rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142
11143 ;;
11144 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011146/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011147
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148#include </usr/local/v6/include/sys/v6config.h>
11149#ifdef __V6D__
11150yes
11151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155 ipv6type=$i;
11156 ipv6lib=v6;
11157 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011158 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011159fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011160rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161
11162 ;;
11163 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011165/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011166
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167#include <sys/param.h>
11168#ifdef _ZETA_MINAMI_INET6
11169yes
11170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011171_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011173 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011174 ipv6type=$i;
11175 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011176 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011178rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179
11180 ;;
11181 esac
11182 if test "$ipv6type" != "unknown"; then
11183 break
11184 fi
11185 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11187$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188fi
11189
11190if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11191 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11192 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11193 echo "using lib$ipv6lib"
11194 else
11195 if test $ipv6trylibc = "yes"; then
11196 echo "using libc"
11197 else
11198 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11199 echo "You need to fetch lib$ipv6lib.a from appropriate"
11200 echo 'ipv6 kit and compile beforehand.'
11201 exit 1
11202 fi
11203 fi
11204fi
11205
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11207$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11209/* end confdefs.h. */
11210 /* CAN_RAW_FD_FRAMES available check */
11211#include <linux/can/raw.h>
11212int
11213main ()
11214{
11215int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11216 ;
11217 return 0;
11218}
11219_ACEOF
11220if ac_fn_c_try_compile "$LINENO"; then :
11221
11222
11223$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11224
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11226$as_echo "yes" >&6; }
11227
11228else
11229
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11231$as_echo "no" >&6; }
11232
11233fi
11234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11235
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011236# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11238$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011241if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242 withval=$with_doc_strings;
11243fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011244
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011245
11246if test -z "$with_doc_strings"
11247then with_doc_strings="yes"
11248fi
11249if test "$with_doc_strings" != "no"
11250then
11251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011253
11254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11256$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011257
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011258# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11260$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011262# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011263if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264 withval=$with_pymalloc;
11265fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011266
Neil Schemenauera35c6882001-02-27 04:45:05 +000011267
Neil Schemenauer16c22972002-03-22 15:34:49 +000011268if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011269then
11270 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011271fi
11272if test "$with_pymalloc" != "no"
11273then
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011276
11277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11279$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011280
Nick Coghlan6ea41862017-06-11 13:16:15 +100011281# Check for --with-c-locale-coercion
11282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11283$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11284
11285# Check whether --with-c-locale-coercion was given.
11286if test "${with_c_locale_coercion+set}" = set; then :
11287 withval=$with_c_locale_coercion;
11288fi
11289
11290
11291if test -z "$with_c_locale_coercion"
11292then
11293 with_c_locale_coercion="yes"
11294fi
11295if test "$with_c_locale_coercion" != "no"
11296then
11297
11298$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11299
11300fi
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11302$as_echo "$with_c_locale_coercion" >&6; }
11303
Benjamin Peterson05159c42009-12-03 03:01:27 +000011304# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11306$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011307
11308# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011310 withval=$with_valgrind;
11311else
11312 with_valgrind=no
11313fi
11314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11316$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011317if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 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 +020011319if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011322
11323else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011324 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011325
11326fi
11327
11328
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011329 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011330fi
11331
Łukasz Langaa785c872016-09-09 17:37:37 -070011332# Check for DTrace support
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11334$as_echo_n "checking for --with-dtrace... " >&6; }
11335
11336# Check whether --with-dtrace was given.
11337if test "${with_dtrace+set}" = set; then :
11338 withval=$with_dtrace;
11339else
11340 with_dtrace=no
11341fi
11342
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11344$as_echo "$with_dtrace" >&6; }
11345
11346
11347
11348
11349
11350DTRACE=
11351DFLAGS=
11352DTRACE_HEADERS=
11353DTRACE_OBJS=
11354
11355if test "$with_dtrace" = "yes"
11356then
11357 # Extract the first word of "dtrace", so it can be a program name with args.
11358set dummy dtrace; ac_word=$2
11359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11360$as_echo_n "checking for $ac_word... " >&6; }
11361if ${ac_cv_path_DTRACE+:} false; then :
11362 $as_echo_n "(cached) " >&6
11363else
11364 case $DTRACE in
11365 [\\/]* | ?:[\\/]*)
11366 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11367 ;;
11368 *)
11369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11370for as_dir in $PATH
11371do
11372 IFS=$as_save_IFS
11373 test -z "$as_dir" && as_dir=.
11374 for ac_exec_ext in '' $ac_executable_extensions; do
11375 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11376 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11378 break 2
11379 fi
11380done
11381 done
11382IFS=$as_save_IFS
11383
11384 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11385 ;;
11386esac
11387fi
11388DTRACE=$ac_cv_path_DTRACE
11389if test -n "$DTRACE"; then
11390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11391$as_echo "$DTRACE" >&6; }
11392else
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394$as_echo "no" >&6; }
11395fi
11396
11397
11398 if test "$DTRACE" = "not found"; then
11399 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11400 fi
11401
11402$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11403
11404 DTRACE_HEADERS="Include/pydtrace_probes.h"
11405
11406 # On OS X, DTrace providers do not need to be explicitly compiled and
11407 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11408 # generation flag '-G'. We check for presence of this flag, rather than
11409 # hardcoding support by OS, in the interest of robustness.
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11411$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11412if ${ac_cv_dtrace_link+:} false; then :
11413 $as_echo_n "(cached) " >&6
11414else
11415 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011416 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011417 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11418 ac_cv_dtrace_link=yes
11419
11420fi
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11422$as_echo "$ac_cv_dtrace_link" >&6; }
11423 if test "$ac_cv_dtrace_link" = "yes"; then
11424 DTRACE_OBJS="Python/pydtrace.o"
11425 fi
11426fi
11427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011428# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011429
Guido van Rossum98935bf2001-09-05 19:13:16 +000011430DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011431
Guido van Rossume97ee181999-12-20 21:27:22 +000011432# the dlopen() function means we might want to use dynload_shlib.o. some
11433# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011434for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011435do :
11436 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011437if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011439#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011441
Guido van Rossume97ee181999-12-20 21:27:22 +000011442fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011443done
Guido van Rossume97ee181999-12-20 21:27:22 +000011444
Michael W. Hudson54241132001-12-07 15:38:26 +000011445
Guido van Rossume97ee181999-12-20 21:27:22 +000011446# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11447# loading of modules.
11448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11450$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011451if test -z "$DYNLOADFILE"
11452then
11453 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011454 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11455 if test "$ac_cv_func_dlopen" = yes
11456 then DYNLOADFILE="dynload_shlib.o"
11457 else DYNLOADFILE="dynload_aix.o"
11458 fi
11459 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011460 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011461 *)
11462 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11463 # out any dynamic loading
11464 if test "$ac_cv_func_dlopen" = yes
11465 then DYNLOADFILE="dynload_shlib.o"
11466 else DYNLOADFILE="dynload_stub.o"
11467 fi
11468 ;;
11469 esac
11470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11472$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011473if test "$DYNLOADFILE" != "dynload_stub.o"
11474then
Martin v. Löwis11437992002-04-12 09:54:03 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011477
11478fi
11479
Neil Schemenauer4e425612001-06-19 15:44:15 +000011480# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11481
Michael W. Hudson54241132001-12-07 15:38:26 +000011482
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11484$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011485if test -z "$MACHDEP_OBJS"
11486then
Jack Jansene578a632001-08-15 01:27:14 +000011487 MACHDEP_OBJS=$extra_machdep_objs
11488else
11489 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011490fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011491if test -z "$MACHDEP_OBJS"; then
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11493$as_echo "none" >&6; }
11494else
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11496$as_echo "$MACHDEP_OBJS" >&6; }
11497fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011498
Guido van Rossum627b2d71993-12-24 10:39:16 +000011499# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011500for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011501 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11502 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011503 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011504 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011505 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011506 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011507 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011508 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011509 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011510 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011511 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011512 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011513 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11514 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011515 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011516 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011517 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011518 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11519 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011520 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011521 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011522 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011523 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011524 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011525do :
11526 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11527ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011528if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011530#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011531_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011533fi
11534done
11535
Michael W. Hudson54241132001-12-07 15:38:26 +000011536
Benjamin Peterson40caa052018-09-12 15:52:40 -070011537# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11538# links. Some libc implementations have a stub lchmod implementation that always
11539# returns an error.
11540if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011541 for ac_func in lchmod
11542do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011543 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11544if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011545 cat >>confdefs.h <<_ACEOF
11546#define HAVE_LCHMOD 1
11547_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011548
11549fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011550done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011551
11552fi
11553
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011554ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11555 #include <dirent.h>
11556"
11557if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11558
11559$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11560
11561fi
11562
11563
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011564# For some functions, having a definition is not sufficient, since
11565# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11567$as_echo_n "checking for chroot... " >&6; }
11568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011569/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571int
11572main ()
11573{
11574void *x=chroot
11575 ;
11576 return 0;
11577}
11578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011580
Matthias Kloseb9621712010-04-24 17:59:49 +000011581$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582
Matthias Kloseb159a552010-04-25 21:00:44 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011584$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011588
11589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11592$as_echo_n "checking for link... " >&6; }
11593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011595#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596int
11597main ()
11598{
11599void *x=link
11600 ;
11601 return 0;
11602}
11603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607
Matthias Kloseb159a552010-04-25 21:00:44 +000011608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011609$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011613
11614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11617$as_echo_n "checking for symlink... " >&6; }
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011620#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011621int
11622main ()
11623{
11624void *x=symlink
11625 ;
11626 return 0;
11627}
11628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011630
Matthias Kloseb9621712010-04-24 17:59:49 +000011631$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011632
Matthias Kloseb159a552010-04-25 21:00:44 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011634$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011635else
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11637$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011638
11639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11642$as_echo_n "checking for fchdir... " >&6; }
11643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011645#include <unistd.h>
11646int
11647main ()
11648{
11649void *x=fchdir
11650 ;
11651 return 0;
11652}
11653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011657
Matthias Kloseb159a552010-04-25 21:00:44 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011659$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011660else
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11662$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011663
11664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11667$as_echo_n "checking for fsync... " >&6; }
11668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011669/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011670#include <unistd.h>
11671int
11672main ()
11673{
11674void *x=fsync
11675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682
Matthias Kloseb159a552010-04-25 21:00:44 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11687$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011688
11689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11692$as_echo_n "checking for fdatasync... " >&6; }
11693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011695#include <unistd.h>
11696int
11697main ()
11698{
11699void *x=fdatasync
11700 ;
11701 return 0;
11702}
11703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011705
Matthias Kloseb9621712010-04-24 17:59:49 +000011706$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011707
Matthias Kloseb159a552010-04-25 21:00:44 +000011708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011710else
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011713
11714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11717$as_echo_n "checking for epoll... " >&6; }
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011719/* end confdefs.h. */
11720#include <sys/epoll.h>
11721int
11722main ()
11723{
11724void *x=epoll_create
11725 ;
11726 return 0;
11727}
11728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011732
Matthias Kloseb159a552010-04-25 21:00:44 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011734$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11737$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011738
11739fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11742$as_echo_n "checking for epoll_create1... " >&6; }
11743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11744/* end confdefs.h. */
11745#include <sys/epoll.h>
11746int
11747main ()
11748{
11749void *x=epoll_create1
11750 ;
11751 return 0;
11752}
11753_ACEOF
11754if ac_fn_c_try_compile "$LINENO"; then :
11755
11756$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11757
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11759$as_echo "yes" >&6; }
11760else
11761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762$as_echo "no" >&6; }
11763
11764fi
11765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11767$as_echo_n "checking for kqueue... " >&6; }
11768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011769/* end confdefs.h. */
11770
11771#include <sys/types.h>
11772#include <sys/event.h>
11773
11774int
11775main ()
11776{
11777int x=kqueue()
11778 ;
11779 return 0;
11780}
11781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011785
Matthias Kloseb159a552010-04-25 21:00:44 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011791
11792fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11795$as_echo_n "checking for prlimit... " >&6; }
11796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11797/* end confdefs.h. */
11798
11799#include <sys/time.h>
11800#include <sys/resource.h>
11801
11802int
11803main ()
11804{
11805void *x=prlimit
11806 ;
11807 return 0;
11808}
11809_ACEOF
11810if ac_fn_c_try_compile "$LINENO"; then :
11811
11812$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11813
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11815$as_echo "yes" >&6; }
11816else
11817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
11819
11820fi
11821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11822
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11824$as_echo_n "checking for memfd_create... " >&6; }
11825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11826/* end confdefs.h. */
11827
11828#ifdef HAVE_SYS_MMAN_H
11829#include <sys/mman.h>
11830#endif
11831#ifdef HAVE_SYS_MEMFD_H
11832#include <sys/memfd.h>
11833#endif
11834
11835int
11836main ()
11837{
11838void *x=memfd_create
11839 ;
11840 return 0;
11841}
11842_ACEOF
11843if ac_fn_c_try_compile "$LINENO"; then :
11844
11845$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11846
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11848$as_echo "yes" >&6; }
11849else
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851$as_echo "no" >&6; }
11852
11853fi
11854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855
Martin v. Löwisd5843682002-11-21 20:41:28 +000011856# On some systems (eg. FreeBSD 5), we would find a definition of the
11857# functions ctermid_r, setgroups in the library, but no prototype
11858# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11859# address to avoid compiler warnings and potential miscompilations
11860# because of the missing prototypes.
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11863$as_echo_n "checking for ctermid_r... " >&6; }
11864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011865/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011866
Martin v. Löwisd5843682002-11-21 20:41:28 +000011867#include <stdio.h>
11868
Martin v. Löwisd5843682002-11-21 20:41:28 +000011869int
11870main ()
11871{
11872void* p = ctermid_r
11873 ;
11874 return 0;
11875}
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011880
Matthias Kloseb159a552010-04-25 21:00:44 +000011881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11885$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011886
11887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11891$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011892if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011893 $as_echo_n "(cached) " >&6
11894else
11895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011896/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011897#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011898int
11899main ()
11900{
11901void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011902
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011903 ;
11904 return 0;
11905}
11906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011907if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011908 ac_cv_flock_decl=yes
11909else
11910 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011911
11912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011914
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011915fi
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11917$as_echo "$ac_cv_flock_decl" >&6; }
11918if test "x${ac_cv_flock_decl}" = xyes; then
11919 for ac_func in flock
11920do :
11921 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011922if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011923 cat >>confdefs.h <<_ACEOF
11924#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011925_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011926
Antoine Pitroua3000072010-09-07 14:52:42 +000011927else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011929$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011931 $as_echo_n "(cached) " >&6
11932else
11933 ac_check_lib_save_LIBS=$LIBS
11934LIBS="-lbsd $LIBS"
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11936/* end confdefs.h. */
11937
11938/* Override any GCC internal prototype to avoid an error.
11939 Use char because int might match the return type of a GCC
11940 builtin and then its argument prototype would still apply. */
11941#ifdef __cplusplus
11942extern "C"
11943#endif
11944char flock ();
11945int
11946main ()
11947{
11948return flock ();
11949 ;
11950 return 0;
11951}
11952_ACEOF
11953if ac_fn_c_try_link "$LINENO"; then :
11954 ac_cv_lib_bsd_flock=yes
11955else
11956 ac_cv_lib_bsd_flock=no
11957fi
11958rm -f core conftest.err conftest.$ac_objext \
11959 conftest$ac_exeext conftest.$ac_ext
11960LIBS=$ac_check_lib_save_LIBS
11961fi
11962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11963$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011964if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011965 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011966
11967
11968$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11969
11970
11971fi
11972
11973
11974fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011975done
11976
Antoine Pitroua3000072010-09-07 14:52:42 +000011977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11980$as_echo_n "checking for getpagesize... " >&6; }
11981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011982/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011983
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011984#include <unistd.h>
11985
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011986int
11987main ()
11988{
11989void* p = getpagesize
11990 ;
11991 return 0;
11992}
11993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011997
Matthias Kloseb159a552010-04-25 21:00:44 +000011998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012000else
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12002$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012003
12004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012006
Victor Stinner984890f2011-11-24 13:53:38 +010012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12008$as_echo_n "checking for broken unsetenv... " >&6; }
12009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010/* end confdefs.h. */
12011
12012#include <stdlib.h>
12013
12014int
12015main ()
12016{
12017int res = unsetenv("DUMMY")
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022if ac_fn_c_try_compile "$LINENO"; then :
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
12025else
12026
12027$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12028
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12030$as_echo "yes" >&6; }
12031
12032fi
12033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12034
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012035for ac_prog in true
12036do
12037 # Extract the first word of "$ac_prog", so it can be a program name with args.
12038set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12040$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012043else
12044 if test -n "$TRUE"; then
12045 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12046else
12047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12048for as_dir in $PATH
12049do
12050 IFS=$as_save_IFS
12051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012054 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $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 +000012056 break 2
12057 fi
12058done
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012061
12062fi
12063fi
12064TRUE=$ac_cv_prog_TRUE
12065if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12067$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12070$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012071fi
12072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012074 test -n "$TRUE" && break
12075done
12076test -n "$TRUE" || TRUE="/bin/true"
12077
12078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12080$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012081if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083else
12084 ac_check_lib_save_LIBS=$LIBS
12085LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012087/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089/* Override any GCC internal prototype to avoid an error.
12090 Use char because int might match the return type of a GCC
12091 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012092#ifdef __cplusplus
12093extern "C"
12094#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012095char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012096int
12097main ()
12098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100 ;
12101 return 0;
12102}
12103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105 ac_cv_lib_c_inet_aton=yes
12106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012109rm -f core conftest.err conftest.$ac_objext \
12110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012111LIBS=$ac_check_lib_save_LIBS
12112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12114$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012115if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012116 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12119$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012122else
12123 ac_check_lib_save_LIBS=$LIBS
12124LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128/* Override any GCC internal prototype to avoid an error.
12129 Use char because int might match the return type of a GCC
12130 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012131#ifdef __cplusplus
12132extern "C"
12133#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012134char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012135int
12136main ()
12137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012139 ;
12140 return 0;
12141}
12142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012144 ac_cv_lib_resolv_inet_aton=yes
12145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148rm -f core conftest.err conftest.$ac_objext \
12149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012150LIBS=$ac_check_lib_save_LIBS
12151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12153$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012154if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012155 cat >>confdefs.h <<_ACEOF
12156#define HAVE_LIBRESOLV 1
12157_ACEOF
12158
12159 LIBS="-lresolv $LIBS"
12160
12161fi
12162
12163
12164fi
12165
12166
Christian Heimesd0764e22007-12-04 15:00:33 +000012167# On Tru64, chflags seems to be present, but calling it will
12168# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12170$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012175 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012178/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012179
Christian Heimesd0764e22007-12-04 15:00:33 +000012180#include <sys/stat.h>
12181#include <unistd.h>
12182int main(int argc, char*argv[])
12183{
12184 if(chflags(argv[0], 0) != 0)
12185 return 1;
12186 return 0;
12187}
Ned Deily3eb67d52011-06-28 00:00:28 -070012188
Christian Heimesd0764e22007-12-04 15:00:33 +000012189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012190if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012191 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012197fi
12198
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012199
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12202$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012203if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012205if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012206 ac_cv_have_chflags="yes"
12207else
12208 ac_cv_have_chflags="no"
12209fi
12210
12211fi
12212if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012215
12216fi
12217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12219$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012224 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012227/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012228
Christian Heimesd0764e22007-12-04 15:00:33 +000012229#include <sys/stat.h>
12230#include <unistd.h>
12231int main(int argc, char*argv[])
12232{
12233 if(lchflags(argv[0], 0) != 0)
12234 return 1;
12235 return 0;
12236}
Ned Deily3eb67d52011-06-28 00:00:28 -070012237
Christian Heimesd0764e22007-12-04 15:00:33 +000012238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012240 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012241else
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012246fi
12247
12248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12251$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012252if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012255 ac_cv_have_lchflags="yes"
12256else
12257 ac_cv_have_lchflags="no"
12258fi
12259
12260fi
12261if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012264
12265fi
12266
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012267case $ac_sys_system/$ac_sys_release in
12268Darwin/*)
12269 _CUR_CFLAGS="${CFLAGS}"
12270 _CUR_LDFLAGS="${LDFLAGS}"
12271 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12272 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12273 ;;
12274esac
12275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12277$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012280else
12281 ac_check_lib_save_LIBS=$LIBS
12282LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012284/* end confdefs.h. */
12285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286/* Override any GCC internal prototype to avoid an error.
12287 Use char because int might match the return type of a GCC
12288 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012289#ifdef __cplusplus
12290extern "C"
12291#endif
12292char inflateCopy ();
12293int
12294main ()
12295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012297 ;
12298 return 0;
12299}
12300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012302 ac_cv_lib_z_inflateCopy=yes
12303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012308LIBS=$ac_check_lib_save_LIBS
12309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12311$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012315
12316fi
12317
12318
12319case $ac_sys_system/$ac_sys_release in
12320Darwin/*)
12321 CFLAGS="${_CUR_CFLAGS}"
12322 LDFLAGS="${_CUR_LDFLAGS}"
12323 ;;
12324esac
12325
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12327$as_echo_n "checking for hstrerror... " >&6; }
12328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012329/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Martin v. Löwise9416172003-05-03 10:12:45 +000012331#include <netdb.h>
12332
Martin v. Löwise9416172003-05-03 10:12:45 +000012333int
12334main ()
12335{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012336void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012344
Matthias Kloseb159a552010-04-25 21:00:44 +000012345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012346$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012347else
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12349$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012350
12351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012352rm -f core conftest.err conftest.$ac_objext \
12353 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354
Matthias Kloseb9621712010-04-24 17:59:49 +000012355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12356$as_echo_n "checking for inet_aton... " >&6; }
12357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012358/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012359
Martin v. Löwis86d66262006-02-17 08:40:11 +000012360#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012361#include <sys/socket.h>
12362#include <netinet/in.h>
12363#include <arpa/inet.h>
12364
Martin v. Löwise9416172003-05-03 10:12:45 +000012365int
12366main ()
12367{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012368void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012369 ;
12370 return 0;
12371}
12372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012376
Matthias Kloseb159a552010-04-25 21:00:44 +000012377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012378$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12381$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012382
12383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012384rm -f core conftest.err conftest.$ac_objext \
12385 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12388$as_echo_n "checking for inet_pton... " >&6; }
12389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012390/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012391
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012392#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012393#include <sys/socket.h>
12394#include <netinet/in.h>
12395#include <arpa/inet.h>
12396
Martin v. Löwise9416172003-05-03 10:12:45 +000012397int
12398main ()
12399{
12400void* p = inet_pton
12401 ;
12402 return 0;
12403}
12404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012408
Matthias Kloseb159a552010-04-25 21:00:44 +000012409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012410$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12413$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012414
12415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012417
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012418# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12420$as_echo_n "checking for setgroups... " >&6; }
12421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012422/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012423
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012424#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012425#ifdef HAVE_GRP_H
12426#include <grp.h>
12427#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012428
Martin v. Löwisd5843682002-11-21 20:41:28 +000012429int
12430main ()
12431{
12432void* p = setgroups
12433 ;
12434 return 0;
12435}
12436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012438
Matthias Kloseb9621712010-04-24 17:59:49 +000012439$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012440
Matthias Kloseb159a552010-04-25 21:00:44 +000012441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012442$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012443else
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012446
12447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012450# check for openpty and forkpty
12451
12452for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012453do :
12454 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012455if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012456 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012457#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012458_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012459
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12462$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012465else
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471/* Override any GCC internal prototype to avoid an error.
12472 Use char because int might match the return type of a GCC
12473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012474#ifdef __cplusplus
12475extern "C"
12476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012477char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012491rm -f core conftest.err conftest.$ac_objext \
12492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012493LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12496$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012497if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012499 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012500else
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12502$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012503if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012505else
12506 ac_check_lib_save_LIBS=$LIBS
12507LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012509/* end confdefs.h. */
12510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511/* Override any GCC internal prototype to avoid an error.
12512 Use char because int might match the return type of a GCC
12513 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012514#ifdef __cplusplus
12515extern "C"
12516#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012517char openpty ();
12518int
12519main ()
12520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012522 ;
12523 return 0;
12524}
12525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012527 ac_cv_lib_bsd_openpty=yes
12528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012531rm -f core conftest.err conftest.$ac_objext \
12532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012533LIBS=$ac_check_lib_save_LIBS
12534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12536$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012537if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012539 LIBS="$LIBS -lbsd"
12540fi
12541
12542
12543fi
12544
Fred Drake8cef4cf2000-06-28 16:40:38 +000012545
12546fi
12547done
12548
12549for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012550do :
12551 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012552if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012554#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012555_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012556
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12559$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012560if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012562else
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012564LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568/* Override any GCC internal prototype to avoid an error.
12569 Use char because int might match the return type of a GCC
12570 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012571#ifdef __cplusplus
12572extern "C"
12573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012574char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012575int
12576main ()
12577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ;
12580 return 0;
12581}
12582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012583if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012585else
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588rm -f core conftest.err conftest.$ac_objext \
12589 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012590LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12593$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012594if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012596 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012597else
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12599$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012600if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012602else
12603 ac_check_lib_save_LIBS=$LIBS
12604LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012606/* end confdefs.h. */
12607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608/* Override any GCC internal prototype to avoid an error.
12609 Use char because int might match the return type of a GCC
12610 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012611#ifdef __cplusplus
12612extern "C"
12613#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012614char forkpty ();
12615int
12616main ()
12617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012619 ;
12620 return 0;
12621}
12622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012624 ac_cv_lib_bsd_forkpty=yes
12625else
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012628rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012630LIBS=$ac_check_lib_save_LIBS
12631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12633$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012634if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012636 LIBS="$LIBS -lbsd"
12637fi
12638
12639
12640fi
12641
Fred Drake8cef4cf2000-06-28 16:40:38 +000012642
12643fi
12644done
12645
Jack Jansendd19cf82001-12-06 22:36:17 +000012646
Michael W. Hudson54241132001-12-07 15:38:26 +000012647# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012648for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012649do :
12650 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12651ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012652if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012655_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012658done
12659
Michael W. Hudson54241132001-12-07 15:38:26 +000012660
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012661ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012662if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012663 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012664
Martin v. Löwis1142de32002-03-29 16:28:31 +000012665else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012667 *" dup2.$ac_objext "* ) ;;
12668 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012670esac
12671
Martin v. Löwis1142de32002-03-29 16:28:31 +000012672fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012673
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012674ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012675if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012676 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12677
12678else
12679 case " $LIBOBJS " in
12680 *" strdup.$ac_objext "* ) ;;
12681 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12682 ;;
12683esac
12684
12685fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012686
12687
12688for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012689do :
12690 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012691if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012696/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012698int
12699main ()
12700{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ;
12703 return 0;
12704}
12705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012709
Guido van Rossum627b2d71993-12-24 10:39:16 +000012710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012712
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012714done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715
Jack Jansen150753c2003-03-29 22:07:47 +000012716for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012717do :
12718 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012719if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012720 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012721#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012725#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012726int
12727main ()
12728{
12729setpgrp(0,0);
12730 ;
12731 return 0;
12732}
12733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012737
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012740
12741fi
12742done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012743
Michael W. Hudson54241132001-12-07 15:38:26 +000012744
Gregory P. Smith387512c2018-12-30 15:42:32 -080012745# We search for both crypt and crypt_r as one or the other may be defined
12746# This gets us our -lcrypt in LIBS when required on the target platform.
12747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12748$as_echo_n "checking for library containing crypt... " >&6; }
12749if ${ac_cv_search_crypt+:} false; then :
12750 $as_echo_n "(cached) " >&6
12751else
12752 ac_func_search_save_LIBS=$LIBS
12753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12754/* end confdefs.h. */
12755
12756/* Override any GCC internal prototype to avoid an error.
12757 Use char because int might match the return type of a GCC
12758 builtin and then its argument prototype would still apply. */
12759#ifdef __cplusplus
12760extern "C"
12761#endif
12762char crypt ();
12763int
12764main ()
12765{
12766return crypt ();
12767 ;
12768 return 0;
12769}
12770_ACEOF
12771for ac_lib in '' crypt; do
12772 if test -z "$ac_lib"; then
12773 ac_res="none required"
12774 else
12775 ac_res=-l$ac_lib
12776 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12777 fi
12778 if ac_fn_c_try_link "$LINENO"; then :
12779 ac_cv_search_crypt=$ac_res
12780fi
12781rm -f core conftest.err conftest.$ac_objext \
12782 conftest$ac_exeext
12783 if ${ac_cv_search_crypt+:} false; then :
12784 break
12785fi
12786done
12787if ${ac_cv_search_crypt+:} false; then :
12788
12789else
12790 ac_cv_search_crypt=no
12791fi
12792rm conftest.$ac_ext
12793LIBS=$ac_func_search_save_LIBS
12794fi
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12796$as_echo "$ac_cv_search_crypt" >&6; }
12797ac_res=$ac_cv_search_crypt
12798if test "$ac_res" != no; then :
12799 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12800
12801fi
12802
12803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12804$as_echo_n "checking for library containing crypt_r... " >&6; }
12805if ${ac_cv_search_crypt_r+:} false; then :
12806 $as_echo_n "(cached) " >&6
12807else
12808 ac_func_search_save_LIBS=$LIBS
12809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12810/* end confdefs.h. */
12811
12812/* Override any GCC internal prototype to avoid an error.
12813 Use char because int might match the return type of a GCC
12814 builtin and then its argument prototype would still apply. */
12815#ifdef __cplusplus
12816extern "C"
12817#endif
12818char crypt_r ();
12819int
12820main ()
12821{
12822return crypt_r ();
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827for ac_lib in '' crypt; do
12828 if test -z "$ac_lib"; then
12829 ac_res="none required"
12830 else
12831 ac_res=-l$ac_lib
12832 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12833 fi
12834 if ac_fn_c_try_link "$LINENO"; then :
12835 ac_cv_search_crypt_r=$ac_res
12836fi
12837rm -f core conftest.err conftest.$ac_objext \
12838 conftest$ac_exeext
12839 if ${ac_cv_search_crypt_r+:} false; then :
12840 break
12841fi
12842done
12843if ${ac_cv_search_crypt_r+:} false; then :
12844
12845else
12846 ac_cv_search_crypt_r=no
12847fi
12848rm conftest.$ac_ext
12849LIBS=$ac_func_search_save_LIBS
12850fi
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12852$as_echo "$ac_cv_search_crypt_r" >&6; }
12853ac_res=$ac_cv_search_crypt_r
12854if test "$ac_res" != no; then :
12855 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12856
12857fi
12858
12859
12860ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12861if test "x$ac_cv_func_crypt_r" = xyes; then :
12862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12863/* end confdefs.h. */
12864
12865#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12866#include <crypt.h>
12867
12868int
12869main ()
12870{
12871
12872struct crypt_data d;
12873char *r = crypt_r("", "", &d);
12874
12875 ;
12876 return 0;
12877}
12878_ACEOF
12879if ac_fn_c_try_compile "$LINENO"; then :
12880
12881$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12882
12883fi
12884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12885
12886fi
12887
12888
Victor Stinnere0be4232011-10-25 13:06:09 +020012889for ac_func in clock_gettime
12890do :
12891 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12892if test "x$ac_cv_func_clock_gettime" = xyes; then :
12893 cat >>confdefs.h <<_ACEOF
12894#define HAVE_CLOCK_GETTIME 1
12895_ACEOF
12896
12897else
12898
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12900$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12901if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12902 $as_echo_n "(cached) " >&6
12903else
12904 ac_check_lib_save_LIBS=$LIBS
12905LIBS="-lrt $LIBS"
12906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12907/* end confdefs.h. */
12908
12909/* Override any GCC internal prototype to avoid an error.
12910 Use char because int might match the return type of a GCC
12911 builtin and then its argument prototype would still apply. */
12912#ifdef __cplusplus
12913extern "C"
12914#endif
12915char clock_gettime ();
12916int
12917main ()
12918{
12919return clock_gettime ();
12920 ;
12921 return 0;
12922}
12923_ACEOF
12924if ac_fn_c_try_link "$LINENO"; then :
12925 ac_cv_lib_rt_clock_gettime=yes
12926else
12927 ac_cv_lib_rt_clock_gettime=no
12928fi
12929rm -f core conftest.err conftest.$ac_objext \
12930 conftest$ac_exeext conftest.$ac_ext
12931LIBS=$ac_check_lib_save_LIBS
12932fi
12933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12934$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12935if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12936
Victor Stinner7efb8332014-08-29 15:41:08 +020012937 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012938 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12939
12940
12941$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12942
12943
12944fi
12945
12946
12947fi
12948done
12949
12950
12951for ac_func in clock_getres
12952do :
12953 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12954if test "x$ac_cv_func_clock_getres" = xyes; then :
12955 cat >>confdefs.h <<_ACEOF
12956#define HAVE_CLOCK_GETRES 1
12957_ACEOF
12958
12959else
12960
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12962$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12963if ${ac_cv_lib_rt_clock_getres+:} false; then :
12964 $as_echo_n "(cached) " >&6
12965else
12966 ac_check_lib_save_LIBS=$LIBS
12967LIBS="-lrt $LIBS"
12968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12969/* end confdefs.h. */
12970
12971/* Override any GCC internal prototype to avoid an error.
12972 Use char because int might match the return type of a GCC
12973 builtin and then its argument prototype would still apply. */
12974#ifdef __cplusplus
12975extern "C"
12976#endif
12977char clock_getres ();
12978int
12979main ()
12980{
12981return clock_getres ();
12982 ;
12983 return 0;
12984}
12985_ACEOF
12986if ac_fn_c_try_link "$LINENO"; then :
12987 ac_cv_lib_rt_clock_getres=yes
12988else
12989 ac_cv_lib_rt_clock_getres=no
12990fi
12991rm -f core conftest.err conftest.$ac_objext \
12992 conftest$ac_exeext conftest.$ac_ext
12993LIBS=$ac_check_lib_save_LIBS
12994fi
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12996$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12997if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12998
12999 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13000
13001
13002fi
13003
13004
13005fi
13006done
13007
13008
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013009for ac_func in clock_settime
13010do :
13011 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13012if test "x$ac_cv_func_clock_settime" = xyes; then :
13013 cat >>confdefs.h <<_ACEOF
13014#define HAVE_CLOCK_SETTIME 1
13015_ACEOF
13016
13017else
13018
13019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13020$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13021if ${ac_cv_lib_rt_clock_settime+:} false; then :
13022 $as_echo_n "(cached) " >&6
13023else
13024 ac_check_lib_save_LIBS=$LIBS
13025LIBS="-lrt $LIBS"
13026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027/* end confdefs.h. */
13028
13029/* Override any GCC internal prototype to avoid an error.
13030 Use char because int might match the return type of a GCC
13031 builtin and then its argument prototype would still apply. */
13032#ifdef __cplusplus
13033extern "C"
13034#endif
13035char clock_settime ();
13036int
13037main ()
13038{
13039return clock_settime ();
13040 ;
13041 return 0;
13042}
13043_ACEOF
13044if ac_fn_c_try_link "$LINENO"; then :
13045 ac_cv_lib_rt_clock_settime=yes
13046else
13047 ac_cv_lib_rt_clock_settime=no
13048fi
13049rm -f core conftest.err conftest.$ac_objext \
13050 conftest$ac_exeext conftest.$ac_ext
13051LIBS=$ac_check_lib_save_LIBS
13052fi
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13054$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13055if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13056
13057 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13058
13059
13060fi
13061
13062
13063fi
13064done
13065
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13068$as_echo_n "checking for major... " >&6; }
13069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013071
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013072#if defined(MAJOR_IN_MKDEV)
13073#include <sys/mkdev.h>
13074#elif defined(MAJOR_IN_SYSMACROS)
13075#include <sys/sysmacros.h>
13076#else
13077#include <sys/types.h>
13078#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013079
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013080int
13081main ()
13082{
13083
13084 makedev(major(0),minor(0));
13085
13086 ;
13087 return 0;
13088}
13089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013091
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13096$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013097
13098else
Skip Montanaro6dead952003-09-25 14:50:04 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013102
13103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013104rm -f core conftest.err conftest.$ac_objext \
13105 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013106
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013107# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013108# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13110$as_echo_n "checking for getaddrinfo... " >&6; }
13111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013112/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013113
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013114#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013115#include <sys/socket.h>
13116#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013117#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013118
Martin v. Löwis11437992002-04-12 09:54:03 +000013119int
13120main ()
13121{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013122getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 ;
13124 return 0;
13125}
13126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013127if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128 have_getaddrinfo=yes
13129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013132rm -f core conftest.err conftest.$ac_objext \
13133 conftest$ac_exeext conftest.$ac_ext
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13135$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136if test $have_getaddrinfo = yes
13137then
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13139$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013140 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013144
13145if test "${enable_ipv6+set}" = set; then
13146 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13147else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013149fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153
Stefan Krah19c21392012-11-22 23:47:32 +010013154#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013155#include <sys/types.h>
13156#include <netdb.h>
13157#include <string.h>
13158#include <sys/socket.h>
13159#include <netinet/in.h>
13160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013161int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013162{
13163 int passive, gaierr, inet4 = 0, inet6 = 0;
13164 struct addrinfo hints, *ai, *aitop;
13165 char straddr[INET6_ADDRSTRLEN], strport[16];
13166
13167 for (passive = 0; passive <= 1; passive++) {
13168 memset(&hints, 0, sizeof(hints));
13169 hints.ai_family = AF_UNSPEC;
13170 hints.ai_flags = passive ? AI_PASSIVE : 0;
13171 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013172 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013173 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13174 (void)gai_strerror(gaierr);
13175 goto bad;
13176 }
13177 for (ai = aitop; ai; ai = ai->ai_next) {
13178 if (ai->ai_addr == NULL ||
13179 ai->ai_addrlen == 0 ||
13180 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13181 straddr, sizeof(straddr), strport, sizeof(strport),
13182 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13183 goto bad;
13184 }
13185 switch (ai->ai_family) {
13186 case AF_INET:
13187 if (strcmp(strport, "54321") != 0) {
13188 goto bad;
13189 }
13190 if (passive) {
13191 if (strcmp(straddr, "0.0.0.0") != 0) {
13192 goto bad;
13193 }
13194 } else {
13195 if (strcmp(straddr, "127.0.0.1") != 0) {
13196 goto bad;
13197 }
13198 }
13199 inet4++;
13200 break;
13201 case AF_INET6:
13202 if (strcmp(strport, "54321") != 0) {
13203 goto bad;
13204 }
13205 if (passive) {
13206 if (strcmp(straddr, "::") != 0) {
13207 goto bad;
13208 }
13209 } else {
13210 if (strcmp(straddr, "::1") != 0) {
13211 goto bad;
13212 }
13213 }
13214 inet6++;
13215 break;
13216 case AF_UNSPEC:
13217 goto bad;
13218 break;
13219 default:
13220 /* another family support? */
13221 break;
13222 }
13223 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013224 freeaddrinfo(aitop);
13225 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226 }
13227
13228 if (!(inet4 == 0 || inet4 == 2))
13229 goto bad;
13230 if (!(inet6 == 0 || inet6 == 2))
13231 goto bad;
13232
13233 if (aitop)
13234 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013235 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236
13237 bad:
13238 if (aitop)
13239 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013240 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241}
13242
Martin v. Löwis11437992002-04-12 09:54:03 +000013243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013245 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13258$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13259
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013260if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261then
13262 if test $ipv6 = yes
13263 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264 echo 'Fatal: You must get working getaddrinfo() function.'
13265 echo ' or you can specify "--disable-ipv6"'.
13266 exit 1
13267 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013268else
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013271
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013273
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013274for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013275do :
13276 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013277if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013279#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013280_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282fi
13283done
13284
Michael W. Hudson54241132001-12-07 15:38:26 +000013285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013286# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13288$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013289if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013293/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294#include <sys/types.h>
13295#include <sys/time.h>
13296#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
13301if ((struct tm *) 0)
13302return 0;
13303 ;
13304 return 0;
13305}
13306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013307if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13315$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013316if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319
13320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13323$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013324if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329#include <sys/types.h>
13330#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332int
13333main ()
13334{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335struct tm tm;
13336 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 ;
13339 return 0;
13340}
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343 ac_cv_struct_tm=time.h
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13350$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013351if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354
13355fi
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357ac_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 +000013358#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360"
Victor Stinnere0be4232011-10-25 13:06:09 +020013361if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
13363cat >>confdefs.h <<_ACEOF
13364#define HAVE_STRUCT_TM_TM_ZONE 1
13365_ACEOF
13366
13367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373
13374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13376"
Victor Stinnere0be4232011-10-25 13:06:09 +020013377if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381fi
13382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013384#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385_ACEOF
13386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13388$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013389if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013393/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013394#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395#if !HAVE_DECL_TZNAME
13396extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399int
13400main ()
13401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 ;
13404 return 0;
13405}
13406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408 ac_cv_var_tzname=yes
13409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412rm -f core conftest.err conftest.$ac_objext \
13413 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13416$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013417 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421 fi
13422fi
13423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424ac_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 +020013425if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
13427cat >>confdefs.h <<_ACEOF
13428#define HAVE_STRUCT_STAT_ST_RDEV 1
13429_ACEOF
13430
13431
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013432fi
13433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434ac_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 +020013435if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437cat >>confdefs.h <<_ACEOF
13438#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13439_ACEOF
13440
13441
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013442fi
13443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444ac_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 +020013445if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013446
13447cat >>confdefs.h <<_ACEOF
13448#define HAVE_STRUCT_STAT_ST_FLAGS 1
13449_ACEOF
13450
13451
13452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454ac_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 +020013455if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013456
13457cat >>confdefs.h <<_ACEOF
13458#define HAVE_STRUCT_STAT_ST_GEN 1
13459_ACEOF
13460
13461
13462fi
13463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464ac_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 +020013465if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013466
13467cat >>confdefs.h <<_ACEOF
13468#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13469_ACEOF
13470
13471
13472fi
13473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474ac_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 +020013475if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477cat >>confdefs.h <<_ACEOF
13478#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13479_ACEOF
13480
13481
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013482fi
13483
Stefan Krah267b6392016-04-26 01:09:18 +020013484ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13485 #include <sys/types.h>
13486 #include <pwd.h>
13487
13488"
13489if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13490
13491cat >>confdefs.h <<_ACEOF
13492#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13493_ACEOF
13494
13495
13496fi
13497ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13498 #include <sys/types.h>
13499 #include <pwd.h>
13500
13501"
13502if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13503
13504cat >>confdefs.h <<_ACEOF
13505#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13506_ACEOF
13507
13508
13509fi
13510
Zachary Ware6a6967e2016-10-01 00:47:27 -050013511# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13512ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13513"
13514if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13515
13516cat >>confdefs.h <<_ACEOF
13517#define HAVE_SIGINFO_T_SI_BAND 1
13518_ACEOF
13519
13520
13521fi
13522
Michael W. Hudson54241132001-12-07 15:38:26 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13525$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013526if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528else
Matthias Kloseb159a552010-04-25 21:00:44 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013533int
13534main ()
13535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ;
13538 return 0;
13539}
13540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542 ac_cv_header_time_altzone=yes
13543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548fi
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13551$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555
13556fi
13557
Guido van Rossumda88dad1995-01-26 00:46:29 +000013558was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13560$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013563
13564#include <sys/types.h>
13565#include <sys/select.h>
13566#include <sys/time.h>
13567
Martin v. Löwis11437992002-04-12 09:54:03 +000013568int
13569main ()
13570{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571;
Martin v. Löwis11437992002-04-12 09:54:03 +000013572 ;
13573 return 0;
13574}
13575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
13578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013581 was_it_defined=yes
13582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13586$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13589$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013590if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013594/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013595#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013596int
13597main ()
13598{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013599struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 ;
13601 return 0;
13602}
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605 ac_cv_struct_addrinfo=yes
13606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13610fi
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13613$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013617
13618fi
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13621$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013622if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624else
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013626/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627
13628# include <sys/types.h>
13629# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013630int
13631main ()
13632{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013633struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 ;
13635 return 0;
13636}
13637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013639 ac_cv_struct_sockaddr_storage=yes
13640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13644fi
13645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13647$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013648if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013651
13652fi
13653
Christian Heimesdffa3942016-09-05 23:54:41 +020013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13655$as_echo_n "checking for sockaddr_alg... " >&6; }
13656if ${ac_cv_struct_sockaddr_alg+:} false; then :
13657 $as_echo_n "(cached) " >&6
13658else
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13660/* end confdefs.h. */
13661
13662# include <sys/types.h>
13663# include <sys/socket.h>
13664# include <linux/if_alg.h>
13665int
13666main ()
13667{
13668struct sockaddr_alg s
13669 ;
13670 return 0;
13671}
13672_ACEOF
13673if ac_fn_c_try_compile "$LINENO"; then :
13674 ac_cv_struct_sockaddr_alg=yes
13675else
13676 ac_cv_struct_sockaddr_alg=no
13677fi
13678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13679fi
13680
13681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13682$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13683if test $ac_cv_struct_sockaddr_alg = yes; then
13684
13685$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13686
13687fi
13688
Guido van Rossum627b2d71993-12-24 10:39:16 +000013689# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13692$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013693if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013698$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013699int
13700main ()
13701{
13702static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013703test_array [0] = 0;
13704return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
13706 ;
13707 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013708}
Martin v. Löwis11437992002-04-12 09:54:03 +000013709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013710if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013711 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013712else
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13718$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721
13722fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13725$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013728else
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013730/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731
Martin v. Löwis11437992002-04-12 09:54:03 +000013732int
13733main ()
13734{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013735
Martin v. Löwis11437992002-04-12 09:54:03 +000013736#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013737 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013739 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741 char const *const *pcpcc;
13742 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 /* NEC SVR4.0.2 mips cc rejects this. */
13744 struct point {int x, y;};
13745 static struct point const zero = {0,0};
13746 /* AIX XL C 1.02.0.0 rejects this.
13747 It does not let you subtract one const X* pointer from another in
13748 an arm of an if-expression whose if-part is not a constant
13749 expression */
13750 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753 ++pcpcc;
13754 ppc = (char**) pcpcc;
13755 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013756 { /* SCO 3.2v4 cc rejects this sort of thing. */
13757 char tx;
13758 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 }
13764 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13765 int x[] = {25, 17};
13766 const int *foo = &x[0];
13767 ++foo;
13768 }
13769 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13770 typedef const int *iptr;
13771 iptr p = 0;
13772 ++p;
13773 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013774 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013776 struct s { int j; const int *ap[3]; } bx;
13777 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 }
13779 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13780 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013783 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013784#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013785
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ;
13787 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788}
Martin v. Löwis11437992002-04-12 09:54:03 +000013789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013790if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791 ac_cv_c_const=yes
13792else
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13798$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802
13803fi
13804
Michael W. Hudson54241132001-12-07 15:38:26 +000013805
Guido van Rossumda88dad1995-01-26 00:46:29 +000013806works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13808$as_echo_n "checking for working signed char... " >&6; }
13809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013810/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013811
Martin v. Löwis11437992002-04-12 09:54:03 +000013812int
13813main ()
13814{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 ;
13817 return 0;
13818}
13819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013821 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013822else
Skip Montanaro6dead952003-09-25 14:50:04 +000013823
Matthias Kloseb9621712010-04-24 17:59:49 +000013824$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013825
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013826
Guido van Rossum7f43da71994-08-01 12:15:30 +000013827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13830$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013831
Guido van Rossumda88dad1995-01-26 00:46:29 +000013832have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13834$as_echo_n "checking for prototypes... " >&6; }
13835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013836/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013837int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013838int
13839main ()
13840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 ;
13843 return 0;
13844}
13845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013849
Matthias Kloseb159a552010-04-25 21:00:44 +000013850 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13854$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855
Guido van Rossumda88dad1995-01-26 00:46:29 +000013856works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13858$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013860/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013861
13862#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013863int foo(int x, ...) {
13864 va_list va;
13865 va_start(va, x);
13866 va_arg(va, int);
13867 va_arg(va, char *);
13868 va_arg(va, double);
13869 return 0;
13870}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872int
13873main ()
13874{
Guido van Rossum90eea071996-08-30 20:58:57 +000013875return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 ;
13877 return 0;
13878}
13879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
13882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013885 works=yes
13886
Guido van Rossum627b2d71993-12-24 10:39:16 +000013887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13890$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891
Martin v. Löwisd6320502004-08-12 13:45:08 +000013892# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13894$as_echo_n "checking for socketpair... " >&6; }
13895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013896/* end confdefs.h. */
13897
13898#include <sys/types.h>
13899#include <sys/socket.h>
13900
13901int
13902main ()
13903{
13904void *x=socketpair
13905 ;
13906 return 0;
13907}
13908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013910
Matthias Kloseb9621712010-04-24 17:59:49 +000013911$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013912
Matthias Kloseb159a552010-04-25 21:00:44 +000013913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013914$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013915else
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13917$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013918
13919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013921
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013922# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13924$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013926/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013927#include <sys/types.h>
13928#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013929int
13930main ()
13931{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013932struct sockaddr x;
13933x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 ;
13935 return 0;
13936}
13937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013938if ac_fn_c_try_compile "$LINENO"; then :
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13940$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013943
13944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13946$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013947
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013950
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013951# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
13953
Matthias Kloseb9621712010-04-24 17:59:49 +000013954ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13960$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013961 OLD_CFLAGS=$CFLAGS
13962 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013964/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013965
13966# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Martin v. Löwis11437992002-04-12 09:54:03 +000013968int
13969main ()
13970{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013971
13972 char *name;
13973 struct hostent *he, *res;
13974 char buffer[2048];
13975 int buflen = 2048;
13976 int h_errnop;
13977
13978 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
13980 ;
13981 return 0;
13982}
13983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13992$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013993
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994else
Skip Montanaro6dead952003-09-25 14:50:04 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13997$as_echo "no" >&6; }
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13999$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014001/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014002
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014003# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
Martin v. Löwis11437992002-04-12 09:54:03 +000014005int
14006main ()
14007{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014008
14009 char *name;
14010 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014011 char buffer[2048];
14012 int buflen = 2048;
14013 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014014
Matthias Kloseb159a552010-04-25 21:00:44 +000014015 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
14017 ;
14018 return 0;
14019}
14020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014024
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
Matthias Kloseb159a552010-04-25 21:00:44 +000014026$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14029$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014031else
Skip Montanaro6dead952003-09-25 14:50:04 +000014032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14034$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14036$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14038/* end confdefs.h. */
14039
14040# include <netdb.h>
14041
14042int
14043main ()
14044{
14045
14046 char *name;
14047 struct hostent *he;
14048 struct hostent_data data;
14049
14050 (void) gethostbyname_r(name, he, &data);
14051
14052 ;
14053 return 0;
14054}
14055_ACEOF
14056if ac_fn_c_try_compile "$LINENO"; then :
14057
14058 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14059
14060
14061$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14062
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14064$as_echo "yes" >&6; }
14065
14066else
14067
14068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14069$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014076
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079 CFLAGS=$OLD_CFLAGS
14080
14081else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 for ac_func in gethostbyname
14084do :
14085 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014086if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014088#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014089_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014092done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093
Michael W. Hudson54241132001-12-07 15:38:26 +000014094
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095fi
14096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
14098
14099
14100
14101
14102
Guido van Rossum627b2d71993-12-24 10:39:16 +000014103# checks for system services
14104# (none yet)
14105
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014106# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014107ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014108if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014109
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014110else
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14112$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014113if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014115else
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014117LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121/* Override any GCC internal prototype to avoid an error.
14122 Use char because int might match the return type of a GCC
14123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014124#ifdef __cplusplus
14125extern "C"
14126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014127char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014128int
14129main ()
14130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ;
14133 return 0;
14134}
14135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014138else
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014141rm -f core conftest.err conftest.$ac_objext \
14142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014143LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14146$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014147if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 cat >>confdefs.h <<_ACEOF
14149#define HAVE_LIBIEEE 1
14150_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014151
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014152 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014153
Guido van Rossum627b2d71993-12-24 10:39:16 +000014154fi
14155
Michael W. Hudson54241132001-12-07 15:38:26 +000014156
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014157fi
14158
Michael W. Hudson54241132001-12-07 15:38:26 +000014159
Guido van Rossum7f43da71994-08-01 12:15:30 +000014160# check for --with-libm=...
14161
Guido van Rossum563e7081996-09-10 18:20:48 +000014162case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014163Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014164*) LIBM=-lm
14165esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14167$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014170if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014172if test "$withval" = no
14173then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14175$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014176elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014177then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14179$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014180else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014181fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014182else
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14184$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185fi
14186
Guido van Rossum7f43da71994-08-01 12:15:30 +000014187
14188# check for --with-libc=...
14189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14191$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014194if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014196if test "$withval" = no
14197then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14199$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014200elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014201then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14203$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014204else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014205fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14208$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209fi
14210
Guido van Rossum7f43da71994-08-01 12:15:30 +000014211
Stefan Krah1919b7e2012-03-21 18:25:23 +010014212# **************************************
14213# * Check for gcc x64 inline assembler *
14214# **************************************
14215
14216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14217$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14219/* end confdefs.h. */
14220
14221int
14222main ()
14223{
14224
14225 __asm__ __volatile__ ("movq %rcx, %rax");
14226
14227 ;
14228 return 0;
14229}
14230_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014231if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014232 have_gcc_asm_for_x64=yes
14233else
14234 have_gcc_asm_for_x64=no
14235fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014236rm -f core conftest.err conftest.$ac_objext \
14237 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14239$as_echo "$have_gcc_asm_for_x64" >&6; }
14240if test "$have_gcc_asm_for_x64" = yes
14241then
14242
14243$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14244
14245fi
14246
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247# **************************************************
14248# * Check for various properties of floating point *
14249# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014250
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14252$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14253if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014255else
14256
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014257
14258ax_cv_c_float_words_bigendian=unknown
14259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014260/* end confdefs.h. */
14261
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014262
14263double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14264
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014265
14266_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014267if ac_fn_c_try_compile "$LINENO"; then :
14268
14269
14270if grep noonsees conftest.$ac_objext >/dev/null ; then
14271 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014272fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014273if grep seesnoon conftest.$ac_objext >/dev/null ; then
14274 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14275 ax_cv_c_float_words_bigendian=no
14276 else
14277 ax_cv_c_float_words_bigendian=unknown
14278 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279fi
14280
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014281
14282fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014284fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14286$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014288case $ax_cv_c_float_words_bigendian in
14289 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014290
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014291$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14292 ;;
14293 no)
14294 ;;
14295 *)
14296 as_fn_error $? "
14297
14298Unknown float word ordering. You need to manually preset
14299ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14300
14301 " "$LINENO" 5 ;;
14302esac
14303
14304
14305if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014306then
14307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014310elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014311then
14312
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014313$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14314
14315else
14316 # Some ARM platforms use a mixed-endian representation for doubles.
14317 # While Python doesn't currently have full support for these platforms
14318 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14319 # conversions work.
14320 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14321 # or little, then it must be this?
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014324
14325fi
14326
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014327# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014328# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014329# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014330# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014331# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014332# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014333
14334# This inline assembler syntax may also work for suncc and icc,
14335# so we try it on all platforms.
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14338$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014340/* end confdefs.h. */
14341
14342int
14343main ()
14344{
14345
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014346 unsigned short cw;
14347 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14348 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014349
14350 ;
14351 return 0;
14352}
14353_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014354if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014355 have_gcc_asm_for_x87=yes
14356else
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014358fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014359rm -f core conftest.err conftest.$ac_objext \
14360 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14362$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014363if test "$have_gcc_asm_for_x87" = yes
14364then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014365
Matthias Kloseb9621712010-04-24 17:59:49 +000014366$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014367
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14371$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14373/* end confdefs.h. */
14374
14375int
14376main ()
14377{
14378
14379 unsigned int fpcr;
14380 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14381 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14382
14383 ;
14384 return 0;
14385}
14386_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014387if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014388 have_gcc_asm_for_mc68881=yes
14389else
14390 have_gcc_asm_for_mc68881=no
14391fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014392rm -f core conftest.err conftest.$ac_objext \
14393 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14395$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14396if test "$have_gcc_asm_for_mc68881" = yes
14397then
14398
14399$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14400
14401fi
14402
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014403# Detect whether system arithmetic is subject to x87-style double
14404# rounding issues. The result of this test has little meaning on non
14405# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14406# mode is round-to-nearest and double rounding issues are present, and
14407# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14409$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014410# $BASECFLAGS may affect the result
14411ac_save_cc="$CC"
14412CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014413if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014414 ac_cv_x87_double_rounding=no
14415else
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014417/* end confdefs.h. */
14418
14419#include <stdlib.h>
14420#include <math.h>
14421int main() {
14422 volatile double x, y, z;
14423 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14424 x = 0.99999999999999989; /* 1-2**-53 */
14425 y = 1./x;
14426 if (y != 1.)
14427 exit(0);
14428 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14429 x = 1e16;
14430 y = 2.99999;
14431 z = x + y;
14432 if (z != 1e16+4.)
14433 exit(0);
14434 /* both tests show evidence of double rounding */
14435 exit(1);
14436}
14437
14438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014439if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014440 ac_cv_x87_double_rounding=no
14441else
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014446fi
14447
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014448CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14450$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014451if test "$ac_cv_x87_double_rounding" = yes
14452then
14453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014455
14456fi
14457
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014458# ************************************
14459# * Check for mathematical functions *
14460# ************************************
14461
14462LIBS_SAVE=$LIBS
14463LIBS="$LIBS $LIBM"
14464
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014465for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14466do :
14467 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14468ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014469if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014470 cat >>confdefs.h <<_ACEOF
14471#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14472_ACEOF
14473
14474fi
14475done
14476
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014477for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014478do :
14479 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14480ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014481if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014482 cat >>confdefs.h <<_ACEOF
14483#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14484_ACEOF
14485
14486fi
14487done
14488
14489ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14490"
Victor Stinnere0be4232011-10-25 13:06:09 +020014491if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014492 ac_have_decl=1
14493else
14494 ac_have_decl=0
14495fi
14496
14497cat >>confdefs.h <<_ACEOF
14498#define HAVE_DECL_ISINF $ac_have_decl
14499_ACEOF
14500ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14501"
Victor Stinnere0be4232011-10-25 13:06:09 +020014502if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014503 ac_have_decl=1
14504else
14505 ac_have_decl=0
14506fi
14507
14508cat >>confdefs.h <<_ACEOF
14509#define HAVE_DECL_ISNAN $ac_have_decl
14510_ACEOF
14511ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14512"
Victor Stinnere0be4232011-10-25 13:06:09 +020014513if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014514 ac_have_decl=1
14515else
14516 ac_have_decl=0
14517fi
14518
14519cat >>confdefs.h <<_ACEOF
14520#define HAVE_DECL_ISFINITE $ac_have_decl
14521_ACEOF
14522
14523
Mark Dickinsona614f042009-11-28 12:48:43 +000014524# For multiprocessing module, check that sem_open
14525# actually works. For FreeBSD versions <= 7.2,
14526# the kernel module that provides POSIX semaphores
14527# isn't loaded by default, so an attempt to call
14528# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14530$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014531if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014533else
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014535 ac_cv_posix_semaphores_enabled=yes
14536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014538/* end confdefs.h. */
14539
14540#include <unistd.h>
14541#include <fcntl.h>
14542#include <stdio.h>
14543#include <semaphore.h>
14544#include <sys/stat.h>
14545
14546int main(void) {
14547 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14548 if (a == SEM_FAILED) {
14549 perror("sem_open");
14550 return 1;
14551 }
14552 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014553 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014554 return 0;
14555}
14556
14557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014558if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014559 ac_cv_posix_semaphores_enabled=yes
14560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014565fi
14566
14567
Mark Dickinsona614f042009-11-28 12:48:43 +000014568fi
14569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14571$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014572if test $ac_cv_posix_semaphores_enabled = no
14573then
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014576
14577fi
14578
Mark Dickinson10683072009-04-18 21:18:19 +000014579# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14581$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014582if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014584else
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014586 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014589/* end confdefs.h. */
14590
14591#include <unistd.h>
14592#include <fcntl.h>
14593#include <stdio.h>
14594#include <semaphore.h>
14595#include <sys/stat.h>
14596
14597int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014598 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014599 int count;
14600 int res;
14601 if(a==SEM_FAILED){
14602 perror("sem_open");
14603 return 1;
14604
14605 }
14606 res = sem_getvalue(a, &count);
14607 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014608 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014609 return res==-1 ? 1 : 0;
14610}
14611
Mark Dickinson10683072009-04-18 21:18:19 +000014612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014613if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014614 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014615else
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014620fi
14621
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014622
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014623fi
14624
Matthias Kloseb9621712010-04-24 17:59:49 +000014625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14626$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014627if test $ac_cv_broken_sem_getvalue = yes
14628then
14629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014631
14632fi
14633
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014634ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14635"
14636if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14637 ac_have_decl=1
14638else
14639 ac_have_decl=0
14640fi
14641
14642cat >>confdefs.h <<_ACEOF
14643#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14644_ACEOF
14645ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14646"
14647if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14648 ac_have_decl=1
14649else
14650 ac_have_decl=0
14651fi
14652
14653cat >>confdefs.h <<_ACEOF
14654#define HAVE_DECL_RTLD_NOW $ac_have_decl
14655_ACEOF
14656ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14657"
14658if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14659 ac_have_decl=1
14660else
14661 ac_have_decl=0
14662fi
14663
14664cat >>confdefs.h <<_ACEOF
14665#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14666_ACEOF
14667ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14668"
14669if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14670 ac_have_decl=1
14671else
14672 ac_have_decl=0
14673fi
14674
14675cat >>confdefs.h <<_ACEOF
14676#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14677_ACEOF
14678ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14679"
14680if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14681 ac_have_decl=1
14682else
14683 ac_have_decl=0
14684fi
14685
14686cat >>confdefs.h <<_ACEOF
14687#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14688_ACEOF
14689ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14690"
14691if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14692 ac_have_decl=1
14693else
14694 ac_have_decl=0
14695fi
14696
14697cat >>confdefs.h <<_ACEOF
14698#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14699_ACEOF
14700ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14701"
14702if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14703 ac_have_decl=1
14704else
14705 ac_have_decl=0
14706fi
14707
14708cat >>confdefs.h <<_ACEOF
14709#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14710_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014711ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14712"
14713if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14714 ac_have_decl=1
14715else
14716 ac_have_decl=0
14717fi
14718
14719cat >>confdefs.h <<_ACEOF
14720#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14721_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014722
14723
Mark Dickinsonbd792642009-03-18 20:06:12 +000014724# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14726$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014727# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014728if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014729 enableval=$enable_big_digits; case $enable_big_digits in
14730yes)
14731 enable_big_digits=30 ;;
14732no)
14733 enable_big_digits=15 ;;
1473415|30)
14735 ;;
14736*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014737 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 +000014738esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14740$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014741
14742cat >>confdefs.h <<_ACEOF
14743#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14744_ACEOF
14745
14746
14747else
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14749$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014750fi
14751
14752
Guido van Rossumef2255b2000-03-10 22:30:29 +000014753# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014754ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014755if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
14757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014759
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014760 wchar_h="yes"
14761
Guido van Rossumef2255b2000-03-10 22:30:29 +000014762else
Martin v. Löwis11437992002-04-12 09:54:03 +000014763 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014764
14765fi
14766
Michael W. Hudson54241132001-12-07 15:38:26 +000014767
Martin v. Löwis11437992002-04-12 09:54:03 +000014768
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014769# determine wchar_t size
14770if test "$wchar_h" = yes
14771then
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14775# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14777$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014778if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014780else
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14782"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
Martin v. Löwis11437992002-04-12 09:54:03 +000014784else
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 if test "$ac_cv_type_wchar_t" = yes; then
14786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014788as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790 else
14791 ac_cv_sizeof_wchar_t=0
14792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014794
Martin v. Löwis11437992002-04-12 09:54:03 +000014795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14797$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798
14799
14800
Martin v. Löwis11437992002-04-12 09:54:03 +000014801cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014802#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014803_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014804
Michael W. Hudson54241132001-12-07 15:38:26 +000014805
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014806fi
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14809$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014810have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014812/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014813
14814#include <tcl.h>
14815#if TCL_UTF_MAX != 6
14816# error "NOT UCS4_TCL"
14817#endif
14818int
14819main ()
14820{
14821
14822 ;
14823 return 0;
14824}
14825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014826if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014827
14828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014830
14831 have_ucs4_tcl=yes
14832
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14836$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014837
Skip Montanaro6dead952003-09-25 14:50:04 +000014838# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014839if test "$wchar_h" = yes
14840then
14841 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14843$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014844 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014846else
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014849 ac_cv_wchar_t_signed=yes
14850else
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014852/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014853
14854 #include <wchar.h>
14855 int main()
14856 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014857 /* Success: exit code 0 */
14858 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014859 }
14860
14861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014863 ac_cv_wchar_t_signed=yes
14864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014869fi
14870
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014871fi
14872
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14874$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875fi
14876
Michael Osipov3738fad2018-08-24 18:17:19 +020014877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14878$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014879# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014880if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014881 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014882then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014885
Michael Osipov3738fad2018-08-24 18:17:19 +020014886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14887$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014888else
Michael Osipov3738fad2018-08-24 18:17:19 +020014889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14890$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014891fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014892
14893# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14895$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014896if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014898else
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 ac_cv_c_bigendian=unknown
14900 # See if we're dealing with a universal compiler.
14901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14902/* end confdefs.h. */
14903#ifndef __APPLE_CC__
14904 not a universal capable compiler
14905 #endif
14906 typedef int dummy;
14907
Skip Montanaro6dead952003-09-25 14:50:04 +000014908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014909if ac_fn_c_try_compile "$LINENO"; then :
14910
14911 # Check for potential -arch flags. It is not universal unless
14912 # there are at least two -arch flags with different values.
14913 ac_arch=
14914 ac_prev=
14915 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14916 if test -n "$ac_prev"; then
14917 case $ac_word in
14918 i?86 | x86_64 | ppc | ppc64)
14919 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14920 ac_arch=$ac_word
14921 else
14922 ac_cv_c_bigendian=universal
14923 break
14924 fi
14925 ;;
14926 esac
14927 ac_prev=
14928 elif test "x$ac_word" = "x-arch"; then
14929 ac_prev=arch
14930 fi
14931 done
14932fi
14933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14934 if test $ac_cv_c_bigendian = unknown; then
14935 # See if sys/param.h defines the BYTE_ORDER macro.
14936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014938#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014940
Martin v. Löwis11437992002-04-12 09:54:03 +000014941int
14942main ()
14943{
Matthias Kloseb9621712010-04-24 17:59:49 +000014944#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14945 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14946 && LITTLE_ENDIAN)
14947 bogus endian macros
14948 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
14950 ;
14951 return 0;
14952}
14953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014954if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014955 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014957/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014958#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961int
14962main ()
14963{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014964#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 not big endian
14966 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014967
14968 ;
14969 return 0;
14970}
14971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014972if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014973 ac_cv_c_bigendian=yes
14974else
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014978fi
14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14980 fi
14981 if test $ac_cv_c_bigendian = unknown; then
14982 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014985#include <limits.h>
14986
Martin v. Löwis11437992002-04-12 09:54:03 +000014987int
14988main ()
14989{
Matthias Kloseb9621712010-04-24 17:59:49 +000014990#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14991 bogus endian macros
14992 #endif
14993
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ;
14995 return 0;
14996}
14997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014998if ac_fn_c_try_compile "$LINENO"; then :
14999 # It does; now see whether it defined to _BIG_ENDIAN or not.
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001/* end confdefs.h. */
15002#include <limits.h>
15003
15004int
15005main ()
15006{
15007#ifndef _BIG_ENDIAN
15008 not big endian
15009 #endif
15010
15011 ;
15012 return 0;
15013}
15014_ACEOF
15015if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015017else
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15021fi
15022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15023 fi
15024 if test $ac_cv_c_bigendian = unknown; then
15025 # Compile a test program.
15026 if test "$cross_compiling" = yes; then :
15027 # Try to guess by grepping values from an object file.
15028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15029/* end confdefs.h. */
15030short int ascii_mm[] =
15031 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15032 short int ascii_ii[] =
15033 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15034 int use_ascii (int i) {
15035 return ascii_mm[i] + ascii_ii[i];
15036 }
15037 short int ebcdic_ii[] =
15038 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15039 short int ebcdic_mm[] =
15040 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15041 int use_ebcdic (int i) {
15042 return ebcdic_mm[i] + ebcdic_ii[i];
15043 }
15044 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046int
15047main ()
15048{
15049return use_ascii (foo) == use_ebcdic (foo);
15050 ;
15051 return 0;
15052}
15053_ACEOF
15054if ac_fn_c_try_compile "$LINENO"; then :
15055 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15056 ac_cv_c_bigendian=yes
15057 fi
15058 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15059 if test "$ac_cv_c_bigendian" = unknown; then
15060 ac_cv_c_bigendian=no
15061 else
15062 # finding both strings is unlikely to happen, but who knows?
15063 ac_cv_c_bigendian=unknown
15064 fi
15065 fi
15066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015068else
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015070/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 /* Are we little or big endian? From Harbison&Steele. */
15077 union
15078 {
15079 long int l;
15080 char c[sizeof (long int)];
15081 } u;
15082 u.l = 1;
15083 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084
15085 ;
15086 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015087}
Martin v. Löwis11437992002-04-12 09:54:03 +000015088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015089if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090 ac_cv_c_bigendian=no
15091else
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15101$as_echo "$ac_cv_c_bigendian" >&6; }
15102 case $ac_cv_c_bigendian in #(
15103 yes)
15104 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15105;; #(
15106 no)
15107 ;; #(
15108 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 ;; #(
15113 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015114 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015115 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015117
Michael W. Hudson54241132001-12-07 15:38:26 +000015118
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015119# ABI version string for Python extension modules. This appears between the
15120# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15121# from the following attributes which affect the ABI of this Python build (in
15122# this order):
15123#
15124# * The Python implementation (always 'cpython-' for us)
15125# * The major and minor version numbers
15126# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015127#
15128# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015129# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15130# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015131#
15132# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15133# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015134
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15136$as_echo_n "checking ABIFLAGS... " >&6; }
15137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15138$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15140$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015141SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15143$as_echo "$SOABI" >&6; }
15144
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015145# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15146if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015147 # Similar to SOABI but remove "d" flag from ABIFLAGS
15148
15149 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15150
15151cat >>confdefs.h <<_ACEOF
15152#define ALT_SOABI "${ALT_SOABI}"
15153_ACEOF
15154
15155fi
15156
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015157
15158case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015159 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015160 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15161 *)
15162 EXT_SUFFIX=${SHLIB_SUFFIX};;
15163esac
15164
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15166$as_echo_n "checking LDVERSION... " >&6; }
15167LDVERSION='$(VERSION)$(ABIFLAGS)'
15168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15169$as_echo "$LDVERSION" >&6; }
15170
E. M. Brayc994c8f2019-05-24 17:33:47 +020015171# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015172
E. M. Brayb1fc4172019-05-24 18:39:39 +020015173if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015174 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015175else
15176 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015177fi
15178
doko@python.org87421192013-01-26 11:39:31 +010015179
doko@ubuntu.com55532312016-06-14 08:55:19 +020015180if test x$PLATFORM_TRIPLET = x; then
15181 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15182else
15183 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15184fi
doko@python.org87421192013-01-26 11:39:31 +010015185
15186
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015187# Check whether right shifting a negative integer extends the sign bit
15188# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15190$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015191if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015193else
Martin v. Löwis11437992002-04-12 09:54:03 +000015194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015196 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015197else
Matthias Kloseb9621712010-04-24 17:59:49 +000015198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015199/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015200
15201int main()
15202{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015203 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015204}
15205
Martin v. Löwis11437992002-04-12 09:54:03 +000015206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015207if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015208 ac_cv_rshift_extends_sign=yes
15209else
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15213 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015214fi
15215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216fi
15217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15219$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015220if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015221then
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015225fi
15226
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015227# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15229$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015230if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015232else
Martin v. Löwis11437992002-04-12 09:54:03 +000015233
Matthias Kloseb9621712010-04-24 17:59:49 +000015234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015235/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015236#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015237int
15238main ()
15239{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015240
15241 FILE *f = fopen("/dev/null", "r");
15242 flockfile(f);
15243 getc_unlocked(f);
15244 funlockfile(f);
15245
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ;
15247 return 0;
15248}
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015251 ac_cv_have_getc_unlocked=yes
15252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_have_getc_unlocked=no
15254fi
15255rm -f core conftest.err conftest.$ac_objext \
15256 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15260$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015261if test "$ac_cv_have_getc_unlocked" = yes
15262then
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
Matthias Kloseb9621712010-04-24 17:59:49 +000015264$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015265
15266fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015267
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015268# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015269# save the value of LIBS so we don't actually link Python with readline
15270LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015271
Gregory P. Smith18820942008-09-07 06:24:49 +000015272# On some systems we need to link readline to a termcap compatible
15273# library. NOTE: Keep the precedence of listed libraries synchronised
15274# with setup.py.
15275py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15277$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015278for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015279 if test -z "$py_libtermcap"; then
15280 READLINE_LIBS="-lreadline"
15281 else
15282 READLINE_LIBS="-lreadline -l$py_libtermcap"
15283 fi
15284 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015286/* end confdefs.h. */
15287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288/* Override any GCC internal prototype to avoid an error.
15289 Use char because int might match the return type of a GCC
15290 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015291#ifdef __cplusplus
15292extern "C"
15293#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015294char readline ();
15295int
15296main ()
15297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015299 ;
15300 return 0;
15301}
15302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015303if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015304 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015306rm -f core conftest.err conftest.$ac_objext \
15307 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015308 if test $py_cv_lib_readline = yes; then
15309 break
15310 fi
15311done
15312# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15313#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015314if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15316$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015317else
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15319$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015322
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015323fi
15324
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015325# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015328#include <readline/readline.h>
15329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015330if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015331 have_readline=yes
15332else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015333 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015334
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015335fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015336rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015337if test $have_readline = yes
15338then
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015340/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015341#include <readline/readline.h>
15342
15343_ACEOF
15344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015348
15349fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015350rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015351
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015353/* end confdefs.h. */
15354#include <readline/readline.h>
15355
15356_ACEOF
15357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015361
15362fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015363rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015364
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015365fi
15366
Martin v. Löwis0daad592001-09-30 21:09:59 +000015367# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15369$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015370if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015372else
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015374LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378/* Override any GCC internal prototype to avoid an error.
15379 Use char because int might match the return type of a GCC
15380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015381#ifdef __cplusplus
15382extern "C"
15383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015384char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015385int
15386main ()
15387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 ;
15390 return 0;
15391}
15392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015395else
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015398rm -f core conftest.err conftest.$ac_objext \
15399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015400LIBS=$ac_check_lib_save_LIBS
15401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15403$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015404if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015405
Matthias Kloseb9621712010-04-24 17:59:49 +000015406$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015407
Martin v. Löwis0daad592001-09-30 21:09:59 +000015408fi
15409
Michael W. Hudson54241132001-12-07 15:38:26 +000015410
Thomas Wouters89d996e2007-09-08 17:39:28 +000015411# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15413$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015414if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015416else
15417 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015418LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015420/* end confdefs.h. */
15421
15422/* Override any GCC internal prototype to avoid an error.
15423 Use char because int might match the return type of a GCC
15424 builtin and then its argument prototype would still apply. */
15425#ifdef __cplusplus
15426extern "C"
15427#endif
15428char rl_completion_display_matches_hook ();
15429int
15430main ()
15431{
15432return rl_completion_display_matches_hook ();
15433 ;
15434 return 0;
15435}
15436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015437if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015438 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015442rm -f core conftest.err conftest.$ac_objext \
15443 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015444LIBS=$ac_check_lib_save_LIBS
15445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15447$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015448if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015451
15452fi
15453
15454
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015455# also in 4.0, but not in editline
15456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15457$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15458if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15459 $as_echo_n "(cached) " >&6
15460else
15461 ac_check_lib_save_LIBS=$LIBS
15462LIBS="-lreadline $READLINE_LIBS $LIBS"
15463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15464/* end confdefs.h. */
15465
15466/* Override any GCC internal prototype to avoid an error.
15467 Use char because int might match the return type of a GCC
15468 builtin and then its argument prototype would still apply. */
15469#ifdef __cplusplus
15470extern "C"
15471#endif
15472char rl_resize_terminal ();
15473int
15474main ()
15475{
15476return rl_resize_terminal ();
15477 ;
15478 return 0;
15479}
15480_ACEOF
15481if ac_fn_c_try_link "$LINENO"; then :
15482 ac_cv_lib_readline_rl_resize_terminal=yes
15483else
15484 ac_cv_lib_readline_rl_resize_terminal=no
15485fi
15486rm -f core conftest.err conftest.$ac_objext \
15487 conftest$ac_exeext conftest.$ac_ext
15488LIBS=$ac_check_lib_save_LIBS
15489fi
15490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15491$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15492if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15493
15494$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15495
15496fi
15497
15498
Martin v. Löwis0daad592001-09-30 21:09:59 +000015499# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15501$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015502if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015504else
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015506LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510/* Override any GCC internal prototype to avoid an error.
15511 Use char because int might match the return type of a GCC
15512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015513#ifdef __cplusplus
15514extern "C"
15515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015516char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015517int
15518main ()
15519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ;
15522 return 0;
15523}
15524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015530rm -f core conftest.err conftest.$ac_objext \
15531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015532LIBS=$ac_check_lib_save_LIBS
15533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15535$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015536if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015539
Guido van Rossum353ae582001-07-10 16:45:32 +000015540fi
15541
Jack Jansendd19cf82001-12-06 22:36:17 +000015542
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015543# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015545/* end confdefs.h. */
15546#include <readline/readline.h>
15547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015548if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015549 have_readline=yes
15550else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015551 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015552
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015553fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015554rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015555if test $have_readline = yes
15556then
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015558/* end confdefs.h. */
15559#include <readline/readline.h>
15560
15561_ACEOF
15562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015566
15567fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015568rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015569
15570fi
15571
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15573$as_echo_n "checking for append_history in -lreadline... " >&6; }
15574if ${ac_cv_lib_readline_append_history+:} false; then :
15575 $as_echo_n "(cached) " >&6
15576else
15577 ac_check_lib_save_LIBS=$LIBS
15578LIBS="-lreadline $READLINE_LIBS $LIBS"
15579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15580/* end confdefs.h. */
15581
15582/* Override any GCC internal prototype to avoid an error.
15583 Use char because int might match the return type of a GCC
15584 builtin and then its argument prototype would still apply. */
15585#ifdef __cplusplus
15586extern "C"
15587#endif
15588char append_history ();
15589int
15590main ()
15591{
15592return append_history ();
15593 ;
15594 return 0;
15595}
15596_ACEOF
15597if ac_fn_c_try_link "$LINENO"; then :
15598 ac_cv_lib_readline_append_history=yes
15599else
15600 ac_cv_lib_readline_append_history=no
15601fi
15602rm -f core conftest.err conftest.$ac_objext \
15603 conftest$ac_exeext conftest.$ac_ext
15604LIBS=$ac_check_lib_save_LIBS
15605fi
15606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15607$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15608if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15609
15610$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15611
15612fi
15613
15614
Martin v. Löwis82bca632006-02-10 20:49:30 +000015615# End of readline checks: restore LIBS
15616LIBS=$LIBS_no_readline
15617
Matthias Kloseb9621712010-04-24 17:59:49 +000015618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15619$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015620if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015621 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015622else
Martin v. Löwis11437992002-04-12 09:54:03 +000015623
Matthias Kloseb9621712010-04-24 17:59:49 +000015624if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015625 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015626else
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015628/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015629
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015630#include <stdlib.h>
15631#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015632int main()
15633{
15634 int val1 = nice(1);
15635 if (val1 != -1 && val1 == nice(2))
15636 exit(0);
15637 exit(1);
15638}
15639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015641if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015642 ac_cv_broken_nice=yes
15643else
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015648fi
15649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650fi
15651
Matthias Kloseb9621712010-04-24 17:59:49 +000015652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15653$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015654if test "$ac_cv_broken_nice" = yes
15655then
Martin v. Löwis11437992002-04-12 09:54:03 +000015656
Matthias Kloseb9621712010-04-24 17:59:49 +000015657$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015658
15659fi
15660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15662$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015663if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015664 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015665else
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015667 ac_cv_broken_poll=no
15668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015670/* end confdefs.h. */
15671
15672#include <poll.h>
15673
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015674int main()
15675{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015676 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015677 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015678
15679 close (42);
15680
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015681 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015682 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015683 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015684 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015685 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015686 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015687 return 1;
15688}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015689
15690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015691if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015692 ac_cv_broken_poll=yes
15693else
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015700fi
15701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15703$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015704if test "$ac_cv_broken_poll" = yes
15705then
15706
Matthias Kloseb9621712010-04-24 17:59:49 +000015707$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015708
15709fi
15710
Martin v. Löwis1d459062005-03-14 21:23:33 +000015711# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15713$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015714if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015716else
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719 ac_cv_working_tzset=no
15720else
Matthias Kloseb9621712010-04-24 17:59:49 +000015721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015722/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015723
15724#include <stdlib.h>
15725#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015726#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015727
15728#if HAVE_TZNAME
15729extern char *tzname[];
15730#endif
15731
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015732int main()
15733{
Brett Cannon18367812003-09-19 00:59:16 +000015734 /* Note that we need to ensure that not only does tzset(3)
15735 do 'something' with localtime, but it works as documented
15736 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015737 This includes making sure that tzname is set properly if
15738 tm->tm_zone does not exist since it is the alternative way
15739 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015740
15741 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015742 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015743 */
15744
Martin v. Löwis1d459062005-03-14 21:23:33 +000015745 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015746 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15747
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015748 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015749 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015750 if (localtime(&groundhogday)->tm_hour != 0)
15751 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015752#if HAVE_TZNAME
15753 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15754 if (strcmp(tzname[0], "UTC") ||
15755 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15756 exit(1);
15757#endif
Brett Cannon18367812003-09-19 00:59:16 +000015758
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015759 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015760 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015761 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015762 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015763#if HAVE_TZNAME
15764 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15765 exit(1);
15766#endif
Brett Cannon18367812003-09-19 00:59:16 +000015767
15768 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15769 tzset();
15770 if (localtime(&groundhogday)->tm_hour != 11)
15771 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015772#if HAVE_TZNAME
15773 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15774 exit(1);
15775#endif
15776
15777#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015778 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15779 exit(1);
15780 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15781 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015782#endif
Brett Cannon18367812003-09-19 00:59:16 +000015783
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015784 exit(0);
15785}
15786
15787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015788if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015789 ac_cv_working_tzset=yes
15790else
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015795fi
15796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797fi
15798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15800$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015801if test "$ac_cv_working_tzset" = yes
15802then
15803
Matthias Kloseb9621712010-04-24 17:59:49 +000015804$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015805
15806fi
15807
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015808# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15810$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015811if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015813else
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015815/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015816#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015817int
15818main ()
15819{
15820
15821struct stat st;
15822st.st_mtim.tv_nsec = 1;
15823
15824 ;
15825 return 0;
15826}
15827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015829 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015830else
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15834fi
15835
Matthias Kloseb9621712010-04-24 17:59:49 +000015836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15837$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015838if test "$ac_cv_stat_tv_nsec" = yes
15839then
15840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015842
15843fi
15844
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015845# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15847$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015848if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015850else
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015852/* end confdefs.h. */
15853#include <sys/stat.h>
15854int
15855main ()
15856{
15857
15858struct stat st;
15859st.st_mtimespec.tv_nsec = 1;
15860
15861 ;
15862 return 0;
15863}
15864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015866 ac_cv_stat_tv_nsec2=yes
15867else
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15871fi
15872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15874$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015875if test "$ac_cv_stat_tv_nsec2" = yes
15876then
15877
Matthias Kloseb9621712010-04-24 17:59:49 +000015878$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015879
15880fi
15881
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015882# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015883ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015884if test "$cross_compiling" = no; then
15885 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15886fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015887
15888for ac_header in curses.h ncurses.h
15889do :
15890 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15891ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15892if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15893 cat >>confdefs.h <<_ACEOF
15894#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15895_ACEOF
15896
15897fi
15898
15899done
15900
15901
15902# On Solaris, term.h requires curses.h
15903for ac_header in term.h
15904do :
15905 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15906#ifdef HAVE_CURSES_H
15907#include <curses.h>
15908#endif
15909
15910"
15911if test "x$ac_cv_header_term_h" = xyes; then :
15912 cat >>confdefs.h <<_ACEOF
15913#define HAVE_TERM_H 1
15914_ACEOF
15915
15916fi
15917
15918done
15919
15920
Jack Jansen666b1e72001-10-31 12:11:48 +000015921# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15923$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015924if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015926else
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015928/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015929#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015930int
15931main ()
15932{
Jack Jansen666b1e72001-10-31 12:11:48 +000015933
15934 int rtn;
15935 rtn = mvwdelch(0,0,0);
15936
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 ;
15938 return 0;
15939}
15940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015941if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015942 ac_cv_mvwdelch_is_expression=yes
15943else
Matthias Kloseb9621712010-04-24 17:59:49 +000015944 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15947fi
15948
Matthias Kloseb9621712010-04-24 17:59:49 +000015949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15950$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015951
15952if test "$ac_cv_mvwdelch_is_expression" = yes
15953then
Martin v. Löwis11437992002-04-12 09:54:03 +000015954
Matthias Kloseb9621712010-04-24 17:59:49 +000015955$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015956
15957fi
15958
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015959# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15960# structs since version 5.7. If the macro is defined as zero before including
15961# [n]curses.h, ncurses will expose fields of the structs regardless of the
15962# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15964$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015965if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015966 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015967else
Matthias Kloseb9621712010-04-24 17:59:49 +000015968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015969/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015970
15971 #define NCURSES_OPAQUE 0
15972 #include <curses.h>
15973
Martin v. Löwis11437992002-04-12 09:54:03 +000015974int
15975main ()
15976{
Jack Jansen666b1e72001-10-31 12:11:48 +000015977
15978 WINDOW *w;
15979 w->_flags = 0;
15980
Martin v. Löwis11437992002-04-12 09:54:03 +000015981 ;
15982 return 0;
15983}
15984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015985if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015986 ac_cv_window_has_flags=yes
15987else
Matthias Kloseb9621712010-04-24 17:59:49 +000015988 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15991fi
15992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15994$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015995
Jack Jansen666b1e72001-10-31 12:11:48 +000015996
15997if test "$ac_cv_window_has_flags" = yes
15998then
Martin v. Löwis11437992002-04-12 09:54:03 +000015999
Matthias Kloseb9621712010-04-24 17:59:49 +000016000$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016001
16002fi
16003
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16005$as_echo_n "checking for is_pad... " >&6; }
16006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007/* end confdefs.h. */
16008#include <curses.h>
16009int
16010main ()
16011{
16012
16013#ifndef is_pad
16014void *x=is_pad
16015#endif
16016
16017 ;
16018 return 0;
16019}
16020_ACEOF
16021if ac_fn_c_try_compile "$LINENO"; then :
16022
16023$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16024
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16026$as_echo "yes" >&6; }
16027else
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16029$as_echo "no" >&6; }
16030
16031fi
16032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16033
Matthias Kloseb9621712010-04-24 17:59:49 +000016034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16035$as_echo_n "checking for is_term_resized... " >&6; }
16036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016037/* end confdefs.h. */
16038#include <curses.h>
16039int
16040main ()
16041{
16042void *x=is_term_resized
16043 ;
16044 return 0;
16045}
16046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016048
Matthias Kloseb9621712010-04-24 17:59:49 +000016049$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016050
Matthias Kloseb159a552010-04-25 21:00:44 +000016051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016052$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016053else
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16055$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016056
16057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16059
Matthias Kloseb9621712010-04-24 17:59:49 +000016060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16061$as_echo_n "checking for resize_term... " >&6; }
16062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016063/* end confdefs.h. */
16064#include <curses.h>
16065int
16066main ()
16067{
16068void *x=resize_term
16069 ;
16070 return 0;
16071}
16072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016073if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016074
Matthias Kloseb9621712010-04-24 17:59:49 +000016075$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016076
Matthias Kloseb159a552010-04-25 21:00:44 +000016077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016078$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016079else
Matthias Kloseb9621712010-04-24 17:59:49 +000016080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16081$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016082
16083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16085
Matthias Kloseb9621712010-04-24 17:59:49 +000016086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16087$as_echo_n "checking for resizeterm... " >&6; }
16088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016089/* end confdefs.h. */
16090#include <curses.h>
16091int
16092main ()
16093{
16094void *x=resizeterm
16095 ;
16096 return 0;
16097}
16098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016099if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016100
Matthias Kloseb9621712010-04-24 17:59:49 +000016101$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016102
Matthias Kloseb159a552010-04-25 21:00:44 +000016103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016104$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016105else
Matthias Kloseb9621712010-04-24 17:59:49 +000016106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16107$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016108
16109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016111
16112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16113$as_echo_n "checking for immedok... " >&6; }
16114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115/* end confdefs.h. */
16116#include <curses.h>
16117int
16118main ()
16119{
16120
16121#ifndef immedok
16122void *x=immedok
16123#endif
16124
16125 ;
16126 return 0;
16127}
16128_ACEOF
16129if ac_fn_c_try_compile "$LINENO"; then :
16130
16131$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16132
16133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16134$as_echo "yes" >&6; }
16135else
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16137$as_echo "no" >&6; }
16138
16139fi
16140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16141
16142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16143$as_echo_n "checking for syncok... " >&6; }
16144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16145/* end confdefs.h. */
16146#include <curses.h>
16147int
16148main ()
16149{
16150
16151#ifndef syncok
16152void *x=syncok
16153#endif
16154
16155 ;
16156 return 0;
16157}
16158_ACEOF
16159if ac_fn_c_try_compile "$LINENO"; then :
16160
16161$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16162
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16164$as_echo "yes" >&6; }
16165else
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16167$as_echo "no" >&6; }
16168
16169fi
16170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16171
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16173$as_echo_n "checking for wchgat... " >&6; }
16174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16175/* end confdefs.h. */
16176#include <curses.h>
16177int
16178main ()
16179{
16180
16181#ifndef wchgat
16182void *x=wchgat
16183#endif
16184
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189if ac_fn_c_try_compile "$LINENO"; then :
16190
16191$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16192
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16194$as_echo "yes" >&6; }
16195else
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16197$as_echo "no" >&6; }
16198
16199fi
16200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16201
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16203$as_echo_n "checking for filter... " >&6; }
16204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205/* end confdefs.h. */
16206#include <curses.h>
16207int
16208main ()
16209{
16210
16211#ifndef filter
16212void *x=filter
16213#endif
16214
16215 ;
16216 return 0;
16217}
16218_ACEOF
16219if ac_fn_c_try_compile "$LINENO"; then :
16220
16221$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16222
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16224$as_echo "yes" >&6; }
16225else
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16227$as_echo "no" >&6; }
16228
16229fi
16230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16231
16232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16233$as_echo_n "checking for has_key... " >&6; }
16234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16235/* end confdefs.h. */
16236#include <curses.h>
16237int
16238main ()
16239{
16240
16241#ifndef has_key
16242void *x=has_key
16243#endif
16244
16245 ;
16246 return 0;
16247}
16248_ACEOF
16249if ac_fn_c_try_compile "$LINENO"; then :
16250
16251$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16252
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16254$as_echo "yes" >&6; }
16255else
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16257$as_echo "no" >&6; }
16258
16259fi
16260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16261
16262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16263$as_echo_n "checking for typeahead... " >&6; }
16264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265/* end confdefs.h. */
16266#include <curses.h>
16267int
16268main ()
16269{
16270
16271#ifndef typeahead
16272void *x=typeahead
16273#endif
16274
16275 ;
16276 return 0;
16277}
16278_ACEOF
16279if ac_fn_c_try_compile "$LINENO"; then :
16280
16281$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16282
16283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16284$as_echo "yes" >&6; }
16285else
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16287$as_echo "no" >&6; }
16288
16289fi
16290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16291
16292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16293$as_echo_n "checking for use_env... " >&6; }
16294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16295/* end confdefs.h. */
16296#include <curses.h>
16297int
16298main ()
16299{
16300
16301#ifndef use_env
16302void *x=use_env
16303#endif
16304
16305 ;
16306 return 0;
16307}
16308_ACEOF
16309if ac_fn_c_try_compile "$LINENO"; then :
16310
16311$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16312
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16314$as_echo "yes" >&6; }
16315else
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16317$as_echo "no" >&6; }
16318
16319fi
16320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016321# last curses configure check
16322CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16325$as_echo "$as_me: checking for device files" >&6;}
16326
16327if test "x$cross_compiling" = xyes; then
16328 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16330$as_echo_n "checking for /dev/ptmx... " >&6; }
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16332$as_echo "not set" >&6; }
16333 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16334 fi
16335 if test "${ac_cv_file__dev_ptc+set}" != set; then
16336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16337$as_echo_n "checking for /dev/ptc... " >&6; }
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16339$as_echo "not set" >&6; }
16340 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16341 fi
16342fi
16343
Matthias Kloseb9621712010-04-24 17:59:49 +000016344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16345$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016346if ${ac_cv_file__dev_ptmx+:} false; then :
16347 $as_echo_n "(cached) " >&6
16348else
16349 test "$cross_compiling" = yes &&
16350 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16351if test -r "/dev/ptmx"; then
16352 ac_cv_file__dev_ptmx=yes
16353else
16354 ac_cv_file__dev_ptmx=no
16355fi
16356fi
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16358$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16359if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016360
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016361fi
16362
16363if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016364
Matthias Kloseb9621712010-04-24 17:59:49 +000016365$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016366
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16369$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016370if ${ac_cv_file__dev_ptc+:} false; then :
16371 $as_echo_n "(cached) " >&6
16372else
16373 test "$cross_compiling" = yes &&
16374 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16375if test -r "/dev/ptc"; then
16376 ac_cv_file__dev_ptc=yes
16377else
16378 ac_cv_file__dev_ptc=no
16379fi
16380fi
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16382$as_echo "$ac_cv_file__dev_ptc" >&6; }
16383if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016384
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016385fi
16386
16387if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016388
Matthias Kloseb9621712010-04-24 17:59:49 +000016389$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016390
Neal Norwitz865400f2003-03-21 01:42:58 +000016391fi
16392
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016393if test $ac_sys_system = Darwin
16394then
16395 LIBS="$LIBS -framework CoreFoundation"
16396fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016397
Matthias Kloseb9621712010-04-24 17:59:49 +000016398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16399$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016400if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016401 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016402else
Matthias Kloseb9621712010-04-24 17:59:49 +000016403 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016404 ac_cv_have_size_t_format="cross -- assuming yes"
16405
Thomas Wouters477c8d52006-05-27 19:21:47 +000016406else
Matthias Kloseb9621712010-04-24 17:59:49 +000016407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016408/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016409
Thomas Wouters477c8d52006-05-27 19:21:47 +000016410#include <stdio.h>
16411#include <stddef.h>
16412#include <string.h>
16413
Christian Heimes2c181612007-12-17 20:04:13 +000016414#ifdef HAVE_SYS_TYPES_H
16415#include <sys/types.h>
16416#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016417
16418#ifdef HAVE_SSIZE_T
16419typedef ssize_t Py_ssize_t;
16420#elif SIZEOF_VOID_P == SIZEOF_LONG
16421typedef long Py_ssize_t;
16422#else
16423typedef int Py_ssize_t;
16424#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016425
Christian Heimes2c181612007-12-17 20:04:13 +000016426int main()
16427{
16428 char buffer[256];
16429
Thomas Wouters477c8d52006-05-27 19:21:47 +000016430 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16431 return 1;
16432
Thomas Wouters89f507f2006-12-13 04:49:30 +000016433 if (strcmp(buffer, "123"))
16434 return 1;
16435
16436 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16437 return 1;
16438
16439 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016440 return 1;
16441
16442 return 0;
16443}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016444
Thomas Wouters477c8d52006-05-27 19:21:47 +000016445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016446if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016447 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016448else
Matthias Kloseb9621712010-04-24 17:59:49 +000016449 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16452 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016453fi
16454
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16457$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016458if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016459
Matthias Kloseb9621712010-04-24 17:59:49 +000016460$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016461
16462fi
16463
Matthias Kloseb9621712010-04-24 17:59:49 +000016464ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016465#ifdef HAVE_SYS_TYPES_H
16466#include <sys/types.h>
16467#endif
16468#ifdef HAVE_SYS_SOCKET_H
16469#include <sys/socket.h>
16470#endif
16471
Matthias Kloseb9621712010-04-24 17:59:49 +000016472"
Victor Stinnere0be4232011-10-25 13:06:09 +020016473if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016474
Martin v. Löwis11437992002-04-12 09:54:03 +000016475else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016476
Matthias Kloseb9621712010-04-24 17:59:49 +000016477$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016478
16479fi
16480
Michael W. Hudson54241132001-12-07 15:38:26 +000016481
Matthias Kloseb9621712010-04-24 17:59:49 +000016482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16483$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016484if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016485 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016486else
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016488 ac_cv_broken_mbstowcs=no
16489else
Matthias Kloseb9621712010-04-24 17:59:49 +000016490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016491/* end confdefs.h. */
16492
Stefan Krah19c21392012-11-22 23:47:32 +010016493#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016494#include<stdlib.h>
16495int main() {
16496 size_t len = -1;
16497 const char *str = "text";
16498 len = mbstowcs(NULL, str, 0);
16499 return (len != 4);
16500}
16501
16502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016503if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016504 ac_cv_broken_mbstowcs=no
16505else
Matthias Kloseb9621712010-04-24 17:59:49 +000016506 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016510fi
16511
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016512fi
16513
Matthias Kloseb9621712010-04-24 17:59:49 +000016514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16515$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016516if test "$ac_cv_broken_mbstowcs" = yes
16517then
16518
Matthias Kloseb9621712010-04-24 17:59:49 +000016519$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016520
16521fi
16522
Antoine Pitroub52ec782009-01-25 16:34:23 +000016523# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16525$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016526
16527# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016528if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016529 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016530if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016531then
16532
Matthias Kloseb9621712010-04-24 17:59:49 +000016533$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016534
Matthias Kloseb9621712010-04-24 17:59:49 +000016535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16536$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016537fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016538if test "$withval" = no
16539then
16540
16541$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16542
Matthias Kloseb9621712010-04-24 17:59:49 +000016543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16544$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016545fi
16546
Antoine Pitrou042b1282010-08-13 21:15:58 +000016547else
16548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16549$as_echo "no value specified" >&6; }
16550fi
16551
Antoine Pitroub52ec782009-01-25 16:34:23 +000016552
Matthias Kloseb17289e2012-03-15 19:51:34 +010016553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16554$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16555if ${ac_cv_computed_gotos+:} false; then :
16556 $as_echo_n "(cached) " >&6
16557else
16558 if test "$cross_compiling" = yes; then :
16559 if test "${with_computed_gotos+set}" = set; then
16560 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16561 else
16562 ac_cv_computed_gotos=no
16563 fi
16564else
16565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16566/* end confdefs.h. */
16567
16568int main(int argc, char **argv)
16569{
16570 static void *targets[1] = { &&LABEL1 };
16571 goto LABEL2;
16572LABEL1:
16573 return 0;
16574LABEL2:
16575 goto *targets[0];
16576 return 1;
16577}
16578
16579_ACEOF
16580if ac_fn_c_try_run "$LINENO"; then :
16581 ac_cv_computed_gotos=yes
16582else
16583 ac_cv_computed_gotos=no
16584fi
16585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16586 conftest.$ac_objext conftest.beam conftest.$ac_ext
16587fi
16588
16589fi
16590
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16592$as_echo "$ac_cv_computed_gotos" >&6; }
16593case "$ac_cv_computed_gotos" in yes*)
16594
16595$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16596
16597esac
16598
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016599case $ac_sys_system in
16600AIX*)
16601
16602$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16603 ;;
16604esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016605
Michael W. Hudson54241132001-12-07 15:38:26 +000016606
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016607
16608
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016609for h in `(cd $srcdir;echo Python/thread_*.h)`
16610do
16611 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16612done
16613
Michael W. Hudson54241132001-12-07 15:38:26 +000016614
Victor Stinner21a74a92019-04-11 22:28:12 +020016615SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16617$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016618for dir in $SRCDIRS; do
16619 if test ! -d $dir; then
16620 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016621 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016622done
Matthias Kloseb9621712010-04-24 17:59:49 +000016623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16624$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016625
Stefan Krah1919b7e2012-03-21 18:25:23 +010016626# Availability of -O2:
16627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16628$as_echo_n "checking for -O2... " >&6; }
16629saved_cflags="$CFLAGS"
16630CFLAGS="-O2"
16631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16632/* end confdefs.h. */
16633
16634int
16635main ()
16636{
16637
16638
16639 ;
16640 return 0;
16641}
16642_ACEOF
16643if ac_fn_c_try_compile "$LINENO"; then :
16644 have_O2=yes
16645else
16646 have_O2=no
16647fi
16648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16650$as_echo "$have_O2" >&6; }
16651CFLAGS="$saved_cflags"
16652
16653# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16654# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16656$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16657saved_cflags="$CFLAGS"
16658CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16659if test "$have_O2" = no; then
16660 CFLAGS=""
16661fi
16662if test "$cross_compiling" = yes; then :
16663 have_glibc_memmove_bug=undefined
16664else
16665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16666/* end confdefs.h. */
16667
16668#include <stdio.h>
16669#include <stdlib.h>
16670#include <string.h>
16671void foo(void *p, void *q) { memmove(p, q, 19); }
16672int main() {
16673 char a[32] = "123456789000000000";
16674 foo(&a[9], a);
16675 if (strcmp(a, "123456789123456789000000000") != 0)
16676 return 1;
16677 foo(a, &a[9]);
16678 if (strcmp(a, "123456789000000000") != 0)
16679 return 1;
16680 return 0;
16681}
16682
16683_ACEOF
16684if ac_fn_c_try_run "$LINENO"; then :
16685 have_glibc_memmove_bug=no
16686else
16687 have_glibc_memmove_bug=yes
16688fi
16689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16690 conftest.$ac_objext conftest.beam conftest.$ac_ext
16691fi
16692
16693CFLAGS="$saved_cflags"
16694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16695$as_echo "$have_glibc_memmove_bug" >&6; }
16696if test "$have_glibc_memmove_bug" = yes; then
16697
16698$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16699
16700fi
16701
16702if test "$have_gcc_asm_for_x87" = yes; then
16703 # Some versions of gcc miscompile inline asm:
16704 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16705 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16706 case $CC in
16707 *gcc*)
16708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16709$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16710 saved_cflags="$CFLAGS"
16711 CFLAGS="-O2"
16712 if test "$cross_compiling" = yes; then :
16713 have_ipa_pure_const_bug=undefined
16714else
16715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16716/* end confdefs.h. */
16717
16718 __attribute__((noinline)) int
16719 foo(int *p) {
16720 int r;
16721 asm ( "movl \$6, (%1)\n\t"
16722 "xorl %0, %0\n\t"
16723 : "=r" (r) : "r" (p) : "memory"
16724 );
16725 return r;
16726 }
16727 int main() {
16728 int p = 8;
16729 if ((foo(&p) ? : p) != 6)
16730 return 1;
16731 return 0;
16732 }
16733
16734_ACEOF
16735if ac_fn_c_try_run "$LINENO"; then :
16736 have_ipa_pure_const_bug=no
16737else
16738 have_ipa_pure_const_bug=yes
16739fi
16740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16741 conftest.$ac_objext conftest.beam conftest.$ac_ext
16742fi
16743
16744 CFLAGS="$saved_cflags"
16745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16746$as_echo "$have_ipa_pure_const_bug" >&6; }
16747 if test "$have_ipa_pure_const_bug" = yes; then
16748
16749$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16750
16751 fi
16752 ;;
16753 esac
16754fi
16755
Victor Stinner4f5366e2015-01-09 02:13:19 +010016756# Check for stdatomic.h
16757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16758$as_echo_n "checking for stdatomic.h... " >&6; }
16759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16760/* end confdefs.h. */
16761
16762
16763 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016764 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016765 int main() {
16766 int loaded_value = atomic_load(&value);
16767 return 0;
16768 }
16769
16770
16771_ACEOF
16772if ac_fn_c_try_link "$LINENO"; then :
16773 have_stdatomic_h=yes
16774else
16775 have_stdatomic_h=no
16776fi
16777rm -f core conftest.err conftest.$ac_objext \
16778 conftest$ac_exeext conftest.$ac_ext
16779
16780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16781$as_echo "$have_stdatomic_h" >&6; }
16782
16783if test "$have_stdatomic_h" = yes; then
16784
16785$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16786
16787fi
16788
16789# Check for GCC >= 4.7 __atomic builtins
16790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16791$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793/* end confdefs.h. */
16794
16795
16796 volatile int val = 1;
16797 int main() {
16798 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16799 return 0;
16800 }
16801
16802
16803_ACEOF
16804if ac_fn_c_try_link "$LINENO"; then :
16805 have_builtin_atomic=yes
16806else
16807 have_builtin_atomic=no
16808fi
16809rm -f core conftest.err conftest.$ac_objext \
16810 conftest$ac_exeext conftest.$ac_ext
16811
16812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16813$as_echo "$have_builtin_atomic" >&6; }
16814
16815if test "$have_builtin_atomic" = yes; then
16816
16817$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16818
16819fi
16820
Ned Deily322f5ba2013-11-21 23:01:59 -080016821# ensurepip option
16822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16823$as_echo_n "checking for ensurepip... " >&6; }
16824
16825# Check whether --with-ensurepip was given.
16826if test "${with_ensurepip+set}" = set; then :
16827 withval=$with_ensurepip;
16828else
16829 with_ensurepip=upgrade
16830fi
16831
16832case $with_ensurepip in #(
16833 yes|upgrade) :
16834 ENSUREPIP=upgrade ;; #(
16835 install) :
16836 ENSUREPIP=install ;; #(
16837 no) :
16838 ENSUREPIP=no ;; #(
16839 *) :
16840 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16841esac
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16843$as_echo "$ENSUREPIP" >&6; }
16844
16845
Victor Stinner35a97c02015-03-08 02:59:09 +010016846# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16848$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850/* end confdefs.h. */
16851
16852
16853 #include <dirent.h>
16854
16855 int main() {
16856 struct dirent entry;
16857 return entry.d_type == DT_UNKNOWN;
16858 }
16859
16860
16861_ACEOF
16862if ac_fn_c_try_link "$LINENO"; then :
16863 have_dirent_d_type=yes
16864else
16865 have_dirent_d_type=no
16866fi
16867rm -f core conftest.err conftest.$ac_objext \
16868 conftest$ac_exeext conftest.$ac_ext
16869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16870$as_echo "$have_dirent_d_type" >&6; }
16871
16872if test "$have_dirent_d_type" = yes; then
16873
16874$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16875
16876fi
16877
Victor Stinner9eb57c52015-03-19 22:21:49 +010016878# check if the Linux getrandom() syscall is available
16879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16880$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16882/* end confdefs.h. */
16883
16884
Victor Stinner1b80b242016-04-12 22:34:58 +020016885 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016886 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016887 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016888
16889 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016890 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016891 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016892 const int flags = GRND_NONBLOCK;
16893 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016894 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016895 return 0;
16896 }
16897
16898
16899_ACEOF
16900if ac_fn_c_try_link "$LINENO"; then :
16901 have_getrandom_syscall=yes
16902else
16903 have_getrandom_syscall=no
16904fi
16905rm -f core conftest.err conftest.$ac_objext \
16906 conftest$ac_exeext conftest.$ac_ext
16907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16908$as_echo "$have_getrandom_syscall" >&6; }
16909
16910if test "$have_getrandom_syscall" = yes; then
16911
16912$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16913
16914fi
16915
Victor Stinner3abf44e2015-09-18 15:38:37 +020016916# check if the getrandom() function is available
16917# the test was written for the Solaris function of <sys/random.h>
16918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16919$as_echo_n "checking for the getrandom() function... " >&6; }
16920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16921/* end confdefs.h. */
16922
16923
16924 #include <sys/random.h>
16925
16926 int main() {
16927 char buffer[1];
16928 const size_t buflen = sizeof(buffer);
16929 const int flags = 0;
16930 /* ignore the result, Python checks for ENOSYS at runtime */
16931 (void)getrandom(buffer, buflen, flags);
16932 return 0;
16933 }
16934
16935
16936_ACEOF
16937if ac_fn_c_try_link "$LINENO"; then :
16938 have_getrandom=yes
16939else
16940 have_getrandom=no
16941fi
16942rm -f core conftest.err conftest.$ac_objext \
16943 conftest$ac_exeext conftest.$ac_ext
16944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16945$as_echo "$have_getrandom" >&6; }
16946
16947if test "$have_getrandom" = yes; then
16948
16949$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16950
16951fi
16952
Neil Schemenauer5741c452019-02-08 10:48:46 -080016953# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16954# shm_* may only be available if linking against librt
16955save_LIBS="$LIBS"
16956save_includes_default="$ac_includes_default"
16957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16958$as_echo_n "checking for library containing shm_open... " >&6; }
16959if ${ac_cv_search_shm_open+:} false; then :
16960 $as_echo_n "(cached) " >&6
16961else
16962 ac_func_search_save_LIBS=$LIBS
16963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16964/* end confdefs.h. */
16965
16966/* Override any GCC internal prototype to avoid an error.
16967 Use char because int might match the return type of a GCC
16968 builtin and then its argument prototype would still apply. */
16969#ifdef __cplusplus
16970extern "C"
16971#endif
16972char shm_open ();
16973int
16974main ()
16975{
16976return shm_open ();
16977 ;
16978 return 0;
16979}
16980_ACEOF
16981for ac_lib in '' rt; do
16982 if test -z "$ac_lib"; then
16983 ac_res="none required"
16984 else
16985 ac_res=-l$ac_lib
16986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16987 fi
16988 if ac_fn_c_try_link "$LINENO"; then :
16989 ac_cv_search_shm_open=$ac_res
16990fi
16991rm -f core conftest.err conftest.$ac_objext \
16992 conftest$ac_exeext
16993 if ${ac_cv_search_shm_open+:} false; then :
16994 break
16995fi
16996done
16997if ${ac_cv_search_shm_open+:} false; then :
16998
16999else
17000 ac_cv_search_shm_open=no
17001fi
17002rm conftest.$ac_ext
17003LIBS=$ac_func_search_save_LIBS
17004fi
17005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17006$as_echo "$ac_cv_search_shm_open" >&6; }
17007ac_res=$ac_cv_search_shm_open
17008if test "$ac_res" != no; then :
17009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17010
17011fi
17012
17013if test "$ac_cv_search_shm_open" = "-lrt"; then
17014
17015$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17016
17017fi
17018for ac_header in sys/mman.h
17019do :
17020 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17021if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17022 cat >>confdefs.h <<_ACEOF
17023#define HAVE_SYS_MMAN_H 1
17024_ACEOF
17025
17026fi
17027
17028done
17029
17030# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17031ac_includes_default="\
17032${ac_includes_default}
17033#ifndef __cplusplus
17034# ifdef HAVE_SYS_MMAN_H
17035# include <sys/mman.h>
17036# endif
17037#endif
17038"
17039for ac_func in shm_open shm_unlink
17040do :
17041 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17042ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17043if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17044 cat >>confdefs.h <<_ACEOF
17045#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17046_ACEOF
17047
17048fi
17049done
17050
17051# we don't want to link with librt always, restore LIBS
17052LIBS="$save_LIBS"
17053ac_includes_default="$save_includes_default"
17054
Christian Heimesff5be6e2018-01-20 13:19:21 +010017055# Check for usable OpenSSL
17056
17057 found=false
17058
17059# Check whether --with-openssl was given.
17060if test "${with_openssl+set}" = set; then :
17061 withval=$with_openssl;
17062 case "$withval" in
17063 "" | y | ye | yes | n | no)
17064 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17065 ;;
17066 *) ssldirs="$withval"
17067 ;;
17068 esac
17069
17070else
17071
17072 # if pkg-config is installed and openssl has installed a .pc file,
17073 # then use that information and don't search ssldirs
17074 if test -n "$ac_tool_prefix"; then
17075 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17076set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17078$as_echo_n "checking for $ac_word... " >&6; }
17079if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17080 $as_echo_n "(cached) " >&6
17081else
17082 if test -n "$PKG_CONFIG"; then
17083 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17084else
17085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17086for as_dir in $PATH
17087do
17088 IFS=$as_save_IFS
17089 test -z "$as_dir" && as_dir=.
17090 for ac_exec_ext in '' $ac_executable_extensions; do
17091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17092 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17094 break 2
17095 fi
17096done
17097 done
17098IFS=$as_save_IFS
17099
17100fi
17101fi
17102PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17103if test -n "$PKG_CONFIG"; then
17104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17105$as_echo "$PKG_CONFIG" >&6; }
17106else
17107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17108$as_echo "no" >&6; }
17109fi
17110
17111
17112fi
17113if test -z "$ac_cv_prog_PKG_CONFIG"; then
17114 ac_ct_PKG_CONFIG=$PKG_CONFIG
17115 # Extract the first word of "pkg-config", so it can be a program name with args.
17116set dummy pkg-config; ac_word=$2
17117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17118$as_echo_n "checking for $ac_word... " >&6; }
17119if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17120 $as_echo_n "(cached) " >&6
17121else
17122 if test -n "$ac_ct_PKG_CONFIG"; then
17123 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17124else
17125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17126for as_dir in $PATH
17127do
17128 IFS=$as_save_IFS
17129 test -z "$as_dir" && as_dir=.
17130 for ac_exec_ext in '' $ac_executable_extensions; do
17131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17132 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17134 break 2
17135 fi
17136done
17137 done
17138IFS=$as_save_IFS
17139
17140fi
17141fi
17142ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17143if test -n "$ac_ct_PKG_CONFIG"; then
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17145$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17146else
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17148$as_echo "no" >&6; }
17149fi
17150
17151 if test "x$ac_ct_PKG_CONFIG" = x; then
17152 PKG_CONFIG=""
17153 else
17154 case $cross_compiling:$ac_tool_warned in
17155yes:)
17156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17158ac_tool_warned=yes ;;
17159esac
17160 PKG_CONFIG=$ac_ct_PKG_CONFIG
17161 fi
17162else
17163 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17164fi
17165
17166 if test x"$PKG_CONFIG" != x""; then
17167 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17168 if test $? = 0; then
17169 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17170 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17171 found=true
17172 fi
17173 fi
17174
17175 # no such luck; use some default ssldirs
17176 if ! $found; then
17177 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17178 fi
17179
17180
17181fi
17182
17183
17184
17185 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17186 # an 'openssl' subdirectory
17187
17188 if ! $found; then
17189 OPENSSL_INCLUDES=
17190 for ssldir in $ssldirs; do
17191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17192$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17193 if test -f "$ssldir/include/openssl/ssl.h"; then
17194 OPENSSL_INCLUDES="-I$ssldir/include"
17195 OPENSSL_LDFLAGS="-L$ssldir/lib"
17196 OPENSSL_LIBS="-lssl -lcrypto"
17197 found=true
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17199$as_echo "yes" >&6; }
17200 break
17201 else
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17203$as_echo "no" >&6; }
17204 fi
17205 done
17206
17207 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17208 # it will just work!
17209 fi
17210
17211 # try the preprocessor and linker with our new flags,
17212 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17213
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17215$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17216 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17217 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17218
17219 save_LIBS="$LIBS"
17220 save_LDFLAGS="$LDFLAGS"
17221 save_CPPFLAGS="$CPPFLAGS"
17222 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17223 LIBS="$OPENSSL_LIBS $LIBS"
17224 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17226/* end confdefs.h. */
17227#include <openssl/ssl.h>
17228int
17229main ()
17230{
17231SSL_new(NULL)
17232 ;
17233 return 0;
17234}
17235_ACEOF
17236if ac_fn_c_try_link "$LINENO"; then :
17237
17238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17239$as_echo "yes" >&6; }
17240 have_openssl=yes
17241
17242else
17243
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17245$as_echo "no" >&6; }
17246 have_openssl=no
17247
17248fi
17249rm -f core conftest.err conftest.$ac_objext \
17250 conftest$ac_exeext conftest.$ac_ext
17251 CPPFLAGS="$save_CPPFLAGS"
17252 LDFLAGS="$save_LDFLAGS"
17253 LIBS="$save_LIBS"
17254
17255
17256
17257
17258
17259
17260if test "$have_openssl" = yes; then
17261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17262$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17263
17264 save_LIBS="$LIBS"
17265 save_LDFLAGS="$LDFLAGS"
17266 save_CPPFLAGS="$CPPFLAGS"
17267 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17268 LIBS="$OPENSSL_LIBS $LIBS"
17269 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17270
17271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17272/* end confdefs.h. */
17273
17274 #include <openssl/x509_vfy.h>
17275
17276int
17277main ()
17278{
17279
17280 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17281 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17282 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17283 X509_VERIFY_PARAM_set_hostflags(p, 0);
17284
17285 ;
17286 return 0;
17287}
17288
17289_ACEOF
17290if ac_fn_c_try_link "$LINENO"; then :
17291
17292 ac_cv_has_x509_verify_param_set1_host=yes
17293
17294else
17295
17296 ac_cv_has_x509_verify_param_set1_host=no
17297
17298fi
17299rm -f core conftest.err conftest.$ac_objext \
17300 conftest$ac_exeext conftest.$ac_ext
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17302$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17303 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17304
17305$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17306
17307 fi
17308
17309 CPPFLAGS="$save_CPPFLAGS"
17310 LDFLAGS="$save_LDFLAGS"
17311 LIBS="$save_LIBS"
17312fi
17313
Christian Heimes892d66e2018-01-29 14:10:18 +010017314# ssl module default cipher suite string
17315
17316
17317
17318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17319$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17320
17321# Check whether --with-ssl-default-suites was given.
17322if test "${with_ssl_default_suites+set}" = set; then :
17323 withval=$with_ssl_default_suites;
17324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17325$as_echo "$withval" >&6; }
17326case "$withval" in
17327 python)
17328 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17329
17330 ;;
17331 openssl)
17332 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17333
17334 ;;
17335 *)
17336 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17337
17338 cat >>confdefs.h <<_ACEOF
17339#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17340_ACEOF
17341
17342 ;;
17343esac
17344
17345else
17346
17347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17348$as_echo "python" >&6; }
17349$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17350
17351
17352fi
17353
17354
17355
Guido van Rossum627b2d71993-12-24 10:39:16 +000017356# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017357ac_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 +000017358
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017359ac_config_files="$ac_config_files Modules/ld_so_aix"
17360
Martin v. Löwis11437992002-04-12 09:54:03 +000017361cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017362# This file is a shell script that caches the results of configure
17363# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017364# scripts and configure runs, see configure's option --config-cache.
17365# It is not useful on other systems. If it contains results you don't
17366# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017367#
Martin v. Löwis11437992002-04-12 09:54:03 +000017368# config.status only pays attention to the cache file if you give it
17369# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017370#
Skip Montanaro6dead952003-09-25 14:50:04 +000017371# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017372# loading this file, other *unset* `ac_cv_foo' will be assigned the
17373# following values.
17374
17375_ACEOF
17376
Guido van Rossumf78abae1997-01-21 22:02:36 +000017377# The following way of writing the cache mishandles newlines in values,
17378# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017380# Ultrix sh set writes to stderr and can't be redirected directly,
17381# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382(
17383 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17384 eval ac_val=\$$ac_var
17385 case $ac_val in #(
17386 *${as_nl}*)
17387 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017388 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17389$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 esac
17391 case $ac_var in #(
17392 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017393 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17394 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 esac ;;
17396 esac
17397 done
17398
Martin v. Löwis11437992002-04-12 09:54:03 +000017399 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17401 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017402 # `set' does not quote correctly, so add quotes: double-quote
17403 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017405 "s/'/'\\\\''/g;
17406 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 *)
17409 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017411 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412 esac |
17413 sort
17414) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017417 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17420 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17422 :end' >>confcache
17423if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17424 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017425 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017426 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17427$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017428 if test ! -f "$cache_file" || test -h "$cache_file"; then
17429 cat confcache >"$cache_file"
17430 else
17431 case $cache_file in #(
17432 */* | ?:*)
17433 mv -f confcache "$cache_file"$$ &&
17434 mv -f "$cache_file"$$ "$cache_file" ;; #(
17435 *)
17436 mv -f confcache "$cache_file" ;;
17437 esac
17438 fi
17439 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017440 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017441 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17442$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017443 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017444fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017445rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017447test "x$prefix" = xNONE && prefix=$ac_default_prefix
17448# Let make expand exec_prefix.
17449test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017451DEFS=-DHAVE_CONFIG_H
17452
Skip Montanaro6dead952003-09-25 14:50:04 +000017453ac_libobjs=
17454ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017455U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017456for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17457 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17461 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17463 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017464done
17465LIBOBJS=$ac_libobjs
17466
17467LTLIBOBJS=$ac_ltlibobjs
17468
17469
Martin v. Löwis11437992002-04-12 09:54:03 +000017470
Matthias Kloseb9621712010-04-24 17:59:49 +000017471
Victor Stinnere0be4232011-10-25 13:06:09 +020017472: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017473ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017474ac_clean_files_save=$ac_clean_files
17475ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017476{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17477$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17478as_write_fail=0
17479cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017480#! $SHELL
17481# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017482# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017483# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017484# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017485
Martin v. Löwis11437992002-04-12 09:54:03 +000017486debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017487ac_cs_recheck=false
17488ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017489
Matthias Kloseb9621712010-04-24 17:59:49 +000017490SHELL=\${CONFIG_SHELL-$SHELL}
17491export SHELL
17492_ASEOF
17493cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17494## -------------------- ##
17495## M4sh Initialization. ##
17496## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498# Be more Bourne compatible
17499DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017500if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 emulate sh
17502 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017504 # is contrary to our usage. Disable this feature.
17505 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017507else
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 case `(set -o) 2>/dev/null` in #(
17509 *posix*) :
17510 set -o posix ;; #(
17511 *) :
17512 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017513esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017514fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017515
17516
Matthias Kloseb9621712010-04-24 17:59:49 +000017517as_nl='
17518'
17519export as_nl
17520# Printing a long string crashes Solaris 7 /usr/bin/printf.
17521as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17522as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17523as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17524# Prefer a ksh shell builtin over an external printf program on Solaris,
17525# but without wasting forks for bash or zsh.
17526if test -z "$BASH_VERSION$ZSH_VERSION" \
17527 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17528 as_echo='print -r --'
17529 as_echo_n='print -rn --'
17530elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17531 as_echo='printf %s\n'
17532 as_echo_n='printf %s'
17533else
17534 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17535 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17536 as_echo_n='/usr/ucb/echo -n'
17537 else
17538 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17539 as_echo_n_body='eval
17540 arg=$1;
17541 case $arg in #(
17542 *"$as_nl"*)
17543 expr "X$arg" : "X\\(.*\\)$as_nl";
17544 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17545 esac;
17546 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17547 '
17548 export as_echo_n_body
17549 as_echo_n='sh -c $as_echo_n_body as_echo'
17550 fi
17551 export as_echo_body
17552 as_echo='sh -c $as_echo_body as_echo'
17553fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017554
17555# The user is always right.
17556if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017557 PATH_SEPARATOR=:
17558 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17559 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17560 PATH_SEPARATOR=';'
17561 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564
17565# IFS
17566# We need space, tab and new line, in precisely that order. Quoting is
17567# there to prevent editors from complaining about space-tab.
17568# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17569# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570IFS=" "" $as_nl"
17571
17572# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017573as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017574case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 *[\\/]* ) as_myself=$0 ;;
17576 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017577for as_dir in $PATH
17578do
17579 IFS=$as_save_IFS
17580 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017581 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17582 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585 ;;
17586esac
17587# We did not find ourselves, most probably we were run as `sh COMMAND'
17588# in which case we are not to be found in the path.
17589if test "x$as_myself" = x; then
17590 as_myself=$0
17591fi
17592if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017593 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17594 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595fi
17596
Matthias Kloseb9621712010-04-24 17:59:49 +000017597# Unset variables that we do not need and which cause bugs (e.g. in
17598# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17599# suppresses any "Segmentation fault" message there. '((' could
17600# trigger a bug in pdksh 5.2.14.
17601for as_var in BASH_ENV ENV MAIL MAILPATH
17602do eval test x\${$as_var+set} = xset \
17603 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017604done
17605PS1='$ '
17606PS2='> '
17607PS4='+ '
17608
17609# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017610LC_ALL=C
17611export LC_ALL
17612LANGUAGE=C
17613export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614
Matthias Kloseb9621712010-04-24 17:59:49 +000017615# CDPATH.
17616(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17617
17618
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017619# as_fn_error STATUS ERROR [LINENO LOG_FD]
17620# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017621# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17622# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017623# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017624as_fn_error ()
17625{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017626 as_status=$1; test $as_status -eq 0 && as_status=1
17627 if test "$4"; then
17628 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17629 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017631 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 as_fn_exit $as_status
17633} # as_fn_error
17634
17635
17636# as_fn_set_status STATUS
17637# -----------------------
17638# Set $? to STATUS, without forking.
17639as_fn_set_status ()
17640{
17641 return $1
17642} # as_fn_set_status
17643
17644# as_fn_exit STATUS
17645# -----------------
17646# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17647as_fn_exit ()
17648{
17649 set +e
17650 as_fn_set_status $1
17651 exit $1
17652} # as_fn_exit
17653
17654# as_fn_unset VAR
17655# ---------------
17656# Portably unset VAR.
17657as_fn_unset ()
17658{
17659 { eval $1=; unset $1;}
17660}
17661as_unset=as_fn_unset
17662# as_fn_append VAR VALUE
17663# ----------------------
17664# Append the text in VALUE to the end of the definition contained in VAR. Take
17665# advantage of any shell optimizations that allow amortized linear growth over
17666# repeated appends, instead of the typical quadratic growth present in naive
17667# implementations.
17668if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17669 eval 'as_fn_append ()
17670 {
17671 eval $1+=\$2
17672 }'
17673else
17674 as_fn_append ()
17675 {
17676 eval $1=\$$1\$2
17677 }
17678fi # as_fn_append
17679
17680# as_fn_arith ARG...
17681# ------------------
17682# Perform arithmetic evaluation on the ARGs, and store the result in the
17683# global $as_val. Take advantage of shells that can avoid forks. The arguments
17684# must be portable across $(()) and expr.
17685if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17686 eval 'as_fn_arith ()
17687 {
17688 as_val=$(( $* ))
17689 }'
17690else
17691 as_fn_arith ()
17692 {
17693 as_val=`expr "$@" || test $? -eq 1`
17694 }
17695fi # as_fn_arith
17696
17697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698if expr a : '\(a\)' >/dev/null 2>&1 &&
17699 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17700 as_expr=expr
17701else
17702 as_expr=false
17703fi
17704
17705if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17706 as_basename=basename
17707else
17708 as_basename=false
17709fi
17710
Matthias Kloseb9621712010-04-24 17:59:49 +000017711if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17712 as_dirname=dirname
17713else
17714 as_dirname=false
17715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717as_me=`$as_basename -- "$0" ||
17718$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17719 X"$0" : 'X\(//\)$' \| \
17720 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017721$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 sed '/^.*\/\([^/][^/]*\)\/*$/{
17723 s//\1/
17724 q
17725 }
17726 /^X\/\(\/\/\)$/{
17727 s//\1/
17728 q
17729 }
17730 /^X\/\(\/\).*/{
17731 s//\1/
17732 q
17733 }
17734 s/.*/./; q'`
17735
Matthias Kloseb9621712010-04-24 17:59:49 +000017736# Avoid depending upon Character Ranges.
17737as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17738as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17739as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17740as_cr_digits='0123456789'
17741as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742
17743ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017744case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017746 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017748 xy) ECHO_C='\c';;
17749 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17750 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 esac;;
17752*)
17753 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017755
Martin v. Löwis11437992002-04-12 09:54:03 +000017756rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757if test -d conf$$.dir; then
17758 rm -f conf$$.dir/conf$$.file
17759else
17760 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017761 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017763if (echo >conf$$.file) 2>/dev/null; then
17764 if ln -s conf$$.file conf$$ 2>/dev/null; then
17765 as_ln_s='ln -s'
17766 # ... but there are two gotchas:
17767 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17768 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017769 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017771 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 elif ln conf$$.file conf$$ 2>/dev/null; then
17773 as_ln_s=ln
17774 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017775 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017777else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017778 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17781rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
Matthias Kloseb9621712010-04-24 17:59:49 +000017783
17784# as_fn_mkdir_p
17785# -------------
17786# Create "$as_dir" as a directory, including parents if necessary.
17787as_fn_mkdir_p ()
17788{
17789
17790 case $as_dir in #(
17791 -*) as_dir=./$as_dir;;
17792 esac
17793 test -d "$as_dir" || eval $as_mkdir_p || {
17794 as_dirs=
17795 while :; do
17796 case $as_dir in #(
17797 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17798 *) as_qdir=$as_dir;;
17799 esac
17800 as_dirs="'$as_qdir' $as_dirs"
17801 as_dir=`$as_dirname -- "$as_dir" ||
17802$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17803 X"$as_dir" : 'X\(//\)[^/]' \| \
17804 X"$as_dir" : 'X\(//\)$' \| \
17805 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17806$as_echo X"$as_dir" |
17807 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17808 s//\1/
17809 q
17810 }
17811 /^X\(\/\/\)[^/].*/{
17812 s//\1/
17813 q
17814 }
17815 /^X\(\/\/\)$/{
17816 s//\1/
17817 q
17818 }
17819 /^X\(\/\).*/{
17820 s//\1/
17821 q
17822 }
17823 s/.*/./; q'`
17824 test -d "$as_dir" && break
17825 done
17826 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017827 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017828
17829
17830} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017831if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017832 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017833else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017835 as_mkdir_p=false
17836fi
17837
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017838
17839# as_fn_executable_p FILE
17840# -----------------------
17841# Test if FILE is an executable regular file.
17842as_fn_executable_p ()
17843{
17844 test -f "$1" && test -x "$1"
17845} # as_fn_executable_p
17846as_test_x='test -x'
17847as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017848
17849# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017850as_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 +000017851
17852# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017853as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017854
17855
Martin v. Löwis11437992002-04-12 09:54:03 +000017856exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017857## ----------------------------------- ##
17858## Main body of $CONFIG_STATUS script. ##
17859## ----------------------------------- ##
17860_ASEOF
17861test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017862
Matthias Kloseb9621712010-04-24 17:59:49 +000017863cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17864# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017865# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866# values after options handling.
17867ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017868This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017869generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017870
17871 CONFIG_FILES = $CONFIG_FILES
17872 CONFIG_HEADERS = $CONFIG_HEADERS
17873 CONFIG_LINKS = $CONFIG_LINKS
17874 CONFIG_COMMANDS = $CONFIG_COMMANDS
17875 $ $0 $@
17876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877on `(hostname || uname -n) 2>/dev/null | sed 1q`
17878"
17879
Martin v. Löwis11437992002-04-12 09:54:03 +000017880_ACEOF
17881
Matthias Kloseb9621712010-04-24 17:59:49 +000017882case $ac_config_files in *"
17883"*) set x $ac_config_files; shift; ac_config_files=$*;;
17884esac
17885
17886case $ac_config_headers in *"
17887"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17888esac
17889
17890
17891cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017892# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017893config_files="$ac_config_files"
17894config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017897
Matthias Kloseb9621712010-04-24 17:59:49 +000017898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017899ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017900\`$as_me' instantiates files and other configuration actions
17901from templates according to the current configuration. Unless the files
17902and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017903
Matthias Kloseb9621712010-04-24 17:59:49 +000017904Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017905
17906 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 --config print configuration, then exit
17909 -q, --quiet, --silent
17910 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 -d, --debug don't remove temporary files
17912 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017913 --file=FILE[:TEMPLATE]
17914 instantiate the configuration file FILE
17915 --header=FILE[:TEMPLATE]
17916 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017917
17918Configuration files:
17919$config_files
17920
17921Configuration headers:
17922$config_headers
17923
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017924Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17928ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017929ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017930python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017931configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017932 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017933
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017934Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017935This config.status script is free software; the Free Software Foundation
17936gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937
17938ac_pwd='$ac_pwd'
17939srcdir='$srcdir'
17940INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017941MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017942test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017943_ACEOF
17944
Matthias Kloseb9621712010-04-24 17:59:49 +000017945cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17946# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017947ac_need_defaults=:
17948while test $# != 0
17949do
17950 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017951 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17953 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017954 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017956 --*=)
17957 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17958 ac_optarg=
17959 ac_shift=:
17960 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017962 ac_option=$1
17963 ac_optarg=$2
17964 ac_shift=shift
17965 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 esac
17967
Skip Montanaro6dead952003-09-25 14:50:04 +000017968 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017970 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17971 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017973 $as_echo "$ac_cs_version"; exit ;;
17974 --config | --confi | --conf | --con | --co | --c )
17975 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 debug=: ;;
17978 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017979 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017980 case $ac_optarg in
17981 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017982 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017983 esac
17984 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 ac_need_defaults=false;;
17986 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017987 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017988 case $ac_optarg in
17989 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17990 esac
17991 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017993 --he | --h)
17994 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017995 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017996Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017998 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017999 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18000 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18001 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018002
18003 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018004 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018005Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018006
Matthias Kloseb9621712010-04-24 17:59:49 +000018007 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018009
18010 esac
18011 shift
18012done
18013
Skip Montanaro6dead952003-09-25 14:50:04 +000018014ac_configure_extra_args=
18015
18016if $ac_cs_silent; then
18017 exec 6>/dev/null
18018 ac_configure_extra_args="$ac_configure_extra_args --silent"
18019fi
18020
18021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018022cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018023if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018024 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018025 shift
18026 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18027 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018029 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018030fi
18031
Martin v. Löwis11437992002-04-12 09:54:03 +000018032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034exec 5>>config.log
18035{
18036 echo
18037 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18038## Running $as_me. ##
18039_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018040 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018041} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018046
Matthias Kloseb9621712010-04-24 17:59:49 +000018047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048
18049# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018050for ac_config_target in $ac_config_targets
18051do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052 case $ac_config_target in
18053 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18054 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18055 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018056 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18057 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018059 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018060 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018061 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018062 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063
Victor Stinnere0be4232011-10-25 13:06:09 +020018064 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 esac
18066done
18067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068
Martin v. Löwis11437992002-04-12 09:54:03 +000018069# If the user did not use the arguments to specify the items to instantiate,
18070# then the envvar interface is used. Set only those that are not.
18071# We use the long form for the default assignment because of an extremely
18072# bizarre bug on SunOS 4.1.3.
18073if $ac_need_defaults; then
18074 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18075 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18076fi
18077
Skip Montanaro6dead952003-09-25 14:50:04 +000018078# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018080# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081# Hook for its removal unless debugging.
18082# Note that there is a small window in which the directory will not be cleaned:
18083# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018084$debug ||
18085{
Victor Stinnere0be4232011-10-25 13:06:09 +020018086 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018088 : "${ac_tmp:=$tmp}"
18089 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018090' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018091 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018092}
Martin v. Löwis11437992002-04-12 09:54:03 +000018093# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018094
Martin v. Löwis11437992002-04-12 09:54:03 +000018095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018097 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018098} ||
18099{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100 tmp=./conf$$-$RANDOM
18101 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018102} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018103ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018104
Matthias Kloseb9621712010-04-24 17:59:49 +000018105# Set up the scripts for CONFIG_FILES section.
18106# No need to generate them if there are no CONFIG_FILES.
18107# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018109
Matthias Kloseb9621712010-04-24 17:59:49 +000018110
18111ac_cr=`echo X | tr X '\015'`
18112# On cygwin, bash can eat \r inside `` if the user requested igncr.
18113# But we know of no other shell where ac_cr would be empty at this
18114# point, so we can use a bashism as a fallback.
18115if test "x$ac_cr" = x; then
18116 eval ac_cr=\$\'\\r\'
18117fi
18118ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18119if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018120 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018121else
18122 ac_cs_awk_cr=$ac_cr
18123fi
18124
Victor Stinnere0be4232011-10-25 13:06:09 +020018125echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018126_ACEOF
18127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128
Matthias Kloseb9621712010-04-24 17:59:49 +000018129{
18130 echo "cat >conf$$subs.awk <<_ACEOF" &&
18131 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18132 echo "_ACEOF"
18133} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018134 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18135ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136ac_delim='%!_!# '
18137for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018138 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018139 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140
Matthias Kloseb9621712010-04-24 17:59:49 +000018141 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18142 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143 break
18144 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018145 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146 else
18147 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149done
Matthias Kloseb9621712010-04-24 17:59:49 +000018150rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151
Matthias Kloseb9621712010-04-24 17:59:49 +000018152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018153cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018155sed -n '
18156h
18157s/^/S["/; s/!.*/"]=/
18158p
18159g
18160s/^[^!]*!//
18161:repl
18162t repl
18163s/'"$ac_delim"'$//
18164t delim
18165:nl
18166h
18167s/\(.\{148\}\)..*/\1/
18168t more1
18169s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18170p
18171n
18172b repl
18173:more1
18174s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18175p
18176g
18177s/.\{148\}//
18178t nl
18179:delim
18180h
18181s/\(.\{148\}\)..*/\1/
18182t more2
18183s/["\\]/\\&/g; s/^/"/; s/$/"/
18184p
18185b
18186:more2
18187s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18188p
18189g
18190s/.\{148\}//
18191t delim
18192' <conf$$subs.awk | sed '
18193/^[^""]/{
18194 N
18195 s/\n//
18196}
18197' >>$CONFIG_STATUS || ac_write_fail=1
18198rm -f conf$$subs.awk
18199cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18200_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018201cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018202 for (key in S) S_is_set[key] = 1
18203 FS = ""
18204
18205}
18206{
18207 line = $ 0
18208 nfields = split(line, field, "@")
18209 substed = 0
18210 len = length(field[1])
18211 for (i = 2; i < nfields; i++) {
18212 key = field[i]
18213 keylen = length(key)
18214 if (S_is_set[key]) {
18215 value = S[key]
18216 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18217 len += length(value) + length(field[++i])
18218 substed = 1
18219 } else
18220 len += 1 + keylen
18221 }
18222
18223 print line
18224}
18225
18226_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18229if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18230 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18231else
18232 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018233fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018234 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018235_ACEOF
18236
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018237# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18238# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239# trailing colons and then remove the whole line if VPATH becomes empty
18240# (actually we leave an empty line to preserve line numbers).
18241if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018242 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18243h
18244s///
18245s/^/:/
18246s/[ ]*$/:/
18247s/:\$(srcdir):/:/g
18248s/:\${srcdir}:/:/g
18249s/:@srcdir@:/:/g
18250s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018252x
18253s/\(=[ ]*\).*/\1/
18254G
18255s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256s/^[^=]*=[ ]*$//
18257}'
18258fi
18259
Matthias Kloseb9621712010-04-24 17:59:49 +000018260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018261fi # test -n "$CONFIG_FILES"
18262
Matthias Kloseb9621712010-04-24 17:59:49 +000018263# Set up the scripts for CONFIG_HEADERS section.
18264# No need to generate them if there are no CONFIG_HEADERS.
18265# This happens for instance with `./config.status Makefile'.
18266if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018267cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018268BEGIN {
18269_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270
Matthias Kloseb9621712010-04-24 17:59:49 +000018271# Transform confdefs.h into an awk script `defines.awk', embedded as
18272# here-document in config.status, that substitutes the proper values into
18273# config.h.in to produce config.h.
18274
18275# Create a delimiter string that does not exist in confdefs.h, to ease
18276# handling of long lines.
18277ac_delim='%!_!# '
18278for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018279 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18280 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 break
18282 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018283 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018284 else
18285 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18286 fi
18287done
18288
18289# For the awk script, D is an array of macro values keyed by name,
18290# likewise P contains macro parameters if any. Preserve backslash
18291# newline sequences.
18292
18293ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18294sed -n '
18295s/.\{148\}/&'"$ac_delim"'/g
18296t rset
18297:rset
18298s/^[ ]*#[ ]*define[ ][ ]*/ /
18299t def
18300d
18301:def
18302s/\\$//
18303t bsnl
18304s/["\\]/\\&/g
18305s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18306D["\1"]=" \3"/p
18307s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18308d
18309:bsnl
18310s/["\\]/\\&/g
18311s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18312D["\1"]=" \3\\\\\\n"\\/p
18313t cont
18314s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18315t cont
18316d
18317:cont
18318n
18319s/.\{148\}/&'"$ac_delim"'/g
18320t clear
18321:clear
18322s/\\$//
18323t bsnlc
18324s/["\\]/\\&/g; s/^/"/; s/$/"/p
18325d
18326:bsnlc
18327s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18328b cont
18329' <confdefs.h | sed '
18330s/'"$ac_delim"'/"\\\
18331"/g' >>$CONFIG_STATUS || ac_write_fail=1
18332
18333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18334 for (key in D) D_is_set[key] = 1
18335 FS = ""
18336}
18337/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18338 line = \$ 0
18339 split(line, arg, " ")
18340 if (arg[1] == "#") {
18341 defundef = arg[2]
18342 mac1 = arg[3]
18343 } else {
18344 defundef = substr(arg[1], 2)
18345 mac1 = arg[2]
18346 }
18347 split(mac1, mac2, "(") #)
18348 macro = mac2[1]
18349 prefix = substr(line, 1, index(line, defundef) - 1)
18350 if (D_is_set[macro]) {
18351 # Preserve the white space surrounding the "#".
18352 print prefix "define", macro P[macro] D[macro]
18353 next
18354 } else {
18355 # Replace #undef with comments. This is necessary, for example,
18356 # in the case of _POSIX_SOURCE, which is predefined and required
18357 # on some systems where configure will not decide to define it.
18358 if (defundef == "undef") {
18359 print "/*", prefix defundef, macro, "*/"
18360 next
18361 }
18362 }
18363}
18364{ print }
18365_ACAWK
18366_ACEOF
18367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018368 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018369fi # test -n "$CONFIG_HEADERS"
18370
18371
18372eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18373shift
18374for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018375do
18376 case $ac_tag in
18377 :[FHLC]) ac_mode=$ac_tag; continue;;
18378 esac
18379 case $ac_mode$ac_tag in
18380 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018381 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382 :[FH]-) ac_tag=-:-;;
18383 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18384 esac
18385 ac_save_IFS=$IFS
18386 IFS=:
18387 set x $ac_tag
18388 IFS=$ac_save_IFS
18389 shift
18390 ac_file=$1
18391 shift
18392
18393 case $ac_mode in
18394 :L) ac_source=$1;;
18395 :[FH])
18396 ac_file_inputs=
18397 for ac_f
18398 do
18399 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018400 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 *) # Look for the file first in the build tree, then in the source tree
18402 # (if the path is not absolute). The absolute path cannot be DOS-style,
18403 # because $ac_f cannot contain `:'.
18404 test -f "$ac_f" ||
18405 case $ac_f in
18406 [\\/$]*) false;;
18407 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18408 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018409 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018411 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18412 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413 done
18414
18415 # Let's still pretend it is `configure' which instantiates (i.e., don't
18416 # use $as_me), people would be surprised to read:
18417 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018418 configure_input='Generated from '`
18419 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18420 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 if test x"$ac_file" != x-; then
18422 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018423 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18424$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018426 # Neutralize special characters interpreted by sed in replacement strings.
18427 case $configure_input in #(
18428 *\&* | *\|* | *\\* )
18429 ac_sed_conf_input=`$as_echo "$configure_input" |
18430 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18431 *) ac_sed_conf_input=$configure_input;;
18432 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018433
18434 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018435 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18436 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437 esac
18438 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018439 esac
18440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018442$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018443 X"$ac_file" : 'X\(//\)[^/]' \| \
18444 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018446$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18448 s//\1/
18449 q
18450 }
18451 /^X\(\/\/\)[^/].*/{
18452 s//\1/
18453 q
18454 }
18455 /^X\(\/\/\)$/{
18456 s//\1/
18457 q
18458 }
18459 /^X\(\/\).*/{
18460 s//\1/
18461 q
18462 }
18463 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 ac_builddir=.
18466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467case "$ac_dir" in
18468.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18469*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018470 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018472 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473 case $ac_top_builddir_sub in
18474 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18475 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18476 esac ;;
18477esac
18478ac_abs_top_builddir=$ac_pwd
18479ac_abs_builddir=$ac_pwd$ac_dir_suffix
18480# for backward compatibility:
18481ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018482
18483case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486 ac_top_srcdir=$ac_top_builddir_sub
18487 ac_abs_top_srcdir=$ac_pwd ;;
18488 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490 ac_top_srcdir=$srcdir
18491 ac_abs_top_srcdir=$srcdir ;;
18492 *) # Relative name.
18493 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18494 ac_top_srcdir=$ac_top_build_prefix$srcdir
18495 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018496esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018498
Martin v. Löwis11437992002-04-12 09:54:03 +000018499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500 case $ac_mode in
18501 :F)
18502 #
18503 # CONFIG_FILE
18504 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018505
18506 case $INSTALL in
18507 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018509 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018510 ac_MKDIR_P=$MKDIR_P
18511 case $MKDIR_P in
18512 [\\/$]* | ?:[\\/]* ) ;;
18513 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18514 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018515_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516
Matthias Kloseb9621712010-04-24 17:59:49 +000018517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518# If the template does not know about datarootdir, expand it.
18519# FIXME: This hack should be removed a few years after 2.60.
18520ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018521ac_sed_dataroot='
18522/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 p
18524 q
18525}
18526/@datadir@/p
18527/@docdir@/p
18528/@infodir@/p
18529/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018530/@mandir@/p'
18531case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532*datarootdir*) ac_datarootdir_seen=yes;;
18533*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18535$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018538 ac_datarootdir_hack='
18539 s&@datadir@&$datadir&g
18540 s&@docdir@&$docdir&g
18541 s&@infodir@&$infodir&g
18542 s&@localedir@&$localedir&g
18543 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018544 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545esac
18546_ACEOF
18547
18548# Neutralize VPATH when `$srcdir' = `.'.
18549# Shell code in configure.ac might set extrasub.
18550# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18552ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018553$extrasub
18554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018556:t
18557/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018558s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018560s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018561s&@srcdir@&$ac_srcdir&;t t
18562s&@abs_srcdir@&$ac_abs_srcdir&;t t
18563s&@top_srcdir@&$ac_top_srcdir&;t t
18564s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18565s&@builddir@&$ac_builddir&;t t
18566s&@abs_builddir@&$ac_abs_builddir&;t t
18567s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18568s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018569s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018571"
Victor Stinnere0be4232011-10-25 13:06:09 +020018572eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18573 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018576 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18577 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18578 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018579 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018580which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018581$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018582which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018583
Victor Stinnere0be4232011-10-25 13:06:09 +020018584 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018586 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18587 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018588 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018589 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590 ;;
18591 :H)
18592 #
18593 # CONFIG_HEADER
18594 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018595 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018596 {
18597 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018598 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18599 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018600 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018601 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018602 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18603$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018605 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018606 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018607 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 fi
18609 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018610 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018611 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018612 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018613 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018614 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018616
18617 esac
18618
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018619
18620 case $ac_file$ac_mode in
18621 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18622
18623 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624done # for ac_tag
18625
Guido van Rossum627b2d71993-12-24 10:39:16 +000018626
Matthias Kloseb9621712010-04-24 17:59:49 +000018627as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018628_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018629ac_clean_files=$ac_clean_files_save
18630
Matthias Kloseb9621712010-04-24 17:59:49 +000018631test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018632 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018633
Martin v. Löwis11437992002-04-12 09:54:03 +000018634
18635# configure is writing to config.log, and then calls config.status.
18636# config.status does its own redirection, appending to config.log.
18637# Unfortunately, on DOS this fails, as config.log is still kept open
18638# by configure, so config.status won't be able to write to it; its
18639# output is simply discarded. So we exec the FD to /dev/null,
18640# effectively closing config.log, so it can be properly (re)opened and
18641# appended to by config.status. When coming back to configure, we
18642# need to make the FD available again.
18643if test "$no_create" != yes; then
18644 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018645 ac_config_status_args=
18646 test "$silent" = yes &&
18647 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018648 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018649 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 exec 5>>config.log
18651 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18652 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018653 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018654fi
18655if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18657$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018658fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018659
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018660
Christian Heimes75ed8902013-11-20 01:11:18 +010018661echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018662if test ! -f Modules/Setup.local
18663then
18664 echo "# Edit this file for local setup changes" >Modules/Setup.local
18665fi
18666
Christian Heimes75ed8902013-11-20 01:11:18 +010018667echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018668$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018669 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018670 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018671mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018672
18673if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18674 echo "" >&6
18675 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018676 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 +000018677 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018678 echo "" >&6
18679 echo "" >&6
18680fi
18681