Revision: 6004 http://geany.svn.sourceforge.net/geany/?rev=6004&view=rev Author: colombanw Date: 2011-10-06 00:44:06 +0000 (Thu, 06 Oct 2011) Log Message: ----------- Move configure logic for enabling plugins to its own file
Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac
Added Paths: ----------- trunk/m4/geany-plugins.m4
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-10-06 00:43:46 UTC (rev 6003) +++ trunk/ChangeLog 2011-10-06 00:44:06 UTC (rev 6004) @@ -3,7 +3,7 @@ * autogen.sh, configure.ac: Modernize configure.ac a bit. * configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4, - m4/geany-gnu-regex.m4: + m4/geany-gnu-regex.m4, m4/geany-plugins.m4: Extract some configure logic to separate files for better readability.
Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2011-10-06 00:43:46 UTC (rev 6003) +++ trunk/configure.ac 2011-10-06 00:44:06 UTC (rev 6004) @@ -28,11 +28,6 @@ AC_PROG_LN_S AC_PROG_INTLTOOL
-# for plugins -AC_DISABLE_STATIC -AM_PROG_LIBTOOL -LIBTOOL="$LIBTOOL --silent" - # autoscan start
# Checks for header files. @@ -78,19 +73,9 @@
# Plugins support -AC_ARG_ENABLE([plugins], - [AS_HELP_STRING([--disable-plugins], [compile without plugin support [default=no]])], - , - [enable_plugins=yes]) +GEANY_CHECK_PLUGINS
-if test "x$enable_plugins" = "xyes" ; then - AC_DEFINE([HAVE_PLUGINS], [1], [Define if plugins are enabled.]) - AM_CONDITIONAL([PLUGINS], true) -else - AM_CONDITIONAL([PLUGINS], false) -fi
- # check whether to use included GNU regex library GEANY_CHECK_GNU_REGEX
@@ -238,7 +223,7 @@ echo "Building Geany for : ${target}" fi echo "Using GTK version : ${GTK_VERSION}" -echo "Build with plugin support : ${enable_plugins}" +echo "Build with plugin support : ${geany_enable_plugins}" echo "Use virtual terminal support : ${want_vte}" echo "Use (UNIX domain) socket support : ${want_socket}" if test "x$enable_gnu_regex" = "xyes" ; then
Added: trunk/m4/geany-plugins.m4 =================================================================== --- trunk/m4/geany-plugins.m4 (rev 0) +++ trunk/m4/geany-plugins.m4 2011-10-06 00:44:06 UTC (rev 6004) @@ -0,0 +1,27 @@ +dnl GEANY_CHECK_PLUGINS +dnl Checks whether to enable plugins support +dnl AC_DEFINEs HAVE_PLUGINS and AM_CONDITIONALs PLUGINS +dnl Result is available in the geany_enable_plugins variable +AC_DEFUN([GEANY_CHECK_PLUGINS], +[ + AC_REQUIRE([AC_DISABLE_STATIC]) + AC_REQUIRE([AM_PROG_LIBTOOL]) + + AC_ARG_ENABLE([plugins], + [AS_HELP_STRING([--disable-plugins], [compile without plugin support [default=no]])], + [geany_enable_plugins=$enableval], + [geany_enable_plugins=yes]) + + dnl silent libtool if it's not already done + AS_CASE(["$LIBTOOL"], + [*--silent*], [], + [LIBTOOL="$LIBTOOL --silent" + AC_SUBST([LIBTOOL])]) + + if test "x$geany_enable_plugins" = "xyes" ; then + AC_DEFINE([HAVE_PLUGINS], [1], [Define if plugins are enabled.]) + AM_CONDITIONAL([PLUGINS], true) + else + AM_CONDITIONAL([PLUGINS], false) + fi +])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.