Bugzilla – Bug 4109
package config depends on python unconditionally
Last modified: 2018-06-27 07:45:45 CEST
Created attachment 507 [details] patch using pythonX from pkg-config When --with-pythonmodule --with-pyunbound enabled, libunbound.pc will contain requirement to python. If ./configure --with-pythonmodule --with-pyunbound PYTHON=python3 is used, it will require python.pc anyway. On both Fedora and Debian they point to python2. I want python3 module only, but there is no way to not depend on python2. On both Debian and Fedora there are available pkg-config for python2, python3 and versions with minor versions as well. I think they should be used if possible.
Hi Petr, I have turned it into the patch below, to move the AC_REQUIRE into the option branch for python. autoconf errors on the AC_REQUIRE not inside a function. Thanks for the patch! Index: configure.ac =================================================================== --- configure.ac (revision 4756) +++ configure.ac (working copy) @@ -586,7 +586,10 @@ CPPFLAGS="$PYTHON_CPPFLAGS" fi ub_have_python=yes - PC_PY_DEPENDENCY="python" + PKG_PROG_PKG_CONFIG + PKG_CHECK_EXISTS(["python${PY_MAJOR_VERSION}"], + [PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"], + [PC_PY_DEPENDENCY="python"]) AC_SUBST(PC_PY_DEPENDENCY) # Check for SWIG Best regards, Wouter