[rygel-gst-0-10-media-engine] Get linker flags and installation dir from Rygel's pc files.



commit 39a0c77273468a8af56748939e89198e600adcfc
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Feb 12 11:00:24 2013 +0100

    Get linker flags and installation dir from Rygel's pc files.

 configure.ac    |   18 ++++++++++++++++++
 src/Makefile.am |    6 +-----
 2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d2ff8d2..5a4f9b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,24 @@ IT_PROG_INTLTOOL([0.40.0])
 dnl Shave the output
 AM_SILENT_RULES([yes])
 
+PKG_PROG_PKG_CONFIG
+
+RYGEL_PLUGIN_LINKER_FLAGS="`$PKG_CONFIG --variable=plugin_ldflags rygel-core-2.0`"
+AC_SUBST(RYGEL_PLUGIN_LINKER_FLAGS)
+
+if test "x$RYGEL_PLUGIN_LINKER_FLAGS" = 'x'
+then
+	AC_MSG_ERROR([Could not get Rygel plugin linker flags])
+fi
+
+RYGEL_ENGINE_DIR="`$PKG_CONFIG --variable=enginedir rygel-server-2.0`"
+AC_SUBST(RYGEL_ENGINE_DIR)
+
+if test "x$RYGEL_ENGINE_DIR" = 'x'
+then
+	AC_MSG_ERROR([Could not get Rygel media engine installation directory])
+fi
+
 AC_CONFIG_FILES([
 Makefile
 data/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index e2347d9..8b58b17 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,6 @@
 include $(top_srcdir)/data/common.am
 
-# TODO: export this directory in some Rygel's pc file.
-enginedir = $(libdir)/rygel-2.0/engines
+enginedir = $(RYGEL_ENGINE_DIR)
 engine_LTLIBRARIES = librygel-media-engine-gst-0-10.la
 
 librygel_media_engine_gst_0_10_la_SOURCES = \
@@ -29,7 +28,4 @@ librygel_media_engine_gst_0_10_la_CFLAGS = \
 librygel_media_engine_gst_0_10_la_LIBADD = \
 	$(DEPS_LIBS)
 
-# TODO: export these flags in some Rygel's pc file.
-RYGEL_PLUGIN_LINKER_FLAGS = -shared -fPIC -module -avoid-version -Wl,-z,defs
-
 librygel_media_engine_gst_0_10_la_LDFLAGS = $(RYGEL_PLUGIN_LINKER_FLAGS)


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