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)
(cherry picked from commit 0d40497)
  • Loading branch information
miconda committed Jul 4, 2016
1 parent 96dbe7c commit 1e400bb
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 1e400bb

Please sign in to comment.