From a5a71edd30e3302d686a669574b301659a87bf04 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 10 May 2018 10:36:19 -0700 Subject: [PATCH] makefile: Fix Linux library search when ldconfig isn't in the path As reported in #560 --- makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index ec642a11..813b8ac8 100644 --- a/makefile +++ b/makefile @@ -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)) LIBPATH += /data/data/com.termux/files/usr/lib endif - ifneq (,$(shell which ldconfig)) - LIBPATH := $(sort $(foreach lib,$(shell ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib)))) + ifeq (ldconfig,$(shell if $(TEST) -e /sbin/ldconfig; then echo ldconfig; fi)) + LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib)))) endif endif LIBEXT = so