aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-12-18 17:42:14 +0100
committerUlrich Müller <ulm@gentoo.org>2020-12-18 17:42:14 +0100
commit18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7 (patch)
tree623f8741ae9f1a32391a33f311ca667070ccc814 /configure.ac
parentUpdate version to 1.4.17. (diff)
downloadeselect-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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 17 insertions, 17 deletions
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)