diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-12-06 18:14:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-12-06 23:02:19 +0100 |
commit | 9e16ad5d511cfa85b3be87f6da36f9b8e0b47424 (patch) | |
tree | 0b2a8a99c198a6a86c255f7995ca55dedf63300c /configure.ac | |
parent | d7b46ef1cf69c9fe5c4c36958ca5d5b40de8cf8d (diff) |
--enable-python=system no longer works on macOS
e.g.:
> [CXX] pyuno/source/module/pyuno_callable.cxx
> In file included from pyuno/source/module/pyuno_callable.cxx:19:
> In file included from pyuno/source/module/pyuno_impl.hxx:27:
> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85:
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:534:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
> register PyObject *obj, /* Object */
> ^~~~~~~~~
(and some $enable_python=system/$_os=Darwin-specific code can thus be removed,
too)
Change-Id: Ic7901732c01bef9335c63dd6f0949453f5824226
Reviewed-on: https://gerrit.libreoffice.org/64732
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 4e55ddbff76e..9f60e40384a0 100644 --- a/configure.ac +++ b/configure.ac @@ -8263,6 +8263,9 @@ fully-internal) ;; system) AC_MSG_RESULT([system]) + if test "$_os" = Darwin; then + AC_MSG_ERROR([--enable-python=system doesn't work on macOS: /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h is known to contain uses of "register", which is removed from C++17]) + fi ;; *) AC_MSG_ERROR([Incorrect --enable-python option]) @@ -8274,17 +8277,6 @@ if test $enable_python != no; then fi if test $enable_python = system; then - if test -z "$PYTHON_CFLAGS" -a $_os = Darwin; then - python_version=2.7 - PYTHON=python$python_version - if test -d "$FRAMEWORKSHOME/Python.framework/Versions/${python_version}/include/python${python_version}"; then - PYTHON_CFLAGS="-I$FRAMEWORKSHOME/Python.framework/Versions/${python_version}/include/python${python_version}" - PYTHON_LIBS="-framework Python" - else - PYTHON_CFLAGS="`$PYTHON-config --includes`" - PYTHON_LIBS="`$PYTHON-config --libs`" - fi - fi if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then # Fallback: Accept these in the environment, or as set above # for MacOSX. |