diff --git a/INSTALL b/INSTALL index 76f94be8a5..108190f746 100644 --- a/INSTALL +++ b/INSTALL @@ -100,6 +100,23 @@ to create the Makefile by typing For more complicated cases, LyX configure takes the following specific flags: + o --enable-build-type=[rel(ease), dev(elopment), pre(release)] + allows to tweak the compiled code. The following table describes + the settings in terms of various options that are described later + + release prerelease development + optimization -O2 -O2 -O + assertions X X + stdlib-debug X + concept-checks X X + warnings X X + debug X X + + The default are as follows in terms of version number + release: stable release (1.x.y) + prerelease: version number contains alpha, beta, rc or pre. + development: version number contains svn. + o --with-extra-lib=DIRECTORY that specifies the path where LyX will find extra libraries (qt4) it needs. Defaults to NONE (i.e. search in standard places). You can specify several @@ -185,8 +202,11 @@ give a value to the CXX variable. If you encounter problems, please read the section 'Problems' at the end of this file. -In particular, the following options could be useful in some desperate -cases: +The following options allow to tweak more precisely the generated code: + + o --enable-profiling instruments the code for use with the gprof + profiler. The result are only meaningful in conjunction with + --enable-build-type=release. o --enable-optimization=VALUE enables you to set optimization to a higher level as the default (-O), for example --enable-optimization=-O3. diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 18e84dfcad..bae0eb3ee5 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -10,14 +10,29 @@ AC_DEFUN([LYX_CHECK_VERSION],[ echo "configuring LyX version" AC_PACKAGE_VERSION 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*|*beta*|*rc*) lyx_prerelease=yes - echo "WARNING: This is a prerelease. Be careful and backup your documents.";; -esac +build_type=release +AC_MSG_CHECKING([for build type]) +AC_ARG_ENABLE(build-type, + AC_HELP_STRING([--enable-build-type=TYPE],[set build options according to TYPE=dev(elopment), rel(ease) or pre(release)]), + [case $enableval in + dev*) lyx_devel_version=yes + build_type=development;; + pre*) lyx_prerelease=yes + build_type=prerelease;; + rel*) ;; + *) AC_ERROR([Bad build type specification \"$enableval\". Please use one of dev(elopment), rel(ease) or pre(release)]);; + esac], + [case AC_PACKAGE_VERSION in + *svn*) lyx_devel_version=yes + build_type=development;; + *pre*|*alpha*|*beta*|*rc*) lyx_prerelease=yes + build_type=prerelease;; + esac]) +AC_MSG_RESULT([$build_type]) +if test $lyx_devel_version == yes ; then + AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX]) + LYX_DATE="not released yet" +fi AC_SUBST(lyx_devel_version)]) diff --git a/status.15x b/status.15x index 4eb502ad45..e5309973f2 100644 --- a/status.15x +++ b/status.15x @@ -44,6 +44,9 @@ What's new * BUILD/INSTALLATION: +- New configure option --enable-build-type allows to set all + compilation options for release, prerelease or development builds. + Please see the INSTALL file for more details. ** Bug fixes: