libbtrfsutil: use pkg-config detection for the right Python version
authorOmar Sandoval <osandov@fb.com>
Tue, 27 Feb 2018 20:42:38 +0000 (12:42 -0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 30 Mar 2018 20:15:53 +0000 (22:15 +0200)
The user may have specified a different version of Python than the
python3 from their $PATH (e.g., with PYTHON=/usr/bin/python3.6).

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
configure.ac

index dcc98ea..af13a95 100644 (file)
@@ -219,7 +219,7 @@ AC_ARG_ENABLE([python],
 
 if test "x$enable_python" = xyes; then
        AM_PATH_PYTHON([3.4])
-       PKG_CHECK_MODULES(PYTHON, [python3])
+       PKG_CHECK_MODULES(PYTHON, [python-${PYTHON_VERSION}])
 fi
 
 AS_IF([test "x$enable_python" = xyes], [PYTHON_BINDINGS=1], [PYTHON_BINDINGS=0])