summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-09-02 13:46:12 +0100
committerDavid Howells <dhowells@redhat.com>2019-09-04 10:43:57 +0100
commit2bdef38877b11be9ddc31362518b37c8019120cd (patch)
treec868881181fc86273ef900eefc99135a78535700
parent6acc20128b87512bb4e72fb899accb85c51ab15c (diff)
downloadkeyutils-2bdef38877b11be9ddc31362518b37c8019120cd.tar.gz
Fix the guess for the default LIBDIR
The guesser for the default LIBDIR examines the libraries used by make, looking for libc. Make uses libcrypt as well as libc, so if libcrypt happens to come first, that matches and the sed command to extract the library path fails. Fix this by looking for a match on "libc." instead of "libc". Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a98bfee..f8f76be 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@ LIBNAME := libkeyutils.so.$(APIVERSION)
#
###############################################################################
ifeq ($(origin LIBDIR),undefined)
-LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!')
+LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc[.]\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!')
endif
ifeq ($(origin USRLIBDIR),undefined)
USRLIBDIR := $(patsubst /lib/%,/usr/lib/%,$(LIBDIR))