1
dnl Available from the GNU Autoconf Macro Archive at:
2
dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_cxx_gcc_abi_demangle.html
4
AC_DEFUN([AX_CXX_GCC_ABI_DEMANGLE],
5
[AC_CACHE_CHECK(whether the compiler supports GCC C++ ABI name demangling,
6
ac_cv_cxx_gcc_abi_demangle,
9
AC_TRY_COMPILE([#include <typeinfo>
13
template<typename TYPE>
19
c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status);
21
std::string name(c_name);
24
return name == "A<int>";
26
ac_cv_cxx_gcc_abi_demangle=yes, ac_cv_cxx_gcc_abi_demangle=no)
29
if test "$ac_cv_cxx_gcc_abi_demangle" = yes; then
30
AC_DEFINE(HAVE_GCC_ABI_DEMANGLE,1,
31
[define if the compiler supports GCC C++ ABI name demangling])