Permalink
Browse files

Use the new macros on all plugins

  • Loading branch information...
1 parent 9ed7b87 commit 43057b6a7f639edd4580480181e96cdf2c80401b @hyperair hyperair committed Nov 5, 2010
View
3 build/addons.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_ADDONS],
[
- GP_STATUS_PLUGIN_ADD([Addons], [yes])
+ GP_ARG_DISABLE(Addons, yes)
+ GP_STATUS_PLUGIN_ADD([Addons], [$enable_addons])
AC_CONFIG_FILES([
addons/Makefile
addons/src/Makefile
View
3 build/codenav.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_CODENAV],
[
- GP_STATUS_PLUGIN_ADD([CodeNav], [yes])
+ GP_ARG_DISABLE([CodeNav], [yes])
+ GP_STATUS_PLUGIN_ADD([CodeNav], [$enable_codenav])
AC_CONFIG_FILES([
codenav/Makefile
codenav/src/Makefile
View
3 build/geanydoc.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYDOC],
[
- GP_STATUS_PLUGIN_ADD([GeanyDoc], [yes])
+ GP_ARG_DISABLE([GeanyDoc], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyDoc], [$enable_geanydoc])
AC_CONFIG_FILES([
geanydoc/Makefile
geanydoc/src/Makefile
View
3 build/geanyextrasel.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYEXTRASEL],
[
- GP_STATUS_PLUGIN_ADD([GeanyExtraSel], [yes])
+ GP_ARG_DISABLE([GeanyExtraSel], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyExtraSel], [$enable_geanyextrasel])
AC_CONFIG_FILES([
geanyextrasel/Makefile
geanyextrasel/src/Makefile
View
3 build/geanygdb.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYGDB],
[
- GP_STATUS_PLUGIN_ADD([GeanyGDB], [yes])
+ GP_ARG_DISABLE([GeanyGDB], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyGDB], [$enable_geanygdb])
AC_CHECK_HEADERS([elf.h])
AC_CHECK_HEADERS([elf_abi.h])
AC_CONFIG_FILES([
View
42 build/geanygendoc.m4
@@ -1,52 +1,22 @@
AC_DEFUN([GP_CHECK_GEANYGENDOC],
[
- AC_ARG_ENABLE(geanygendoc,
- AC_HELP_STRING([--enable-geanygendoc=ARG],
- [Enable GeanyGenDoc plugin [[default=auto]]]),,
- [enable_geanygendoc=auto])
+ GP_ARG_DISABLE([GeanyGenDoc], [auto])
GTK_VERSION=2.12
GLIB_VERSION=2.14
GIO_VERSION=2.18
CTPL_VERSION=0.3
- geanygendoc_have_gtk=no
- geanygendoc_have_glib=no
- geanygendoc_have_gio=no
- geanygendoc_have_ctpl=no
- if [[ x"$enable_geanygendoc" = "xauto" ]]; then
- PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= ${GTK_VERSION}],
- [geanygendoc_have_gtk=yes],
- [geanygendoc_have_gtk=no])
- PKG_CHECK_MODULES(GLIB, [glib-2.0 >= ${GLIB_VERSION}],
- [geanygendoc_have_glib=yes],
- [geanygendoc_have_glib=no])
- PKG_CHECK_MODULES(GIO, [gio-2.0 >= ${GIO_VERSION}],
- [geanygendoc_have_gio=yes],
- [geanygendoc_have_gio=no])
- PKG_CHECK_MODULES(CTPL, [ctpl >= ${CTPL_VERSION}],
- [geanygendoc_have_ctpl=yes],
- [geanygendoc_have_ctpl=no])
- if [[ $geanygendoc_have_gtk = yes ]] &&
- [[ $geanygendoc_have_glib = yes ]] &&
- [[ $geanygendoc_have_gio = yes ]] &&
- [[ $geanygendoc_have_ctpl = yes ]]; then
- enable_geanygendoc=yes
- else
- enable_geanygendoc=no
- fi
- elif [[ x"$enable_geanygendoc" = "xyes" ]]; then
- PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= ${GTK_VERSION}])
- PKG_CHECK_MODULES(GLIB, [glib-2.0 >= ${GLIB_VERSION}])
- PKG_CHECK_MODULES(GIO, [gio-2.0 >= ${GIO_VERSION}])
- PKG_CHECK_MODULES(CTPL, [ctpl >= ${CTPL_VERSION}])
- fi
+ GP_CHECK_PLUGIN_DEPS([GeanyGenDoc], GEANYGENDOC,
+ [gtk+-2.0 >= ${GK_VERSION}
+ glib-2.0 >= ${GLIB_VERSION}
+ gio-2.0 >= ${GIO_VERSION}
+ ctpl >= ${CTPL_VERSION}])
AC_PATH_PROG([RST2HTML], [rst2html], [no])
AC_SUBST([RST2HTML])
AM_CONDITIONAL([BUILD_RST], [test "x$RST2HTML" != "xno"])
- AM_CONDITIONAL(ENABLE_GEANYGENDOC, test $enable_geanygendoc = yes)
GP_STATUS_PLUGIN_ADD([GeanyGenDoc], [$enable_geanygendoc])
AC_CONFIG_FILES([
View
3 build/geanyinsertnum.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYINSERTNUM],
[
- GP_STATUS_PLUGIN_ADD([GeanyInsertNum], [yes])
+ GP_ARG_DISABLE([GeanyInsertNum], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyInsertNum], [$enable_geanyinsertnum])
AC_CONFIG_FILES([
geanyinsertnum/Makefile
geanyinsertnum/src/Makefile
View
3 build/geanylatex.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYLATEX],
[
- GP_STATUS_PLUGIN_ADD([GeanyLaTeX], [yes])
+ GP_ARG_DISABLE([GeanyLaTeX], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyLaTeX], [$enable_geanylatex])
AC_CONFIG_FILES([
geanylatex/Makefile
geanylatex/src/Makefile
View
3 build/geanylipsum.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYLIPSUM],
[
- GP_STATUS_PLUGIN_ADD([GeanyLipsum], [yes])
+ GP_ARG_DISABLE([GeanyLipsum], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyLipsum], [$enable_geanylipsum])
AC_CONFIG_FILES([
geanylipsum/Makefile
geanylipsum/src/Makefile
View
16 build/geanylua.m4
@@ -1,9 +1,6 @@
AC_DEFUN([GP_CHECK_GEANYLUA],
[
- AC_ARG_ENABLE(geanylua,
- AC_HELP_STRING([--enable-geanylua=ARG],
- [Enable GeanyLua plugin [[default=auto]]]),,
- [enable_geanylua=auto])
+ GP_ARG_DISABLE([GeanyLua], [auto])
AC_ARG_WITH([lua-pkg],
AC_HELP_STRING([--with-lua-pkg=ARG],
@@ -18,15 +15,8 @@ AC_DEFUN([GP_CHECK_GEANYLUA],
done])
LUA_VERSION=5.1
- if [[ x"$enable_geanylua" = "xauto" ]]; then
- PKG_CHECK_MODULES(LUA, [${LUA_PKG_NAME} >= ${LUA_VERSION}],
- [enable_geanylua=yes],
- [enable_geanylua=no])
- elif [[ x"$enable_geanylua" = "xyes" ]]; then
- PKG_CHECK_MODULES(LUA, [${LUA_PKG_NAME} >= ${LUA_VERSION}])
- fi
-
- AM_CONDITIONAL(ENABLE_GEANYLUA, test $enable_geanylua = yes)
+ GP_CHECK_PLUGIN_DEPS([GeanyLua], [LUA],
+ [${LUA_PKG_NAME} >= ${LUA_VERSION}])
GP_STATUS_PLUGIN_ADD([GeanyLua], [$enable_geanylua])
AC_CONFIG_FILES([
View
3 build/geanyprj.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYPRJ],
[
- GP_STATUS_PLUGIN_ADD([GeanyPrj], [yes])
+ GP_ARG_DISABLE([GeanyPrj], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyPrj], [$enable_geanyprj])
AC_CONFIG_FILES([
geanyprj/Makefile
geanyprj/src/Makefile
View
3 build/geanysendmail.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYSENDMAIL],
[
- GP_STATUS_PLUGIN_ADD([GeanySendmail], [yes])
+ GP_ARG_DISABLE([GeanySendmail], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanySendmail], [$enable_geanysendmail])
AC_CONFIG_FILES([
geanysendmail/Makefile
geanysendmail/src/Makefile
View
9 build/geanyvc.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_GEANYVC],
[
- GP_STATUS_PLUGIN_ADD([GeanyVC], [yes])
+ GP_ARG_DISABLE([GeanyVC], [yes])
+ GP_STATUS_PLUGIN_ADD([GeanyVC], [$enable_geanyvc])
AC_ARG_ENABLE(gtkspell,
AC_HELP_STRING([--enable-gtkspell=ARG],
[Enable GtkSpell support in GeanyVC. [[default=auto]]]),,
@@ -13,12 +14,16 @@ AC_DEFUN([GP_CHECK_GEANYVC],
PKG_CHECK_MODULES(GTKSPELL, [gtkspell-2.0])
fi
+ if [[ "$enable_gtkspell" = yes -a "$enable_geanyvc" no ]]; then
+ AC_MSG_WARN([GtkSpell support for GeanyVC enabled, but GeanyVC itself not enabled.])
+ fi
+
AM_CONDITIONAL(USE_GTKSPELL, test $enable_gtkspell = yes)
GP_STATUS_FEATURE_ADD([GeanyVC GtkSpell support], [$enable_gtkspell])
AC_CONFIG_FILES([
geanyvc/Makefile
geanyvc/src/Makefile
- geanyvc/tests/Makefile
+ geanyvc/tests/Makefile
])
])
View
17 build/pretty-printer.m4
@@ -1,21 +1,10 @@
AC_DEFUN([GP_CHECK_PRETTYPRINTER],
[
- AC_ARG_ENABLE([prettyprinter],
- AC_HELP_STRING([--enable-prettyprinter=ARG],
- [Enable the pretty-printer plugin [[default=auto]]]),,
- enable_prettyprinter=auto)
-
LIBXML_VERSION=2.6.27
- if [[ x"$enable_prettyprinter" = "xauto" ]]; then
- PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_VERSION],
- [enable_prettyprinter=yes],
- [enable_prettyprinter=no])
- elif [[ x"$enable_prettyprinter" = "xyes" ]]; then
- PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_VERSION])
- fi
-
- AM_CONDITIONAL(ENABLE_PRETTYPRINTER, test $enable_prettyprinter = yes)
+ GP_ARG_DISABLE([pretty-printer], [auto])
+ GP_CHECK_PLUGIN_DEPS([pretty-printer], [LIBXML],
+ [libxml-2.0 >= ${LIBXML_VERSION}])
GP_STATUS_PLUGIN_ADD([Pretty Printer], [$enable_prettyprinter])
AC_CONFIG_FILES([
View
3 build/shiftcolumn.m4
@@ -1,6 +1,7 @@
AC_DEFUN([GP_CHECK_SHIFTCOLUMN],
[
- GP_STATUS_PLUGIN_ADD([ShiftColumn], [yes])
+ GP_ARG_DISABLE([ShiftColumn], [yes])
+ GP_STATUS_PLUGIN_ADD([ShiftColumn], [$enable_shiftcolumn])
AC_CONFIG_FILES([
shiftcolumn/Makefile
shiftcolumn/src/Makefile
View
27 build/spellcheck.m4
@@ -1,30 +1,15 @@
AC_DEFUN([GP_CHECK_SPELLCHECK],
[
- AC_ARG_ENABLE([spellcheck],
- AC_HELP_STRING([--enable-spellcheck=ARG],
- [Enable the spellcheck plugin [[default=auto]]]),,
- enable_spellcheck=auto)
+ GP_ARG_DISABLE([spellcheck], [auto])
ENCHANT_VERSION=1.3
OPT_ENCHANT_VERSION=1.5
+ GP_CHECK_PLUGIN_DEPS([spellcheck], [ENCHANT],
+ [enchant >= ${ENCHANT_VERSION}])
+ PKG_CHECK_MODULES([ENCHANT], [enchant >= $OPT_ENCHANT_VERSION],
+ have_enchant_1_5=yes,
+ have_enchant_1_5=no)
- if [[ x"$enable_spellcheck" = "xauto" ]]; then
- PKG_CHECK_MODULES(ENCHANT, [enchant >= $OPT_ENCHANT_VERSION],
- [have_enchant_1_5=yes; enable_spellcheck=yes],
- [have_enchant_1_5=no; enable_spellcheck=auto])
- if [[ "$enable_spellcheck" = "auto" ]]; then
- PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION],
- [enable_spellcheck=yes],
- [enable_spellcheck=no])
- fi
- elif [[ x"$enable_spellcheck" = "xyes" ]]; then
- PKG_CHECK_MODULES(ENCHANT, [enchant >= $OPT_ENCHANT_VERSION],
- [have_enchant_1_5=yes],
- [have_enchant_1_5=no;
- PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION])])
- fi
-
- AM_CONDITIONAL(ENABLE_SPELLCHECK, test $enable_spellcheck = yes)
AM_CONDITIONAL(HAVE_ENCHANT_1_5, test $have_enchant_1_5 = yes)
GP_STATUS_PLUGIN_ADD([Spellcheck], [$enable_spellcheck])
View
20 build/treebrowser.m4
@@ -1,14 +1,18 @@
AC_DEFUN([GP_CHECK_TREEBROWSER],
[
- AC_ARG_ENABLE(treebrowser,
- AC_HELP_STRING([--enable-treebrowser=ARG],
- [Enable TreeBrowser plugin [[default=auto]]]),,
- [enable_treebrowser=auto])
+ GP_ARG_DISABLE([Treebrowser], [auto])
+ if [[ "$enable_treebrowser" != no ]]; then
+ AC_CHECK_FUNC([creat],,
+ [
+ if [[ "$enable_treebrowser" = auto ]]; then
+ enable_treebrowser=no
+ else
+ AC_MSG_ERROR([Treebrowser cannot be enabled because creat() is missing.
+ Please disable it (--disable-treebrowser) or make sure creat()
+ works on your system.])
+ fi
+ ])
- 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])],
[AC_MSG_NOTICE([Treebrowser GIO support is disabled because of the following problem: $GIO1_PKG_ERRORS])])
View
53 build/webhelper.m4
@@ -1,55 +1,13 @@
AC_DEFUN([GP_CHECK_WEBHELPER],
[
- AC_ARG_ENABLE([webhelper],
- AC_HELP_STRING([--enable-webhelper=ARG],
- [Enable WebHelper plugin [[default=auto]]]),
- [],
- [enable_webhelper=auto])
+ GP_ARG_DISABLE([WebHelper], [auto])
GTK_VERSION=2.16
GLIB_VERSION=2.16
GIO_VERSION=2.18
GDK_PIXBUF_VERSION=2.0
WEBKIT_VERSION=1.1.18
- webhelper_have_gtk=no
- webhelper_have_glib=no
- webhelper_have_gio=no
- webhelper_have_gdk_pixbuf=no
- webhelper_have_webkit=no
- if [[ x"$enable_webhelper" = "xauto" ]]; then
- PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= ${GTK_VERSION}],
- [webhelper_have_gtk=yes],
- [webhelper_have_gtk=no])
- PKG_CHECK_MODULES([GLIB], [glib-2.0 >= ${GLIB_VERSION}],
- [webhelper_have_glib=yes],
- [webhelper_have_glib=no])
- PKG_CHECK_MODULES([GIO], [gio-2.0 >= ${GIO_VERSION}],
- [webhelper_have_gio=yes],
- [webhelper_have_gio=no])
- PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= ${GDK_PIXBUF_VERSION}],
- [webhelper_have_gdk_pixbuf=yes],
- [webhelper_have_gdk_pixbuf=no])
- PKG_CHECK_MODULES([WEBKIT], [webkit-1.0 >= ${WEBKIT_VERSION}],
- [webhelper_have_webkit=yes],
- [webhelper_have_webkit=no])
- if [[ $webhelper_have_gtk = yes ]] &&
- [[ $webhelper_have_glib = yes ]] &&
- [[ $webhelper_have_gio = yes ]] &&
- [[ $webhelper_have_gdk_pixbuf = yes ]] &&
- [[ $webhelper_have_webkit = yes ]]; then
- enable_webhelper=yes
- else
- enable_webhelper=no
- fi
- elif [[ x"$enable_webhelper" = "xyes" ]]; then
- PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= ${GTK_VERSION}])
- PKG_CHECK_MODULES([GLIB], [glib-2.0 >= ${GLIB_VERSION}])
- PKG_CHECK_MODULES([GIO], [gio-2.0 >= ${GIO_VERSION}])
- PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= ${GDK_PIXBUF_VERSION}])
- PKG_CHECK_MODULES([WEBKIT], [webkit-1.0 >= ${WEBKIT_VERSION}])
- fi
-
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums], [no])
AC_SUBST([GLIB_MKENUMS])
if [[ x"$GLIB_MKENUMS" = "xno" ]]; then
@@ -60,7 +18,14 @@ AC_DEFUN([GP_CHECK_WEBHELPER],
fi
fi
- AM_CONDITIONAL(ENABLE_WEBHELPER, test $enable_webhelper = yes)
+ GP_CHECK_PLUGIN_DEPS([WebHelper], [WEBHELPER],
+ [gtk-2.0 >= ${GTK_VERSION}
+ glib-2.0 >= ${GLIB_VERSION}
+ gio-2.0 >= ${GIO_VERSION}
+ gdk-pixbuf-2.0 >= ${GDK_PIXBUF_VERSION}
+ webkit-1.0 >= ${WEBKIT_VERSION}])
+
+
GP_STATUS_PLUGIN_ADD([WebHelper], [$enable_webhelper])
AC_CONFIG_FILES([

0 comments on commit 43057b6

Please sign in to comment.