Skip to content

Commit

Permalink
uuid: detect if pkg-config knows about uuid lib
Browse files Browse the repository at this point in the history
(cherry picked from commit 66fc01f)
(cherry picked from commit 21cb1bf)
  • Loading branch information
miconda committed Jun 29, 2016
1 parent a10acb9 commit 0d40497
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/uuid/Makefile
Expand Up @@ -6,12 +6,15 @@ auto_gen=
NAME=uuid.so

ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config)
BUILDER = $(shell \
if pkg-config --exists uuid; then \
echo 'pkg-config uuid'; \
fi)
endif

ifneq ($(BUILDER),)
DEFS += $(shell $(BUILDER) --cflags uuid)
LIBS += $(shell $(BUILDER) --libs uuid)
DEFS += $(shell $(BUILDER) --cflags)
LIBS += $(shell $(BUILDER) --libs)
else
DEFS +=-I$(LOCALBASE)/include -I$(SYSBASE)/include
LIBS+=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -luuid
Expand Down

0 comments on commit 0d40497

Please sign in to comment.