< prev index next >
make/autoconf/basics.m4
Print this page
@@ -256,20 +256,16 @@
# where it exists, else fall back to horribly
# complicated shell code.
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
- ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
- if test "x$ISGNU" = x; then
- # A readlink that we do not know how to use.
- # Are there other non-GNU readlinks out there?
+ READLINK_ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+ # If READLINK_ISGNU is empty, then it's a non-GNU readlink. Don't use it.
READLINK_TESTED=yes
- READLINK=
- fi
fi
- if test "x$READLINK" != x; then
+ if test "x$READLINK" != x && "x$READLINK_ISGNU" != x; then
$1=`$READLINK -f [$]$1`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
@@ -492,10 +488,11 @@
BASIC_REQUIRE_PROGS(MKDIR, mkdir)
BASIC_REQUIRE_PROGS(MKTEMP, mktemp)
BASIC_REQUIRE_PROGS(MV, mv)
BASIC_REQUIRE_PROGS(NAWK, [nawk gawk awk])
BASIC_REQUIRE_PROGS(PRINTF, printf)
+ BASIC_REQUIRE_PROGS(READLINK, [greadlink readlink])
BASIC_REQUIRE_PROGS(RM, rm)
BASIC_REQUIRE_PROGS(RMDIR, rmdir)
BASIC_REQUIRE_PROGS(SH, sh)
BASIC_REQUIRE_PROGS(SORT, sort)
BASIC_REQUIRE_PROGS(TAIL, tail)
@@ -523,11 +520,10 @@
# Always use the bash builtin pwd to get uniform behavior.
THEPWDCMD=pwd
# These are not required on all platforms
BASIC_PATH_PROGS(CYGPATH, cygpath)
- BASIC_PATH_PROGS(READLINK, [greadlink readlink])
BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
BASIC_PATH_PROGS(NICE, nice)
BASIC_PATH_PROGS(PANDOC, pandoc)
])
< prev index next >