dnl
dnl Checks whether make has the GNU make $(if condition,then,else) extension.
dnl Runs 'if-true' if so, 'if-false' otherwise.
-AC_DEFUN([OVS_MAKE_HAS_IF],
+AC_DEFUN([OVS_CHECK_MAKE_IF],
[AC_CACHE_CHECK(
[whether ${MAKE-make} has GNU make \$(if) extension],
[ovs_cv_gnu_make_if],
ovs_cv_gnu_make_if=yes
else
ovs_cv_gnu_make_if=no
- fi])
- AS_IF([test $ovs_cv_gnu_make_if = yes], [$1], [$2])])
+ fi])])
dnl OVS_CHECK_SPARSE_TARGET
dnl
dnl OVS_ENABLE_SPARSE
AC_DEFUN([OVS_ENABLE_SPARSE],
[AC_REQUIRE([OVS_CHECK_SPARSE_TARGET])
- OVS_MAKE_HAS_IF(
- [AC_CONFIG_COMMANDS_PRE(
- [: ${SPARSE=sparse}
- AC_SUBST([SPARSE])
- CC='$(if $(C),REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS)" cgcc $(CGCCFLAGS),'"$CC"')'])])])
+ AC_REQUIRE([OVS_CHECK_MAKE_IF])
+ : ${SPARSE=sparse}
+ AC_SUBST([SPARSE])
+ AC_CONFIG_COMMANDS_PRE(
+ [if test $ovs_cv_gnu_make_if = yes; then
+ CC='$(if $(C),REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS)" cgcc $(CGCCFLAGS),'"$CC"')'
+ fi])])