diff options
author | Ulrich Müller <ulm@gentoo.org> | 2020-12-18 17:42:14 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2020-12-18 17:42:14 +0100 |
commit | 18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7 (patch) | |
tree | 623f8741ae9f1a32391a33f311ca667070ccc814 | |
parent | Update version to 1.4.17. (diff) | |
download | eselect-18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7.tar.gz eselect-18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7.tar.bz2 eselect-18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7.zip |
Prefer realpath in configure check.
* configure.ac (REALPATH, READLINK): Prefer realpath to readlink,
because the former is included with Coreutils since version 8.15.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 34 |
2 files changed, 22 insertions, 17 deletions
@@ -1,3 +1,8 @@ +2020-12-18 Ulrich Müller <ulm@gentoo.org> + + * configure.ac (REALPATH, READLINK): Prefer realpath to readlink, + because the former is included with Coreutils since version 8.15. + 2020-12-16 Ulrich Müller <ulm@gentoo.org> * configure.ac: Update version to 1.4.17. diff --git a/configure.ac b/configure.ac index 79cb10b..48522e6 100644 --- a/configure.ac +++ b/configure.ac @@ -34,25 +34,25 @@ fi AC_PATH_PROG(ENV_UPDATE, env-update, /usr/sbin/env-update, [$PATH:$prefix/sbin:/usr/sbin]) -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 +CANONICALISE="" +# realpath is included with Coreutils since version 8.15 (2012) +AC_CHECK_PROGS(REALPATH, [grealpath realpath]) +if test x$REALPATH != x; then CANONICALISE="$REALPATH" else - AC_MSG_ERROR([Either GNU readlink or realpath is required]) + 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) + CANONICALISE="$READLINK -f" + else + AC_MSG_RESULT(no) + fi + fi +fi +if test "x$CANONICALISE" = x; then + AC_MSG_ERROR([Either realpath or GNU readlink is required]) fi AC_SUBST(CANONICALISE) |