]> sigrok.org Git - libsigrokdecode.git/blobdiff - configure.ac
Fix 'make install' on OSes where 'python3' doesn't exist.
[libsigrokdecode.git] / configure.ac
index 420c8f322d36c47dc10df1ecb144ab0cd459cd8f..c27376fd33339dcbb06628d0bda94fa7eae19156 100644 (file)
@@ -115,6 +115,13 @@ PKG_CHECK_MODULES([python3], [python3 >= 3.2],
 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])