- GPOINTER_TO_INT="((gint) (ptr))"
- GPOINTER_TO_UINT="((guint) (ptr))"
- GINT_TO_POINTER="((gpointer) (v))"
- GUINT_TO_POINTER="((gpointer) (v))"
- GSIZE="int"
- GSIZE_FORMAT='"u"'
- G_GUINT64_FORMAT='"llu"'
+ AC_MSG_ERROR([unsupported pointer size])
+fi
+
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+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
+have_glib=false
+if test "x$PKG_CONFIG" != "xno"; then
+ if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
+ have_glib=true;
+ else
+ have_glib=false;
+ fi