From: Eric Bollengier Date: Mon, 1 Apr 2019 15:28:02 +0000 (+0200) Subject: Add Cython detection X-Git-Tag: Release-9.6.0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2da5ebb0dcb92cf615a863f66e574027b3f39b94;p=thirdparty%2Fbacula.git Add Cython detection --- diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 357972aa5..3246b2e7e 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1531,6 +1531,40 @@ AC_ARG_WITH(sbin-perm, AC_SUBST(SBINPERM) +dnl ------------------------------------------ +dnl Python Cython detection +dnl ------------------------------------------ +CYTHON=cython +CYTHON_LIBS= +CYTHON_INC= +AC_ARG_WITH(cython, + AC_HELP_STRING([--with-cython=cython], [Cython path]), + [ + if test "x$withval" != "xno" ; then + CYTHON=$withval + fi + ] +) + +$CYTHON -h > /dev/null 2> /dev/null +if test $? = 0; then + if echo $CYTHON | grep cython3 > /dev/null; then + PYTHON=python3 + CYTHON="$CYTHON -3" + else + PYTHON=python + CYTHON="$CYTHON -2" + fi + CYTHON_LIBS=`${PYTHON}-config --libs 2>/dev/null` + CYTHON_INC=`${PYTHON}-config --includes 2>/dev/null` +else + CYTHON= +fi + +AC_SUBST(CYTHON) +AC_SUBST(CYTHON_LIBS) +AC_SUBST(CYTHON_INC) + dnl ------------------------------------------- dnl enable batch attribute DB insert (default on) dnl -------------------------------------------