From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3EDFD138200 for ; Sat, 13 Oct 2012 09:16:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CCD13E0534; Sat, 13 Oct 2012 09:16:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2F02DE0534 for ; Sat, 13 Oct 2012 09:16:38 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6598233DA7D for ; Sat, 13 Oct 2012 09:16:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 09544E5440 for ; Sat, 13 Oct 2012 09:16:36 +0000 (UTC) From: "Ulrich Mueller" 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 Mueller" Message-ID: <1350117980.89efdeb043758ed074c58f389b98bc23b9241dfa.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: / X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog acinclude.m4 configure.ac X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Mueller X-VCS-Revision: 89efdeb043758ed074c58f389b98bc23b9241dfa X-VCS-Branch: master Date: Sat, 13 Oct 2012 09:16:36 +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-Archives-Salt: 1752e8e1-ea73-42a7-97de-7ce12104e216 X-Archives-Hash: 6acd50eadf7895f38c3f72ad36920deb commit: 89efdeb043758ed074c58f389b98bc23b9241dfa Author: Ulrich Müller gentoo org> AuthorDate: Sat Oct 13 08:27:01 2012 +0000 Commit: Ulrich Mueller gentoo org> CommitDate: Sat Oct 13 08:46:20 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=89efdeb0 Fix configure test for sed, bug 438112. * configure.ac (SED): Replace broken ES_PROG_GNU_SED code by a straightforward check for GNU sed. Fixes bug 438112. (READLINK, REALPATH): Simplify logic and add output messages. (RST2HTML): Simplify. * acinclude.m4: Remove file. --- ChangeLog | 8 ++++++++ acinclude.m4 | 27 --------------------------- configure.ac | 43 ++++++++++++++++++++++++------------------- 3 files changed, 32 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 857a31f..386e250 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-10-13 Ulrich Müller + + * configure.ac (SED): Replace broken ES_PROG_GNU_SED code by + a straightforward check for gsed or sed, bug 438112. + (READLINK, REALPATH): Simplify logic and add output messages. + (RST2HTML): Simplify. + * acinclude.m4: File removed. + 2012-10-11 Ulrich Müller * libs/package-manager.bash.in (arch): Add amd64 as case label. diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index bde52c0..0000000 --- a/acinclude.m4 +++ /dev/null @@ -1,27 +0,0 @@ -AC_DEFUN([ES_PROG_GNU_SED], -[AC_MSG_CHECKING([for GNU sed]) -AC_CACHE_VAL(es_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -saved_IFS=$IFS ; IFS=: -for es_dir in $PATH -do - IFS=$saved_IFS - if test -x "$es_dir/sed" ; then - if "$es_dir/sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null ; then - es_path_sed="$es_dir/sed" - fi - fi - - if test -z "$es_path_sed" && test -x "$es_dir/gsed" ; then - if "$es_dir/gsed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null ; then - es_path_sed="$es_dir/gsed" - fi - fi - - es_cv_path_SED=$es_path_sed -done -]) -SED=$es_cv_path_SED -AC_MSG_RESULT([$SED]) -AC_SUBST(SED) -]) diff --git a/configure.ac b/configure.ac index 2f62b9e..379705e 100644 --- a/configure.ac +++ b/configure.ac @@ -17,8 +17,17 @@ if test x$BASH = x; then AC_MSG_ERROR([bash is required]) fi -ES_PROG_GNU_SED +# 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]) if test x$SED = x; then + AC_MSG_ERROR([sed is required]) +fi +AC_MSG_CHECKING([whether $SED is GNU sed]) +if $SED 'v4.0' /dev/null 2>&1; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) AC_MSG_ERROR([GNU sed is required]) fi @@ -29,36 +38,32 @@ AC_PATH_PROG(ENV_UPDATE, env-update, /usr/sbin/env-update, AC_PATH_PROG(READLINK, greadlink) if test x$READLINK = x; then - AC_CHECK_PROG(READLINK, readlink -f ., yes, no, [$PATH]) - if test x$READLINK = xyes; then - AC_PATH_PROG(READLINK, readlink) - fi - - CANONICALISE_TEST=`$READLINK -f . > /dev/null 2>&1` - if ! test x$? = x0; then - unset READLINK + 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) - if test x$REALPATH = x; then - AC_MSG_ERROR([Either GNU readlink or realpath is required]) - fi fi fi if test x$READLINK != x; then CANONICALISE="$READLINK -f" -else +elif test x$REALPATH != x; then CANONICALISE="$REALPATH" +else + AC_MSG_ERROR([Either GNU readlink or realpath is required]) fi AC_SUBST(CANONICALISE) # Gentoo uses rst2html.py but most other -# distro's/OS's install it w/o the .py extension -AC_PATH_PROG(RST2HTML, rst2html) -if test x$RST2HTML = x; then - AC_PATH_PROG(RST2HTML, rst2html.py) -fi +# distros install it w/o the .py extension +AC_PATH_PROGS(RST2HTML, [rst2html rst2html.py]) # Support for Gentoo Prefix AC_MSG_CHECKING([if target installation is in an offset prefix])