summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2003-09-06 02:25:13 +0000
committerDom Lachowicz <domlachowicz@gmail.com>2003-09-06 02:25:13 +0000
commit6243109b21d0e33a19a427690a98300759c64122 (patch)
tree60b9af4d428fd2560b4e727ff7950869fdafe3c2
parentad5d9d3b1319a1ea7eab0d4633d2eab7081ed9b4 (diff)
downloadenchant-6243109b21d0e33a19a427690a98300759c64122.tar.gz
hopefully better aspell configure checks
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@20845 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r--configure.in31
1 files changed, 27 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index f3a4b7b..9ae0012 100644
--- a/configure.in
+++ b/configure.in
@@ -120,10 +120,33 @@ if test "x$check_aspell" != "xno"; then
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`\"'"
+ aspell_prefix=${prefix}
+ if test "x$prefix" = "xNONE"; then
+ aspell_prefix="/usr/local"
+ fi
+
+ AC_CHECK_PROG(HAVE_ASPELL, aspell, yes, no)
+ if test "x$HAVE_ASPELL" = "xyes"; then
+ #perl -e 'if (<STDIN> =~ /(.*) Aspell 0\.(.*)\.(.*)/) { print "$2\n"; } else { print "0\n"; }'`;
+ AC_MSG_CHECKING([For Aspell >= 0.50.0])
+ aspell_major=`aspell -v | awk -F. '{print $4;}'`
+ if test "$aspell_major" -ge "50"; then
+ 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`\"'"
+
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+
+ if test "x$ASPELL_DICT_DIR" = "x"; then
+ AC_MSG_WARN([Didn't find aspell >= 0.50.0 and no explicit path aspell specified. Guessing at $aspell_prefix])
+ ASPELL_LIBS="-L$aspell_prefix/lib -laspell"
+ ASPELL_DICT_DIR="\"$aspell_prefix/lib/aspell\""
+ fi
fi
AC_CHECK_LIB(aspell,new_aspell_config,build_aspell=yes,AC_MSG_WARN([Enchant building without the aspell library]),)