]> git.lyx.org Git - lyx.git/blobdiff - config/lyxinclude.m4
* insetbranch.C (textString): implement, so that branches appear
[lyx.git] / config / lyxinclude.m4
index 0def2730d3c3b427b7f810629857ed79d78c1f62..e022616aeb810a18e71f69b286497704b7031e85 100644 (file)
@@ -8,19 +8,16 @@ dnl Usage LYX_CHECK_VERSION   Displays version of LyX being built and
 dnl sets variables "lyx_devel_version" and "lyx_prerelease"
 AC_DEFUN([LYX_CHECK_VERSION],[
 echo "configuring LyX version" AC_PACKAGE_VERSION
-if echo AC_PACKAGE_VERSION | grep 'svn' >/dev/null ; then
-  lyx_devel_version=yes
-  AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
-  echo "WARNING: This is a development version. Expect bugs."
-else
-  lyx_devel_version=no
-fi
-if echo AC_PACKAGE_VERSION | grep 'pre' > /dev/null ; then
-    lyx_prerelease=yes
-    echo "WARNING: This is a prerelease. Be careful and backup your documents."
-else
-    lyx_prerelease=no
-fi
+lyx_devel_version=no
+lyx_prerelease=no
+case AC_PACKAGE_VERSION in
+  *svn*) lyx_devel_version=yes
+         AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
+         LYX_DATE="not released yet"
+         echo "WARNING: This is a development version. Expect bugs.";;
+  *pre*|*alpha*)lyx_prerelease=yes
+        echo "WARNING: This is a prerelease. Be careful and backup your documents.";;
+esac
 AC_SUBST(lyx_devel_version)])
 
 
@@ -29,6 +26,7 @@ dnl
 dnl
 AC_DEFUN([LYX_VERSION_SUFFIX],[
 AC_MSG_CHECKING([for version suffix])
+dnl We need the literal double quotes in the rpm spec file
 RPM_VERSION_SUFFIX='""'
 AC_ARG_WITH(version-suffix,
   [  --with-version-suffix[=<version>]  install lyx files as lyx<version>],
@@ -72,6 +70,14 @@ LYX_ERROR([Cannot find $1. Please check that the $2 library
 dnl Usage: LYX_CHECK_ERRORS  Displays a warning message if a LYX_ERROR
 dnl   has occured previously.
 AC_DEFUN([LYX_CHECK_ERRORS],[
+if test x$lyx_warning = xyes; then
+cat <<EOF
+=== The following minor problems have been detected by configure.
+=== Please check the messages below before running 'make'.
+=== (see the section 'Problems' in the INSTALL file)
+$lyx_warning_txt
+EOF
+fi
 if test x$lyx_error = xyes; then
 cat <<EOF
 **** The following problems have been detected by configure.
@@ -80,16 +86,9 @@ cat <<EOF
 $lyx_error_txt
 $lyx_warning_txt
 EOF
+exit 1
 else
 
-if test x$lyx_warning = xyes; then
-cat <<EOF
-=== The following minor problems have been detected by configure.
-=== Please check the messages below before running 'make'.
-=== (see the section 'Problems' in the INSTALL file)
-$lyx_warning_txt
-EOF
-fi
 cat <<EOF
 Configuration of LyX was successful.
 Type 'make' to compile the program,
@@ -192,7 +191,7 @@ AC_ARG_ENABLE(stdlib-debug,
 
 AC_ARG_ENABLE(concept-checks,
   AC_HELP_STRING([--enable-concept-checks],[enable concept checks]),,
-  [ if test $lyx_devel_version = yes -o $lyx-prerelease = yes ; then
+  [ if test $lyx_devel_version = yes -o $lyx_prerelease = yes ; then
        enable_concept_checks=yes;
     else
         enable_concept_checks=no;
@@ -242,6 +241,8 @@ if test x$GXX = xyes; then
         CXXFLAGS="-pg $CXXFLAGS"
         LDFLAGS="-pg $LDFLAGS"
     fi
+  fi
+  if test "$ac_env_CPPFLAGS_set" != set; then
     if test x$enable_warnings = xyes ; then
         case $gxx_version in
             3.1*|3.2*|3.3*)
@@ -256,7 +257,7 @@ if test x$GXX = xyes; then
   case $gxx_version in
       3.1*)    AM_CXXFLAGS="-finline-limit=500 ";;
       3.2*|3.3*)    AM_CXXFLAGS="";;
-      3.4*|4.0*)
+      3.4*|4.*)
           AM_CXXFLAGS=""
           test $enable_pch = yes && lyx_pch_comp=yes
           ;;
@@ -264,7 +265,7 @@ if test x$GXX = xyes; then
   esac
   if test x$enable_stdlib_debug = xyes ; then
     case $gxx_version in
-      3.4*|4.0*)
+      3.4*|4.*)
         lyx_flags="stdlib-debug $lyx_flags"
        AC_DEFINE(_GLIBCXX_DEBUG, 1, [libstdc++ debug mode])
        AC_DEFINE(_GLIBCXX_DEBUG_PEDANTIC, 1, [libstdc++ pedantic debug mode])
@@ -277,7 +278,7 @@ if test x$GXX = xyes; then
         lyx_flags="concept-checks $lyx_flags"
         AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
        ;;
-      3.4*|4.0*)
+      3.4*|4.*)
         lyx_flags="concept-checks $lyx_flags"
        AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
        ;;
@@ -547,14 +548,14 @@ rm -f conftest*])
 ])
 ### end of LYX_PATH_HEADER
 
-### Check which frontends we want to use. The default is XForms only
+### Check which frontends we want to use.
 ###
 AC_DEFUN([LYX_USE_FRONTENDS],
 [AC_MSG_CHECKING([what frontend should be used for the GUI])
 AC_ARG_WITH(frontend,
   [  --with-frontend=THIS    Use THIS frontend as main GUI:
-                           Possible values: xforms, qt, gtk(EXPERIMENTAL)],
-  [FRONTENDS="$withval"])
+                           Possible values: qt4],
+  [FRONTENDS="$withval"],[FRONTENDS="qt4"])
 if test "x$FRONTENDS" = x ; then
   AC_MSG_RESULT(none)
   AC_ERROR("Please select a frontend using --with-frontend")
@@ -591,7 +592,6 @@ case $lyx_use_packaging in
           mandir='${datadir}/man' ;;
   windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout])
           PACKAGE=LyX${version_suffix}
-          program_suffix=$version_suffix
           default_prefix="C:/Program Files/${PACKAGE}"
           bindir='${prefix}/bin'
           libdir='${prefix}/Resources'
@@ -606,6 +606,7 @@ case $lyx_use_packaging in
     *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
 esac
 AC_SUBST(pkgdatadir)
+AC_SUBST(program_suffix)
 ])