summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLyude <lyude@redhat.com>2017-07-17 19:38:32 -0400
committerLyude <lyude@redhat.com>2017-07-17 19:39:37 -0400
commitfd096fcc3362b1178d687f08e63e198ad9d3dd67 (patch)
treecdeb21e0a77743ec94c92ca69ecccdba03042791 /configure.ac
parent1b4d6e506f73ba5b0cff35684f2c0b4bef930213 (diff)
configure.ac: Make building chamelium an option
Originally when chamelium support got added we were expecting basically any distribution to already have the required dependencies for it, however seeing as someone made chamelium compilation conditional that must not actually be the case. This being said however, when compilation of the chamelium tests/libs was made to only build when all of the dependencies were found, nothing was actually added to configure.ac to give even the slightest indication that chamelium support wasn't going to get built. This ended up breaking my autocompletion for the chamelium source files, leading to a multihour troubleshooting session where I eventually realized that someone had changed building chamelium support from mandatory to automatic. For now, I'll make this conditional so that people who can't satisfy these dependencies can disable this and everyone else can get warnings to let them know that they're missing dependencies required to build this. Please add messages in the future to our build scripts when these things get changed :\. Additionally, we also add xmlrpc_util and xmlrpc_client to the chamelium dependencies. This isn't required older versions of libxmlrpc, but it seems that in newer versions they've changed which packages provide which symbols. It shouldn't break building with older versions of xmlrpc though. Signed-off-by: Lyude <lyude@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index bf09927c..5b41f333 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,10 +180,15 @@ fi
PKG_CHECK_MODULES(GLIB, glib-2.0)
# for chamelium
-PKG_CHECK_MODULES(XMLRPC, xmlrpc_client, [xmlrpc=yes], [xmlrpc=no])
-PKG_CHECK_MODULES(PIXMAN, pixman-1, [pixman=yes], [pixman=no])
-AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$xmlrpc$pixman" = xyesyes])
-if test x"$xmlrpc$pixman" = xyesyes; then
+AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium],
+ [Enable building of chamelium libraries and tests (default: yes)]),
+ [enable_chamelium=yes], [enable_chamelium=no])
+AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$enable_chamelium" = xyes])
+if test "x$enable_chamelium" = xyes; then
+ PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client, [],
+ [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.])])
AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
fi