Find libmsgpackc in Multi-Arch library paths

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>
master
James McCoy 8 years ago
parent 7526080ac6
commit 2a8908bdcf

@ -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

Loading…
Cancel
Save