+
+pkg_config_path=
+AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir],
+ if test x$with_crosspkgdir = "x"; then
+ if test -s $PKG_CONFIG_PATH; then
+ pkg_config_path=$PKG_CONFIG_PATH
+ fi
+ else
+ pkg_config_path=$with_crosspkgdir
+ PKG_CONFIG_PATH=$pkg_config_path
+ export PKG_CONFIG_PATH
+ fi
+)
+
+dnl
+dnl No, you can not replace the call below with a pkg.m4 macro
+dnl
+if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
+ have_glib=true;
+else
+ have_glib=false;
+fi
+AM_CONDITIONAL(HAVE_GLIB, $have_glib)
+