From: Eric Bollengier Date: Fri, 23 Sep 2022 15:50:10 +0000 (+0200) Subject: Fix Cython detection on python >= 3.8 X-Git-Tag: Release-13.0.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c319e7951d18fd633bac545f6d477697662290;p=thirdparty%2Fbacula.git Fix Cython detection on python >= 3.8 --- diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 6dec88657..b0945b74d 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1616,8 +1616,13 @@ if test $? = 0; then PYTHON=python CYTHON="$CYTHON -2" fi - CYTHON_LIBS=`${PYTHON}-config --libs 2>/dev/null` - CYTHON_INC=`${PYTHON}-config --includes 2>/dev/null` + # Thanks to Python, in 3.8 the new --embed flag is necessary + # but it break any previous version. So, let's do it 2 times + CYTHON_LIBS=`${PYTHON}-config --ldflags --embed 2>/dev/null` + if test $? != 0; then + CYTHON_LIBS=`${PYTHON}-config --ldflags 2>/dev/null` + fi + CYTHON_INC=`${PYTHON}-config --cflags 2>/dev/null` else CYTHON= fi