Added python plugins code
This commit is contained in:
28
configure.ac
28
configure.ac
@@ -45,6 +45,8 @@ AS_IF([test "x$PLATFORM" = xosx],
|
||||
### Options
|
||||
AC_ARG_ENABLE([notifications],
|
||||
[AS_HELP_STRING([--enable-notifications], [enable desktop notifications])])
|
||||
AC_ARG_ENABLE([python-plugins],
|
||||
[AS_HELP_STRING([--enable-python-plugins], [enable Python plugins])])
|
||||
AC_ARG_ENABLE([c-plugins],
|
||||
[AS_HELP_STRING([--enable-c-plugins], [enable C plugins])])
|
||||
AC_ARG_ENABLE([plugins],
|
||||
@@ -59,6 +61,28 @@ AC_ARG_WITH([themes],
|
||||
[AS_HELP_STRING([--with-themes[[=PATH]]], [install themes (default yes)])])
|
||||
|
||||
### plugins
|
||||
|
||||
# python
|
||||
if test "x$enable_plugins" = xno; then
|
||||
AM_CONDITIONAL([BUILD_PYTHON_API], [false])
|
||||
elif test "x$enable_python_plugins" != xno; then
|
||||
AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python-config, yes, no)
|
||||
if test "$PYTHON_CONFIG_EXISTS" == "yes"; then
|
||||
AX_PYTHON_DEVEL
|
||||
AM_CONDITIONAL([BUILD_PYTHON_API], [true])
|
||||
AC_DEFINE([HAVE_PYTHON], [1], [Python support])
|
||||
else
|
||||
if test "x$enable_python_plugins" = xyes; then
|
||||
AC_MSG_ERROR([Python not found, cannot enable Python plugins.])
|
||||
else
|
||||
AM_CONDITIONAL([BUILD_PYTHON_API], [false])
|
||||
AC_MSG_NOTICE([Python development package not found, Python plugin support disabled.])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AM_CONDITIONAL([BUILD_PYTHON_API], [false])
|
||||
fi
|
||||
|
||||
# c
|
||||
LT_INIT
|
||||
if test "x$enable_plugins" = xno; then
|
||||
@@ -231,8 +255,8 @@ AC_CHECK_HEADERS([ncurses.h], [], [])
|
||||
AM_CFLAGS="-Wall -Wno-deprecated-declarations"
|
||||
AS_IF([test "x$PACKAGE_STATUS" = xdevelopment],
|
||||
[AM_CFLAGS="$AM_CFLAGS -Wunused -Werror"])
|
||||
AM_LDFLAGS="$AM_LDFLAGS -export-dynamic"
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS $glib_CFLAGS $curl_CFLAGS $libnotify_CFLAGS"
|
||||
AM_LDFLAGS="$AM_LDFLAGS $PYTHON_LDFLAGS -export-dynamic"
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS $glib_CFLAGS $curl_CFLAGS $libnotify_CFLAGS $PYTHON_CPPFLAGS"
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -DTHEMES_PATH=\"\\\"$THEMES_PATH\\\"\""
|
||||
LIBS="$glib_LIBS $curl_LIBS $libnotify_LIBS $LIBS"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user