1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Date: Sun, 11 Dec 2022 17:27:52 +0900
Subject: [PATCH] Get bash path with command
The command path is different in the distribution. This is not the hard
code, but the implementation obtained with 'command' command.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
m4/dyn_linker.m4 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/m4/dyn_linker.m4 b/m4/dyn_linker.m4
index 0e269e9..c0c8aa3 100644
--- a/m4/dyn_linker.m4
+++ b/m4/dyn_linker.m4
@@ -1,6 +1,7 @@
AC_DEFUN([LD_SO_PATH],
[
- xpath1=`readelf -e /usr/bin/bash | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev`
+ bash_path=`command -v bash`
+ xpath1=`readelf -e $bash_path | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev`
xpath=`realpath $xpath1`
if test ! -f "$xpath" ; then
AC_MSG_ERROR([Cant find the dynamic linker])
|