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],[
-changequote(, ) dnl
echo "configuring LyX version $VERSION"
if echo "$VERSION" | grep 'cvs' >/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
else
lyx_prerelease=no
fi
-changequote([, ]) dnl
-AC_SUBST(lyx_devel_version)
-if test $lyx_devel_version = yes ; then
- AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
-fi])
+AC_SUBST(lyx_devel_version)])
dnl Define the option to set a LyX version on installed executables and directories
dnl
AC_DEFUN([LYX_VERSION_SUFFIX],[
AC_MSG_CHECKING([for install target ... ])
+RPM_VERSION_SUFFIX='""'
AC_ARG_WITH(version-suffix,
[ --with-version-suffix[=<version>] install lyx files as lyx<version>],
[if test "x$withval" = "xyes";
ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
fi
lyxname="lyx$withval"
- program_suffix=$withval],
+ program_suffix=$withval
+ RPM_VERSION_SUFFIX="--with-version-suffix=$withval"],
[lyxname=lyx])
+AC_SUBST(RPM_VERSION_SUFFIX)
AC_MSG_RESULT([$lyxname])
])
*) lyx_opt=${enable_optimization};;
esac
+lyx_pch_comp=no
+
# set the debug flags correctly.
if test x$GXX = xyes; then
dnl Useful for global version info
3.1*) CXXFLAGS="$lyx_opt -finline-limit=500 -fno-exceptions";;
3.2*) CXXFLAGS="$lyx_opt -fno-exceptions";;
3.3*) CXXFLAGS="$lyx_opt -fno-exceptions";;
- 3.4*) CXXFLAGS="$lyx_opt -fno-exceptions";;
+ 3.4*|3.5*)
+ CXXFLAGS="$lyx_opt -fno-exceptions"
+ lyx_pch_comp=yes;;
*) CXXFLAGS="$lyx_opt";;
esac
if test x$enable_debug = xyes ; then
case $gxx_version in
- 3.4*) CXXFLAGS="-g $CXXFLAGS"
+ 3.4*|3.5*) CXXFLAGS="-g $CXXFLAGS"
AC_DEFINE(_GLIBCXX_DEBUG, 1, [libstdc++ debug mode])
AC_DEFINE(_GLIBCXX_DEBUG_PEDANTIC, 1, [libstdc++ pedantic debug mode])
;;
case $gxx_version in
2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall";;
2.96*) CXXFLAGS="$CXXFLAGS -W -Wall";;
- 3.1*) CXXFLAGS="$CXXFLAGS -W -Wall";;
- 3.4*) CXXFLAGS="$CXXFLAGS -Wextra -Wall";;
- *) CXXFLAGS="$CXXFLAGS -W -Wall";;
+ 3.1*) CXXFLAGS="$CXXFLAGS -W -Wall";;
+ 3.2*) CXXFLAGS="$CXXFLAGS -W -Wall";;
+ 3.3*) CXXFLAGS="$CXXFLAGS -W -Wall";;
+ *) CXXFLAGS="$CXXFLAGS -Wextra -Wall";;
esac
fi
-fi])dnl
+fi
+AM_CONDITIONAL(LYX_BUILD_PCH, test "$lyx_pch_comp" = yes)
+])dnl
dnl NOT USED CURRENTLY*************************************
[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],
+ Possible values: xforms, qt, gtk(EXPERIMENTAL)],
[FRONTENDS="$withval"], [FRONTENDS="xforms"])
AC_MSG_RESULT($FRONTENDS)
AC_SUBST(FRONTENDS)