public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Mueller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: /
Date: Sat, 13 Oct 2012 09:16:36 +0000 (UTC)	[thread overview]
Message-ID: <1350117980.89efdeb043758ed074c58f389b98bc23b9241dfa.ulm@gentoo> (raw)

commit:     89efdeb043758ed074c58f389b98bc23b9241dfa
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 13 08:27:01 2012 +0000
Commit:     Ulrich Mueller <ulm <AT> gentoo <DOT> 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  <ulm@gentoo.org>
+
+	* 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  <ulm@gentoo.org>
 
 	* 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 >/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])


             reply	other threads:[~2012-10-13  9:16 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13  9:16 Ulrich Mueller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-02 18:26 [gentoo-commits] proj/eselect:master commit in: / Ulrich Müller
2025-02-02 18:26 Ulrich Müller
2024-11-18  6:05 Ulrich Müller
2024-11-18  6:05 Ulrich Müller
2023-09-13 18:20 Ulrich Müller
2023-09-13 18:20 Ulrich Müller
2023-08-09 15:37 Ulrich Müller
2023-08-09 15:37 Ulrich Müller
2023-06-12 16:24 Ulrich Müller
2023-06-12 16:24 Ulrich Müller
2023-06-07  7:29 Ulrich Müller
2023-06-07  7:29 Ulrich Müller
2023-06-06 18:52 Ulrich Müller
2023-06-06 18:52 Ulrich Müller
2023-03-20 17:25 Ulrich Müller
2023-03-20 17:25 Ulrich Müller
2023-03-15 11:04 Ulrich Müller
2023-02-27 17:40 Ulrich Müller
2022-01-19  3:54 Ulrich Müller
2022-01-19  3:54 Ulrich Müller
2022-01-08 17:14 Ulrich Müller
2022-01-08 17:14 Ulrich Müller
2021-12-28  9:41 Ulrich Müller
2021-12-28  9:41 Ulrich Müller
2021-02-19 13:33 Ulrich Müller
2020-12-16 12:49 Ulrich Müller
2020-12-16 12:49 Ulrich Müller
2019-11-28 19:23 Ulrich Müller
2019-11-28 19:23 Ulrich Müller
2019-11-28 13:41 Ulrich Müller
2019-11-28 13:41 Ulrich Müller
2019-09-04 10:40 Ulrich Müller
2019-09-04 10:40 Ulrich Müller
2019-09-04 10:40 Ulrich Müller
2019-09-02 11:28 Ulrich Müller
2019-09-02 10:39 Ulrich Müller
2019-02-17  7:52 Ulrich Müller
2019-02-17  7:52 Ulrich Müller
2018-05-30 16:01 Ulrich Müller
2018-05-30 16:01 Ulrich Müller
2018-01-24 10:03 Ulrich Müller
2018-01-24 10:03 Ulrich Müller
2018-01-09  9:08 Ulrich Müller
2018-01-09  9:08 Ulrich Müller
2017-12-25 11:00 Ulrich Müller
2017-12-25 11:00 Ulrich Müller
2017-12-25 11:00 Ulrich Müller
2017-09-17 21:41 Ulrich Müller
2017-03-22  5:26 Ulrich Müller
2017-03-22  5:26 Ulrich Müller
2016-12-10  9:33 Ulrich Müller
2016-12-10  9:33 Ulrich Müller
2016-10-30  9:17 Ulrich Müller
2016-10-30  9:17 Ulrich Müller
2016-06-17 18:42 Ulrich Müller
2016-06-17 18:42 Ulrich Müller
2016-06-01 19:50 Ulrich Müller
2015-08-22 14:49 Ulrich Müller
2015-08-13 10:07 Ulrich Müller
2015-08-13 10:07 Ulrich Müller
2015-08-13 10:07 Ulrich Müller
2015-01-24 12:27 Ulrich Müller
2015-01-24 12:27 Ulrich Müller
2015-01-24 12:27 Ulrich Müller
2015-01-17 23:52 Ulrich Müller
2014-09-01 16:55 Ulrich Müller
2014-09-01 16:55 Ulrich Müller
2014-05-24 17:51 Ulrich Müller
2014-05-24 17:51 Ulrich Müller
2014-05-20  8:03 Ulrich Müller
2014-05-20  7:46 Ulrich Müller
2014-05-20  6:53 Ulrich Müller
2014-03-20 14:15 Ulrich Müller
2014-03-20 14:15 Ulrich Müller
2014-02-15  0:00 Ulrich Müller
2014-02-15  0:00 Ulrich Müller
2013-12-07 13:28 Ulrich Müller
2013-10-27 18:40 Ulrich Müller
2013-10-27 14:51 Ulrich Müller
2013-08-28  6:11 Ulrich Mueller
2013-08-28  6:11 Ulrich Mueller
2013-08-28  6:11 Ulrich Mueller
2013-08-08 20:59 Ulrich Mueller
2013-07-16 16:08 Ulrich Mueller
2013-07-16 16:08 Ulrich Mueller
2013-07-14  8:19 Ulrich Mueller
2013-07-11  6:14 Ulrich Mueller
2013-07-06 13:17 Ulrich Mueller
2013-07-06 13:17 Ulrich Mueller
2013-06-22 15:58 Ulrich Mueller
2013-06-22 15:58 Ulrich Mueller
2013-01-06 19:09 Ulrich Mueller
2013-01-05 15:35 Ulrich Mueller
2012-10-23  8:40 Ulrich Mueller
2012-10-23  8:40 Ulrich Mueller
2012-10-13  9:16 Ulrich Mueller
2012-10-13  9:16 Ulrich Mueller
2012-09-14 22:41 Ulrich Mueller
2012-09-13 17:11 Ulrich Mueller
2012-09-12 22:09 Ulrich Mueller
2012-06-27 17:07 Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350117980.89efdeb043758ed074c58f389b98bc23b9241dfa.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox