Revision: 2175 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2175&view=re... Author: colombanw Date: 2011-08-27 20:22:03 +0000 (Sat, 27 Aug 2011) Log Message: ----------- DevHelp: fix check for libdevhelp
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-27 17:51:57 UTC (rev 2174) +++ trunk/geany-plugins/build/devhelp.m4 2011-08-27 20:22:03 UTC (rev 2175) @@ -8,41 +8,22 @@ DEVHELP1_VERSION=2.30.1 DEVHELP2_VERSION=2.32.0
- GP_CHECK_PLUGIN_DEPS([devhelp], [DHPLUG], - [gtk+-2.0 >= ${GTK_VERSION} - glib-2.0 >= ${GLIB_VERSION} - webkit-1.0 >= ${WEBKIT_VERSION} - gthread-2.0]) + # Use newer libdevhelp-2.0 if present, and fallback on older libdevhelp-1.0 + libdevhelp_pkg=libdevhelp-2.0 + libdevhelp_version=${DEVHELP2_VERSION} + AS_IF([test "x$enable_devhelp" != "xno"], + [PKG_CHECK_EXISTS([${libdevhelp_pkg} >= ${libdevhelp_version}], + [], + [libdevhelp_pkg=libdevhelp-1.0 + libdevhelp_version=${DEVHELP1_VERSION}])])
- # 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_devhelp))=yes], - [m4_tolower(AS_TR_SH(enable_devhelp))=no]) - ] - ) - fi + GP_CHECK_PLUGIN_DEPS([devhelp], [DEVHELP], + [gtk+-2.0 >= ${GTK_VERSION} + glib-2.0 >= ${GLIB_VERSION} + webkit-1.0 >= ${WEBKIT_VERSION} + ${libdevhelp_pkg} >= ${libdevhelp_version} + gthread-2.0])
- AM_CONDITIONAL(m4_toupper(AS_TR_SH(ENABLE_devhelp)), - test "$m4_tolower(AS_TR_SH(enable_devhelp))" = 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-27 17:51:57 UTC (rev 2174) +++ trunk/geany-plugins/devhelp/src/Makefile.am 2011-08-27 20:22:03 UTC (rev 2175) @@ -21,10 +21,9 @@
devhelp_la_CFLAGS = \ $(AM_CFLAGS) \ - $(DHPLUG_CFLAGS) \ $(DEVHELP_CFLAGS) \ -DDHPLUG_DATA_DIR="$(plugindatadir)"
-devhelp_la_LIBADD = $(DHPLUG_LIBS) $(DEVHELP_LIBS) +devhelp_la_LIBADD = $(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.