aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in53
1 files changed, 51 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 2e2ac2c43b..6c803a28b9 100644
--- a/configure.in
+++ b/configure.in
@@ -899,6 +899,46 @@ if test "x${enable_mono}" = "xyes"; then
MONO_PLUGIN="mono"
fi
+dnl Python hooks
+dnl This should just define python CFLAGS etc here, it is used later to
+dnl turn on the python plugin or not.
+dnl (Thanks to Pidgin)
+
+AC_ARG_ENABLE([python],
+ AC_HELP_STRING([--enable-python],
+ [Add python embedded hooks.]),
+ [enable_python=$enableval],[enable_python=no])
+
+if test "x${enable_python}" = "xyes"; then
+ AC_PATH_PROG(pythonpath, python)
+ if test "_$pythonpath" != _ ; then
+ AC_MSG_CHECKING(for python compile flags)
+ PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'`
+ PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'`
+ changequote(<<, >>)dnl
+ PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'`
+ PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'`
+ changequote([, ])dnl
+
+ if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
+ PY_LIBS="-lpython$PY_VERSION -L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
+ PY_INCLUDES="-I$PY_PREFIX/include/python$PY_VERSION"
+ AC_MSG_RESULT(ok)
+ python_package="python-devel"
+ PYTHON_PLUGIN="python"
+ else
+ AC_MSG_ERROR([Can't find Python.h])
+ PY_LIBS=""
+ PY_INCLUDES=""
+ python_package=""
+ PYTHON_PLUGIN=""
+ fi
+ fi
+ AC_SUBST(PY_LIBS)
+ AC_SUBST(PY_INCLUDES)
+fi
+
+
dnl ********************************************************************************
dnl security extension support (SSL and S/MIME)
dnl
@@ -1691,15 +1731,17 @@ AC_ARG_ENABLE([plugins],
dnl Add any new plugins here
plugins_base_always="calendar-file calendar-http calendar-weather itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup hula-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup"
-plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN"
+
+plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN "
all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono"
plugins_standard_always="bbdb subject-thread save-calendar select-one-source copy-tool mail-to-task mark-calendar-offline audio-inline mailing-list-actions default-mailer import-ics-attachments prefer-plain mail-notification attachment-reminder face backup-restore email-custom-header"
+
plugins_standard="$plugins_standard_always"
all_plugins_standard="$plugins_standard"
plugins_experimental_always="folder-unsubscribe mail-to-meeting save-attachments external-editor"
-plugins_experimental="$plugins_experimental_always $IPOD_SYNC $TNEF_ATTACHMENTS"
+plugins_experimental="$plugins_experimental_always $IPOD_SYNC $TNEF_ATTACHMENTS $PYTHON_PLUGIN"
all_plugins_experimental="$plugins_experimental_always ipod-sync tnef-attachments"
case x"$enable_plugins" in
@@ -1742,6 +1784,12 @@ if test "x${enable_mono}" = "xyes"; then
msg_plugins="$msg_plugins (and mono)"
fi
+
+if test "x${enable_python}" = "xyes"; then
+ plugins_enabled="$plugins_enabled python"
+ msg_plugins="$msg_plugins (and python)"
+fi
+
AC_SUBST(plugins_enabled)
AC_SUBST(all_plugins_base)
AC_SUBST(all_plugins_standard)
@@ -1974,6 +2022,7 @@ plugins/select-one-source/Makefile
plugins/mark-calendar-offline/Makefile
plugins/prefer-plain/Makefile
plugins/profiler/Makefile
+plugins/python/Makefile
plugins/copy-tool/Makefile
plugins/folder-unsubscribe/Makefile
plugins/mailing-list-actions/Makefile