X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=m4%2Fensc_pathprog.m4;h=cd99634614a948bed97c602197757e84ecb4375c;hb=HEAD;hp=c28574880e848446285c3623d68f27c64c25b8f2;hpb=9c78378bebc1a9f3d400f422df8ede9efea57dea;p=util-vserver.git diff --git a/m4/ensc_pathprog.m4 b/m4/ensc_pathprog.m4 index c285748..cd99634 100644 --- a/m4/ensc_pathprog.m4 +++ b/m4/ensc_pathprog.m4 @@ -29,7 +29,7 @@ AC_DEFUN([ENSC_PATHPROG_INIT], ]) -dnl Usage: ENSC_PATHPROG(, [, , ]) +dnl Usage: ENSC_PATHPROG(, [, , , ]) AC_DEFUN([ENSC_PATHPROG], [ AC_REQUIRE([ENSC_SET_SEARCHPATH]) @@ -59,6 +59,16 @@ $4]) fi fi + if test "x$5" = x; then + ensc_pathprog_path="${$1}" + while test -h "$ensc_pathprog_path"; do + case "$ensc_pathprog_path" in + ../*) $1=`readlink -f "${$1}"`; break ;; + esac + ensc_pathprog_path=`readlink "$ensc_pathprog_path"` + done + fi + test "${$1}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'$1'@!${$1}!g;" test "${$1}"]) @@ -74,7 +84,7 @@ AC_DEFUN([ENSC_PATHPROG_STANDARD_TOOLS], ENSC_PATHPROG(CMP, cmp) ENSC_PATHPROG(CP, cp) ENSC_PATHPROG(DIRNAME, dirname) - ENSC_PATHPROG(EGREP, egrep) + ENSC_PATHPROG(EGREP, egrep, [], [], no-deref) ENSC_PATHPROG(ENV, env) ENSC_PATHPROG(GREP, grep) ENSC_PATHPROG(LN, ln)