build: check hard pkg-config dependencies first
build: check hard pkg-config dependencies first

As reported by Damien Lespiau <damien.lespiau@intel.com>:

"""
PKG_CHECK_MODULES requires PKG_PROG_PKG_CONFIG, see pkg.m4:

    AC_DEFUN([PKG_CHECK_MODULES],
    [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl

The expansion of the AC_REQUIRE is done only once, the first time m4
encounters PKG_CHECK_MODULES.

Now the real issue is that the first occurrence of PKG_CHECK_MODULES is
in the test:
    if test "x$enable_vala" != no;

which means PKG_PROG_PKG_CONFIG is not being executed when --disable-vala
is given on the command line and thus I have the following error at
configure time.
"""

Then, this patch makes check first the hard dependencies, and aftwards the
optional stuff.

Signed-off-by: Víctor Manuel Jáquez Leal <853e0dbb5ddd43a0f0483f24794ae05c4c52af91@igalia.com>

GNOME/grilo,grilofw/grilo,kyoushuu/grilo,jasuarez/grilo,kyoushuu/grilo,grilofw/grilo,MathieuDuponchelle/grilo,GNOME/grilo,jasuarez/grilo,kyoushuu/grilo,MathieuDuponchelle/grilo,kyoushuu/grilo,grilofw/grilo,jasuarez/grilo,MathieuDuponchelle/grilo