From a482753491e400c08cd9540f3e821d45d0e1eee6 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 18 Feb 2010 07:39:56 +0000 Subject: [PATCH] Build modules dynamically loaded with -avoid-version and no -version-info. --- example/Makefile.am | 8 ++++---- src/Makefile.am | 13 +++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/example/Makefile.am b/example/Makefile.am index baceac3..5266569 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -63,7 +63,7 @@ EXTRA_DIST = \ # External modules used by the above input methods. -VINFO = -version-info @API_VERSION@ +moduledir = ${libdir}/@M17N_MODULE_DIR@ BASICBUILDS = libmimx-anthy.la if WITH_GUI @@ -71,14 +71,14 @@ BUILD_LIBS = $(BASICBUILDS) libmimx-ispell.la else BUILD_LIBS = $(BASICBUILDS) endif -lib_LTLIBRARIES = $(BUILD_LIBS) +module_LTLIBRARIES = $(BUILD_LIBS) libmimx_ispell_la_SOURCES = mimx-ispell.c libmimx_ispell_la_LIBADD = ${common_ldflags_gui} -libmimx_ispell_la_LDFLAGS = -module ${VINFO} +libmimx_ispell_la_LDFLAGS = -avoid-version -module libmimx_anthy_la_SOURCES = mimx-anthy.c libmimx_anthy_la_LIBADD = ${common_ldflags} @ANTHY_LD_FLAGS@ -libmimx_anthy_la_LDFLAGS = -module ${VINFO} +libmimx_anthy_la_LDFLAGS = -avoid-version -module if MAINTAINER_MODE diff --git a/src/Makefile.am b/src/Makefile.am index 4c282a9..241a295 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ VINFO = -version-info @API_VERSION@ BASICBUILDS = libm17n-core.la libm17n.la libm17n-flt.la if WITH_GUI -BUILD_LIBS = $(BASICBUILDS) libm17n-gui.la libm17n-X.la libm17n-gd.la +BUILD_LIBS = $(BASICBUILDS) libm17n-gui.la else BUILD_LIBS = $(BASICBUILDS) endif @@ -83,18 +83,23 @@ libm17n_gui_la_SOURCES = ${GUI_SOURCES} libm17n_gui_la_LIBADD = ${OPTIONAL_LD_FLAGS} ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la libm17n_gui_la_LDFLAGS = -export-dynamic ${VINFO} +if WITH_GUI + +moduledir = ${libdir}/@M17N_MODULE_DIR@ +module_LTLIBRARIES = libm17n-X.la libm17n-gd.la X_LD_FLAGS = ${X_PRE_LIBS} ${X_LIBS} @X11_LD_FLAGS@ ${X_EXTRA_LIBS} libm17n_X_la_SOURCES = m17n-X.h m17n-X.c libm17n_X_la_LIBADD = ${X_LD_FLAGS} @XFT2_LD_FLAGS@ ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la -libm17n_X_la_LDFLAGS = -module ${VINFO} +libm17n_X_la_LDFLAGS = -avoid-version -module libm17n_gd_la_SOURCES = m17n-gd.c libm17n_gd_la_LIBADD = @GD_LD_FLAGS@ @FREETYPE_LD_FLAGS@ ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la -libm17n_gd_la_LDFLAGS = -module ${VINFO} +libm17n_gd_la_LDFLAGS = -avoid-version -module -AM_CPPFLAGS = -DM17NDIR=\"@M17NDIR@\" -DGETTEXTDIR=\"@GETTEXTDIR@\" +endif +AM_CPPFLAGS = -DM17NDIR=\"@M17NDIR@\" -DM17N_MODULE_DIR=\"${libdir}/@M17N_MODULE_DIR@\" -DGETTEXTDIR=\"@GETTEXTDIR@\" BASICHEADERS = m17n-core.h m17n.h m17n-misc.h m17n-flt.h if WITH_GUI -- 1.7.10.4