diff options
author | Rob Savoye <rob@welcomehome.org> | 2001-05-26 05:55:28 +0000 |
---|---|---|
committer | Rob Savoye <rob@welcomehome.org> | 2001-05-26 05:55:28 +0000 |
commit | 4330bafff46c45742dc65b79a7e06196f0d89336 (patch) | |
tree | 37f7b37ad0a0f2ed4b94c848d7d0d9c2487d077f /aclocal.m4 | |
parent | 93d1d8d757dfbf0738f9fcb72ea6f04050772da4 (diff) | |
download | dejagnu-4330bafff46c45742dc65b79a7e06196f0d89336.zip dejagnu-4330bafff46c45742dc65b79a7e06196f0d89336.tar.gz dejagnu-4330bafff46c45742dc65b79a7e06196f0d89336.tar.bz2 |
* acinclude.m4: Add DJ_AC_STL, which figures out if we're running
libstdc++ version 2 or 3.
* aclocal.m4: Regenerated.
* configure.in: Add DJ_AC_STL.
* configure: Regenerated.
* dejagnu.h: Add the use of the std namespace, so we work with
libstdc++ version 2 or 3.
* testsuite/libdejagnu/unit.cc: Use setbuf() or pubsetbuff(),
depending on the version.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -10,6 +10,27 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. +AC_DEFUN(DJ_AC_STL, [ +AC_MSG_CHECKING(for for STL versions) +AC_CACHE_VAL(ac_cv_stl,[ + AC_TRY_COMPILE([#include <iostream>], [ + using namespace std; + char bbuuff[5120]; + cout.rdbuf()->pubsetbuf(bbuuff, 5120); ], + ac_cv_stl=v3 + , + ac_cv_stl=v2 + ), +]) + +if test x"${ac_cv_stl}" != x"v2" ; then + AC_MSG_RESULT(v3) + AC_DEFINE(HAVE_STL3) +else + AC_MSG_RESULT(v2) +fi +]) + AC_DEFUN(DJ_AC_PATH_TCLSH, [ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ ../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. @@ -223,3 +244,12 @@ else $1_FALSE= fi]) + +dnl AM_PROG_LEX +dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT +AC_DEFUN(AM_PROG_LEX, +[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) +AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") +AC_PROG_LEX +AC_DECL_YYTEXT]) + |