Fix linking complaints brought out by:
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 27 Feb 2012 05:20:17 +0000 (05:20 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 27 Feb 2012 05:20:17 +0000 (05:20 +0000)
From: Thanatermesis <thanatermesis.ecvs@gmail.com>
Subject: [E-devel] LDFLAGS with -Wl,-z,defs

Aparently if you add the option "-Wl,-z,defs" to your LDFLAGS, there's some
libs that doesn't compile, like evas and e_dbus, there's some logs:

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/emotion@68464 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

m4/emotion_check.m4
src/edje_external/Makefile.am
src/modules/generic/Makefile.am
src/modules/gstreamer/Makefile.am
src/modules/xine/Makefile.am

index ebd7e7e..f70a2c3 100644 (file)
@@ -172,6 +172,34 @@ AC_ARG_ENABLE(generic-[]DOWN,
    ],
    [enable_module="auto"])
 
+SHM_OPEN_LIBS=""
+AC_COMPILE_IFELSE(
+   [AC_LANG_PROGRAM(
+       [[
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+       ]],
+       [[
+int fd;
+fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+shm_unlink("/");
+       ]])],
+   [
+    have_shm_open="yes"
+    AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
+    SHM_OPEN_LIBS="-lrt"
+   ],
+   [have_shm_open="no"])
+AC_SUBST(SHM_OPEN_LIBS)
+
+AC_MSG_CHECKING([shm_open])
+AC_MSG_RESULT([${have_shm_open}])
+
+if test "x{have_shm_open)" != "xyes"; then
+  enable_generic="no"
+fi
+
 if test "x${enable_generic}" != "xyes" && test "x${enable_generic}" != "xstatic"; then
    if test "x${enable_module}" = "xyes"; then
       AC_MSG_WARN([Generic module is disabled, force disable of Generic Player $1])
index bd92c54..9b36faf 100644 (file)
@@ -13,6 +13,6 @@ pkgdir = $(libdir)/edje/modules/emotion/$(MODULE_EDJE)
 pkg_LTLIBRARIES = module.la
 
 module_la_SOURCES = emotion.c
-module_la_LIBADD = $(top_builddir)/src/lib/libemotion.la @EDJE_EXTERNAL_LIBS@
+module_la_LIBADD = @EMOTION_LIBS@ $(top_builddir)/src/lib/libemotion.la @EDJE_EXTERNAL_LIBS@
 module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 module_la_LIBTOOLFLAGS = --tag=disable-static
index 0e64559..04fbab5 100644 (file)
@@ -22,7 +22,7 @@ includesdir = $(includedir)/emotion-@VMAJ@
 noinst_HEADERS = emotion_generic.h
 
 em_generic_la_SOURCES = emotion_generic.c
-em_generic_la_LIBADD = $(top_builddir)/src/lib/libemotion.la
+em_generic_la_LIBADD = @EMOTION_LIBS@ @SHM_OPEN_LIBS@ $(top_builddir)/src/lib/libemotion.la
 em_generic_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 em_generic_la_LIBTOOLFLAGS = --tag=disable-static
 em_generic_la_DEPENDENCIES = emotion_generic.h Emotion_Generic_Plugin.h
index fef825e..3672510 100644 (file)
@@ -26,7 +26,7 @@ emotion_alloc.c \
 emotion_fakeeos.c \
 emotion_convert.c
 
-gstreamer_la_LIBADD  = @ECORE_X_LIBS@ @GSTREAMER_LIBS@ @GSTREAMER_INTERFACE_LIBS@ $(top_builddir)/src/lib/libemotion.la
+gstreamer_la_LIBADD  = @EMOTION_LIBS@ @ECORE_X_LIBS@ @GSTREAMER_LIBS@ @GSTREAMER_INTERFACE_LIBS@ $(top_builddir)/src/lib/libemotion.la
 gstreamer_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 gstreamer_la_LIBTOOLFLAGS = --tag=disable-static
 gstreamer_la_DEPENDENCIES = $(top_builddir)/config.h
index 455e393..baf8fec 100644 (file)
@@ -23,7 +23,7 @@ xine_la_SOURCES = \
 emotion_xine.c \
 emotion_xine.h \
 emotion_xine_vo_out.c
-xine_la_LIBADD = @XINE_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread
+xine_la_LIBADD = @EMOTION_LIBS@ @XINE_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread
 xine_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
 xine_la_LIBTOOLFLAGS = --tag=disable-static