makefile: Fix Linux library search when ldconfig isn't in the path

As reported in #560
This commit is contained in:
Mark Pizzolato 2018-05-10 10:36:19 -07:00
parent c0cda9ffd4
commit a5a71edd30

View file

@ -297,8 +297,8 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
ifneq (,$(shell if $(TEST) -d /data/data/com.termux/files/usr/lib; then echo termuxlib; fi)) ifneq (,$(shell if $(TEST) -d /data/data/com.termux/files/usr/lib; then echo termuxlib; fi))
LIBPATH += /data/data/com.termux/files/usr/lib LIBPATH += /data/data/com.termux/files/usr/lib
endif endif
ifneq (,$(shell which ldconfig)) ifeq (ldconfig,$(shell if $(TEST) -e /sbin/ldconfig; then echo ldconfig; fi))
LIBPATH := $(sort $(foreach lib,$(shell ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib)))) LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib))))
endif endif
endif endif
LIBEXT = so LIBEXT = so