Revision: 769 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=769&view=rev Author: hyperair Date: 2009-06-22 09:59:02 +0000 (Mon, 22 Jun 2009)
Log Message: ----------- Automagic detection of enchant
If --enable-spellcheck=auto (default), then check if enchant exists, otherwise disable spellcheck without failing.
If --enable-spellcheck=yes, or --enable-spellcheck, then fail if enchant does not exist.
If --disable-spellcheck, or --enable-spellcheck=no, then don't build spellcheck at all.
Modified Paths: -------------- trunk/geany-plugins/build/spellcheck.m4 trunk/geany-plugins/build/vars.auxfiles.mk trunk/geany-plugins/build/vars.docs.mk trunk/geany-plugins/spellcheck/Makefile.am trunk/geany-plugins/spellcheck/src/Makefile.am
Modified: trunk/geany-plugins/build/spellcheck.m4 =================================================================== --- trunk/geany-plugins/build/spellcheck.m4 2009-06-22 09:57:49 UTC (rev 768) +++ trunk/geany-plugins/build/spellcheck.m4 2009-06-22 09:59:02 UTC (rev 769) @@ -1,6 +1,22 @@ AC_DEFUN([GP_CHECK_SPELLCHECK], [ - PKG_CHECK_MODULES(ENCHANT, [enchant >= 1.3]) + AC_ARG_ENABLE([spellcheck], + AC_HELP_STRING([--enable-spellcheck=ARG], + [Enable the spellcheck plugin [[default=auto]]]),, + enable_spellcheck=auto) + + ENCHANT_VERSION=1.3 + + if [[ x"$enable_spellcheck" = "xauto" ]]; then + PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION], + [enable_spellcheck=yes], + [enable_spellcheck=no]) + elif [[ x"$enable_spellcheck" = "xyes" ]]; then + PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION]) + fi + + AM_CONDITIONAL(ENABLE_SPELLCHECK, test $enable_spellcheck = yes) + AC_CONFIG_FILES([ spellcheck/Makefile spellcheck/src/Makefile
Modified: trunk/geany-plugins/build/vars.auxfiles.mk =================================================================== --- trunk/geany-plugins/build/vars.auxfiles.mk 2009-06-22 09:57:49 UTC (rev 768) +++ trunk/geany-plugins/build/vars.auxfiles.mk 2009-06-22 09:59:02 UTC (rev 769) @@ -1,11 +1,6 @@ include $(top_srcdir)/build/vars.docs.mk
-plugindoc_DATA = \ - README \ - ChangeLog \ - NEWS \ - COPYING \ - AUTHORS +plugindoc_DATA = $(AUXFILES)
# TODO: make sure these files exist! README AUTHORS NEWS:
Modified: trunk/geany-plugins/build/vars.docs.mk =================================================================== --- trunk/geany-plugins/build/vars.docs.mk 2009-06-22 09:57:49 UTC (rev 768) +++ trunk/geany-plugins/build/vars.docs.mk 2009-06-22 09:59:02 UTC (rev 769) @@ -1,3 +1,10 @@ plugindocdir = $(docdir)/$(plugin) htmldocdir = $(plugindocdir)/html examplesdir = $(plugindocdir)/examples +AUXFILES = \ + README \ + ChangeLog \ + NEWS \ + COPYING \ + AUTHORS +
Modified: trunk/geany-plugins/spellcheck/Makefile.am =================================================================== --- trunk/geany-plugins/spellcheck/Makefile.am 2009-06-22 09:57:49 UTC (rev 768) +++ trunk/geany-plugins/spellcheck/Makefile.am 2009-06-22 09:59:02 UTC (rev 769) @@ -1,4 +1,10 @@ +# if spellcheck is disabled, we should distribute its files, but not install +if ENABLE_SPELLCHECK include $(top_srcdir)/build/vars.auxfiles.mk +else +include $(top_srcdir)/build/vars.docs.mk +EXTRA_DIST = $(AUXFILES) +endif
SUBDIRS = src plugin = spellcheck
Modified: trunk/geany-plugins/spellcheck/src/Makefile.am =================================================================== --- trunk/geany-plugins/spellcheck/src/Makefile.am 2009-06-22 09:57:49 UTC (rev 768) +++ trunk/geany-plugins/spellcheck/src/Makefile.am 2009-06-22 09:59:02 UTC (rev 769) @@ -1,6 +1,11 @@ include $(top_srcdir)/build/vars.build.mk
+if ENABLE_SPELLCHECK geanyplugins_LTLIBRARIES = spellcheck.la +else +EXTRA_LTLIBRARIES = spellcheck.la +endif + spellcheck_la_SOURCES = \ scplugin.h \ speller.h \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.