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 -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";;
- *) 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
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
AC_DEFUN(LYX_CXX_NAMESPACES,[
AC_CACHE_CHECK(for correct namespaces support,lyx_cv_cxx_namespace,
[AC_TRY_COMPILE([
- #include <vector>
- using std::vector;
+ namespace foo {
+ int bar;
+ }
],[
- vector<int> test;
+ foo::bar = 0;
return 0;
],lyx_cv_cxx_namespace=yes,lyx_cv_cxx_namespace=no)
])
[AC_MSG_CHECKING([type of argument for putenv()])
AC_CACHE_VAL(lyx_cv_func_putenv_arg,dnl
[AC_TRY_COMPILE(dnl
-[#include <cstdlib>
-extern int putenv(const char *);],,dnl
+[#include <cstdlib>],
+[char const * foo = "bar";
+ putenv(foo);],dnl
[lyx_cv_func_putenv_arg='char const *'],[lyx_cv_func_putenv_arg='char *'])])
AC_MSG_RESULT($lyx_cv_func_putenv_arg)
AC_DEFINE_UNQUOTED(PUTENV_TYPE_ARG,$lyx_cv_func_putenv_arg,dnl