summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-02-17 17:28:43 +0800
committerPeng Wu <alexepico@gmail.com>2013-02-17 17:31:26 +0800
commita8421c0fb6a25e4af628d43841cbb8b7cca81997 (patch)
treed9e86d4c93d7236cd0c4650b57271d822c503798
parent8c8eabf8451c91635edf4cf48b20bc59210037ef (diff)
downloadlibpinyin-a8421c0fb6a25e4af628d43841cbb8b7cca81997.zip
libpinyin-a8421c0fb6a25e4af628d43841cbb8b7cca81997.tar.gz
libpinyin-a8421c0fb6a25e4af628d43841cbb8b7cca81997.tar.xz
Fixes issue reported by fundawang:
https://github.com/libpinyin/libpinyin/issues/33 merge libpinyin-0.8.0-link.patch.
-rw-r--r--configure.ac8
-rw-r--r--src/Makefile.am4
-rw-r--r--src/lookup/Makefile.am2
-rw-r--r--src/storage/Makefile.am2
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/include/Makefile.am2
-rw-r--r--tests/lookup/Makefile.am6
-rw-r--r--tests/storage/Makefile.am16
-rw-r--r--utils/segment/Makefile.am6
-rw-r--r--utils/storage/Makefile.am10
-rw-r--r--utils/training/Makefile.am28
11 files changed, 42 insertions, 50 deletions
diff --git a/configure.ac b/configure.ac
index e32e1cf..71c79ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,14 +51,6 @@ AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
# Checks for libraries.
PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= 2.4.0])
-GLIB2_CPPFLAGS=`$PKG_CONFIG --cflags glib-2.0`
-
-AC_SUBST(GLIB2_CPPFLAGS)
-
-GLIB2_LDFLAGS=`$PKG_CONFIG --libs glib-2.0`
-
-AC_SUBST(GLIB2_LDFLAGS)
-
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([locale.h stdlib.h string.h sys/time.h unistd.h])
diff --git a/src/Makefile.am b/src/Makefile.am
index 5ac2c6f..5600c86 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,7 +30,7 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
libpinyinincludedir = $(includedir)/libpinyin-@VERSION@
@@ -44,7 +44,7 @@ noinst_LTLIBRARIES = libpinyin_internal.la
libpinyin_la_SOURCES = pinyin.cpp
-libpinyin_la_LIBADD = storage/libstorage.la lookup/liblookup.la
+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@
diff --git a/src/lookup/Makefile.am b/src/lookup/Makefile.am
index 3f15a99..00d7df4 100644
--- a/src/lookup/Makefile.am
+++ b/src/lookup/Makefile.am
@@ -19,7 +19,7 @@ MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/storage \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
noinst_HEADERS = lookup.h \
pinyin_lookup2.h \
diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am
index 322a9b5..4a2f1f8 100644
--- a/src/storage/Makefile.am
+++ b/src/storage/Makefile.am
@@ -17,7 +17,7 @@
INCLUDES = -I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/storage \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
libpinyinincludedir = $(includedir)/libpinyin-@VERSION@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 84b4518..8208214 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,7 +28,7 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
noinst_HEADERS = timer.h \
tests_helper.h
@@ -39,12 +39,12 @@ noinst_PROGRAMS = test_pinyin \
test_pinyin_SOURCES = test_pinyin.cpp
-test_pinyin_LDADD = ../src/libpinyin.la @GLIB2_LDFLAGS@
+test_pinyin_LDADD = ../src/libpinyin.la @GLIB2_LIBS@
test_phrase_SOURCES = test_phrase.cpp
-test_phrase_LDADD = ../src/libpinyin.la @GLIB2_LDFLAGS@
+test_phrase_LDADD = ../src/libpinyin.la @GLIB2_LIBS@
test_chewing_SOURCES = test_chewing.cpp
-test_chewing_LDADD = ../src/libpinyin.la @GLIB2_LDFLAGS@
+test_chewing_LDADD = ../src/libpinyin.la @GLIB2_LIBS@
diff --git a/tests/include/Makefile.am b/tests/include/Makefile.am
index 656c665..7174bec 100644
--- a/tests/include/Makefile.am
+++ b/tests/include/Makefile.am
@@ -19,7 +19,7 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
TESTS = test_memory_chunk
diff --git a/tests/lookup/Makefile.am b/tests/lookup/Makefile.am
index f0eb408..4bcc176 100644
--- a/tests/lookup/Makefile.am
+++ b/tests/lookup/Makefile.am
@@ -20,15 +20,15 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
-I$(top_srcdir)/tests \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
noinst_PROGRAMS = test_pinyin_lookup \
test_phrase_lookup
test_pinyin_lookup_SOURCES = test_pinyin_lookup.cpp
-test_pinyin_lookup_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+test_pinyin_lookup_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
test_phrase_lookup_SOURCES = test_phrase_lookup.cpp
-test_phrase_lookup_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@ \ No newline at end of file
+test_phrase_lookup_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@ \ No newline at end of file
diff --git a/tests/storage/Makefile.am b/tests/storage/Makefile.am
index df20f67..7b03120 100644
--- a/tests/storage/Makefile.am
+++ b/tests/storage/Makefile.am
@@ -20,7 +20,7 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
-I$(top_srcdir)/tests \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
TESTS = test_phrase_index_logger \
test_ngram \
@@ -37,30 +37,30 @@ noinst_PROGRAMS = test_phrase_index \
test_phrase_index_SOURCES = test_phrase_index.cpp
-test_phrase_index_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+test_phrase_index_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
test_phrase_index_logger_SOURCES = test_phrase_index_logger.cpp
test_phrase_index_logger_LDADD = ../../src/libpinyin_internal.la \
- @GLIB2_LDFLAGS@
+ @GLIB2_LIBS@
test_phrase_table_SOURCES = test_phrase_table.cpp
-test_phrase_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+test_phrase_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
test_ngram_SOURCES = test_ngram.cpp
-test_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+test_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
test_flexible_ngram_SOURCES = test_flexible_ngram.cpp
test_flexible_ngram_LDADD = ../../src/libpinyin_internal.la \
- @GLIB2_LDFLAGS@
+ @GLIB2_LIBS@
test_parser2_SOURCES = test_parser2.cpp
-test_parser2_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+test_parser2_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
test_chewing_table_SOURCES = test_chewing_table.cpp
-test_chewing_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+test_chewing_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
diff --git a/utils/segment/Makefile.am b/utils/segment/Makefile.am
index 184b7af..5315266 100644
--- a/utils/segment/Makefile.am
+++ b/utils/segment/Makefile.am
@@ -22,14 +22,14 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
-I$(top_srcdir)/utils \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
noinst_PROGRAMS = spseg ngseg
spseg_SOURCES = spseg.cpp
-spseg_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+spseg_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
ngseg_SOURCES = ngseg.cpp
-ngseg_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+ngseg_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
diff --git a/utils/storage/Makefile.am b/utils/storage/Makefile.am
index 944d647..321f426 100644
--- a/utils/storage/Makefile.am
+++ b/utils/storage/Makefile.am
@@ -20,7 +20,7 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
-I$(top_srcdir)/utils \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
bin_PROGRAMS = gen_binary_files \
import_interpolation
@@ -30,16 +30,16 @@ noinst_PROGRAMS = export_interpolation \
gen_binary_files_SOURCES = gen_binary_files.cpp
-gen_binary_files_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+gen_binary_files_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
import_interpolation_SOURCES = import_interpolation.cpp
-import_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+import_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
export_interpolation_SOURCES = export_interpolation.cpp
-export_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+export_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
gen_chewing_table_SOURCES = gen_chewing_table.cpp
-gen_chewing_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+gen_chewing_table_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
diff --git a/utils/training/Makefile.am b/utils/training/Makefile.am
index 58119aa..dc834ec 100644
--- a/utils/training/Makefile.am
+++ b/utils/training/Makefile.am
@@ -22,7 +22,7 @@ INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/storage \
-I$(top_srcdir)/src/lookup \
-I$(top_srcdir)/utils \
- @GLIB2_CPPFLAGS@
+ @GLIB2_CFLAGS@
noinst_HEADERS = k_mixture_model.h
@@ -43,55 +43,55 @@ noinst_PROGRAMS = gen_ngram \
gen_ngram_SOURCES = gen_ngram.cpp
-gen_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+gen_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
gen_deleted_ngram_SOURCES = gen_deleted_ngram.cpp
-gen_deleted_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+gen_deleted_ngram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
gen_unigram_SOURCES = gen_unigram.cpp
-gen_unigram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+gen_unigram_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
gen_k_mixture_model_SOURCES = gen_k_mixture_model.cpp
-gen_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+gen_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
estimate_interpolation_SOURCES = estimate_interpolation.cpp
-estimate_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+estimate_interpolation_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
estimate_k_mixture_model_SOURCES = estimate_k_mixture_model.cpp
estimate_k_mixture_model_LDADD = ../../src/libpinyin_internal.la \
- @GLIB2_LDFLAGS@
+ @GLIB2_LIBS@
merge_k_mixture_model_SOURCES = merge_k_mixture_model.cpp
-merge_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+merge_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
prune_k_mixture_model_SOURCES = prune_k_mixture_model.cpp
-prune_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+prune_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
import_k_mixture_model_SOURCES = import_k_mixture_model.cpp
-import_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+import_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
export_k_mixture_model_SOURCES = export_k_mixture_model.cpp
-export_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+export_k_mixture_model_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
k_mixture_model_to_interpolation_SOURCES = k_mixture_model_to_interpolation.cpp
k_mixture_model_to_interpolation_LDADD = ../../src/libpinyin_internal.la \
- @GLIB2_LDFLAGS@
+ @GLIB2_LIBS@
validate_k_mixture_model_SOURCES = validate_k_mixture_model.cpp
validate_k_mixture_model_LDADD = ../../src/libpinyin_internal.la \
- @GLIB2_LDFLAGS@
+ @GLIB2_LIBS@
eval_correction_rate_SOURCES = eval_correction_rate.cpp
-eval_correction_rate_LDADD = ../../src/libpinyin_internal.la @GLIB2_LDFLAGS@
+eval_correction_rate_LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@