-
-dnl NOT USED CURRENTLY*************************************
-dnl Usage: LYX_CXX_RTTI : checks whether the C++ compiler
-dnl supports RTTI
-AC_DEFUN([LYX_CXX_RTTI],[
-### Check whether the compiler supports runtime type information
-AC_CACHE_CHECK(whether the C++ compiler supports RTTI,lyx_cv_rtti,
- [AC_TRY_RUN([
-class rtti {
-public:
- virtual int tag() { return 0; }
-};
-class derived1 : public rtti {
-public:
- int tag() { return 1; }
-};
-class derived2 : public rtti {
-public:
- int tag() { return 2; }
-};
-int main() {
- derived1 * foo1 = new derived1();
- derived2 * foo2 = new derived2();
- rtti * bar = foo1;
- derived1 * bar1 = dynamic_cast<derived1 *>(bar);
- if (bar1 == 0)
- exit(1);
- bar = foo2;
- bar1 = dynamic_cast<derived1 *>(bar);
- if (bar1 != 0)
- exit(1);
- return 0;
-}
-],lyx_cv_rtti=yes,lyx_cv_rtti=no,lyx_cv_rtti=no)
-])
-if test x$lyx_cv_rtti = xyes ; then
- AC_DEFINE(HAVE_RTTI, 1,
- [Define to 1 if your compiler supports runtime type information])
-fi])
-
-
-dnl Usage: LYX_CXX_EXPLICIT : checks whether the C++ compiler
-dnl understands the "explicit" directive.
-AC_DEFUN([LYX_CXX_EXPLICIT],[
-### Check whether the compiler understands the keyword `explicit'
-AC_CACHE_CHECK(whether the C++ compiler understands explicit,lyx_cv_explicit,
- [AC_TRY_COMPILE([
-class Expl {
-public:
- explicit Expl() {}
-};],,lyx_cv_explicit=yes,lyx_cv_explicit=no)
-])
-if test $lyx_cv_explicit = no ; then
- AC_DEFINE(explicit,[ ],
- [Define to nothing if your compiler does not understand the
- 'explicit' directive])
-fi])
-
-
-dnl NOT USED CURRENTLY*************************************
-dnl Usage: LYX_CXX_STL_STACK : checks whether the C++ compiler
-dnl has a working stl stack template
-AC_DEFUN([LYX_CXX_STL_STACK],[
-AC_CACHE_CHECK(for broken STL stack template,lyx_cv_broken_stack,
- [AC_TRY_COMPILE([
-#include <stack>
-using std::stack;
-],[
- stack<int> stakk;
- stakk.push(0);
-],lyx_cv_broken_stack=no,lyx_cv_broken_stack=yes)
-])
-if test $lyx_cv_broken_stack = yes ; then
- AC_DEFINE(BROKEN_STL_STACK, 1,
- [Define if you have the STL from libg++ 2.7.x, where stack<> is not defined
- correctly])
-fi])
-
-
-dnl Usage: LYX_STD_COUNT : checks wherer the C++ library have a conforming
-dnl count template, if not the old HP version is assumed.
-AC_DEFUN([LYX_STD_COUNT],[
-AC_CACHE_CHECK(for conforming std::count,lyx_cv_std_count,
- [AC_TRY_COMPILE([
-#include <algorithm>
-using std::count;
-int countChar(char * b, char * e, char const c)
-{
- return count(b, e, c);
-}
-],[
- char a[] = "hello";
- int i = countChar(a, a + 5, 'l');
-],lyx_cv_std_count=yes,lyx_cv_std_count=no)
-])
-if test $lyx_cv_std_count = yes ; then
- AC_DEFINE(HAVE_STD_COUNT, 1,
- [Define if you have a conforming std::count template, otherwise HP version of count template is assumed.])
-fi])
-
-
-dnl Usage: LYX_CXX_STL_MODERN_STREAMS : checks whether the C++ compiler
-dnl supports modern STL streams
-AC_DEFUN([LYX_CXX_STL_MODERN_STREAMS],[
-AC_CACHE_CHECK(for modern STL streams,lyx_cv_modern_streams,
- [AC_TRY_COMPILE([
-#include <iostream>
-],[
- std::streambuf * test = std::cerr.rdbuf();
- test->pubsync();
-],lyx_cv_modern_streams=yes,lyx_cv_modern_streams=no)
-])
-if test $lyx_cv_modern_streams = yes ; then
- AC_DEFINE(MODERN_STL_STREAMS, 1,
- [Define if you have modern standard-compliant STL streams])
-fi])
-
-