summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-05-16 13:23:09 +0800
committerPeng Wu <alexepico@gmail.com>2017-05-16 13:23:09 +0800
commit80cd413400656838023362ad13638d9aa91daf05 (patch)
tree176be39e1a67d8df7542b98ab0fd531a8c3fefdf
parentc96110fd976e92b0f8de0a08a5cb278ef66c664b (diff)
downloadlibpinyin-80cd413400656838023362ad13638d9aa91daf05.zip
libpinyin-80cd413400656838023362ad13638d9aa91daf05.tar.gz
libpinyin-80cd413400656838023362ad13638d9aa91daf05.tar.xz
update autoconf
-rw-r--r--configure.ac25
-rw-r--r--src/Makefile.am2
-rw-r--r--tests/Makefile.am3
3 files changed, 22 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 3d2df33..e5e3fd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,20 +112,30 @@ fi
AM_CONDITIONAL([KYOTOCABINET], [test x"$DBM" = x"KyotoCabinet"])
+# --enable-libzhuyin
+AC_ARG_ENABLE(libzhuyin,
+ AC_HELP_STRING([--enable-libzhuyin],
+ [Support libzhuyin library.]),
+ [enable_libzhuyin=$enableval],
+ [enable_libzhuyin=no]
+)
+AM_CONDITIONAL(ENABLE_LIBZHUYIN, test x"$enable_libzhuyin" = x"yes")
+
+
AC_CONFIG_FILES([libpinyin.pc
libpinyin.spec
- Makefile
+ Makefile
doc/Makefile
- data/Makefile
- src/Makefile
+ data/Makefile
+ src/Makefile
src/include/Makefile
src/storage/Makefile
- src/lookup/Makefile
- tests/Makefile
+ src/lookup/Makefile
+ tests/Makefile
tests/include/Makefile
tests/storage/Makefile
- tests/lookup/Makefile
- utils/Makefile
+ tests/lookup/Makefile
+ utils/Makefile
utils/storage/Makefile
utils/segment/Makefile
utils/training/Makefile
@@ -138,4 +148,5 @@ Build options:
Version $VERSION
Install prefix $prefix
DBM $DBM
+ enable libzhuyin $enable_libzhuyin
])
diff --git a/src/Makefile.am b/src/Makefile.am
index 25c8c3d..fe01097 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,6 +48,7 @@ libpinyin_la_LIBADD = storage/libstorage.la lookup/liblookup.la @GLIB2_LIBS@
libpinyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libpinyin.ver \
-version-info @LT_VERSION_INFO@
+if ENABLE_LIBZHUYIN
lib_LTLIBRARIES += libzhuyin.la
libzhuyin_la_SOURCES = zhuyin.cpp
@@ -56,6 +57,7 @@ libzhuyin_la_LIBADD = storage/libstorage.la lookup/liblookup.la @GLIB2_LIBS@
libzhuyin_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libzhuyin.ver \
-version-info @LT_VERSION_INFO@
+endif
libpinyin_internal_la_SOURCES = pinyin_internal.cpp
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 67f4065..34da2d0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -50,9 +50,10 @@ test_chewing_SOURCES = test_chewing.cpp
test_chewing_LDADD = ../src/libpinyin.la
-
+if ENABLE_LIBZHUYIN
noinst_PROGRAMS += test_zhuyin
test_zhuyin_SOURCES = test_zhuyin.cpp
test_zhuyin_LDADD = ../src/libzhuyin.la
+endif