Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread Jean-Marc Lasgouttes

Le 09/03/2011 19:18, Stephan Witt a écrit :

Am 09.03.2011 um 18:12 schrieb Jean-Marc Lasgouttes:


Le 09/03/2011 16:40, sw...@lyx.org a écrit :

Author: switt
Date: Wed Mar  9 16:40:03 2011
New Revision: 37887
URL: http://www.lyx.org/trac/changeset/37887

Log:
do not check for hunspell libraries if header is not present


Is it the patch you intended to commit?


Yes, this one I've posted and tested. Why do you ask?


I still think that mine is a useful cleanup, although functionally
equivalent. I thought this was the one José tested.

JMarc


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread José Matos
On Thursday 10 March 2011 09:36:02 Jean-Marc Lasgouttes wrote:
  Yes, this one I've posted and tested. Why do you ask?
 
 I still think that mine is a useful cleanup, although functionally
 equivalent. I thought this was the one José tested.
 
 JMarc

Actually I tested Stephan's.

FWIW at the time that I read your message it looked like you forgot to attach 
the patch. So in the original thread I only saw Stephan's patch and not yours.

I assume that my mind could have been playing tricks with me... it is always a 
possibility. :-)

-- 
José Abílio


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread Jean-Marc Lasgouttes

Le 10/03/2011 13:50, José Matos a écrit :

FWIW at the time that I read your message it looked like you forgot to attach
the patch. So in the original thread I only saw Stephan's patch and not yours.


What a diplomatic way to tell me that I again forgot about the most 
important part :)


OK, here is it now.

JMarc

Index: config/spell.m4
===
--- config/spell.m4	(révision 37898)
+++ config/spell.m4	(copie de travail)
@@ -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
 	])
 
 


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread José Matos
On Thursday 10 March 2011 17:55:04 Jean-Marc Lasgouttes wrote:
 What a diplomatic way to tell me that I again forgot about the most 
 important part :)

Diplomat is my middle name. ;-)

Your patch works here and I agree that it is nicer then the one it is now. :-)

Happy? :-)

 OK, here is it now.
 
 JMarc

-- 
José Abílio


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread Jean-Marc Lasgouttes

Le 10/03/11 20:45, José Matos a écrit :

Your patch works here and I agree that it is nicer then the one it is now. :-)

Happy? :-)


Yes, but what's the catch?

JMarc


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread Jean-Marc Lasgouttes

Le 09/03/2011 19:18, Stephan Witt a écrit :

Am 09.03.2011 um 18:12 schrieb Jean-Marc Lasgouttes:


Le 09/03/2011 16:40, sw...@lyx.org a écrit :

Author: switt
Date: Wed Mar  9 16:40:03 2011
New Revision: 37887
URL: http://www.lyx.org/trac/changeset/37887

Log:
do not check for hunspell libraries if header is not present


Is it the patch you intended to commit?


Yes, this one I've posted and tested. Why do you ask?


I still think that mine is a useful cleanup, although functionally
equivalent. I thought this was the one José tested.

JMarc


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread José Matos
On Thursday 10 March 2011 09:36:02 Jean-Marc Lasgouttes wrote:
> > Yes, this one I've posted and tested. Why do you ask?
> 
> I still think that mine is a useful cleanup, although functionally
> equivalent. I thought this was the one José tested.
> 
> JMarc

Actually I tested Stephan's.

FWIW at the time that I read your message it looked like you forgot to attach 
the patch. So in the original thread I only saw Stephan's patch and not yours.

I assume that my mind could have been playing tricks with me... it is always a 
possibility. :-)

-- 
José Abílio


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread Jean-Marc Lasgouttes

Le 10/03/2011 13:50, José Matos a écrit :

FWIW at the time that I read your message it looked like you forgot to attach
the patch. So in the original thread I only saw Stephan's patch and not yours.


What a diplomatic way to tell me that I again forgot about the most 
important part :)


OK, here is it now.

JMarc

Index: config/spell.m4
===
--- config/spell.m4	(révision 37898)
+++ config/spell.m4	(copie de travail)
@@ -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
 	])
 
 


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread José Matos
On Thursday 10 March 2011 17:55:04 Jean-Marc Lasgouttes wrote:
> What a diplomatic way to tell me that I again forgot about the most 
> important part :)

Diplomat is my middle name. ;-)

Your patch works here and I agree that it is nicer then the one it is now. :-)

Happy? :-)

> OK, here is it now.
> 
> JMarc

-- 
José Abílio


Re: r37887 - lyx-devel/trunk/config

2011-03-10 Thread Jean-Marc Lasgouttes

Le 10/03/11 20:45, José Matos a écrit :

Your patch works here and I agree that it is nicer then the one it is now. :-)

Happy? :-)


Yes, but what's the catch?

JMarc


Re: r37887 - lyx-devel/trunk/config

2011-03-09 Thread Stephan Witt
Am 09.03.2011 um 18:12 schrieb Jean-Marc Lasgouttes:

 Le 09/03/2011 16:40, sw...@lyx.org a écrit :
 Author: switt
 Date: Wed Mar  9 16:40:03 2011
 New Revision: 37887
 URL: http://www.lyx.org/trac/changeset/37887
 
 Log:
 do not check for hunspell libraries if header is not present
 
 Is it the patch you intended to commit?

Yes, this one I've posted and tested. Why do you ask?

Stephan

Re: r37887 - lyx-devel/trunk/config

2011-03-09 Thread Stephan Witt
Am 09.03.2011 um 18:12 schrieb Jean-Marc Lasgouttes:

> Le 09/03/2011 16:40, sw...@lyx.org a écrit :
>> Author: switt
>> Date: Wed Mar  9 16:40:03 2011
>> New Revision: 37887
>> URL: http://www.lyx.org/trac/changeset/37887
>> 
>> Log:
>> do not check for hunspell libraries if header is not present
> 
> Is it the patch you intended to commit?

Yes, this one I've posted and tested. Why do you ask?

Stephan