]> git.lyx.org Git - lyx.git/blobdiff - acinclude.m4
patch from Dekel
[lyx.git] / acinclude.m4
index 00ad1f508ea3be410750a50a1f955c2f1204395e..ac8165def8da673ab01613e99fda1a5e1e0e6dd8 100644 (file)
@@ -176,29 +176,33 @@ dnl normal versions of a library), tasteless as that idea is.
   ac_save_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS=
 dnl Check the version of g++
-  gxx_version=`g++ --version`
+  gxx_version=`${CXX} --version`
   
   AC_PROG_CXX_G
   if test "$ac_test_CXXFLAGS" = set; then
     CXXFLAGS="$ac_save_CXXFLAGS"
   elif test $ac_cv_prog_cxx_g = yes; then
     case $gxx_version in
-      2.7*) CXXFLAGS="$lyx_opt";;
-      2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";;
-      2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
-      *)    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 -fhonor-std";;
+      *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";;
-       *) CXXFLAGS="$CXXFLAGS -ansi -Wall -W";;
+       2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion -Winline";;
+       2.96*)  CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion -Winline";;
+       *)      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
@@ -341,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
@@ -541,23 +547,18 @@ lyx_cv_xfversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
   sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'`
 rm -f conftest*])
 case "$lyx_cv_xfversion" in 
-  "(unknown)"|0.82|0.83|0.84|0.85
-     LYX_ERROR(dnl
+  "(unknown)"|0.8[1-7]
+         LYX_ERROR(dnl
 Version $lyx_cv_xfversion of xforms is not compatible with LyX. 
-   This version of LyX works best with version 0.88[,] although it
-   supports also versions 0.81[,] 0.86 and 0.87.) ;;
-  0.81|0.86|0.87) 
-     LYX_WARNING(dnl
-While LyX is compatible with version $lyx_cv_xfversion of xforms[,] 
-   it is recommended that you upgrade to version 0.88.) ;;
-     0.88) ;;
-     0.89) LYX_WARNING(dnl
+   This version of LyX works best with versions 0.88 (recommended) and later.) ;;
+    0.88) ;;
+    0.89) LYX_WARNING(dnl
 LyX should work ok with version $lyx_cv_xfversion of xforms[,] but
 it is an unproven version and might still have some bugs. If you
 have problems[,] please use version 0.88 instead.) ;;
-          *) LYX_WARNING(dnl
+       *) LYX_WARNING(dnl
 Version $lyx_cv_xfversion of xforms might not be compatible with LyX[,] 
  since it is newer than 0.88. You might have slight problems with it.);;
+ since it is newer than 0.88. You might have slight problems with it.);;
 esac
 fi])
 
@@ -1267,7 +1268,11 @@ AC_DEFUN(AM_WITH_NLS,
               [AC_CACHE_CHECK([for gettext in libintl],
                 gt_cv_func_gettext_libintl,
                 [AC_CHECK_LIB(intl, gettext,
-                 gt_cv_func_gettext_libintl=yes,
+dnl ============== A fix is here! ======================
+dnl -lintl was not added to the LIBS variable in this case
+                 [gt_cv_func_gettext_libintl=yes
+                  INTLLIBS="-lintl"],
+dnl ==== end of fix
                  gt_cv_func_gettext_libintl=no)],
                 gt_cv_func_gettext_libintl=no)])
           fi