diff options
author | Paul Kocialkowski <paul.kocialkowski@linux.intel.com> | 2017-07-19 17:58:59 +0300 |
---|---|---|
committer | Lyude <lyude@redhat.com> | 2017-07-19 13:44:12 -0400 |
commit | 4c70d6e66faa177ceb072fa346b4cbe3b19330c1 (patch) | |
tree | 43042903d7231a1356446949a21e644c93075a1f /configure.ac | |
parent | 8145888a30c3c812cd6b33fb61c9fd969ce74350 (diff) |
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 <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 7 insertions, 1 deletions
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 |