mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Continue pre-spring cleaning of configure script
* build-type=profiling implies -fno-omit-frame-pointer in gcc. This allows sysprof to yield proper call trees * remove --enable-grpof option (the build type is enough) * remove --with-frontend option since we have only one frontend. Move stuff around and generally simplify the Qt detection code * do not check for bc anymore. * Update README.
This commit is contained in:
parent
3057bce3f2
commit
3ef4db2ce4
38
INSTALL
38
INSTALL
@ -110,13 +110,16 @@ flags:
|
|||||||
concept-checks X X
|
concept-checks X X
|
||||||
warnings X X
|
warnings X X
|
||||||
debug X X X X
|
debug X X X X
|
||||||
gprof X
|
|
||||||
|
|
||||||
The defaults are as follows in terms of version number
|
The defaults are as follows in terms of version number
|
||||||
release: stable release (1.x.y)
|
release: stable release (1.x.y)
|
||||||
prerelease: version number contains alpha, beta, rc or pre.
|
prerelease: version number contains alpha, beta, rc or pre.
|
||||||
development: version number contains dev.
|
development: version number contains dev.
|
||||||
|
|
||||||
|
The `profiling' build type uses the -fno-omit-frame-pointer option with gcc
|
||||||
|
|
||||||
|
The `gprof' build type compiles and links with -pg option with gcc.
|
||||||
|
|
||||||
o --with-extra-lib=DIRECTORY that specifies the path where LyX will
|
o --with-extra-lib=DIRECTORY that specifies the path where LyX will
|
||||||
find extra libraries (qt4) it needs. Defaults to NONE
|
find extra libraries (qt4) it needs. Defaults to NONE
|
||||||
(i.e. search in standard places). You can specify several
|
(i.e. search in standard places). You can specify several
|
||||||
@ -155,10 +158,6 @@ LyX:
|
|||||||
o --with-included-gettext forces the use of the included GNU gettext
|
o --with-included-gettext forces the use of the included GNU gettext
|
||||||
library, although you might have another one installed.
|
library, although you might have another one installed.
|
||||||
|
|
||||||
o --with-catgets allows to use the catget() functions which can
|
|
||||||
exist on your system. This can cause problems, though. Use with
|
|
||||||
care.
|
|
||||||
|
|
||||||
o You can also set the environment variable LINGUAS to a list of
|
o You can also set the environment variable LINGUAS to a list of
|
||||||
languages in case you do not want to install all the translation
|
languages in case you do not want to install all the translation
|
||||||
files. For example, if you are only interested in German and
|
files. For example, if you are only interested in German and
|
||||||
@ -203,51 +202,38 @@ give a value to the CXX variable.
|
|||||||
If you encounter problems, please read the section 'Problems' at the end of
|
If you encounter problems, please read the section 'Problems' at the end of
|
||||||
this file.
|
this file.
|
||||||
|
|
||||||
The following options allow you to tweak the generated code more precisely:
|
The following options allow you to tweak the generated code more precisely (see the description of --enable-build-type for the default values):
|
||||||
|
|
||||||
o --enable-gprof instruments the code for use with the gprof
|
|
||||||
profiler. The results are only meaningful in conjunction with
|
|
||||||
--enable-build-type=release.
|
|
||||||
|
|
||||||
o --enable-optimization=VALUE enables you to set optimization to a
|
o --enable-optimization=VALUE enables you to set optimization to a
|
||||||
higher level than the default (-O), for example --enable-optimization=-O3.
|
higher level than the default, for example --enable-optimization=-O3.
|
||||||
|
|
||||||
o --disable-optimization - you can use this to disable compiler
|
o --disable-optimization - you can use this to disable compiler
|
||||||
optimization of LyX. The compile may be much quicker with some
|
optimization of LyX. The compile may be much quicker with some
|
||||||
compilers, but LyX will run more slowly.
|
compilers, but LyX will run more slowly.
|
||||||
|
|
||||||
o --enable-debug will add debug information to your binary. This
|
o --enable-debug will add debug information to your binary. This
|
||||||
requires a lot more disk space, but is a must if you want to try to
|
requires a lot more disk space, but is a must if you want to try
|
||||||
debug problems in LyX. The default is to have debug information
|
to debug problems in LyX. There is no run-time penalty.
|
||||||
for development versions and prereleases only.
|
|
||||||
|
|
||||||
o --enable-warnings that make the compiler output more warnings during
|
o --enable-warnings that make the compiler output more warnings during
|
||||||
the compilation of LyX. Opposite is --disable-warnings. By default,
|
the compilation of LyX. Opposite is --disable-warnings.
|
||||||
this flag is on for development versions only.
|
|
||||||
|
|
||||||
o --enable-assertions that make the compiler generate run-time
|
o --enable-assertions that make the compiler generate run-time
|
||||||
code which checks that some variables have sane values. Opposite
|
code which checks that some variables have sane values. Opposite
|
||||||
is --disable-assertions. By default, this flag is on for
|
is --disable-assertions.
|
||||||
development versions only.
|
|
||||||
|
|
||||||
o --enable-stdlib-debug adds some debug code in the standard
|
o --enable-stdlib-debug adds some debug code in the standard
|
||||||
library; this slows down the code, but has been helpful in the
|
library; this slows down the code, but has been helpful in the
|
||||||
past to find bugs. By default, this flag is on for development
|
past to find bugs.
|
||||||
versions only.
|
|
||||||
|
|
||||||
o --enable-concept-checks adds some compile-time checks. There is no
|
o --enable-concept-checks adds some compile-time checks. There is no
|
||||||
run-time penalty. By default, this flag is on for development
|
run-time penalty.
|
||||||
versions only.
|
|
||||||
|
|
||||||
o --without-latex-config that disables the automatic detection of your
|
o --without-latex-config that disables the automatic detection of your
|
||||||
latex configuration. This detection is automatically disabled if
|
latex configuration. This detection is automatically disabled if
|
||||||
latex cannot be found. If you find that you have to use this
|
latex cannot be found. If you find that you have to use this
|
||||||
flag, please report it as a bug.
|
flag, please report it as a bug.
|
||||||
|
|
||||||
o --with-frontend=FRONTEND that allows to specify which frontend you
|
|
||||||
want to use. The default value is qt4, which is the only available
|
|
||||||
frontend for now.
|
|
||||||
|
|
||||||
o --enable-monolithic-build[=boost,client,insets,mathed,core,tex2lyx,frontend-qt4]
|
o --enable-monolithic-build[=boost,client,insets,mathed,core,tex2lyx,frontend-qt4]
|
||||||
that enables monolithic build of the given parts of the source
|
that enables monolithic build of the given parts of the source
|
||||||
code. This should reduce the compilation time provided you have
|
code. This should reduce the compilation time provided you have
|
||||||
|
@ -182,11 +182,6 @@ AC_ARG_ENABLE(concept-checks,
|
|||||||
[enable_concept_checks=no])]
|
[enable_concept_checks=no])]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_ENABLE(gprof,
|
|
||||||
AC_HELP_STRING([--enable-gprof],[enable profiling using gprof]),,
|
|
||||||
[AS_CASE([$build_type], [gprof], [enable_gprof=yes], [enable_gprof=no])]
|
|
||||||
)
|
|
||||||
|
|
||||||
### set up optimization
|
### set up optimization
|
||||||
AC_ARG_ENABLE(optimization,
|
AC_ARG_ENABLE(optimization,
|
||||||
AC_HELP_STRING([--enable-optimization[=value]],[enable compiler optimisation]),,
|
AC_HELP_STRING([--enable-optimization[=value]],[enable compiler optimisation]),,
|
||||||
@ -231,16 +226,20 @@ if test x$GXX = xyes; then
|
|||||||
if test "$ac_test_CXXFLAGS" = set; then
|
if test "$ac_test_CXXFLAGS" = set; then
|
||||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
else
|
else
|
||||||
CFLAGS="$lyx_opt"
|
CFLAGS="$lyx_opt"
|
||||||
CXXFLAGS="$lyx_opt"
|
CXXFLAGS="$lyx_opt"
|
||||||
if test x$enable_debug = xyes ; then
|
if test x$enable_debug = xyes ; then
|
||||||
CFLAGS="-g $CFLAGS"
|
CFLAGS="-g $CFLAGS"
|
||||||
CXXFLAGS="-g $CXXFLAGS"
|
CXXFLAGS="-g $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
if test x$enable_gprof = xyes ; then
|
if test $build_type = gprof ; then
|
||||||
CFLAGS="-pg $CFLAGS"
|
CFLAGS="-pg $CFLAGS"
|
||||||
CXXFLAGS="-pg $CXXFLAGS"
|
CXXFLAGS="-pg $CXXFLAGS"
|
||||||
LDFLAGS="-pg $LDFLAGS"
|
LDFLAGS="-pg $LDFLAGS"
|
||||||
|
fi
|
||||||
|
if test $build_type = profiling ; then
|
||||||
|
CFLAGS="$CFLAGS -fno-omit-frame-pointer"
|
||||||
|
CXXFLAGS="$CXXFLAGS -fno-omit-frame-pointer"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$ac_env_CPPFLAGS_set" != set; then
|
if test "$ac_env_CPPFLAGS_set" != set; then
|
||||||
@ -450,25 +449,6 @@ rm -f conftest*])
|
|||||||
])
|
])
|
||||||
### end of LYX_PATH_HEADER
|
### end of LYX_PATH_HEADER
|
||||||
|
|
||||||
### 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,
|
|
||||||
[AC_HELP_STRING([--with-frontend=THIS], [use THIS frontend as main GUI:
|
|
||||||
Possible values: qt4])],
|
|
||||||
[FRONTENDS="$withval"],[FRONTENDS="qt4"])
|
|
||||||
if test "x$FRONTENDS" = x ; then
|
|
||||||
AC_MSG_RESULT(none)
|
|
||||||
AC_MSG_ERROR("Please select a frontend using --with-frontend")
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($FRONTENDS)
|
|
||||||
AC_SUBST(FRONTENDS)
|
|
||||||
AC_SUBST(FRONTENDS_SUBDIRS)
|
|
||||||
AC_SUBST(FRONTENDS_PROGS)
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
## Check what kind of packaging should be used at install time.
|
## Check what kind of packaging should be used at install time.
|
||||||
## The default is autodetected.
|
## The default is autodetected.
|
||||||
AC_DEFUN([LYX_USE_PACKAGING],
|
AC_DEFUN([LYX_USE_PACKAGING],
|
||||||
|
@ -135,15 +135,27 @@ AC_DEFUN([QT4_DO_IT_ALL],
|
|||||||
QT4_DO_MANUAL_CONFIG
|
QT4_DO_MANUAL_CONFIG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -z "$QT4_LIB"; then
|
||||||
|
AC_MSG_ERROR([cannot find qt4 library.])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Check qt version
|
dnl Check qt version
|
||||||
AS_VERSION_COMPARE($QT4_VERSION, $1,
|
AS_VERSION_COMPARE($QT4_VERSION, $1,
|
||||||
[AC_MSG_ERROR([LyX requires at least version $1 of Qt. Only version $QT4_VERSION has been found.])
|
[AC_MSG_ERROR([LyX requires at least version $1 of Qt. Only version $QT4_VERSION has been found.])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH)
|
AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH)
|
||||||
|
if test -z "$MOC4"; then
|
||||||
|
AC_MSG_ERROR([cannot find moc binary.])
|
||||||
|
fi
|
||||||
AC_PATH_PROGS(UIC4, [uic-qt4 uic],[],$qt4_cv_bin:$PATH)
|
AC_PATH_PROGS(UIC4, [uic-qt4 uic],[],$qt4_cv_bin:$PATH)
|
||||||
|
if test -z "$UIC4"; then
|
||||||
|
AC_MSG_ERROR([cannot find uic binary.])
|
||||||
|
fi
|
||||||
AC_PATH_PROGS(RCC4, [rcc-qt4 rcc],[],$qt4_cv_bin:$PATH)
|
AC_PATH_PROGS(RCC4, [rcc-qt4 rcc],[],$qt4_cv_bin:$PATH)
|
||||||
AC_CHECK_PROG(bc_found,[bc],[yes],[no],$PATH)
|
if test -z "$RCC4"; then
|
||||||
|
AC_MSG_ERROR([cannot find rcc binary.])
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([QT4_DO_PKG_CONFIG],
|
AC_DEFUN([QT4_DO_PKG_CONFIG],
|
||||||
|
37
configure.ac
37
configure.ac
@ -64,9 +64,6 @@ AM_PATH_PYTHON(2.4.0,, :)
|
|||||||
### we need to know the byte order for unicode conversions
|
### we need to know the byte order for unicode conversions
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
### check which frontend we want to use
|
|
||||||
LYX_USE_FRONTENDS
|
|
||||||
|
|
||||||
### Check for a C++ compiler
|
### Check for a C++ compiler
|
||||||
LYX_PROG_CXX
|
LYX_PROG_CXX
|
||||||
|
|
||||||
@ -126,39 +123,14 @@ AC_CHECK_HEADERS(magic.h,
|
|||||||
is correctly installed on your system.
|
is correctly installed on your system.
|
||||||
Falling back to builtin file format detection.])])
|
Falling back to builtin file format detection.])])
|
||||||
|
|
||||||
|
### setup the qt4 frontend.
|
||||||
### check which frontend we want to use
|
|
||||||
|
|
||||||
dnl The code below is not in a macro, because this would cause big
|
dnl The code below is not in a macro, because this would cause big
|
||||||
dnl problems with the AC_REQUIRE contained in QT4_DO_IT_ALL.
|
dnl problems with the AC_REQUIRE contained in QT4_DO_IT_ALL.
|
||||||
for frontend in $FRONTENDS ; do
|
QT4_DO_IT_ALL([4.5.0])
|
||||||
case "$frontend" in
|
AC_SUBST([FRONTENDS_SUBDIRS], [qt4])
|
||||||
qt4)
|
FRONTEND_INFO="${FRONTEND_INFO}\
|
||||||
QT4_DO_IT_ALL([4.5.0])
|
|
||||||
FRONTENDS_PROGS="$FRONTENDS_PROGS lyx-qt4\$(EXEEXT)"
|
|
||||||
FRONTENDS_SUBDIRS="$FRONTENDS_SUBDIRS qt4"
|
|
||||||
RPM_FRONTEND="qt4"
|
|
||||||
FRONTEND_INFO="${FRONTEND_INFO}\
|
|
||||||
Qt 4 Frontend:\n\
|
Qt 4 Frontend:\n\
|
||||||
Qt 4 version:\t\t${QT4_VERSION}\n"
|
Qt 4 version:\t\t${QT4_VERSION}\n"
|
||||||
dnl qt 4 build will fail without moc, uic, or bc
|
|
||||||
if test -z "$MOC4"; then
|
|
||||||
AC_MSG_ERROR([cannot find moc binary.])
|
|
||||||
fi
|
|
||||||
if test -z "$UIC4"; then
|
|
||||||
AC_MSG_ERROR([cannot find uic binary.!])
|
|
||||||
fi
|
|
||||||
if test -z "$QT4_LIB"; then
|
|
||||||
AC_MSG_ERROR([cannot find qt4 library.])
|
|
||||||
fi
|
|
||||||
if test "$bc_found" = "no"; then
|
|
||||||
AC_MSG_ERROR([cannot find bc program.])
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([unknown frontend '$frontend'.]);;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# fix the value of the prefixes.
|
# fix the value of the prefixes.
|
||||||
test "x$prefix" = xNONE && prefix=$default_prefix
|
test "x$prefix" = xNONE && prefix=$default_prefix
|
||||||
@ -244,7 +216,6 @@ ${FRONTEND_INFO}\
|
|||||||
LyX files dir: ${real_pkgdatadir}\n"
|
LyX files dir: ${real_pkgdatadir}\n"
|
||||||
|
|
||||||
AC_SUBST(VERSION_INFO)
|
AC_SUBST(VERSION_INFO)
|
||||||
AC_SUBST(RPM_FRONTEND)
|
|
||||||
AC_SUBST(AM_CPPFLAGS)
|
AC_SUBST(AM_CPPFLAGS)
|
||||||
AC_SUBST(AM_CXXFLAGS)
|
AC_SUBST(AM_CXXFLAGS)
|
||||||
AC_SUBST(AM_CFLAGS)
|
AC_SUBST(AM_CFLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user