]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add Cython detection
authorEric Bollengier <eric@baculasystems.com>
Mon, 1 Apr 2019 15:28:02 +0000 (17:28 +0200)
committerRadosław Korzeniewski <radekk@inteos.pl>
Sat, 14 Dec 2019 14:55:28 +0000 (15:55 +0100)
bacula/autoconf/configure.in

index 357972aa5a17d96733bb73b321b2ea806b9c6688..3246b2e7e881c08f6e3c508575d03044534c8840 100644 (file)
@@ -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 -------------------------------------------