]> git.lyx.org Git - lyx.git/blobdiff - config/lyxinclude.m4
Initialize status_ in the 3rd constructor.
[lyx.git] / config / lyxinclude.m4
index 68bd87704cda76dbe0a8233ecd0860277595cf05..509898034bd9ad9266cf3b452d04846da442f5c1 100644 (file)
@@ -176,27 +176,30 @@ AC_MSG_RESULT($cross_compiling)
 
 AC_PROG_CXX_GNU
 
-dnl We might want to get or shut warnings.
-AC_ARG_WITH(warnings,
-  [  --with-warnings         tell the compiler to display more warnings],,
+### We might want to get or shut warnings.
+AC_ARG_ENABLE(warnings,
+  [  --enable-warnings       tell the compiler to display more warnings],,
   [ if test $lyx_devel_version = yes -o $lyx_prerelease = yes && test $ac_cv_prog_gxx = yes ; then
-       with_warnings=yes;
+       enable_warnings=yes;
     else
-       with_warnings=no;
+       enable_warnings=no;
     fi;])
-if test x$with_warnings = xyes ; then
+if test x$enable_warnings = xyes ; then
   lyx_flags="$lyx_flags warnings"
   AC_DEFINE(WITH_WARNINGS, 1,
   [Define this if you want to see the warning directives put here and
    there by the developpers to get attention])
 fi
 
-# optimize less for development versions
-if test $lyx_devel_version = yes -o $lyx_prerelease = yes ; then
-  lyx_opt="-O"
-else
-  lyx_opt="-O2"
-fi
+### set up optimization
+AC_ARG_ENABLE(optimization,
+  [  --enable-optimization[=value]   enable compiler optimisation],,
+        enable_optimization=yes;)
+case $enable_optimization in
+  yes) lyx_opt=-O;;
+   no) lyx_opt=;;
+    *) lyx_opt=${enable_optimization};;
+esac
 
 # set the debug flags correctly.
 if test $ac_cv_prog_gxx = yes; then
@@ -226,18 +229,17 @@ dnl Check the version of g++
   else
     CXXFLAGS="$lyx_opt"
   fi
-  if test x$with_warnings = xyes ; then
+  if test x$enable_warnings = xyes ; then
     case $gxx_version in
        2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall";;
        2.96*)  CXXFLAGS="$CXXFLAGS -W -Wall";;
-       2.97*)  CXXFLAGS="$CXXFLAGS -W -Wall";;
        *)      CXXFLAGS="$CXXFLAGS -W -Wall";;
     esac
     if test $lyx_devel_version = yes ; then
        case $gxx_version in
            2.95.*) ;;
            2.96*) ;;
-           2.97*) CXXFLAGS="$CXXFLAGS -Wconversion -Winline";;
+           2.97*) ;;
            *2.91*) ;;
            *) ;;
         esac
@@ -910,8 +912,8 @@ extern int select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func
 AC_DEFUN(LYX_USE_FRONTEND,
 [AC_MSG_CHECKING(what frontend should be used as main GUI)
 AC_ARG_WITH(frontend,
-  [  --with-frontend[=value] Use THIS frontend as main GUI:
-                          Possible values: xforms,kde,gnome],
+  [  --with-frontend=THIS    Use THIS frontend as main GUI:
+                            Possible values: xforms, qt2, gnome],
   [lyx_use_frontend="$withval"], [lyx_use_frontend="xforms"])
 AC_MSG_RESULT($lyx_use_frontend)
 lyx_flags="$lyx_flags frontend-$lyx_use_frontend"