AX_CXX_HAVE_FUNCTION

Alan Manuel Gloria <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <CAF+kUQUNaKp9_fccHa5Zab14ybe87g0Lx0PSiVEHf5qUG02Wmw@mail.gmail.com>
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.

Sincerely,
AmkG
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.