Do not require Autoconf 2.64, as CentOS 6 provides 2.63.

The only required bit from Autoconf 2.64 is AS_VAR_IF. Which is in fact
provided, but just in case there is now a fallback implementation in
m4/sb_autoconf_compat.m4.
This commit is contained in:
Alexey Kopytov
2017-02-13 21:52:41 +03:00
parent 731b5e7aa2
commit 24fa9b2a04
2 changed files with 14 additions and 1 deletions

View File

@ -58,7 +58,7 @@
#serial 4
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
[
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS

13
m4/sb_autoconf_compat.m4 Normal file
View File

@ -0,0 +1,13 @@
# ---------------------------------------------------------------------------
# Provide various compatibility macros for older Autoconf machines
# Definitions were copied from the Autoconf source code.
# ---------------------------------------------------------------------------
m4_ifdef([AS_VAR_IF],,m4_define([AS_VAR_IF],
[AS_LITERAL_WORD_IF([$1],
[AS_IF(m4_ifval([$2], [[test "x$$1" = x[]$2]], [[${$1:+false} :]])],
[AS_VAR_COPY([as_val], [$1])
AS_IF(m4_ifval([$2], [[test "x$as_val" = x[]$2]], [[${as_val:+false} :]])],
[AS_IF(m4_ifval([$2],
[[eval test \"x\$"$1"\" = x"_AS_ESCAPE([$2], [`], [\"$])"]],
[[eval \${$1:+false} :]])]),
[$3], [$4])]))dnl