From f731b219967fabb5eaab4446dcccaa5f1493f339 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 17 Jul 2006 17:34:05 +0000 Subject: [PATCH] * lib/autoconf/libs.m4 (AC_PATH_XTRA): Do the check for space after -R regardless of host. Patrick Welche reports that a space after -R is also required for NetBSD 3.99. --- ChangeLog | 9 ++++++++- lib/autoconf/libs.m4 | 32 +++++++++++--------------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0c5bf73..eee0f7ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ 2006-07-17 Paul Eggert - * README: Recommend M4 1.4.5. + * lib/autoconf/libs.m4 (AC_PATH_XTRA): Do the check for space after + -R regardless of host. Patrick Welche reports that a space after -R + is also required for NetBSD 3.99. + + * NEWS: Recommend M4 1.4.5. + * README: Likewise. * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. + * tests/tools.at (autom4te cache): Update wording of diagnostic + to match M4 1.4.5. 2006-07-07 Paul Eggert diff --git a/lib/autoconf/libs.m4 b/lib/autoconf/libs.m4 index 773aa65a..a3249bad 100644 --- a/lib/autoconf/libs.m4 +++ b/lib/autoconf/libs.m4 @@ -395,29 +395,19 @@ else # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" -dnl FIXME: banish uname from this macro! # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - AC_MSG_CHECKING([whether -R must be followed by a space]) - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_nospace=yes, ac_R_nospace=no) - if test $ac_R_nospace = yes; then - AC_MSG_RESULT([no]) - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_space=yes, ac_R_space=no) - if test $ac_R_space = yes; then - AC_MSG_RESULT([yes]) - X_LIBS="$X_LIBS -R $x_libraries" - else - AC_MSG_RESULT([neither works]) - fi - fi - LIBS=$ac_xsave_LIBS - esac + AC_MSG_CHECKING([whether -R must be followed by a space]) + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [AC_MSG_RESULT([no]) + X_LIBS="$X_LIBS -R$x_libraries"], + [LIBS="$ac_xsave_LIBS -R $x_libraries" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [AC_MSG_RESULT([yes]) + X_LIBS="$X_LIBS -R $x_libraries"], + [AC_MSG_RESULT([neither works])])]) + LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with.