Commit 1b7ce6ee authored by Colin Walters's avatar Colin Walters

configure: Make cheese detection auto

Simply detect cheese availability, and build with if it is.
This helps people jhbuilding the gnome-shell moduleset.
parent 975c3aea
......@@ -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
......
......@@ -16,9 +16,12 @@ AM_CPPFLAGS = \
-I$(srcdir)/../common/ \
$(PANEL_CFLAGS) \
$(USER_ACCOUNTS_PANEL_CFLAGS) \
$(CHEESE_CFLAGS) \
$(DISABLE_DEPRECATED)
if BUILD_CHEESE
AM_CPPFLAGS += $(CHEESE_CFLAGS)
endif
MARSHALFILES = marshal.c marshal.h
BUILT_SOURCES = $(MARSHALFILES)
......@@ -67,11 +70,14 @@ libuser_accounts_la_SOURCES = \
libuser_accounts_la_LIBADD = \
$(PANEL_LIBS) \
$(USER_ACCOUNTS_PANEL_LIBS) \
$(CHEESE_LIBS) \
$(top_builddir)/panels/common/liblanguage.la \
-lcrypt \
-lm
if BUILD_CHEESE
libuser_accounts_la_LIBADD += $(CHEESE_LIBS)
endif
libuser_accounts_la_LDFLAGS = $(PANEL_LDFLAGS)
EXTRA_DIST = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment