]> git.lyx.org Git - lyx.git/blobdiff - config/lyxinclude.m4
change the std::string check
[lyx.git] / config / lyxinclude.m4
index 3e8a6600790d46c2d1d76472d3a311cc7f8cc006..cbd9564ce77f4fc05b5a336e163c3c3bcd83eb29 100644 (file)
@@ -183,25 +183,26 @@ dnl Check the version of g++
     CXXFLAGS="$ac_save_CXXFLAGS"
   elif test $ac_cv_prog_cxx_g = yes; then
     case $gxx_version in
-      2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";;
-      2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
-      2.96*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
-      *2.91.*) CXXFLAGS="-g $lyx_opt -Wno-return-type -fno-exceptions -fno-rtti";;
-      *)    CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";;
+      2.95.1)  CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti -fno-exceptions";;
+      2.95.*)  CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
+      2.96*)   CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
+      *2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
+      *)       CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
     esac
   else
     CXXFLAGS="$lyx_opt"
   fi
   if test x$with_warnings = xyes ; then
     case $gxx_version in
-       2.95.*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";;
-       2.96*) CXXFLAGS="$CXXFLAGS -Wall -W -Wconversion";;
-       *) CXXFLAGS="$CXXFLAGS -ansi -Wall -W";;
+       2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion -Winline";;
+       2.96*)  CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion";;
+       *)      CXXFLAGS="$CXXFLAGS -ansi -W -Wall -Wno-return-type";;
     esac
     if test $lyx_devel_version = yes ; then
        case $gxx_version in
            2.95.*) ;;
            2.96*) ;;
+           *2.91*) ;;
            *) CXXFLAGS="$CXXFLAGS -pedantic";;
         esac
     fi
@@ -344,8 +345,10 @@ AC_DEFUN(LYX_CXX_STL_STRING,[
            using std::string;
        ],[
            string a("hello there");
-           a.clear();
+           a.erase();
            a = "hey";
+           char s[] = "y";
+           int t = a.compare(a.length() - 1, 1, s);
            a.erase();
        ],[
            with_included_string=no