summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Gilbert <bgilbert@cs.cmu.edu>2015-02-04 03:46:48 -0500
committerMarc-André Lureau <marcandre.lureau@redhat.com>2015-02-06 17:18:27 +0100
commit08101d0146fe6d46e332ceacd66881a4c58fcf4c (patch)
treed87c7e6a223392970ca3b30872dc1ef2270f02f6 /configure.ac
parent6631e262a1afe54b3ff1ee64b3f30c9a4b761c9d (diff)
downloadspice-gtk-08101d0146fe6d46e332ceacd66881a4c58fcf4c.tar.gz
spice-gtk-08101d0146fe6d46e332ceacd66881a4c58fcf4c.tar.xz
spice-gtk-08101d0146fe6d46e332ceacd66881a4c58fcf4c.zip
Don't build libspice-client-gtk if configured --without-gtk
libspice-client-glib is useful as a client library on platforms that don't support GTK.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 11 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 9b420a3..4e88dec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,13 +158,13 @@ AC_SUBST([SASL_LIBS])
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
- [AS_HELP_STRING([--with-gtk=@<:@2.0/3.0@:>@],[which gtk+ version to compile against @<:@default=3.0@:>@])],
+ [AS_HELP_STRING([--with-gtk=@<:@2.0/3.0/no@:>@],[which gtk+ version to compile against @<:@default=3.0@:>@])],
[case "$with_gtk" in
- 2.0|3.0) ;;
+ 2.0|3.0) AC_MSG_RESULT([$with_gtk]) ;;
+ no) AC_MSG_RESULT([none]) ;;
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
esac],
[with_gtk=3.0])
-AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
2.0) GTK_API_VERSION=2.0
@@ -175,15 +175,20 @@ case "$with_gtk" in
GTK_REQUIRED=2.91.3
SPICE_GTK_API_VERSION=3.0
;;
+ no)
+ AS_IF([test x$enable_gtk_doc = xyes],
+ [AC_MSG_ERROR([Without GTK+, gtk-doc must be disabled])])
esac
AC_SUBST([GTK_API_VERSION])
AC_SUBST([GTK_REQUIRED])
AC_SUBST([SPICE_GTK_API_VERSION])
+AM_CONDITIONAL([WITH_GTK],[test "$with_gtk" != "no"])
AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
-PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
+AS_IF([test "x$with_gtk" != "xno"],
+ [PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
SPICE_GTK_REQUIRES="${SPICE_GTK_REQUIRES} gtk+-$GTK_API_VERSION >= $GTK_REQUIRED"
@@ -599,7 +604,7 @@ AC_ARG_WITH([python],
yes|no|auto) with_python="$withval";;
*) AC_MSG_ERROR([bad value $withval for python option]) ;;
esac],
- [AS_IF([test "$with_gtk" = "3.0" || test "x$os_win32" = "xyes"],
+ [AS_IF([test "$with_gtk" != "2.0" || test "x$os_win32" = "xyes"],
[with_python=no],[with_python=auto])]
)
@@ -758,8 +763,8 @@ AC_MSG_NOTICE([
prefix: ${prefix}
c compiler: ${CC}
Target: ${red_target}
- Gtk: $GTK_API_VERSION
+ Gtk: ${with_gtk}
Coroutine: ${with_coroutine}
Audio: ${with_audio}
SASL support: ${enable_sasl}