build: Disable printers panel is libsmbclient.pc isn't found

https://bugzilla.gnome.org/show_bug.cgi?id=693923
This commit is contained in:
Jeremy Bicha 2013-02-15 16:40:07 -05:00 committed by Bastien Nocera
parent cb0b2b5039
commit 05e60169ea
2 changed files with 11 additions and 3 deletions

View file

@ -152,8 +152,7 @@ PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
smbclient)
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES)
PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
@ -213,6 +212,14 @@ if test x${have_bluetooth} = xyes; then
AC_DEFINE(HAVE_BLUETOOTH, 1, [Define to 1 if bluetooth support is available])
fi
# Check for smbclient
PKG_CHECK_MODULES(SMBCLIENT, smbclient, [have_smbclient=yes], [have_smbclient=no])
if test x"$have_smbclient" = x"no"; then
AC_MSG_WARN(*** Printer panel will not be built (smbclient.pc not found) ***)
enable_cups=no
fi
# Check for CUPS 1.4 or newer
AC_ARG_ENABLE([cups],
AS_HELP_STRING([--disable-cups], [disable CUPS support (default: enabled)]),,

View file

@ -3,6 +3,7 @@ cappletname = printers
INCLUDES = \
$(PANEL_CFLAGS) \
$(PRINTERS_PANEL_CFLAGS) \
$(SMBCLIENT_CFLAGS) \
-I$(top_srcdir)/shell/ \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
$(NULL)
@ -44,7 +45,7 @@ libprinters_la_SOURCES = \
cc-printers-panel.c \
cc-printers-panel.h
libprinters_la_LIBADD = $(PRINTERS_PANEL_LIBS) $(PANEL_LIBS) $(CUPS_LIBS)
libprinters_la_LIBADD = $(PRINTERS_PANEL_LIBS) $(PANEL_LIBS) $(CUPS_LIBS) $(SMBCLIENT_LIBS)
resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/printers.gresource.xml)
cc-printers-resources.c: printers.gresource.xml $(resource_files)