Author: lasgouttes
Date: Mon Mar 21 23:30:36 2011
New Revision: 37988
URL: http://www.lyx.org/trac/changeset/37988

Log:
streamline hunspell checking

Modified:
   lyx-devel/trunk/config/spell.m4

Modified: lyx-devel/trunk/config/spell.m4
==============================================================================
--- lyx-devel/trunk/config/spell.m4     Mon Mar 21 23:30:17 2011        (r37987)
+++ lyx-devel/trunk/config/spell.m4     Mon Mar 21 23:30:36 2011        (r37988)
@@ -51,15 +51,10 @@
        test "$with_hunspell" = "no" && lyx_use_hunspell=false
 
        if $lyx_use_hunspell ; then
-       AC_CHECK_HEADERS(hunspell/hunspell.hxx,
-               [lyx_use_hunspell=true; break;],
+         AC_CHECK_HEADERS(hunspell/hunspell.hxx,
+               [AC_SEARCH_LIBS(Hunspell_spell,
+                    [hunspell hunspell-1.2],, [lyx_use_hunspell=false])],
                [lyx_use_hunspell=false])
-
-       if test x$lyx_use_hunspell = xtrue ; then
-               AC_CHECK_LIB(hunspell, main, LIBS="-lhunspell $LIBS", 
lyx_use_hunspell=false)
-               if test x$lyx_use_hunspell = xfalse ; then
-                        AC_CHECK_LIB(hunspell-1.2, main, [LIBS="-lhunspell-1.2 
$LIBS" lyx_use_hunspell=true], lyx_use_hunspell=false)
-               fi
        fi
        AC_MSG_CHECKING([whether to use hunspell])
        if $lyx_use_hunspell ; then
@@ -69,7 +64,6 @@
        else
                AC_MSG_RESULT(no)
        fi
-       fi
        ])
 
 

Reply via email to