Add Makefile section to detect msgpackc with ld

If all checks fail, use ld to look for -lmsgpackc. This doesn't work on
macOS, but seems to pick up installs that were as of yet undetected.
master
Nicolas Favre-Felix 3 years ago
parent 0528287aa6
commit 97d9d77430
No known key found for this signature in database
GPG Key ID: C04E7AA8B6F73372

@ -31,6 +31,14 @@ ifneq ($(strip $(MSGPACK_OSX_LIB)),)
FORMAT_OBJS += src/formats/msgpack.o
CFLAGS += -DMSGPACK=1
LDFLAGS += -lmsgpackc
else
# check for MessagePackC using ld (returns 1 in both cases on macOS)
MSGPACKC_LD=$(shell ld -lmsgpackc >/dev/null 2>/dev/null; echo $$?)
ifeq ($(strip $(MSGPACKC_LD)),0)
FORMAT_OBJS += src/formats/msgpack.o
CFLAGS += -DMSGPACK=1
LDFLAGS += -lmsgpackc
endif
endif
endif
endif

Loading…
Cancel
Save