fix build with python 3.8 OBS-URL: https://build.opensuse.org/request/show/785836 OBS-URL: https://build.opensuse.org/package/show/X11:xfce/thunarx-python?expand=0&rev=21
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
diff --git a/aclocal.m4 b/aclocal.m4
|
|
index 402f5c8..3f9dd64 100644
|
|
--- a/aclocal.m4
|
|
+++ b/aclocal.m4
|
|
@@ -11008,7 +11008,9 @@ py_lib_name=`basename $py_include_path`
|
|
if test "x$PYTHON_LIBS" = x; then
|
|
PYTHON_CONFIG=`which $PYTHON`-config
|
|
if test -x "$PYTHON_CONFIG"; then
|
|
- PYTHON_LIBS=`$PYTHON_CONFIG --ldflags 2>/dev/null`
|
|
+ # python 3.8 needs this, but 3.6 does not support it
|
|
+ $PYTHON_CONFIG --ldflags --embed >/dev/null 2>&1 && EMBED=--embed
|
|
+ PYTHON_LIBS=`$PYTHON_CONFIG --ldflags $EMBED 2>/dev/null`
|
|
else
|
|
PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
|
|
fi
|
|
diff --git a/configure b/configure
|
|
index 9fabaa0..690ca33 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -13557,7 +13557,9 @@ py_lib_name=`basename $py_include_path`
|
|
if test "x$PYTHON_LIBS" = x; then
|
|
PYTHON_CONFIG=`which $PYTHON`-config
|
|
if test -x "$PYTHON_CONFIG"; then
|
|
- PYTHON_LIBS=`$PYTHON_CONFIG --ldflags 2>/dev/null`
|
|
+ # python 3.8 needs this, but 3.6 does not support it
|
|
+ $PYTHON_CONFIG --ldflags --embed >/dev/null 2>&1 && EMBED=--embed
|
|
+ PYTHON_LIBS=`$PYTHON_CONFIG --ldflags $EMBED 2>/dev/null`
|
|
else
|
|
PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
|
|
fi
|