From 4c70d6e66faa177ceb072fa346b4cbe3b19330c1 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Wed, 19 Jul 2017 17:58:59 +0300 Subject: configure.ac: Make glib dependency optional to preserve Android build This adds ifdef wrappers, with matching autoconf macros, to make the dependency on glib (used for parsing configuration) optional. This allows preserving the ability to build IGT on Android, where glib support is lacking. Signed-off-by: Paul Kocialkowski Reviewed-by: Lyude --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 52339c8b..7655df1c 100644 --- a/configure.ac +++ b/configure.ac @@ -177,7 +177,10 @@ AM_CONDITIONAL(HAVE_UDEV, [test "x$udev" = xyes]) if test x"$udev" = xyes; then AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection]) fi -PKG_CHECK_MODULES(GLIB, glib-2.0) +PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib=yes], [glib=no]) +if test x"$glib" = xyes; then + AC_DEFINE(HAVE_GLIB,1,[Enable glib support]) +fi # for chamelium AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium], @@ -189,6 +192,9 @@ if test "x$enable_chamelium" = xyes; then [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium. Use --disable-chamelium to disable chamelium support.])]) PKG_CHECK_MODULES(PIXMAN, pixman-1, [], [AC_MSG_ERROR([Failed to find pixman, required by chamelium. Use --disable-chamelium to disable chamelium support.])]) + if test x"$glib" != xyes; then + AC_MSG_ERROR([Failed to find glib, required by chamelium. Use --disable-chamelium to disable chamelium support.]) + fi AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support]) fi -- cgit v1.2.3