Revision: 2167 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2167&view=re... Author: codebrainz Date: 2011-08-24 07:50:51 +0000 (Wed, 24 Aug 2011)
Log Message: ----------- Adjust Autotools build system to support newer Devhelp library.
Check first for older 'libdevhelp-2.0' and if it's not found, then check for 'libdevhelp-1.0'. If using 'libdevhelp-2.0', 'HAVE_BOOK_MANAGER' needs to be defined so the existing code can adapt to which version is found.
Modified Paths: -------------- trunk/geany-plugins/build/devhelp.m4 trunk/geany-plugins/devhelp/src/Makefile.am
Modified: trunk/geany-plugins/build/devhelp.m4 =================================================================== --- trunk/geany-plugins/build/devhelp.m4 2011-08-24 06:43:53 UTC (rev 2166) +++ trunk/geany-plugins/build/devhelp.m4 2011-08-24 07:50:51 UTC (rev 2167) @@ -5,15 +5,44 @@ GTK_VERSION=2.16 GLIB_VERSION=2.16 WEBKIT_VERSION=1.1.18 - DEVHELP_VERSION=2.30.1 + DEVHELP1_VERSION=2.30.1 + DEVHELP2_VERSION=2.32.0
- GP_CHECK_PLUGIN_DEPS([devhelp], [DEVHELP], + GP_CHECK_PLUGIN_DEPS([devhelp], [DHPLUG], [gtk+-2.0 >= ${GTK_VERSION} glib-2.0 >= ${GLIB_VERSION} webkit-1.0 >= ${WEBKIT_VERSION} - libdevhelp-1.0 >= ${DEVHELP_VERSION} gthread-2.0])
+ # First tries newer library version libdevhelp-2.0 and if that + # fails, tries to find older version libdevhelp-1.0. + if test "$m4_tolower(AS_TR_SH(enable_devhelp))" = "yes"; then + PKG_CHECK_MODULES( + [DEVHELP], + [libdevhelp-2.0 >= ${DEVHELP2_VERSION}], + [AC_DEFINE([HAVE_BOOK_MANAGER], [1], [Use libdevhelp-2.0])], + [PKG_CHECK_MODULES( + [DEVHELP], + [libdevhelp-1.0 >= ${DEVHELP1_VERSION}]) + ] + ) + elif test "$m4_tolower(AS_TR_SH(enable_devhelp))" = "auto"; then + PKG_CHECK_MODULES( + [DEVHELP], + [libdevhelp-2.0 >= ${DEVHELP2_VERSION}], + [AC_DEFINE(HAVE_BOOK_MANAGER)], + [PKG_CHECK_MODULES( + [DEVHELP], + [libdevhelp-1.0 >= ${DEVHELP1_VERSION}], + [m4_tolower(AS_TR_SH(enable_$1))=yes], + [m4_tolower(AS_TR_SH(enable_$1))=no]) + ] + ) + fi + + AM_CONDITIONAL(m4_toupper(AS_TR_SH(ENABLE_$1)), + test "$m4_tolower(AS_TR_SH(enable_$1))" = yes) + GP_STATUS_PLUGIN_ADD([DevHelp], [$enable_devhelp])
AC_CONFIG_FILES([
Modified: trunk/geany-plugins/devhelp/src/Makefile.am =================================================================== --- trunk/geany-plugins/devhelp/src/Makefile.am 2011-08-24 06:43:53 UTC (rev 2166) +++ trunk/geany-plugins/devhelp/src/Makefile.am 2011-08-24 07:50:51 UTC (rev 2167) @@ -21,9 +21,10 @@
devhelp_la_CFLAGS = \ $(AM_CFLAGS) \ + $(DHPLUG_CFLAGS) \ $(DEVHELP_CFLAGS) \ -DDHPLUG_DATA_DIR="$(plugindatadir)"
-devhelp_la_LIBADD = $(DEVHELP_LIBS) +devhelp_la_LIBADD = $(DHPLUG_LIBS) $(DEVHELP_LIBS)
include $(top_srcdir)/build/cppcheck.mk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org