build: prefer python3 over python2 in autotools's configure script

On Debian sid, pygobject no longer builds "python-gobject" for
python2. Still, python2 may be installed and detected preferably
by AM_PATH_PYTHON(). Add workaround.
This commit is contained in:
Thomas Haller 2020-08-12 19:06:28 +02:00
parent 173533c3b2
commit 54a1cfa973
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728

View File

@ -1223,7 +1223,10 @@ else
fi
AC_SUBST(NM_LOG_COMPILER, 'LOG_COMPILER = "$(top_srcdir)/tools/run-nm-test.sh" --called-from-make "$(abs_top_builddir)" "$(LIBTOOL)" "$(with_valgrind)" "'"$with_valgrind_suppressions"'" --launch-dbus=auto')
AM_PATH_PYTHON([], [], [PYTHON=python])
AM_PATH_PYTHON([3], [], [PYTHON=])
if test -z "$PYTHON"; then
AM_PATH_PYTHON([], [], [PYTHON=python])
fi
AC_SUBST(PYTHON, [$PYTHON])
AC_DEFINE_UNQUOTED(TEST_NM_PYTHON, "$PYTHON", [Define python path for test binary])