X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=configure.ac;h=c27376fd33339dcbb06628d0bda94fa7eae19156;hp=b7777adf45ce8fda0acb851b70c5476638e35863;hb=1c0dbcc95b2e8e9a20279f0dab0eecd115be5484;hpb=20e950feb2fea1c6c106ced44e1fef3cf6d882ef diff --git a/configure.ac b/configure.ac index b7777ad..c27376f 100644 --- a/configure.ac +++ b/configure.ac @@ -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])