From d85b8756272617a7e03e7431a54fc9d20a2a4d8f Mon Sep 17 00:00:00 2001 From: Peter De Wachter Date: Wed, 2 Mar 2016 19:41:44 +0100 Subject: [PATCH] Use cups-config --ldflags This fixes link problems on NixOS. --- Makefile.am | 1 + configure.ac | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile.am b/Makefile.am index 5d49e0f..bcfd47b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,7 @@ src_rastertobrlaser_SOURCES = \ src/line.h \ src/line.cc src_rastertobrlaser_LDADD = $(CUPS_LIBS) +src_rastertobrlaser_LDFLAGS = $(CUPS_LDFLAGS) src_brdecode_SOURCES = \ src/brdecode.cc diff --git a/configure.ac b/configure.ac index 5bfcb53..e746b2b 100644 --- a/configure.ac +++ b/configure.ac @@ -38,10 +38,12 @@ AS_IF([test -z "$CUPS_CONFIG"], [AC_MSG_ERROR(["cups-config" command not found. Please install the CUPS development package.])]) CUPS_CFLAGS=`"$CUPS_CONFIG" --cflags` CUPS_LIBS=`"$CUPS_CONFIG" --image --libs` +CUPS_LDFLAGS=`"$CUPS_CONFIG" --image --ldflags` CUPS_SERVERBIN=`"$CUPS_CONFIG" --serverbin` CUPS_DATADIR=`"$CUPS_CONFIG" --datadir` AC_SUBST(CUPS_CFLAGS) AC_SUBST(CUPS_LIBS) +AC_SUBST(CUPS_LDFLAGS) AC_SUBST(CUPS_SERVERBIN) AC_SUBST(CUPS_DATADIR)