]> sigrok.org Git - libsigrokdecode.git/blobdiff - configure.ac
Only load and use PDs of API version 2.
[libsigrokdecode.git] / configure.ac
index b7777adf45ce8fda0acb851b70c5476638e35863..c27376fd33339dcbb06628d0bda94fa7eae19156 100644 (file)
@@ -99,7 +99,11 @@ PKG_CHECK_MODULES([python3], [python3 >= 3.2],
        [pyver=`$PKG_CONFIG --modversion python3`;
        CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python3_CFLAGS";
        LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python3_LIBS"],
-[PKG_CHECK_MODULES([python33], [python-3.3 >= 3.2],
+[PKG_CHECK_MODULES([python34], [python-3.4 >= 3.4],
+       [pyver=`$PKG_CONFIG --modversion python-3.4`;
+       CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python34_CFLAGS";
+       LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python34_LIBS"],
+[PKG_CHECK_MODULES([python33], [python-3.3 >= 3.3],
        [pyver=`$PKG_CONFIG --modversion python-3.3`;
        CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
        LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"],
@@ -107,10 +111,17 @@ PKG_CHECK_MODULES([python3], [python3 >= 3.2],
        [pyver=`$PKG_CONFIG --modversion python-3.2`;
        CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
        LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"],
-)])])
+)])])])
 AC_SUBST(CPPFLAGS_PYTHON)
 AC_SUBST(LDFLAGS_PYTHON)
 
+# We also need to find the name of the python3 executable (for 'make install').
+# Some OSes call this python3, some call it python3.2, etc. etc.
+AC_CHECK_PROGS([PYTHON3], [python3.4 python3.3 python3.2 python3])
+if test "x$PYTHON3" == "x"; then
+       AC_MSG_ERROR([cannot find python3 executable.])
+fi
+
 # Link against libm, this is required (among other things) by Python.
 AC_SEARCH_LIBS([pow], [m])