new configure option --enable-build-type

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@23614 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-03-10 10:27:34 +00:00
parent 9973b943b3
commit 33d93b32db
3 changed files with 48 additions and 10 deletions

24
INSTALL
View File

@ -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.

View File

@ -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)])

View File

@ -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: