[rygel/wip/lms-tizen: 384/384] build: Fix linking of LMS against unistring



commit 7dfa8f0a1f0c1405a0fd449a5b03c5d0f375294e
Author: Jens Georg <mail jensge org>
Date:   Sun Apr 19 00:26:43 2015 +0200

    build: Fix linking of LMS against unistring
    
    Signed-off-by: Jens Georg <mail jensge org>

 configure.ac                         |   19 ++++++++++---------
 src/plugins/lms/Makefile.am          |    3 ++-
 src/plugins/media-export/Makefile.am |    3 ++-
 3 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a8465b9..a4e2eb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,7 +93,16 @@ AC_SUBST([TEST_DEPS_VALAFLAGS])
 
 PKG_CHECK_MODULES([EXAMPLE_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED gssdp-1.0 >= 
$GSSDP_REQUIRED])
 
-
+AC_CHECK_HEADER([unistr.h],
+                AC_CHECK_LIB([unistring],
+                             [u8_strcoll],
+                             [have_unistring=yes],[have_unistring=no]))
+AS_IF([test "x$have_unistring" = "xyes"],
+      [
+        AC_DEFINE([HAVE_UNISTRING],[1],[Use libunistring for collation])
+        UNISTRING_LIBS="-lunistring"
+        AC_SUBST([UNISTRING_LIBS])
+])
 
 dnl Media engine to use
 BUILT_ENGINES="librygel-media-engine-simple"
@@ -326,14 +335,6 @@ dnl Check additional requirements for MediaExport plugins
 if test "x$enable_media_export_plugin" = "xyes";
 then
     RYGEL_CHECK_PACKAGES([sqlite3 gstreamer-tag-1.0 gstreamer-app-1.0])
-    AC_CHECK_HEADER([unistr.h],
-                    AC_CHECK_LIB([unistring],
-                                 [u8_strcoll],
-                                 [have_unistring=yes],[have_unistring=no]))
-    if test "x$have_unistring" = "xyes"; then
-        AC_DEFINE([HAVE_UNISTRING],[1],[Use libunistring for collation])
-        RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_LIBS="$RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_LIBS -lunistring"
-    fi
 fi
 
 dnl Check additional requirements for LMS plugin
diff --git a/src/plugins/lms/Makefile.am b/src/plugins/lms/Makefile.am
index f96a2ab..c7cf886 100644
--- a/src/plugins/lms/Makefile.am
+++ b/src/plugins/lms/Makefile.am
@@ -38,7 +38,8 @@ librygel_lms_la_CFLAGS = \
 
 librygel_lms_la_LIBADD = \
        $(RYGEL_PLUGIN_LMS_DEPS_LIBS) \
-       $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS)
+       $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS) \
+       $(UNISTRING_LIBS)
 
 librygel_lms_la_LDFLAGS = \
        $(RYGEL_PLUGIN_LINKER_FLAGS)
diff --git a/src/plugins/media-export/Makefile.am b/src/plugins/media-export/Makefile.am
index 4916bcc..ecf5fc1 100644
--- a/src/plugins/media-export/Makefile.am
+++ b/src/plugins/media-export/Makefile.am
@@ -53,7 +53,8 @@ librygel_media_export_la_CFLAGS = \
        -DG_LOG_DOMAIN='"MediaExport"'
 librygel_media_export_la_LIBADD = \
        $(RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_LIBS) \
-       $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS)
+       $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS) \
+       $(UNISTRING_LIBS)
 
 librygel_media_export_la_LDFLAGS = \
        $(RYGEL_PLUGIN_LINKER_FLAGS)


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