]> git.lyx.org Git - lyx.git/blobdiff - acinclude.m4
Fix configure bug with gettext
[lyx.git] / acinclude.m4
index 9cd693fe6692587b9bf7e96855d81cee904db5b8..e7d8f225206639ccb4c412bbc072184bdcea150d 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";;
+       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
@@ -1270,7 +1271,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