configure: Make cheese detection auto

Simply detect cheese availability, and build with if it is.
This helps people jhbuilding the gnome-shell moduleset.
This commit is contained in:
Colin Walters 2011-03-03 14:12:23 -05:00
parent 975c3aea6a
commit 1b7ce6ee5a
2 changed files with 14 additions and 5 deletions

View file

@ -160,11 +160,14 @@ AM_CONDITIONAL(BUILD_PRINTERS, [test x"$enable_cups" = x"yes"])
# Optional dependency for the user accounts panel
AC_ARG_WITH([cheese],
AS_HELP_STRING([--with-cheese], [enable cheese webcam support]),,
with_cheese=yes)
with_cheese=auto)
if test x"$with_cheese" != x"no" ; then
PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.29.90)
AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.29.90, [have_cheese=yes], [have_cheese=no])
AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
if test x${have_cheese} = xyes; then
AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
fi
fi
# This is a hard-dependency for the region and user-accounts panels