autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FYI] docs: cygnus mode doesn't require AM_CYGWIN32 macro.


From: Ralf Wildenhues
Subject: Re: [FYI] docs: cygnus mode doesn't require AM_CYGWIN32 macro.
Date: Sun, 9 Jan 2011 10:19:56 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

[ replacing automake-patches with autoconf-patches ]

tying up another loose end:

* Ralf Wildenhues wrote on Wed, Dec 22, 2010 at 07:22:24AM CET:
> Hmpf.  Nowadays AM_CYGWIN just expands to AC_CYGWIN, which causes
> $CYGWIN to be set.  The latter is probably a bad idea for other reasons
> (Cygwin AFAIK uses the variable for other purposes), but at least one
> macro in Autoconf's fortran.m4 still seems to make use of $CYGWIN.  It
> should at least also be fixed to use $host_os instead.

The patch below should address that.  I have no idea whether this code
is still relevant on Cygwin, but I'm assuming that it is.  I haven't
actually tested it there, but I'm running the testsuite on GNU/Linux
right now to ensure there are no undesired side effects.  OK to push
when that passes?

Thanks,
Ralf

    Avoid reference to $CYGWIN in Fortran macros.
    
    * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Require
    AC_CANONICAL_HOST.  Replace test for $CYGWIN with $host_s test.

diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index c704868..bed9c96 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -609,7 +609,8 @@ fi],
 # in "octave-2.0.13/aclocal.m4", and full credit should go to John
 # W. Eaton for writing this extremely useful macro.  Thank you John.
 AC_DEFUN([_AC_FC_LIBRARY_LDFLAGS],
-[_AC_FORTRAN_ASSERT()dnl
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_AC_FORTRAN_ASSERT()dnl
 _AC_PROG_FC_V
 AC_CACHE_CHECK([for _AC_LANG libraries of $[]_AC_FC[]], 
ac_cv_[]_AC_LANG_ABBREV[]_libs,
 [if test "x$[]_AC_LANG_PREFIX[]LIBS" != "x"; then
@@ -641,7 +642,11 @@ while test address@hidden:@] != 1; do
          |-LANG:=* | -LIST:* | -LNO:* | -link)
          ;;
        -lkernel32)
-         test x"$CYGWIN" != xyes && 
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg"
+         case $host_os in
+         *cygwin*) ;;
+         *) ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs 
$ac_arg"
+           ;;
+         esac
          ;;
        -[[LRuYz]])
          # These flags, when seen by themselves, take an argument.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]