Revision: 833 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=833&view=rev Author: hyperair Date: 2009-07-17 19:40:48 +0000 (Fri, 17 Jul 2009)
Log Message: ----------- Tidy up configure.ac, add --with-geany-prefix arg
* Factor out geany checks to build/geany.m4 + Also add --with-geany-prefix=PATH argument to this file * Factor out i18n stuff to build/i18n.m4 * Factor out unittests checking to build/unittests.m4
Modified Paths: -------------- trunk/geany-plugins/configure.ac
Added Paths: ----------- trunk/geany-plugins/build/geany.m4 trunk/geany-plugins/build/i18n.m4 trunk/geany-plugins/build/unittests.m4
Added: trunk/geany-plugins/build/geany.m4 =================================================================== --- trunk/geany-plugins/build/geany.m4 (rev 0) +++ trunk/geany-plugins/build/geany.m4 2009-07-17 19:40:48 UTC (rev 833) @@ -0,0 +1,21 @@ +AC_DEFUN([GP_CHECK_GEANY], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_ARG_WITH([geany-prefix], + AC_HELP_STRING([--with-geany-prefix=PATH], + [Set Geany's installation prefix [[default=auto]]]), + [geany_prefix=${withval}], + [geany_prefix=""]) + + OLD_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + test -z $geany_prefix || \ + export PKG_CONFIG_PATH="$geany_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + + PKG_CHECK_MODULES([GEANY], [geany >= $1]) + geanypluginsdir=$($PKG_CONFIG --variable=libdir)/geany + AC_SUBST([geanypluginsdir]) + + test -z $geany_prefix || \ + PKG_CONFIG_PATH="$OLD_PKG_CONFIG_PATH" + +])
Added: trunk/geany-plugins/build/i18n.m4 =================================================================== --- trunk/geany-plugins/build/i18n.m4 (rev 0) +++ trunk/geany-plugins/build/i18n.m4 2009-07-17 19:40:48 UTC (rev 833) @@ -0,0 +1,12 @@ +AC_DEFUN([GP_I18N], +[ + GETTEXT_PACKAGE=geany-plugins + AC_SUBST(GETTEXT_PACKAGE) + AC_DEFINE_UNQUOTED( + [GETTEXT_PACKAGE], + ["$GETTEXT_PACKAGE"], + [The domain to use with gettext]) + LOCALEDIR="${datadir}/locale" + AC_SUBST(LOCALEDIR) + AM_GLIB_GNU_GETTEXT +])
Added: trunk/geany-plugins/build/unittests.m4 =================================================================== --- trunk/geany-plugins/build/unittests.m4 (rev 0) +++ trunk/geany-plugins/build/unittests.m4 2009-07-17 19:40:48 UTC (rev 833) @@ -0,0 +1,7 @@ +AC_DEFUN([GP_CHECK_UNITTESTS], +[ + PKG_CHECK_MODULES([CHECK], [check >= $1], + [AM_CONDITIONAL(UNITTESTS, true)], + [AM_CONDITIONAL(UNITTESTS, false)]) +]) +
Modified: trunk/geany-plugins/configure.ac =================================================================== --- trunk/geany-plugins/configure.ac 2009-07-17 18:19:31 UTC (rev 832) +++ trunk/geany-plugins/configure.ac 2009-07-17 19:40:48 UTC (rev 833) @@ -12,25 +12,12 @@
dnl i18n IT_PROG_INTLTOOL([0.35.0]) -GETTEXT_PACKAGE=geany-plugins -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED( - [GETTEXT_PACKAGE], - ["$GETTEXT_PACKAGE"], - [The domain to use with gettext]) -AM_GLIB_GNU_GETTEXT -LOCALEDIR="${datadir}/locale" -AC_SUBST(LOCALEDIR) +GP_I18N
dnl common checks -PKG_CHECK_MODULES([GEANY], [geany >= 0.16]) -geanypluginsdir=`${PKG_CONFIG} --variable=libdir geany`/geany -AC_SUBST([geanypluginsdir]) +GP_CHECK_GEANY(0.16) +GP_CHECK_UNITTESTS(0.9.4)
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], - [AM_CONDITIONAL(UNITTESTS, true)], - [AM_CONDITIONAL(UNITTESTS, false)]) - dnl plugin checks GP_CHECK_ADDONS GP_CHECK_GEANYGDB
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.