about summary refs log tree commit diff stats
path: root/configure.ac
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-03-02 23:00:47 +0000
committerJames Booth <boothj5@gmail.com>2016-03-02 23:00:47 +0000
commit2c7a4e4843697e799a366782f16ebe3d7ce16c12 (patch)
tree2b3c6e6333a7ec8dca933013091c320f34652a9f /configure.ac
parent5ddf379ffd4fc16751a76f76a7788a9d2f1bc808 (diff)
downloadprofani-tty-2c7a4e4843697e799a366782f16ebe3d7ce16c12.tar.gz
Added workaround for http://bugs.python.org/issue3588
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 57146d9c..38ca4f6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,9 @@ AS_IF([test "x$PLATFORM" = xcygwin],
 AS_IF([test "x$PLATFORM" = xosx],
     [AC_DEFINE([PLATFORM_OSX], [1], [OSx])])
 
+### Environment variables
+AC_ARG_VAR([PYTHON_FRAMEWORK], [Set base directory for Python Framework])
+
 ### Options
 AC_ARG_ENABLE([notifications],
     [AS_HELP_STRING([--enable-notifications], [enable desktop notifications])])
@@ -66,6 +69,11 @@ AC_ARG_WITH([themes],
 if test "x$enable_plugins" = xno; then
     AM_CONDITIONAL([BUILD_PYTHON_API], [false])
 elif test "x$enable_python_plugins" != xno; then
+    AS_IF([test "x$PLATFORM" = xosx], [
+        AS_IF([test "x$PYTHON_FRAMEWORK" = x], [ PYTHON_FRAMEWORK="/Library/Frameworks/Python.framework" ])
+        AC_MSG_NOTICE([Symlinking Python.framework to $PYTHON_FRAMEWORK])
+        rm -f Python.framework
+        ln -s $PYTHON_FRAMEWORK Python.framework ])
     AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python-config, yes, no)
     if test "$PYTHON_CONFIG_EXISTS" == "yes"; then
         AX_PYTHON_DEVEL
@@ -79,6 +87,7 @@ elif test "x$enable_python_plugins" != xno; then
             AC_MSG_NOTICE([Python development package not found, Python plugin support disabled.])
         fi
     fi
+    AS_IF([test "x$PLATFORM" = xosx], [rm -f Python.framework])
 else
     AM_CONDITIONAL([BUILD_PYTHON_API], [false])
 fi