Only check for wnck3 if --enable-gtk3 was passed, and enable it by default then.

Only check for wnck/gksu in the other case.
This way one only needs --enable-gtk3 to switch.
This commit is contained in:
Landry Breuil
2014-12-11 22:18:50 +01:00
parent 9e0dde7a47
commit 5310bb20d5

View File

@@ -71,17 +71,19 @@ XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.5.0])
dnl *********************************** dnl ***********************************
dnl *** Check for optional packages *** dnl *** Check for optional packages ***
dnl *********************************** dnl ***********************************
XDT_CHECK_OPTIONAL_PACKAGE([WNCK], [libwnck-1.0], [2.0], [wnck], [building with libwnck for window icons/names], [yes])
AM_CONDITIONAL([HAVE_WNCK], [test x"$WNCK_FOUND" = x"yes"])
XDT_CHECK_OPTIONAL_PACKAGE([GKSU], [libgksu2], [2.0], [gksu], [building with libgksu to run as root], [yes])
AM_CONDITIONAL([HAVE_GKSU], [test x"$GKSU_FOUND" = x"yes"])
XDT_CHECK_OPTIONAL_PACKAGE([GTK3], XDT_CHECK_OPTIONAL_PACKAGE([GTK3],
[gtk+-3.0], [3.2.0], [gtk3], [gtk+-3.0], [3.2.0], [gtk3],
[GTK+ 3 support], [no]) [GTK+ 3 support], [no])
AM_CONDITIONAL([USE_GTK3], [test "x$GTK3_FOUND" = "xyes"]) AM_CONDITIONAL([USE_GTK3], [test "x$GTK3_FOUND" = "xyes"])
XDT_CHECK_OPTIONAL_PACKAGE([WNCK3], [libwnck-3.0], [3.2], [wnck3], [building with libwnck3 for window icons/names], [no]) if test "x$GTK3_FOUND" = "xyes"; then
AM_CONDITIONAL([USE_WNCK3], [test x"$WNCK3_FOUND" = x"yes"]) XDT_CHECK_OPTIONAL_PACKAGE([WNCK3], [libwnck-3.0], [3.2], [wnck3], [building with libwnck3 for window icons/names], [yes])
else
XDT_CHECK_OPTIONAL_PACKAGE([WNCK], [libwnck-1.0], [2.0], [wnck], [building with libwnck for window icons/names], [yes])
XDT_CHECK_OPTIONAL_PACKAGE([GKSU], [libgksu2], [2.0], [gksu], [building with libgksu to run as root], [yes])
fi
AM_CONDITIONAL([HAVE_WNCK3], [test x"$WNCK3_FOUND" = x"yes"])
AM_CONDITIONAL([HAVE_WNCK], [test x"$WNCK_FOUND" = x"yes"])
AM_CONDITIONAL([HAVE_GKSU], [test x"$GKSU_FOUND" = x"yes"])
dnl *********************************** dnl ***********************************
dnl ********** Check for skel ********* dnl ********** Check for skel *********
dnl *********************************** dnl ***********************************
@@ -155,7 +157,7 @@ echo
echo "Build Configuration:" echo "Build Configuration:"
echo echo
echo "* Gksu: ${GKSU_VERSION:-no}" echo "* Gksu: ${GKSU_VERSION:-no}"
if test "x$WNCK3_FOUND" = "xyes" ; then if test "x$GTK3_FOUND" = "xyes" ; then
echo "* Wnck: ${WNCK3_VERSION:-no}" echo "* Wnck: ${WNCK3_VERSION:-no}"
else else
echo "* Wnck: ${WNCK_VERSION:-no}" echo "* Wnck: ${WNCK_VERSION:-no}"