[PATCH] cups: Use pkg-config to find cups backend dir

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

 



Some distributions(Gentoo) patch cups backend path to
something else than libdir. Use pkg-config to find backend
path for cups.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@xxxxxxxxxxxx>
---
 Makefile.tools | 3 ++-
 configure.ac   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile.tools b/Makefile.tools
index 044342e29..c17244677 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -538,7 +538,8 @@ endif
 endif
 
 if CUPS
-cupsdir = $(libdir)/cups/backend
+
+cupsdir = $(CUPSDIR)
 
 cups_PROGRAMS = profiles/cups/bluetooth
 
diff --git a/configure.ac b/configure.ac
index bb6380f2f..778c27a0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,9 @@ AC_SUBST(UDEV_DIR, [${path_udevdir}])
 AC_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups],
                 [disable CUPS printer support]), [enable_cups=${enableval}])
 AM_CONDITIONAL(CUPS, test "${enable_cups}" != "no")
+if (test "${enable_cups}" != "no"); then
+   AC_SUBST(CUPSDIR, `$PKG_CONFIG cups --variable=cups_serverbin`/backend)
+fi
 
 AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh],
 		[enable Mesh profile support]), [enable_mesh=${enableval}])
-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux