+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.
# _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)
# _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)
# _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)
# _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)
# 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. ##
## ------------------------------------- ##
AT_CHECK_AUTOCONF
AT_CHECK([sed -n 's/^ac_ext=//p' configure], 0,
[c
+c
+c
+cc
cc
f
cc
+cc
+c
c
])