aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2016-06-01 21:41:11 +0200
committerUlrich Müller <ulm@gentoo.org>2016-06-01 21:41:11 +0200
commitda9a451824ccd5e4e2b9be405fecad82599ba702 (patch)
tree318f36823533032763bc95698133f394e9ff482a /configure.ac
parentHappy new year 2016! (diff)
downloadeselect-da9a451824ccd5e4e2b9be405fecad82599ba702.tar.gz
eselect-da9a451824ccd5e4e2b9be405fecad82599ba702.tar.bz2
eselect-da9a451824ccd5e4e2b9be405fecad82599ba702.zip
Avoid absolute paths for programs.
* configure.ac: Where possible, use AC_CHECK_PROGS instead of AC_PATH_PROGS, in order to avoid absolute paths, bug 122260. * libs/core.bash.in (sed): * libs/package-manager.bash.in (portageq): Invoke commands with "command" so that they will work without a path.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 13 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 8f38759..6fce662 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ fi
# AC_PROG_SED doesn't work here, because on Gentoo FreeBSD systems it
# is confused by a wrapper script that is in the PATH at build time.
-AC_PATH_PROGS(SED, [gsed sed])
+AC_CHECK_PROGS(SED, [gsed sed])
if test x$SED = x; then
AC_MSG_ERROR([sed is required])
fi
@@ -31,27 +31,22 @@ else
AC_MSG_ERROR([GNU sed is required])
fi
-AC_PATH_PROG(PORTAGEQ, portageq, /usr/bin/portageq,
- [$prefix/bin:/usr/bin:/bin:$PATH])
AC_PATH_PROG(ENV_UPDATE, env-update, /usr/sbin/env-update,
[$PATH:$prefix/sbin:/usr/sbin])
-AC_PATH_PROG(READLINK, greadlink)
-if test x$READLINK = x; then
- AC_PATH_PROG(READLINK, readlink)
- if test x$READLINK != x; then
- AC_MSG_CHECKING([whether readlink supports -f])
- if $READLINK -f . >/dev/null 2>&1; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- READLINK=""
- fi
- fi
- if test x$READLINK = x; then
- AC_PATH_PROG(REALPATH, realpath)
+AC_CHECK_PROGS(READLINK, [greadlink readlink])
+if test x$READLINK != x; then
+ AC_MSG_CHECKING([whether $READLINK supports -f])
+ if $READLINK -f . >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ READLINK=""
fi
fi
+if test x$READLINK = x; then
+ AC_CHECK_PROGS(REALPATH, realpath)
+fi
if test x$READLINK != x; then
CANONICALISE="$READLINK -f"
elif test x$REALPATH != x; then
@@ -63,7 +58,7 @@ AC_SUBST(CANONICALISE)
# Gentoo uses rst2html.py but most other
# distros install it w/o the .py extension
-AC_PATH_PROGS(RST2HTML, [rst2html rst2html.py])
+AC_CHECK_PROGS(RST2HTML, [rst2html rst2html.py])
# Support for Gentoo Prefix
AC_MSG_CHECKING([if target installation is in an offset prefix])