[vino] Check for presence of glib-mkenums in configure



commit 442128640f21b162772f2aa4a93e8109886923c7
Author: David King <amigadave amigadave com>
Date:   Tue Mar 1 19:16:37 2011 +0100

    Check for presence of glib-mkenums in configure
    
    AC_SUBST a GLIB_MKENUMS variable in configure, that can be used in
    Makefile.am.

 configure.ac       |    7 +++++++
 server/Makefile.am |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 87181ec..4e2df6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,13 @@ AS_IF([test "x$GLIB_GENMARSHAL" = "x"],
   [AC_SUBST([GLIB_GENMARSHAL])
     AC_MSG_RESULT([$GLIB_GENMARSHAL])])
 
+AC_MSG_CHECKING([for glib-mkenums script])
+GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+AS_IF([test "x$GLIB_MKENUMS" = "x"],
+  [AC_MSG_ERROR([glib-mkenums not listed in glib-2.0 pkg-config file])],
+  [AC_SUBST([GLIB_MKENUMS])
+    AC_MSG_RESULT([$GLIB_MKENUMS])])
+
 # GNOME libraries
 GTK_VERSION=3.0.0
 GLIB_VERSION=2.17.0
diff --git a/server/Makefile.am b/server/Makefile.am
index 4c6dc15..0c83638 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -113,7 +113,7 @@ vino_enum_headers = \
 	$(NULL)
 
 vino-enums.c: $(vino_enum_headers)
-	$(AM_V_GEN)glib-mkenums    --fhead "#include <glib-object.h>\n" \
+	$(AM_V_GEN)$(GLIB_MKENUMS)    --fhead "#include <glib-object.h>\n" \
 			--fhead "#include \"vino-enums.h\"\n\n" \
 			--fprod "\n/* enumerations from \"@filename \" */" \
 			--fprod "\n#include \"@filename \"\n" \
@@ -128,7 +128,7 @@ vino-enums.c: $(vino_enum_headers)
 		$(vino_enum_headers) > $@
 
 vino-enums.h: $(vino_enum_headers)
-	$(AM_V_GEN)glib-mkenums    --fhead "#ifndef __VINO_ENUMS_H__\n" \
+	$(AM_V_GEN)$(GLIB_MKENUMS)    --fhead "#ifndef __VINO_ENUMS_H__\n" \
 			--fhead "#define __VINO_ENUMS_H__ 1\n\n" \
 			--fhead "G_BEGIN_DECLS\n\n" \
 			--ftail "G_END_DECLS\n\n" \



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