SF.net SVN: geany-plugins:[1688] trunk/geany-plugins
colombanw at users.sourceforge.net
colombanw at xxxxx
Thu Oct 28 21:02:34 UTC 2010
Revision: 1688
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1688&view=rev
Author: colombanw
Date: 2010-10-28 21:02:33 +0000 (Thu, 28 Oct 2010)
Log Message:
-----------
Build system: don't force building the Treebrowser plugin
If the dependencies of the Treebrowser plugin are not met, simply
disable the plugin rather than abort the whole build.
Also add checks for creat(), sys/types.h, sys/stat.h and fcntl.h, and
fix the check for GIO to correctly handle the case it's not available.
Modified Paths:
--------------
trunk/geany-plugins/build/treebrowser.m4
trunk/geany-plugins/treebrowser/Makefile.am
trunk/geany-plugins/treebrowser/src/Makefile.am
trunk/geany-plugins/wscript
Modified: trunk/geany-plugins/build/treebrowser.m4
===================================================================
--- trunk/geany-plugins/build/treebrowser.m4 2010-10-28 16:57:20 UTC (rev 1687)
+++ trunk/geany-plugins/build/treebrowser.m4 2010-10-28 21:02:33 UTC (rev 1688)
@@ -1,8 +1,29 @@
AC_DEFUN([GP_CHECK_TREEBROWSER],
[
+ AC_ARG_ENABLE(treebrowser,
+ AC_HELP_STRING([--enable-treebrowser=ARG],
+ [Enable TreeBrowser plugin [[default=auto]]]),,
+ [enable_treebrowser=auto])
+
+ treebrowser_have_creat=yes
+ AC_CHECK_HEADERS([sys/types.h sys/stat.h fcntl.h],
+ [], [treebrowser_have_creat=no])
+ AC_CHECK_FUNC([creat], [], [treebrowser_have_creat=no])
PKG_CHECK_MODULES([GIO], [gio-2.0],
- [AC_DEFINE([HAVE_GIO], 1, [Whether we have GIO])], [])
- GP_STATUS_PLUGIN_ADD([Treebrowser], [yes])
+ [AC_DEFINE([HAVE_GIO], 1, [Whether we have GIO])],
+ [AC_MSG_NOTICE([Treebrowser GIO support is disabled because of the following problem: $GIO1_PKG_ERRORS])])
+
+ if test "x$enable_treebrowser" = "xauto"; then
+ enable_treebrowser="$treebrowser_have_creat"
+ elif test "x$enable_treebrowser" = "xyes"; then
+ if ! test "x$treebrowser_have_creat" = "xyes"; then
+ AC_MSG_ERROR([missing function creat()])
+ fi
+ fi
+
+ AM_CONDITIONAL(ENABLE_TREEBROWSER, test "x$enable_treebrowser" = "xyes")
+ GP_STATUS_PLUGIN_ADD([TreeBrowser], [$enable_treebrowser])
+
AC_CONFIG_FILES([
treebrowser/Makefile
treebrowser/src/Makefile
Modified: trunk/geany-plugins/treebrowser/Makefile.am
===================================================================
--- trunk/geany-plugins/treebrowser/Makefile.am 2010-10-28 16:57:20 UTC (rev 1687)
+++ trunk/geany-plugins/treebrowser/Makefile.am 2010-10-28 21:02:33 UTC (rev 1688)
@@ -1,4 +1,9 @@
+if ENABLE_TREEBROWSER
include $(top_srcdir)/build/vars.auxfiles.mk
+else
+include $(top_srcdir)/build/vars.docs.mk
+EXTRA_DIST = $(AUXFILES)
+endif
SUBDIRS = src
plugin = treebrowser
Modified: trunk/geany-plugins/treebrowser/src/Makefile.am
===================================================================
--- trunk/geany-plugins/treebrowser/src/Makefile.am 2010-10-28 16:57:20 UTC (rev 1687)
+++ trunk/geany-plugins/treebrowser/src/Makefile.am 2010-10-28 21:02:33 UTC (rev 1688)
@@ -1,6 +1,11 @@
include $(top_srcdir)/build/vars.build.mk
+if ENABLE_TREEBROWSER
geanyplugins_LTLIBRARIES = treebrowser.la
+else
+EXTRA_LTLIBRARIES = treebrowser.la
+endif
+
treebrowser_la_SOURCES = treebrowser.c
treebrowser_la_CFLAGS = $(AM_CFLAGS) $(GIO_CFLAGS)
treebrowser_la_LIBADD = $(COMMONLIBS) $(GIO_LIBS)
Modified: trunk/geany-plugins/wscript
===================================================================
--- trunk/geany-plugins/wscript 2010-10-28 16:57:20 UTC (rev 1687)
+++ trunk/geany-plugins/wscript 2010-10-28 21:02:33 UTC (rev 1688)
@@ -104,7 +104,11 @@
[ 'lua-5.1', '5.1', False ] ]),
Plugin('GeanyPrj', None, [ 'geanyprj/src' ]),
Plugin('Pretty-Printer', None, [ 'pretty-printer/src' ], [ [ 'libxml-2.0', '2.6.27', True ] ]),
- Plugin('TreeBrowser', None, [ 'treebrowser/src' ], [ [ 'gio-2.0', '2.16', False ] ]),
+ Plugin('TreeBrowser', None, [ 'treebrowser/src' ],
+ [ [ 'gio-2.0', '2.16', False ],
+ [ 'sys/types.h', '', True ],
+ [ 'sys/stat.h', '', True ],
+ [ 'fcntl.h', '', True] ]),
Plugin('Updatechecker', None, [ 'updatechecker/src' ], [ ['libsoup-2.4', '2.4.0', True] ])
]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list