[PATCH] Find libmsgpackc in Multi-Arch library paths
authorJames McCoy <jamessan@jamessan.com>
Fri, 22 Jul 2016 03:30:32 +0000 (23:30 -0400)
committerAndrii Senkovych <andrii@senkovych.com>
Sun, 26 Aug 2018 12:30:36 +0000 (13:30 +0100)
The msgpack library may be present in /usr/lib or /usr/lib/$arch,
but only the former is being searched.  Check both places and fix the
library name to use the C lib (libmsgpackc) rather than the C++ lib
(libmsgpack).

Signed-off-by: James McCoy <jamessan@jamessan.com>
Gbp-Pq: Name msgpack-clib.patch

Makefile

index 40a7787fdb73a2b17866a8062218add6bb9a82fd..11bd9cd578354d7256a722c06e695c40042c028f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,11 +14,11 @@ ifneq ($(findstring yes,$(shell pkg-config --exists msgpack && echo yes)),)
        CFLAGS += -DMSGPACK=1 $(shell pkg-config --cflags msgpack)
        LDFLAGS += $(shell pkg-config --libs msgpack)
 else
-       MSGPACK_LIB=$(shell ls /usr/lib/libmsgpack.so 2>/dev/null)
+       MSGPACK_LIB=$(shell ls /usr/lib/libmsgpackc.so /usr/lib/*/libmsgpackc.so 2>/dev/null)
        ifneq ($(strip $(MSGPACK_LIB)),)
                FORMAT_OBJS += formats/msgpack.o
                CFLAGS += -DMSGPACK=1
-               LDFLAGS += -lmsgpack
+               LDFLAGS += -lmsgpackc
        endif
 endif