Skip to content

Commit

Permalink
GeanyPy: Properly honor disabling/automatic choice with Autotools
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed Jun 17, 2013
1 parent 11e88f8 commit d52b48c
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions build/geanypy.m4
Expand Up @@ -2,15 +2,23 @@ AC_DEFUN([GP_CHECK_GEANYPY],
[
GP_ARG_DISABLE([Geanypy], [auto])
GP_CHECK_PLUGIN_GTK2_ONLY([Geanypy])
GP_COMMIT_PLUGIN_STATUS([Geanypy])
PKG_CHECK_MODULES([PYGTK], [pygtk-2.0])
AX_PYTHON_DEVEL([>= '2.6'])
AX_PYTHON_LIBRARY(,[AC_MSG_ERROR([Cannot find Python library])])
AC_SUBST([PYTHON])
AC_DEFINE_UNQUOTED(
[GEANYPY_PYTHON_LIBRARY],
["$PYTHON_LIBRARY"],
[Location of Python library to dlopen()])
dnl FIXME: Checks for Python below should gracefully disable the plugin
dnl if they don't succeed and enable_geanypy is set to `auto`.
dnl However, since these macros don't seem to gracefully handle
dnl failure, and since if PyGTK is found they are likely to succeed
dnl anyway, we assume that if the plugin is not disabled at this
dnl point it is OK for these checks to be fatal. The user can pass
dnl always pass --disable-geanypy anyway.
AS_IF([! test x$enable_geanypy = xno], [
AX_PYTHON_DEVEL([>= '2.6'])
AX_PYTHON_LIBRARY(,[AC_MSG_ERROR([Cannot find Python library])])
AC_SUBST([PYTHON])
AC_DEFINE_UNQUOTED([GEANYPY_PYTHON_LIBRARY],
["$PYTHON_LIBRARY"],
[Location of Python library to dlopen()])
])
GP_COMMIT_PLUGIN_STATUS([Geanypy])
AC_CONFIG_FILES([
geanypy/Makefile
geanypy/src/Makefile
Expand Down

0 comments on commit d52b48c

Please sign in to comment.