Use system whereami if available

This commit is contained in:
Philippe Teuwen 2020-05-24 20:35:09 +02:00
parent 243771fa3d
commit 0653feaec8
2 changed files with 15 additions and 1 deletions

View file

@ -89,6 +89,14 @@ ifneq ($(SKIPLUASYSTEM),1)
endif
endif
ifneq ($(SKIPWHEREAMISYSTEM),1)
ifneq (,$(wildcard /usr/include/whereami.h))
WAILIBINC =
WAILIB = -lwhereami
WAISYSTEM = 1
endif
endif
ifneq ($(SKIPBT),1)
BTLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs bluez 2>/dev/null)
endif
@ -188,7 +196,10 @@ else
$(info native BT support: Bluez not found, disabled)
endif
ifeq ($(LUASYSTEM),1)
$(info system LUA: Lua5.2 found)
$(info Lua library: system library found)
endif
ifeq ($(WAISYSTEM),1)
$(info Whereami library: system library found)
endif
$(info compiler version: $(shell $(CC) --version|head -n 1))
$(info ===================================================================)
@ -443,8 +454,10 @@ cliparser:
$(Q)$(MAKE) --no-print-directory -C $(CLIPARSERLIBPATH) all
whereami:
ifneq ($(WAISYSTEM),1)
$(info [*] MAKE $@)
$(Q)$(MAKE) --no-print-directory -C $(WAILIBPATH) all
endif
# common libraries:
mbedtls:

View file

@ -62,6 +62,7 @@ It's also possible to skip parts even if libraries are present in the compilatio
* `make client SKIPQT=1` to skip GUI even if Qt is present
* `make client SKIPBT=1` to skip native Bluetooth support even if libbluetooth is present
* `make client SKIPLUASYSTEM=1` to skip system Lua lib even if liblua5.2 is present, use embedded Lua lib instead
* `make client SKIPWHEREAMISYSTEM=1` to skip system Whereami lib even if libwhereami is present, use embedded whereami lib instead
If you're cross-compiling, these ones might be useful: