From: David Elliott Date: Mon, 14 Mar 2005 01:42:56 +0000 (+0000) Subject: Update to include recent acinclude.m4 changes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/08cd454f761df1f92b30a6f255b86ca7ca905bc4 Update to include recent acinclude.m4 changes. Yes, they aren't any longer used by configure but they're still in acinclude.m4 so now they're here too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/aclocal.m4 b/aclocal.m4 index e1a2a8af65..0440201c4c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -719,6 +719,25 @@ if test "$ac_cv_cxx_static_cast" = yes; then fi ]) +dnl http://autoconf-archive.cryp.to/ac_cxx_dynamic_cast.html +AC_DEFUN([AC_CXX_DYNAMIC_CAST], +[AC_CACHE_CHECK(whether the compiler supports dynamic_cast<>, +ac_cv_cxx_dynamic_cast, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +class Base { public : Base () {} virtual void f () = 0;}; +class Derived : public Base { public : Derived () {} virtual void f () {} };],[ +Derived d; Base& b=d; return dynamic_cast(&b) ? 0 : 1;], + ac_cv_cxx_dynamic_cast=yes, ac_cv_cxx_dynamic_cast=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_dynamic_cast" = yes; then + AC_DEFINE(HAVE_DYNAMIC_CAST,,[define if the compiler supports dynamic_cast<>]) +fi +]) + + dnl --------------------------------------------------------------------------- dnl Support macros for makefiles generated by BAKEFILE. dnl ---------------------------------------------------------------------------