[libdmapsharing] Do not use AM_CONDITIONAL within a shell conditional



commit 55a8417308cd3af0bc306d37c0a887080827c2b2
Author: W. Michael Petullo <mike flyn org>
Date:   Sun Feb 2 23:12:35 2014 -0500

    Do not use AM_CONDITIONAL within a shell conditional
    
    Signed-off-by: W. Michael Petullo <mike flyn org>

 configure.ac      |   36 +++++++++++++++---------------------
 tests/Makefile.am |    4 ++--
 vala/Makefile.am  |    4 ++--
 3 files changed, 19 insertions(+), 25 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f994043..2fd87a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -338,15 +338,14 @@ AM_CONDITIONAL(USE_GSTREAMERAPP, test x"$HAVE_GSTREAMERAPP" = "xyes")
 AC_SUBST(GSTREAMERAPP_CFLAGS)
 AC_SUBST(GSTREAMERAPP_LIBS)
 
-AM_CONDITIONAL(HAVE_VALA, false)
-if test "x$USE_MAINTAINER_MODE" = "xyes" ; then
-        AM_PROG_VALAC([0.11.4])
-        if test "x$VALAC" = "x" ; then
-                AC_MSG_ERROR([Cannot find the "valac" compiler in your PATH])
-        fi
-       AC_PATH_PROG(VALA_GEN_INTROSPECT, vala-gen-introspect)
-       AC_PATH_PROG(VAPIGEN, vapigen)
-       AM_CONDITIONAL(HAVE_VALA, true)
+AM_PROG_VALAC([0.11.4])
+AM_CONDITIONAL(HAVE_VALAC, test -x "$VALAC")
+
+AC_PATH_PROG(VALA_GEN_INTROSPECT, vala-gen-introspect)
+AC_PATH_PROG(VAPIGEN, vapigen)
+AM_CONDITIONAL(BUILD_VAPI, test -n "$VALA_GEN_INTROSPECT" -a -n "$VAPIGEN")
+if test -n "$BUILD_VAPI" ; then
+       AC_WARN([will not build vapi])
 fi
 
 PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
@@ -360,20 +359,15 @@ AM_CONDITIONAL(HAVE_GEE, test "x$HAVE_GEE" = "xyes")
 AC_SUBST(GEE_CFLAGS)
 AC_SUBST(GEE_LIBS)
 
-if test "x$HAVE_VALA" = "xyes" -a "x$HAVE_GEE" = "xyes" -a "x$HAVE_GTK" = "xyes"; then
-       AM_CONDITIONAL(BUILD_DPAPVIEW, true)
-else
-       AM_CONDITIONAL(BUILD_DPAPVIEW, false)
-       AC_WARN([Will not build dpapview])
+AM_CONDITIONAL(BUILD_DPAPVIEW, test "x$HAVE_VALA" = "xyes" -a "x$HAVE_GEE" = "xyes" -a "x$HAVE_GTK" = "xyes")
+if test -n "$BUILD_DPAPVIEW" ; then
+       AC_WARN([will not build dpapview])
 fi
 
-AM_CONDITIONAL(HAVE_CHECK, false)
-if test "x$USE_MAINTAINER_MODE" = "xyes" ; then
-       PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
-       AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
-       if test "x$have_check" = "xyes"; then
-               AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
-       fi
+PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
+AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+if test "x$have_check" = "xyes"; then
+       AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
 fi
 
 AC_CHECK_LIB(z, uncompress)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b857c04..d36b454 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,7 +52,7 @@ test_dmap_server_LDADD = \
        $(IMAGEMAGICK_LIBS) \
        $(MDNS_LIBS)
 
-if MAINTAINER_MODE
+if HAVE_VALAC
 BUILT_SOURCES = dacplisten.stamp dpapview.stamp dmapcopy.stamp dmapserve.stamp
 
 dacplisten.stamp: $(dacplisten_VALASOURCES)
@@ -170,7 +170,7 @@ EXTRA_DIST = \
        $(dmapserve_VALABUILTSOURCES) \
        dpapview.ui
 
-if MAINTAINER_MODE
+if HAVE_VALAC
 CLEANFILES = \
        $(BUILT_SOURCES) \
        $(dpapview_VALABUILTSOURCES)
diff --git a/vala/Makefile.am b/vala/Makefile.am
index 181600e..44c71c1 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -1,4 +1,4 @@
-if MAINTAINER_MODE
+if BUILD_VAPI
 libdmapsharing- API_VERSION@-daap/libdmapsharing- API_VERSION@.gi: libdmapsharing- 
API_VERSION@-daap/libdmapsharing- API_VERSION@-uninstalled.files libdmapsharing- 
API_VERSION@-daap/libdmapsharing- API_VERSION@-uninstalled.namespace
        PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing- 
API_VERSION@-uninstalled libdmapsharing- API_VERSION@-daap
        @mv libdmapsharing- API_VERSION@-daap/libdmapsharing- API_VERSION@-uninstalled.gi libdmapsharing- 
API_VERSION@-daap/libdmapsharing- API_VERSION@.gi
@@ -91,7 +91,7 @@ DISTCLEANFILES = \
        libdmapsharing- API_VERSION@-dmap/libdmapsharing- API_VERSION@-uninstalled.files \
        libdmapsharing- API_VERSION@-dpap/libdmapsharing- API_VERSION@-uninstalled.files
 
-if MAINTAINER_MODE
+if BUILD_VAPI
 CLEANFILES += \
        libdmapsharing- API_VERSION@.vapi
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]