Hi autoconf archive maintainers,
I was browsing randomly through C++ related autoconf macros when I came upon code that appears to be very, very strange to me:
AC_DEFUN([AX_CXX_HAVE_FUNCTION],
[AC_CACHE_CHECK(
[for std::bad_function_call in functional],
ax_cv_cxx_have_function,
[dnl
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[
[#include <functional>]
[using std::bad_function_call;]
],
[]
)],
[ax_cv_cxx_have_function=yes],
[ax_cv_cxx_have_function=no]
)
AC_LANG_POP([C++])])
if test x"$ax_cv_cxx_have_function" = "xyes"
then
AC_DEFINE(HAVE_CXX_FUNCTION,
1,
[Define if functional defines the std::bad_function_call class.])
fi
])
My understanding is that s/bad_function_call/function/
The source code of AX_CXX_HAVE_FUNCTION is almost identical to the source code of AX_CXX_HAVE_BAD_FUNCTION_CALL, which leads me to believe that it was copied directly and insufficiently modified.