From 20c9f7c2cca015a8ed57f4380045e745009291d2 Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Wed, 13 Feb 2013 20:25:01 +0100 Subject: Get the lib name for MagickCore from pkg-config. With recent ImageMagick releases the Quantum depth is postfixed to the lib name. --- GNUmakefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index d95bbf6..601147b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -39,6 +39,8 @@ ifeq ("$(ARCH)", "x86_64") LDFLAGS+=-m64 endif +MAGICKCORELIB=$(LINKERFLAG)$(lastword $(shell pkg-config --libs MagickCore)) + AR=ar RANLIB=ranlib @@ -85,7 +87,7 @@ $(LIBNAME_DMAGICK): $(OBJECTS_DMAGICK) echo "void main(){}" > $@ unittest: /tmp/stubmain.d $(SOURCES_DMAGICK) - $(DC) $(DCFLAGS) $(UNITTESTFLAG) $(LINKERFLAG)-lMagickCore $(LDFLAGS) $^ $(output) + $(DC) $(DCFLAGS) $(UNITTESTFLAG) $(MAGICKCORELIB) $(LDFLAGS) $^ $(output) ./$@ ####################################################################### @@ -109,7 +111,7 @@ DMagick.pc: echo Name: DMagick > $@ echo Description: DMagick - A D binding for ImageMagick. >> $@ echo Version: $(DMAGICK_VERSION) >> $@ - echo Libs: $(LINKERFLAG)-L$(prefix)/lib/ $(LINKERFLAG)-lDMagick $(LINKERFLAG)-lMagickCore >> $@ + echo Libs: $(LINKERFLAG)-L$(prefix)/lib/ $(LINKERFLAG)-lDMagick $(MAGICKCORELIB) >> $@ echo Cflags: -I$(prefix)/include/d/ $(VERSIONS) >> $@ ####################################################################### -- cgit v1.2.3