Fix help string for --enable-gui.
[m17n/m17n-lib.git] / example / Makefile.am
index a74b64c..1fd9b4d 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile.am -- example level Makefile for the m17n library.
-# Copyright (C) 2003, 2004
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010
 #   National Institute of Advanced Industrial Science and Technology (AIST)
 #   Registration Number H15PRO112
 
 
 # You should have received a copy of the GNU Lesser General Public
 # License along with the m17n library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307, USA.
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 
 ## Process this file with Automake to create Makefile.in
 
 ## Note: Source files have preifx "m" but executables have prefix
 ## "m17n-" to avoid confliction of program names.
 
-bin_PROGRAMS = m17n-conv m17n-view m17n-date m17n-dump m17n-edit
+BASICPROGS = m17n-conv
+if WITH_GUI
+bin_PROGRAMS = $(BASICPROGS) m17n-view m17n-date m17n-dump m17n-edit
+else
+bin_PROGRAMS = $(BASICPROGS)
+endif
 
-common_ldflags = ${top_srcdir}/src/libm17n-core.la ${top_srcdir}/src/libm17n.la
-common_ldflags_gui = ${common_ldflags} ${top_srcdir}/src/libm17n-gui.la
+common_ldflags = ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la
+common_ldflags_gui = ${common_ldflags} ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
+AM_CPPFLAGS=@CONFIG_FLAGS@
 
 m17n_date_SOURCES = mdate.c
 m17n_date_LDADD = ${common_ldflags}
@@ -36,7 +42,7 @@ m17n_date_LDADD = ${common_ldflags}
 m17n_conv_SOURCES = mconv.c
 m17n_conv_LDADD = ${common_ldflags}
 
-X_LD_FLAGS = ${X_PRE_LIBS} ${X_LIBS} @XAW_LD_FLAGS@ -lXmu -lXt -lX11 ${X_EXTRA_LIBS}
+X_LD_FLAGS = ${X_PRE_LIBS} ${X_LIBS} @XAW_LD_FLAGS@ @X11_LD_FLAGS@ ${X_EXTRA_LIBS}
 
 m17n_edit_SOURCES = medit.c
 m17n_edit_LDADD = ${X_LD_FLAGS} ${common_ldflags_gui} -ldl
@@ -57,19 +63,26 @@ EXTRA_DIST = \
 
 # External modules used by the above input methods.
 
-VINFO = -version-info @API_VERSION@
+moduledir = ${libdir}/@M17N_MODULE_DIR@
 
-lib_LTLIBRARIES = libmimx-ispell.la libmimx-anthy.la
+BASICBUILDS = libmimx-anthy.la
+if WITH_GUI
+BUILD_LIBS = $(BASICBUILDS) libmimx-ispell.la 
+else
+BUILD_LIBS = $(BASICBUILDS)
+endif
+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
 
-# Special targets to test the m17n library with Purify.  They are for
-# the maintainers only.
+if MAINTAINER_MODE
+
+# Special targets to test the m17n library with Purify.
 
 PURIFY=/usr/local/rational/releases/purify.sol.2002.05.00/purify
 
@@ -79,3 +92,4 @@ purify_medit: medit ../src/.libs/libm17n-core.so ../src/.libs/libm17n.so ../src/
 purify_mdate: mdate.o ../src/.libs/libm17n.so ../src/.libs/libm17n-X.so
        ${PURIFY} gcc -g mdate.o -lXaw -lXmu -L/usr/X11R6/lib -R/usr/X11R6/lib -lSM -lICE -lX11 -lXt -L../src/.libs -lm17n -lm17n-X -ldl
 
+endif