summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2004-02-07 21:21:23 +0000
committerDom Lachowicz <domlachowicz@gmail.com>2004-02-07 21:21:23 +0000
commit0d9176ef44f5ce88cdb2cfcdfbe5383fdb61f7a9 (patch)
tree0175c57cd8c841459dbd0081adae8af8d55c2b09
parentcb2cdef5c8df492520e32af9dc14c2504c4dda51 (diff)
downloadenchant-0d9176ef44f5ce88cdb2cfcdfbe5383fdb61f7a9.tar.gz
fix 6385, as far as i can be bothered with it
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@20913 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r--configure.in13
-rw-r--r--src/myspell/Makefile.am15
2 files changed, 22 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 2c9b4a9..339694c 100644
--- a/configure.in
+++ b/configure.in
@@ -100,8 +100,16 @@ if test "x$with_myspell_dir" != "x" ; then
myspell_dir=$with_myspell_dir
fi
-MYSPELL_CFLAGS="-DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dir\"'"
+with_system_myspell=no
+if test "x$build_myspell" != "xno"; then
+ PKG_CHECK_MODULES(MYSPELL, myspell, with_system_myspell=yes, with_system_myspell=no)
+fi
+AM_CONDITIONAL(WITH_SYSTEM_MYSPELL, test "x$with_system_myspell" = "xyes")
+
+MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dir\"'"
+
AC_SUBST(MYSPELL_CFLAGS)
+AC_SUBST(MYSPELL_LIBS)
check_aspell=yes
build_aspell=no
@@ -238,6 +246,7 @@ $PACKAGE-$VERSION
Build Aspell backend: ${build_aspell}
Build Ispell backend: ${build_ispell}
Build Uspell backend: ${build_uspell}
- Build Myspell backend: ${build_myspell}
Build Hspell backend: ${build_hspell}
+ Build Myspell backend: ${build_myspell}
+ Build against system Myspell: ${with_system_myspell}
"
diff --git a/src/myspell/Makefile.am b/src/myspell/Makefile.am
index afa7949..bd30142 100644
--- a/src/myspell/Makefile.am
+++ b/src/myspell/Makefile.am
@@ -12,8 +12,14 @@ myspell_LTLIBRARIES = $(target_lib)
myspelldir= $(libdir)/enchant
libenchant_myspell_lalibdir=$(libdir)/enchant
-libenchant_myspell_la_LIBADD= $(ENCHANT_LIBS) $(top_builddir)/src/libenchant.la
+libenchant_myspell_la_LIBADD= $(MYSPELL_LIBS) $(ENCHANT_LIBS) $(top_builddir)/src/libenchant.la
libenchant_myspell_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined
+
+if WITH_SYSTEM_MYSPELL
+libenchant_myspell_la_SOURCES = \
+ myspell_checker.cpp \
+ myspell_checker.h
+else
libenchant_myspell_la_SOURCES = \
affentry.cxx \
affentry.hxx \
@@ -26,9 +32,10 @@ libenchant_myspell_la_SOURCES = \
hashmgr.cxx \
hashmgr.hxx \
htypes.hxx \
- myspell_checker.cpp \
- myspell_checker.h \
myspell.cxx \
myspell.hxx \
suggestmgr.cxx \
- suggestmgr.hxx
+ suggestmgr.hxx \
+ myspell_checker.cpp \
+ myspell_checker.h
+endif