autoconf-patches
[Top][All Lists]
Advanced

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

FYI: FYI: AC_REQUIRE vs AC_LANG


From: Akim Demaille
Subject: FYI: FYI: AC_REQUIRE vs AC_LANG
Date: 23 Jan 2001 17:43:04 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * aclang.m4 (_AC_LANG_SET): Turn off optimizations.

Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.116
diff -u -u -r1.116 aclang.m4
--- aclang.m4 2001/01/23 08:44:49 1.116
+++ aclang.m4 2001/01/23 16:38:23
@@ -111,10 +111,17 @@
 # _AC_LANG_SET(OLD, NEW)
 # ----------------------
 # Output the shell code needed to switch from OLD language to NEW language.
-# Optimize if OLD == NEW.
+# Do not try to optimize like this:
+#
+# m4_defun([_AC_LANG_SET],
+# [m4_if([$1], [$2], [],
+#        [_AC_LANG_DISPATCH([AC_LANG], [$2])])])
+#
+# as it can introduce differences between the sh-current language and the
+# m4-current-language when m4_require is used.  Something more subtle
+# might be possible, but at least for the time being, play it safe.
 m4_defun([_AC_LANG_SET],
-[m4_if([$1], [$2], [],
-       [_AC_LANG_DISPATCH([AC_LANG], [$2])])])
+[_AC_LANG_DISPATCH([AC_LANG], [$2])])
 
 
 # AC_LANG(LANG)
Index: tests/compile.at
===================================================================
RCS file: /cvs/autoconf/tests/compile.at,v
retrieving revision 1.14
diff -u -u -r1.14 compile.at
--- tests/compile.at 2001/01/19 14:03:14 1.14
+++ tests/compile.at 2001/01/23 16:42:52
@@ -7,35 +7,6 @@
 # primitive, so check those first.
 
 
-## --------- ##
-## AC_LANG.  ##
-## --------- ##
-
-# Check that AC_LANG is optimizing, i.e., we don't output useless
-# language changes.  Still, make sure we do change the language when
-# needed :)
-
-AT_SETUP([AC_LANG])
-
-AT_DATA([configure.ac],
-[[AC_INIT
-AC_LANG(C)
-AC_LANG(C++)
-AC_LANG(C++)
-AC_LANG(Fortran 77)
-AC_LANG(Fortran 77)
-]])
-
-AT_CHECK_AUTOCONF
-AT_CHECK([sed -n 's/^ac_ext=//p' configure], 0,
-[c
-cc
-f
-])
-
-AT_CLEANUP
-
-
 ## ------------------------------------- ##
 ## AC_LANG, AC_LANG_PUSH & AC_LANG_POP.  ##
 ## ------------------------------------- ##
@@ -68,9 +39,14 @@
 AT_CHECK_AUTOCONF
 AT_CHECK([sed -n 's/^ac_ext=//p' configure], 0,
 [c
+c
+c
 cc
+cc
 f
 cc
+cc
+c
 c
 ])
 



reply via email to

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