autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

AX_CXX_HAVE_FUNCTION


From: Alan Manuel Gloria
Subject: AX_CXX_HAVE_FUNCTION
Date: Fri, 12 Feb 2016 09:04:24 +0800

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

reply via email to

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