From a7039727c356ecb8f51819975da611b6629df4c4 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 12 Jul 2007 12:57:59 +0000 Subject: [PATCH] * 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 --- INSTALL.MacOSX | 30 ++++++++++++++++++++++-------- config/qt4.m4 | 7 +++++-- configure.ac | 25 ++++++++++++++----------- po/POTFILES.in | 2 ++ src/Makefile.am | 2 +- src/client/Makefile.am | 2 +- 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/INSTALL.MacOSX b/INSTALL.MacOSX index f52e6af4ed..e84af75505 100644 --- a/INSTALL.MacOSX +++ b/INSTALL.MacOSX @@ -1,7 +1,7 @@ Building LyX/Mac-1.5 Ronald Florence -Modified by Bennett Helm and by Anders -Ekberg . +Modified by Bennett Helm , Anders +Ekberg and Jean-Marc Lasgouttes . 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 diff --git a/config/qt4.m4 b/config/qt4.m4 index 778978eaa9..728697c14e 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -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 diff --git a/configure.ac b/configure.ac index c12aff90d2..a953b1421c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/po/POTFILES.in b/po/POTFILES.in index 674f4d4beb..aa04d9f78b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 3c2e486d24..96f132f530 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 812518d690..d91ecd2e50 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -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 \