summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Piechotka <uzytkownik2@gmail.com>2013-04-03 19:34:46 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2013-04-08 13:05:51 +0200
commit4a1c8482e19e5f3bf86b1a663362b6045b5fa4d6 (patch)
tree90c966804086e2bcc726d652a326eb97630d36e7
parenta4039273834a6f74cf1bb61b045dc185336f3dea (diff)
Add --enable-ovirt configure option
https://bugzilla.gnome.org/show_bug.cgi?id=697202
-rw-r--r--configure.ac22
1 files changed, 20 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9c71cc3..a79c534 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,8 +98,26 @@ VALA_ADD_CHECKFILE([src/gnome_boxes_search_provider_vala.stamp])
VALA_ADD_CHECKFILE([libgd/gd-1.0.vapi])
-PKG_CHECK_MODULES(OVIRT, [govirt-1.0 >= $GOVIRT_MIN_VERSION],
- [have_govirt=yes], [have_govirt=no])
+AC_ARG_ENABLE(ovirt,
+ AS_HELP_STRING([--enable-ovirt=yes|no|auto], [Enable support for OVirt]),
+ [enable_ovirt=$enableval],
+ [enable_ovirt=auto])
+case "x$enable_ovirt" in
+ xyes)
+ PKG_CHECK_MODULES(OVIRT, [govirt-1.0 >= $GOVIRT_MIN_VERSION])
+ have_govirt="yes"
+ ;;
+ xauto)
+ PKG_CHECK_MODULES(OVIRT, [govirt-1.0 >= $GOVIRT_MIN_VERSION],
+ [have_govirt=yes], [have_govirt=no])
+ ;;
+ xno)
+ have_govirt="xno"
+ ;;
+ x*)
+ AC_MSG_ERROR([Unknown --enable-ovirt argument: $enable_ovirt])
+ ;;
+esac
if test "x$have_govirt" = "xyes"; then
AC_DEFINE([HAVE_OVIRT], [1], [Build with oVirt support?])
else