[gnome-control-center] printers: Check for CUPS header files
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Check for CUPS header files
- Date: Wed, 19 Jan 2011 10:13:30 +0000 (UTC)
commit a03eb1664c890e987b13451d137b0c4c9dfff854
Author: Marek Kasik <mkasik redhat com>
Date: Wed Jan 19 11:11:59 2011 +0100
printers: Check for CUPS header files
Don't build Printers panel if there are not CUPS header files.
configure.ac | 13 +++++++++----
panels/Makefile.am | 5 ++++-
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c218244..0bfb462 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,10 +107,15 @@ PKG_CHECK_MODULES(PULSEAUDIO,
libpulse-mainloop-glib >= $PA_REQUIRED_VERSION)
AC_SUBST(PULSEAUDIO_CFLAGS)
AC_SUBST(PULSEAUDIO_LIBS)
-# check for cups
-AC_CHECK_HEADERS(cups/cups.h cups/http.h cups/ipp.h)
-CUPS_LIBS=-lcups
-AC_SUBST(CUPS_LIBS)
+
+AC_CHECK_HEADERS([cups/cups.h cups/http.h cups/ipp.h], have_cups=yes, have_cups=no)
+if test x$have_cups = xyes ; then
+ CUPS_LIBS=-lcups
+ AC_SUBST(CUPS_LIBS)
+else
+ AC_MSG_WARN(*** Printers panel will not be built (CUPS header files not found) ***)
+fi
+AM_CONDITIONAL(BUILD_PRINTERS, [test x$have_cups = xyes])
gtk_lib_dir=`$PKG_CONFIG --variable libdir gtk+-3.0`
gtk_binary_version=`$PKG_CONFIG --variable gtk_binary_version gtk+-3.0`
diff --git a/panels/Makefile.am b/panels/Makefile.am
index efd5cf6..501f5fc 100644
--- a/panels/Makefile.am
+++ b/panels/Makefile.am
@@ -5,7 +5,6 @@ SUBDIRS= \
display \
media \
mouse \
- printers \
region \
network \
info \
@@ -15,4 +14,8 @@ SUBDIRS= \
user-accounts \
datetime
+if BUILD_PRINTERS
+SUBDIRS += printers
+endif
+
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]