diff options
author | Peng Wu <alexepico@gmail.com> | 2012-10-08 13:46:05 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-10-08 13:46:05 +0800 |
commit | cbef61619838758394a80a23fef064c73453fe4a (patch) | |
tree | 204ceefb61b0242c89db5c6426b0f11c19dcce07 /src | |
parent | 05a4b696ecf2267e766f918c123756ff98e45df3 (diff) | |
download | ibus-libpinyin-cbef61619838758394a80a23fef064c73453fe4a.tar.gz ibus-libpinyin-cbef61619838758394a80a23fef064c73453fe4a.tar.bz2 ibus-libpinyin-cbef61619838758394a80a23fef064c73453fe4a.zip |
detect libpinyin datadir
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/PYLibPinyin.cc | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 2ea0fe6..fe986fc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -159,7 +159,10 @@ ibus_engine_libpinyin_LDADD += $(LIBUUID_LIBS) endif if IBUS_BUILD_LIBPINYIN - ibus_engine_libpinyin_CXXFLAGS += -DIBUS_BUILD_LIBPINYIN + ibus_engine_libpinyin_CXXFLAGS += \ + -DIBUS_BUILD_LIBPINYIN \ + -DLIBPINYIN_DATADIR=\"@LIBPINYIN_DATADIR@\/data\" \ + $(NULL) endif if IBUS_BUILD_LUA_EXTENSION diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc index eb2b937..f1854ba 100644 --- a/src/PYLibPinyin.cc +++ b/src/PYLibPinyin.cc @@ -64,7 +64,7 @@ LibPinyinBackEnd::initPinyinContext (Config *config) if (retval) { g_free(userdir); userdir = NULL; } - context = pinyin_init ("/usr/share/libpinyin/data", userdir); + context = pinyin_init (LIBPINYIN_DATADIR, userdir); g_free (userdir); const char *dicts = config->dictionaries ().c_str (); @@ -110,7 +110,7 @@ LibPinyinBackEnd::initChewingContext (Config *config) if (retval) { g_free(userdir); userdir = NULL; } - context = pinyin_init ("/usr/share/libpinyin/data", userdir); + context = pinyin_init (LIBPINYIN_DATADIR, userdir); g_free(userdir); const char *dicts = config->dictionaries ().c_str (); |