diff options
author | Ulrich Müller <ulm@gentoo.org> | 2012-10-13 10:27:01 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2012-10-13 10:46:20 +0200 |
commit | 89efdeb043758ed074c58f389b98bc23b9241dfa (patch) | |
tree | 935a9e8a10e1122387d45cd90588781d708eb6d4 /configure.ac | |
parent | configure.ac: Remove excessive quoting and whitespace. (diff) | |
download | eselect-89efdeb043758ed074c58f389b98bc23b9241dfa.tar.gz eselect-89efdeb043758ed074c58f389b98bc23b9241dfa.tar.bz2 eselect-89efdeb043758ed074c58f389b98bc23b9241dfa.zip |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 43 |
1 files changed, 24 insertions, 19 deletions
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]) |