diff --git a/legacy/emotion/configure.ac b/legacy/emotion/configure.ac index 8ba3355b97..71ee6100ea 100644 --- a/legacy/emotion/configure.ac +++ b/legacy/emotion/configure.ac @@ -29,6 +29,26 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'` version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN" AC_SUBST(version_info) +EFL_EMOTION_BUILD="" +case "$host_os" in + mingw* | cegcc*) + EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD" + ;; +esac +AC_SUBST(EFL_EMOTION_BUILD) + +### Checks for linker characteristics + +# use --enable-auto-import on Windows + +lt_enable_auto_import="" +case "$host_os" in + mingw* | cegcc*) + lt_enable_auto_import="-Wl,--enable-auto-import" + ;; +esac +AC_SUBST(lt_enable_auto_import) + PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9]) PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0]) PKG_CHECK_MODULES(ECORE, [ecore >= 0.9.9 ecore-evas >= 0.9.9 ecore-job >= 0.9.9]) diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h index 04bd444f3f..aa231cc3c4 100644 --- a/legacy/emotion/src/lib/Emotion.h +++ b/legacy/emotion/src/lib/Emotion.h @@ -1,15 +1,22 @@ #ifndef EMOTION_H #define EMOTION_H +#include + #ifdef EAPI -#undef EAPI +# undef EAPI #endif -#ifdef WIN32 -# ifdef BUILDING_DLL -# define EAPI __declspec(dllexport) + +#ifdef _WIN32 +# ifdef EFL_EMOTION_BUILD +# ifdef DLL_EXPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI +# endif /* ! DLL_EXPORT */ # else # define EAPI __declspec(dllimport) -# endif +# endif /* ! EFL_EMOTION_BUILD */ #else # ifdef __GNUC__ # if __GNUC__ >= 4 @@ -20,9 +27,7 @@ # else # define EAPI # endif -#endif - -#include +#endif /* ! _WIN32 */ enum _Emotion_Module { diff --git a/legacy/emotion/src/lib/Makefile.am b/legacy/emotion/src/lib/Makefile.am index 34a4a2e1cf..d2bb4adc78 100644 --- a/legacy/emotion/src/lib/Makefile.am +++ b/legacy/emotion/src/lib/Makefile.am @@ -8,7 +8,8 @@ AM_CPPFLAGS = \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVAS_CFLAGS@ \ -@ECORE_CFLAGS@ +@ECORE_CFLAGS@ \ +@EFL_EMOTION_BUILD@ lib_LTLIBRARIES = libemotion.la include_HEADERS = Emotion.h @@ -18,4 +19,4 @@ emotion_private.h libemotion_la_LIBADD = @EVAS_LIBS@ @ECORE_LIBS@ libemotion_la_DEPENDENCIES = $(top_builddir)/config.h -libemotion_la_LDFLAGS = -version-info @version_info@ +libemotion_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c index 9cd682d0be..c0a188aaa0 100644 --- a/legacy/emotion/src/lib/emotion_smart.c +++ b/legacy/emotion/src/lib/emotion_smart.c @@ -1,5 +1,5 @@ -#include "Emotion.h" #include "emotion_private.h" +#include "Emotion.h" #define E_SMART_OBJ_GET(smart, o, type) \ { \ diff --git a/legacy/emotion/src/modules/gstreamer/Makefile.am b/legacy/emotion/src/modules/gstreamer/Makefile.am index 6aee2e3fb3..533ab0c35c 100644 --- a/legacy/emotion/src/modules/gstreamer/Makefile.am +++ b/legacy/emotion/src/modules/gstreamer/Makefile.am @@ -7,6 +7,7 @@ AM_CPPFLAGS = \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EFL_EMOTION_BUILD@ \ @EVAS_CFLAGS@ \ @ECORE_CFLAGS@ \ @GST_CFLAGS@ @@ -27,7 +28,7 @@ emotion_gstreamer_pipeline_file.c \ emotion_gstreamer_pipeline_uri.c \ emotion_gstreamer_pipeline_v4l.c gstreamer_la_LIBADD = @EVAS_LIBS@ @ECORE_LIBS@ @GST_LIBS@ $(top_builddir)/src/lib/libemotion.la -gstreamer_la_LDFLAGS = -module -avoid-version +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 diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c index 1449819889..943e31f2c7 100644 --- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c +++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c @@ -6,11 +6,10 @@ #include -#include "Emotion.h" #include "emotion_private.h" #include "emotion_gstreamer.h" #include "emotion_gstreamer_pipeline.h" - +#include "Emotion.h" /* Callbacks to get the eos */ static int _eos_timer_fct (void *data); diff --git a/legacy/emotion/src/modules/vlc/Makefile.am b/legacy/emotion/src/modules/vlc/Makefile.am index 842e34f807..f165d684a5 100644 --- a/legacy/emotion/src/modules/vlc/Makefile.am +++ b/legacy/emotion/src/modules/vlc/Makefile.am @@ -22,7 +22,7 @@ vlc_la_SOURCES = \ emotion_vlc.c \ emotion_vlc.h vlc_la_LIBADD = @EVAS_LIBS@ @ECORE_LIBS@ @VLC_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread -vlc_la_LDFLAGS = -module -avoid-version +vlc_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version vlc_la_LIBTOOLFLAGS = --tag=disable-static vlc_la_DEPENDENCIES = $(top_builddir)/config.h diff --git a/legacy/emotion/src/modules/xine/Makefile.am b/legacy/emotion/src/modules/xine/Makefile.am index 6ae4990882..3dfcba7584 100644 --- a/legacy/emotion/src/modules/xine/Makefile.am +++ b/legacy/emotion/src/modules/xine/Makefile.am @@ -23,7 +23,7 @@ emotion_xine.c \ emotion_xine.h \ emotion_xine_vo_out.c xine_la_LIBADD = @EVAS_LIBS@ @ECORE_LIBS@ @XINE_LIBS@ $(top_builddir)/src/lib/libemotion.la -lpthread -xine_la_LDFLAGS = -module -avoid-version +xine_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version xine_la_LIBTOOLFLAGS = --tag=disable-static xine_la_DEPENDENCIES = $(top_builddir)/config.h