From 24fa9b2a04ff24d0f10aa3882e4069c561a2ef04 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Mon, 13 Feb 2017 21:52:41 +0300 Subject: [PATCH] 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. --- m4/ax_check_compile_flag.m4 | 2 +- m4/sb_autoconf_compat.m4 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 m4/sb_autoconf_compat.m4 diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 index ca36397..99a2220 100644 --- a/m4/ax_check_compile_flag.m4 +++ b/m4/ax_check_compile_flag.m4 @@ -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 diff --git a/m4/sb_autoconf_compat.m4 b/m4/sb_autoconf_compat.m4 new file mode 100644 index 0000000..00c4770 --- /dev/null +++ b/m4/sb_autoconf_compat.m4 @@ -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