# 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
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
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
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