2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

build: criu -- Make sure the required libs are installed

Otherwise our feature testing engine will simply fail
due to lack of libs we're binding with.

Reported-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Tested-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Cyrill Gorcunov
2016-02-24 18:04:00 +03:00
committed by Pavel Emelyanov
parent 38eacf5edb
commit d550e2017d

View File

@@ -56,7 +56,19 @@ ccflags-y += -I/usr/include/libnl3
export ccflags-y
LIBS := -lrt -lpthread -lprotobuf-c -ldl -lnl-3
REQ-LIBS-NAMES := libpthread libprotobuf-c libnl-3
#
# Make sure all required libs are installed
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(shell sh -c \
'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
echo "int main(int argc, char *argv[]) { return 0; }" | \
"$(CC)" -x c - $(LIBS) -o "$$TMP" > /dev/null 2>&1 && echo y; \
rm -f "$$TMP"'),y)
$(error "Make sure '$(REQ-LIBS-NAMES)' libraries are installed")
endif
endif
ifeq ($(GMON),1)
CFLAGS += -pg
GMONLDOPT := -pg