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=cd79aadd44f87634ec062923de4f1d82289067af;hpb=8591304a8b064ccedfeb2a44fcce93a336aa7a40;p=util-vserver.git diff --git a/m4/ensc_pathprog.m4 b/m4/ensc_pathprog.m4 index cd79aad..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,11 +84,8 @@ AC_DEFUN([ENSC_PATHPROG_STANDARD_TOOLS], ENSC_PATHPROG(CMP, cmp) ENSC_PATHPROG(CP, cp) ENSC_PATHPROG(DIRNAME, dirname) - ENSC_PATHPROG(EGREP, egrep) - env_old_searchpath="${ensc_searchpath}" - ensc_searchpath="/bin:${ensc_searchpath:-$PATH}" + ENSC_PATHPROG(EGREP, egrep, [], [], no-deref) ENSC_PATHPROG(ENV, env) - ensc_searchpath="${env_old_searchpath}" ENSC_PATHPROG(GREP, grep) ENSC_PATHPROG(LN, ln) ENSC_PATHPROG(MKDIR, mkdir)