diff options
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/PYPPhoneticEditor.h | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 851e94d..b37641a 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,11 @@ PKG_CHECK_MODULES(SQLITE, [ ]) AC_PATH_PROG(SQLITE3, sqlite3) +# check libpinyin +PKG_CHECK_MODULES(LIBPINYIN, [ + libpinyin >= 0.2.0 +]) + # check uuid AC_CHECK_FUNCS([uuid_create], [], [ PKG_CHECK_MODULES(LIBUUID, uuid, [ diff --git a/src/Makefile.am b/src/Makefile.am index 3065410..fd12e0b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -134,6 +134,7 @@ ibus_engine_pinyin_SOURCES = \ ibus_engine_pinyin_CXXFLAGS = \ @IBUS_CFLAGS@ \ @SQLITE_CFLAGS@ \ + @LIBPINYIN_CFLAGS@ \ @OPENCC_CFLAGS@ \ -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ -DPKGDATADIR=\"$(pkgdatadir)\" \ @@ -153,6 +154,7 @@ endif ibus_engine_pinyin_LDADD = \ @IBUS_LIBS@ \ @SQLITE_LIBS@ \ + @LIBPINYIN_LIBS@ \ @OPENCC_LIBS@ \ $(NULL) diff --git a/src/PYPPhoneticEditor.h b/src/PYPPhoneticEditor.h index 3d64bc4..f222557 100644 --- a/src/PYPPhoneticEditor.h +++ b/src/PYPPhoneticEditor.h @@ -21,6 +21,7 @@ #ifndef __PY_LIB_PINYIN_BASE_EDITOR_H_ #define __PY_LIB_PINYIN_BASE_EDITOR_H_ +#include <pinyin.h> #include "PYLookupTable.h" #include "PYEditor.h" #include "PYPinyinParser.h" @@ -81,6 +82,9 @@ protected: String m_buffer; /* use LibPinyinBackEnd here. */ + CandidateConstraints m_constraints; + MatchResults m_match_results; + std::vector<std::string> m_special_phrases; std::string m_selected_special_phrase; }; |