* configure.ac: check earlier for -liconv and -lz, since Qt4 needs them;

put LIBICONV in LIBS.

	* src/Makefile.am: 
	* src/client/Makefile.am: update accordingly.

	* config/qt4.m4: do not try to run pkg-config tests when pkg-config 
	is not installed.

	* INSTALL.MacOSX: advise to use pkg-config; remove -lz from LDFLAGS;
	remove --with-frontend=qt4 from configure line; in the svn case, remove
	also --disable-stdlib-debug and --disable-concept-checks (and explain 
	why --disable-stdlib-debug may be needed).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19056 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2007-07-12 12:57:59 +00:00
parent d4008e6295
commit a7039727c3
6 changed files with 45 additions and 23 deletions

View File

@ -1,7 +1,7 @@
Building LyX/Mac-1.5
Ronald Florence <ron@18james.com>
Modified by Bennett Helm <bennett.helm@fandm.edu> and by Anders
Ekberg <anek@mac.com>.
Modified by Bennett Helm <bennett.helm@fandm.edu>, Anders
Ekberg <anek@mac.com> and Jean-Marc Lasgouttes <lasgouttes@lyx.org>.
LyX/Mac is built from the LyX source, the GPL-licensed Trolltech
Qt/Mac library, and a custom application bundle.
@ -50,6 +50,11 @@ using:
sudo port install gettext
4. [Useful to simplify detection of Qt:] pkg-config >= 0.9.0. Again,
the simplest way is through MacPorts:
sudo port install pkgconfig
BUILD INSTRUCTIONS
@ -60,10 +65,13 @@ where you installed Qt for /path/to/QT4 (as above).
(a) Official Releases
cd to the top of the LyX source hierarchy, and enter:
If you did not install pkg-config, first set the LDFLAGS variable:
export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -lz -framework Cocoa"
./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.5 --without-x --with-frontend=qt4 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os
export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa"
Then, cd to the top of the LyX source hierarchy, and enter:
./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.5 --without-x --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os
make
make install-strip
@ -76,14 +84,20 @@ user's directory being located at ~/Library/Application Support/LyX-1.5.)
Building LyX from developmental sources requires a few more steps.
Instead of the instructions above, do the following:
cd to the top of the LyX source hierarchy, and enter:
If you did not install pkg-config, first set the LDFLAGS variable:
export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa"
Then, cd to the top of the LyX source hierarchy, and enter:
export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -lz -framework Cocoa"
./autogen.sh
./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.5 --without-x --with-frontend=qt4 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os --disable-stdlib-debug --disable-concept-checks
./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.5 --without-x --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os
make
make install-strip
Note that by default svn versions use some extra debugging code that
somewhat slows LyX down. If it is a real problem, you can pass the
option --disable-stdlib-debug to configure.
The information on this page is believed to be accurate, has been used
successfully on many systems and sites, and has benefited from the

View File

@ -135,7 +135,10 @@ AC_DEFUN([QT4_DO_IT_ALL],
AC_SUBST(QT4_CPPFLAGS)
dnl Check if it possible to do a pkg-config
QT4_DO_PKG_CONFIG
PKG_PROG_PKG_CONFIG
if test -n "$PKG_CONFIG" ; then
QT4_DO_PKG_CONFIG
fi
if test "$pkg_failed" != "no" ; then
QT4_DO_MANUAL_CONFIG
fi
@ -145,7 +148,7 @@ AC_DEFUN([QT4_DO_IT_ALL],
AC_DEFUN([QT4_DO_PKG_CONFIG],
[
PKG_PROG_PKG_CONFIG
dnl tell pkg-config to look also in $qt4_cv_dir/lib.
save_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
if test -n "$qt4_cv_dir" ; then
PKG_CONFIG_PATH=$qt4_cv_dir/lib:$qt4_cv_dir/lib/pkgconfig:$PKG_CONFIG_PATH

View File

@ -158,6 +158,20 @@ AC_LIBTOOL_WIN32_DLL
#AM_PROG_LIBTOOL
LYX_PROG_LIBTOOL
### We need iconv for unicode support (Qt4 frontend requires it too)
AM_ICONV
if test "$am_cv_func_iconv" = no; then
LYX_ERROR([Cannot find required library iconv])
else
LIBS="$LIBS $LIBICONV"
fi
### check for compression support
AC_CHECK_HEADERS(zlib.h,
[AC_CHECK_LIB(z, gzopen, [LIBS="$LIBS -lz"], LYX_LIB_ERROR(libz,zlib))],
[LYX_LIB_ERROR(zlib.h,zlib)])
### Check for X libraries
AC_PATH_XTRA
case $have_x in
@ -211,12 +225,6 @@ if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then
prefix=`pwd`/installprefix
fi
### We need iconv for unicode support
AM_ICONV
if test "$am_cv_func_iconv" = no; then
LYX_ERROR([Cannot find required library iconv])
fi
### Setup GNU gettext
dnl GNU gettext is written in C
AC_LANG_PUSH(C)
@ -247,11 +255,6 @@ LYX_CHECK_DECL(mkstemp,[unistd.h stdlib.h])
# Check the form of mkdir()
AC_FUNC_MKDIR
# check for compression support
AC_CHECK_HEADERS(zlib.h,
[AC_CHECK_LIB(z, gzopen, [LIBS="$LIBS -lz"], LYX_LIB_ERROR(libz,zlib))],
[LYX_LIB_ERROR(zlib.h,zlib)])
dnl This is a slight hack: the tests generated by autoconf 2.52 do not
dnl work correctly because of some conflict with stdlib.h with g++ 2.96
dnl We aim to remove this eventually, since we should test as much as

View File

@ -121,6 +121,7 @@ src/insets/InsetRef.cpp
src/insets/InsetTOC.cpp
src/insets/InsetTabular.cpp
src/insets/InsetText.cpp
src/insets/InsetTheorem.cpp
src/insets/InsetUrl.cpp
src/insets/InsetVSpace.cpp
src/insets/InsetWrap.cpp
@ -128,6 +129,7 @@ src/insets/RenderGraphic.cpp
src/insets/RenderPreview.cpp
src/lengthcommon.cpp
src/lyxfind.cpp
src/mathed/InsetFormulaMacro.cpp
src/mathed/InsetMathAMSArray.cpp
src/mathed/InsetMathCases.cpp
src/mathed/InsetMathGrid.cpp

View File

@ -27,7 +27,7 @@ LYX_POST_LIBS = frontends/controllers/libcontrollers.la \
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_SIGNALS) $(BOOST_FILESYSTEM) $(BOOST_IOSTREAMS)
OTHERLIBS = $(BOOST_LIBS) $(LIBICONV) $(INTLLIBS) $(AIKSAURUS_LIBS) @LIBS@ $(SOCKET_LIBS)
OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(AIKSAURUS_LIBS) @LIBS@ $(SOCKET_LIBS)
bin_PROGRAMS = lyx
noinst_PROGRAMS = $(FRONTENDS_PROGS)

View File

@ -16,7 +16,7 @@ BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM)
lyxclient_LDADD = \
$(top_builddir)/src/support/libsupport.la \
$(BOOST_LIBS) $(LIBICONV) $(INTLLIBS) @LIBS@ $(SOCKET_LIBS)
$(BOOST_LIBS) $(INTLLIBS) @LIBS@ $(SOCKET_LIBS)
lyxclient_SOURCES = \
boost.cpp \