[gnome-color-manager] trivial: Add build-require of CUPS for future code



commit b793dae7eee30abee9a8c177f8e92e13a6a472e1
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 4 13:18:50 2010 +0000

    trivial: Add build-require of CUPS for future code

 configure.ac                        |   15 +++++++++++++++
 contrib/gnome-color-manager.spec.in |    2 ++
 src/Makefile.am                     |   10 ++++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index df3c1ee..acb9265 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,21 @@ PKG_CHECK_MODULES(X11, x11)
 AC_SUBST(X11_CFLAGS)
 AC_SUBST(X11_LIBS)
 
+dnl **** Check for cups ****
+AC_SUBST(CUPS_CFLAGS,"")
+AC_SUBST(CUPS_LIBS,"")
+ac_save_CPPFLAGS="$CPPFLAGS"
+ac_cups_cflags=`cups-config --cflags 2>/dev/null`
+ac_cups_libs=`cups-config --ldflags 2>/dev/null`
+CPPFLAGS="$CPPFLAGS $ac_cups_cflags"
+AC_CHECK_HEADERS(cups/cups.h,
+    [AC_CHECK_LIB(cups,cupsGetDefault,
+		  [
+			CUPS_CFLAGS="$ac_cups_cflags"
+			CUPS_LIBS="-lcups $ac_cups_libs"
+		  ],,[$ac_cups_libs])])
+CPPFLAGS="$ac_save_CPPFLAGS"
+
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2
 
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index be05f33..7805df0 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -24,6 +24,7 @@ Requires:  dbus-x11
 Requires:  udev
 Requires:  vte
 Requires:  lcms
+Requires:  cups
 Requires:  polkit
 Requires:  PackageKit
 Requires:  shared-color-profiles
@@ -49,6 +50,7 @@ BuildRequires: libXxf86vm-devel
 BuildRequires: libXrandr-devel
 BuildRequires: gnome-desktop-devel
 BuildRequires: lcms-devel
+BuildRequires: cups-devel
 
 %description
 gnome-color-manager is a session framework that makes it easy to manage, install
diff --git a/src/Makefile.am b/src/Makefile.am
index fc23fce..6d998ce 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,6 +8,7 @@ INCLUDES =						\
 	$(VTE_CFLAGS)					\
 	$(LCMS_CFLAGS)					\
 	$(XORG_CFLAGS)					\
+	$(CUPS_CFLAGS)					\
 	$(DBUS_GLIB_CFLAGS)				\
 	-DG_UDEV_API_IS_SUBJECT_TO_CHANGE		\
 	-DGNOME_DESKTOP_USE_UNSTABLE_API		\
@@ -102,6 +103,7 @@ gcm_dump_edid_LDADD =					\
 	$(XORG_LIBS)					\
 	$(DBUS_GLIB_LIBS)				\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_dump_edid_CFLAGS =					\
@@ -121,6 +123,7 @@ gcm_dump_profile_LDADD =				\
 	$(XORG_LIBS)					\
 	$(DBUS_GLIB_LIBS)				\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_dump_profile_CFLAGS =				\
@@ -134,6 +137,7 @@ gcm_fix_profile_LDADD =					\
 	$(X11_LIBS)					\
 	$(LCMS_LIBS)					\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_fix_profile_CFLAGS =				\
@@ -153,6 +157,7 @@ gcm_inspect_LDADD =					\
 	$(XORG_LIBS)					\
 	$(DBUS_GLIB_LIBS)				\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_inspect_CFLAGS =					\
@@ -172,6 +177,7 @@ gcm_apply_LDADD =					\
 	$(XORG_LIBS)					\
 	$(DBUS_GLIB_LIBS)				\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_apply_CFLAGS =					\
@@ -191,6 +197,7 @@ gcm_import_LDADD =					\
 	$(XORG_LIBS)					\
 	$(DBUS_GLIB_LIBS)				\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_import_CFLAGS =					\
@@ -220,6 +227,7 @@ gcm_prefs_LDADD =					\
 	$(DBUS_GLIB_LIBS)				\
 	$(XORG_LIBS)					\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_prefs_CFLAGS =					\
@@ -242,6 +250,7 @@ gcm_session_LDADD =					\
 	$(DBUS_GLIB_LIBS)				\
 	$(XORG_LIBS)					\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_session_CFLAGS =					\
@@ -286,6 +295,7 @@ gcm_self_test_LDADD =					\
 	$(DBUS_GLIB_LIBS)				\
 	$(XORG_LIBS)					\
 	$(GTK_LIBS)					\
+	$(CUPS_LIBS)					\
 	-lm
 
 gcm_self_test_CFLAGS = -DEGG_TEST $(AM_CFLAGS)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]