]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (_AC_LANG_SET): Turn off optimizations.
authorAkim Demaille <akim@epita.fr>
Tue, 23 Jan 2001 16:50:19 +0000 (16:50 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 23 Jan 2001 16:50:19 +0000 (16:50 +0000)
ChangeLog
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4
tests/compile.at

index 32eb872bb3f167acf7b2c9fc12d4013fafc8f97e..748ccf4e10dd3b81345beb5dc23bc17ef393e6aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-23  Akim Demaille  <akim@epita.fr>
+
+       * aclang.m4 (_AC_LANG_SET): Turn off optimizations.
+
 2001-01-23  Akim Demaille  <akim@epita.fr>
 
        * configure.in: If this is a beta, dump the core of BUGS.
index c8bf566e71f5e7df5ff48cb8768d34e7b8892a06..0a5075e6f517be8482041f8008517e7c78afceff 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -111,10 +111,17 @@ m4_define([_AC_LANG_DISPATCH],
 # _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 c8bf566e71f5e7df5ff48cb8768d34e7b8892a06..0a5075e6f517be8482041f8008517e7c78afceff 100644 (file)
@@ -111,10 +111,17 @@ m4_define([_AC_LANG_DISPATCH],
 # _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 c8bf566e71f5e7df5ff48cb8768d34e7b8892a06..0a5075e6f517be8482041f8008517e7c78afceff 100644 (file)
@@ -111,10 +111,17 @@ m4_define([_AC_LANG_DISPATCH],
 # _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 c8bf566e71f5e7df5ff48cb8768d34e7b8892a06..0a5075e6f517be8482041f8008517e7c78afceff 100644 (file)
@@ -111,10 +111,17 @@ m4_define([_AC_LANG_DISPATCH],
 # _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 daaa59571665ed58e9ced354f3768ad239fa0bc2..0a6e18b5e811c4ed30e1c259798e7872019acc71 100644 (file)
@@ -7,35 +7,6 @@ AT_BANNER([Low level compiling/preprocessing macros.])
 # 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 @@ AC_LANG_POP(C)
 AT_CHECK_AUTOCONF
 AT_CHECK([sed -n 's/^ac_ext=//p' configure], 0,
 [c
+c
+c
+cc
 cc
 f
 cc
+cc
+c
 c
 ])