summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2006-01-14 20:10:19 +0000
committerDom Lachowicz <domlachowicz@gmail.com>2006-01-14 20:10:19 +0000
commitf45cd394b131d9d1c05398267779102fd691f217 (patch)
treee768387814fab625d59a917da67f7dbd61983b06
parent7f5d852c3116af74620e630a776b6a8e03f8e5c9 (diff)
downloadenchant-f45cd394b131d9d1c05398267779102fd691f217.tar.gz
have the ispell compatibility script look for enchant in rather than assume that it's in the path
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@21090 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r--configure.in1
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/ispell6
-rwxr-xr-xtests/ispell.in25
4 files changed, 31 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index f106836..b2e8271 100644
--- a/configure.in
+++ b/configure.in
@@ -251,6 +251,7 @@ src/myspell/Makefile
src/hspell/Makefile
src/applespell/Makefile
tests/Makefile
+tests/ispell
doc/Makefile
data/Makefile
autopackage/default.apspec
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1807d66..0980415 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
INCLUDES=-I$(top_srcdir)/src $(ENCHANT_CFLAGS)
-EXTRA_DIST=test.pwl ispell
+EXTRA_DIST=test.pwl ispell.in
DEPS= $(top_builddir)/src/libenchant.la
ldadd= $(top_builddir)/src/libenchant.la $(ENCHANT_LIBS)
diff --git a/tests/ispell b/tests/ispell
index 0d1956a..c0b229e 100755
--- a/tests/ispell
+++ b/tests/ispell
@@ -2,6 +2,8 @@
# Ispell compatibility script for Enchant
+exec_prefix=/usr
+bindir=${exec_prefix}/bin
command=""
for p
@@ -15,8 +17,8 @@ done
case $command in
-A|-c|-e*|-d) echo "Enchant does not support the $command mode.";;
--a|-l|-v* ) exec enchant "$@" ;;
-"-" ) exec enchant "$@" ;;
+-a|-l|-v* ) exec ${bindir}/enchant "$@" ;;
+"-" ) exec ${bindir}/enchant "$@" ;;
* ) echo "Ispell compatibility script for Enchant."
echo "Usage: $0 [options] -a|-l|-v[v]|<file>"
exit 1 ;;
diff --git a/tests/ispell.in b/tests/ispell.in
new file mode 100755
index 0000000..0346c09
--- /dev/null
+++ b/tests/ispell.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Ispell compatibility script for Enchant
+
+exec_prefix=@prefix@
+bindir=${exec_prefix}/bin
+command=""
+
+for p
+do
+ case $p in
+ -a|-A|-l|-c|-e*|-v*|-D) command=$p ;;
+ -* ) ;;
+ * ) command=${command:="-"} ;;
+ esac
+done
+
+case $command in
+-A|-c|-e*|-d) echo "Enchant does not support the $command mode.";;
+-a|-l|-v* ) exec ${bindir}/enchant "$@" ;;
+"-" ) exec ${bindir}/enchant "$@" ;;
+* ) echo "Ispell compatibility script for Enchant."
+ echo "Usage: $0 [options] -a|-l|-v[v]|<file>"
+ exit 1 ;;
+esac