From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A3C7313835A for ; Fri, 19 Feb 2021 13:33:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BD65BE0D7F; Fri, 19 Feb 2021 13:33:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A3E22E0D7E for ; Fri, 19 Feb 2021 13:33:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 869B0340F75 for ; Fri, 19 Feb 2021 13:33:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1386C487 for ; Fri, 19 Feb 2021 13:33:12 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1608309734.18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: / X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog configure.ac X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7 X-VCS-Branch: master Date: Fri, 19 Feb 2021 13:33:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 82c94d6b-145c-4260-9fd7-bc5687472f81 X-Archives-Hash: 6ceb1bcab9c40754ee360c0bc838621e commit: 18cb2b5b6b5538b9aa1680181eb36e3c5e7b30c7 Author: Ulrich Müller gentoo org> AuthorDate: Fri Dec 18 16:42:14 2020 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Fri Dec 18 16:42:14 2020 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=18cb2b5b 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 gentoo.org> ChangeLog | 5 +++++ configure.ac | 34 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index e15e521..90109e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-12-18 Ulrich Müller + + * 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 * 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)