diff options
author | Dom Lachowicz <domlachowicz@gmail.com> | 2003-08-26 02:12:42 +0000 |
---|---|---|
committer | Dom Lachowicz <domlachowicz@gmail.com> | 2003-08-26 02:12:42 +0000 |
commit | 0c11655aae5bf8f810bd94c5928033df6f9db942 (patch) | |
tree | c3cd1e83c56f0d76eadc6c325f956307499e9817 | |
parent | 5eca7c0792d789a474a1d4bfca08843ecc5a00ee (diff) | |
download | enchant-0c11655aae5bf8f810bd94c5928033df6f9db942.tar.gz |
much improved aspell detection checks, based on the ones in gnome-spell
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@20818 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r-- | configure.in | 46 | ||||
-rw-r--r-- | src/aspell/Makefile.am | 6 |
2 files changed, 33 insertions, 19 deletions
diff --git a/configure.in b/configure.in index d088340..f5c476f 100644 --- a/configure.in +++ b/configure.in @@ -103,25 +103,39 @@ fi MYSPELL_CFLAGS="-DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dict_dir\"'" AC_SUBST(MYSPELL_CFLAGS) -check_pspell=yes - -AC_ARG_ENABLE(pspell, [ --disable-pspell enable the pspell backend [default=auto]], check_pspell="$enableval", check_pspell=yes) - -build_pspell=no - -if test "x$check_pspell" != "xno"; then - AC_CHECK_LIB(pspell, pspell_manager_add_to_personal, - [build_pspell=yes - PSPELL_LIBS=-lpspell AC_SUBST(PSPELL_LIBS)]) +check_aspell=yes +build_aspell=no + +AC_ARG_ENABLE(aspell, [ --disable-aspell enable the aspell backend [default=auto]], check_aspell="$enableval", check_aspell=yes) + +AC_ARG_WITH(aspell-prefix, [ --with-aspell-prefix=DIR + specify under which prefix aspell is installed.], with_aspell_prefix="$withval", ) + +if test "x$check_aspell" != "xno"; then + if test "x$with_aspell_prefix" != "x"; then + saved_LDFLAGS=$LDFLAGS + LDFLAGS="-L$with_aspell_prefix/lib "$LDFLAGS + ASPELL_INC="-I$with_aspell_prefix/include" + ASPELL_LIBS="-L$with_aspell_prefix/lib -laspell" + ASPELL_DICT_DIR="'\"$with_aspell_prefix/lib/aspell\"'" + else + LDFLAGS="-L`aspell config prefix`/lib "$LDFLAGS + ASPELL_INC="-I`aspell config prefix`/include" + ASPELL_LIBS="-L`aspell config prefix`/lib -laspell" + ASPELL_DICT_DIR="'\"`aspell config dict-dir`\"'" + fi - if test "$build_pspell" = "no"; then - AC_CHECK_LIB(aspell, aspell_speller_add_to_personal, - [build_pspell=yes - PSPELL_LIBS=-laspell AC_SUBST(PSPELL_LIBS)]) + AC_CHECK_LIB(aspell,new_aspell_config,build_aspell=yes,AC_MSG_WARN([Enchant building without the aspell library]),) + if test "x$with_aspell_prefix" != "x"; then + LDFLAGS=$saved_LDFLAGS fi + + AC_SUBST(ASPELL_INC) + AC_SUBST(ASPELL_LIBS) + AC_SUBST(ASPELL_DICT_DIR) fi -AM_CONDITIONAL(WITH_PSPELL, test "$build_pspell" = yes) +AM_CONDITIONAL(WITH_ASPELL, test "$build_aspell" = yes) build_uspell=no @@ -168,7 +182,7 @@ $PACKAGE-$VERSION prefix: ${prefix} compiler: ${CC} - Build Aspell/Pspell backend: ${build_pspell} + Build Aspell backend: ${build_aspell} Build Ispell backend: ${build_ispell} Build Uspell backend: ${build_uspell} Build Myspell backend: ${build_myspell} diff --git a/src/aspell/Makefile.am b/src/aspell/Makefile.am index 9b23e7e..36c61a2 100644 --- a/src/aspell/Makefile.am +++ b/src/aspell/Makefile.am @@ -1,15 +1,15 @@ -if WITH_PSPELL +if WITH_ASPELL target_lib = libenchant_aspell.la else target_lib = endif -INCLUDES=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) -D_ENCHANT_BUILD=1 +INCLUDES=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) -I@ASPELL_INC@ -D_ENCHANT_BUILD=1 -DASPELL_DICT_DIR=@ASPELL_DICT_DIR@ aspell_LTLIBRARIES = $(target_lib) aspelldir= $(libdir)/enchant -libenchant_aspell_la_LIBADD= $(ENCHANT_LIBS) $(PSPELL_LIBS) $(top_builddir)/src/libenchant.la +libenchant_aspell_la_LIBADD= $(ENCHANT_LIBS) $(ASPELL_LIBS) $(top_builddir)/src/libenchant.la libenchant_aspell_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined libenchant_aspell_la_SOURCES = aspell_provider.c libenchant_aspell_lalibdir=$(libdir)/enchant |