aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>2024-02-24 19:35:50 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-02-26 21:35:06 -0500
commit15032315f35c44820952a9750baf58c2b4090b3f (patch)
tree71da4a24786e7415eafd5676d6e645694c54d439
parentc01c40498cfb770d4282f31edd9d75bb53646efa (diff)
cups: Use pkg-config to find cups backend dir
Some distributions(Gentoo) patch cups backend path to something else than libdir. Use pkg-config to find backend path for cups.
-rw-r--r--Makefile.tools3
-rw-r--r--configure.ac3
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.tools b/Makefile.tools
index 044342e29b..c172446776 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 6248eb0ea6..af0e9900e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,6 +246,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}])