]> git.lyx.org Git - lyx.git/blobdiff - config/pspell.m4
make "make distcheck" work
[lyx.git] / config / pspell.m4
index 08b0f8b4d5c77daf0c3969d391b98bc82d308ee3..2b803dc1115f2060d696f2f9a20eeb4b9d747009 100644 (file)
@@ -1,29 +1,29 @@
 # Macro to add for using pspell spellchecker libraries!     -*- sh -*-
 # @author@: Jürgen Vigna
 
-AC_DEFUN(CHECK_WITH_PSPELL,
+AC_DEFUN([CHECK_WITH_PSPELL],
 [
-    AC_MSG_CHECKING([for pspell support])
     AC_ARG_WITH(pspell,
        AC_HELP_STRING([--with-pspell],[use PSpell libraries]),
        [
            case "$withval" in
-               y*) USE_PSPELL="yes";;
-               *) USE_PSPELL="no";;
+               y*) USING_PSPELL="yes";;
+               *) USING_PSPELL="no";;
            esac
            ],
        [
-           USE_PSPELL="yes"
+           USING_PSPELL="yes"
            ])
 
-    if test "$USE_PSPELL" = "yes" ; then
-       AC_CHECK_HEADERS(pspell/pspell.h, break, USE_PSPELL=no)
-       AC_CHECK_LIB(pspell, new_pspell_config)
+    if test "$USING_PSPELL" = "yes" ; then
+       AC_CHECK_HEADERS(pspell/pspell.h, USING_PSPELL="yes", USING_PSPELL="no")
+       AC_CHECK_LIB(pspell, main, LIBS="-lpspell $LIBS"; USING_PSPELL="yes", USING_PSPELL="no")
 
-       if test "$USE_PSPELL" = "yes"; then
+       if test "$USING_PSPELL" = "yes"; then
            AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
            lyx_flags="$lyx_flags use-pspell"
        fi
     fi
-    AC_MSG_RESULT($USE_PSPELL)
+    AC_MSG_CHECKING([whether to use pspell])
+    AC_MSG_RESULT($USING_PSPELL)
     ])