summaryrefslogtreecommitdiffstats
path: root/tdespell2/plugins/configure.in.in
diff options
context:
space:
mode:
Diffstat (limited to 'tdespell2/plugins/configure.in.in')
-rw-r--r--tdespell2/plugins/configure.in.in41
1 files changed, 41 insertions, 0 deletions
diff --git a/tdespell2/plugins/configure.in.in b/tdespell2/plugins/configure.in.in
new file mode 100644
index 000000000..8aaf6de2c
--- /dev/null
+++ b/tdespell2/plugins/configure.in.in
@@ -0,0 +1,41 @@
+ AC_ARG_WITH(aspell,AC_HELP_STRING([--with-aspell],[Enable aspell support [default=check]]),[aspell_test="$withval"],[aspell_test="yes"])
+
+ if test "x$aspell_test" = "xyes" ; then
+ AC_LANG_SAVE
+ AC_LANG_C
+ dnl Check for aspell library
+ KDE_CHECK_LIB(aspell, new_aspell_config, [LIBASPELL="-laspell"])
+ KDE_CHECK_HEADER(aspell.h)
+ if test -z "$ac_cv_header_aspell_h"; then
+ echo ""
+ echo "Your libaspell is too old or not installed, I couldn't find aspell.h."
+ echo "You must download aspell >= 0.50.2, see http://aspell.net"
+ echo "Spell-checking with libaspell will not be available, only with ispell dicts."
+ echo ""
+ fi
+ AC_LANG_RESTORE
+ fi
+
+ aspell_datadir="/usr/lib/aspell"
+ if test -f "/usr/bin/pspell-config"; then
+ aspell_datadir=`/usr/bin/pspell-config --pkgdatadir`
+ fi
+
+ AC_DEFINE_UNQUOTED( ASPELL_DATADIR, ["$aspell_datadir"], [Define where aspell data dir is] )
+ AM_CONDITIONAL(include_aspell_plugin, test -n "$ac_cv_header_aspell_h" -a -n "$LIBASPELL")
+
+ AC_ARG_WITH(hspell,AC_HELP_STRING([--with-hspell],[Enable hspell support [default=check]]),[hspell_test="$withval"],[hspell_test="yes"])
+
+ if test "x$hspell_test" = "xyes" ; then
+ AC_LANG_SAVE
+ AC_LANG_C
+ dnl Check for hspell library
+ KDE_CHECK_LIB(hspell, hspell_check_word, [LIBHSPELL="-lhspell"],[],-lz)
+ KDE_CHECK_HEADER(hspell.h)
+ if test "$ac_cv_header_hspell_h" != "yes"; then
+ unset LIBHSPELL
+ fi
+ AC_LANG_RESTORE
+ fi
+
+ AM_CONDITIONAL(include_hspell_plugin, test "$ac_cv_header_hspell_h" = "yes" -a -n "$LIBHSPELL")