summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-05-04 22:17:03 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-05-04 22:25:45 +0200
commit1c0dbcc95b2e8e9a20279f0dab0eecd115be5484 (patch)
tree69754bab8d6a793f9f5e0c89351d321892c27403 /configure.ac
parent0672779d5e3e128ef3f7ec932772ff6d65fcbc50 (diff)
downloadlibsigrokdecode-1c0dbcc95b2e8e9a20279f0dab0eecd115be5484.tar.gz
libsigrokdecode-1c0dbcc95b2e8e9a20279f0dab0eecd115be5484.zip
Fix 'make install' on OSes where 'python3' doesn't exist.
Sometimes the Python 3 executable is called just 'python3', sometimes it is called 'python3.4' and so on. Handle all cases transparently for the user. Before: $ make install /usr/bin/env: python3: No such file or directory After: $ make install python3.4 ./tools/install-decoders -i ./decoders -o [...] Installing 36 protocol decoders: [...]
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 420c8f3..c27376f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])