Diff between 9cc8b97b8f5d060e334207136100e947732aed08 and d5a9195a6269e703c6e3a47c40982ec94d8cc838

Changed Files

File Additions Deletions Status
Makefile.tools +5 -1 modified
configure.ac +7 -1 modified

Full Patch

diff --git a/Makefile.tools b/Makefile.tools
index c172446..27a7537 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -539,7 +539,11 @@ endif
 
 if CUPS
 
-cupsdir = $(CUPSDIR)
+if CUPS_SERVERBIN
+cupsdir = $(CUPS_SERVERBIN)/backend
+else
+cupsdir = $(libdir)/cups/backend
+endif
 
 cups_PROGRAMS = profiles/cups/bluetooth
 
diff --git a/configure.ac b/configure.ac
index af0e990..6552154 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,13 @@ 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)
+	AC_MSG_CHECKING([cups directory])
+	cups_serverbin=`$PKG_CONFIG cups --variable=cups_serverbin`
+	AM_CONDITIONAL(CUPS_SERVERBIN, test "${cups_serverbin}" != "")
+	if (test "${cups_serverbin}" != ""); then
+		AC_SUBST(CUPS_SERVERBIN, ${cups_serverbin})
+	fi
+	AC_MSG_RESULT([${cups_serverbin}])
 fi
 
 AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh],