>>>>> "Roger" == Roger Mc Murtrie <[EMAIL PROTECTED]> writes:
Roger> svn version built successfully with your latest patch iconv-2 Roger> but needs export LDFLAGS/ OK, then here is the patch that I propose to apply. What it does: - check earlier for -liconv and -lz, since Qt4 needs them - put LIBICONV in LIBS, and update the Makefiles accordingly. - do not try to run pkg-config tests when pkg-config is not installed. - update and simplify 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 --disable-concept-checks (and explain why --disable-stdlib-debug may be needed). Roger, I'd appreciate if you could test this latest patch (in particular without pkg-config). Bennett, could you check that what I did makes sense (you probably know things I do not know). Jose', can I apply? JMarc
Index: src/Makefile.am =================================================================== --- src/Makefile.am (révision 19050) +++ src/Makefile.am (copie de travail) @@ -27,7 +27,7 @@ LYX_POST_LIBS = frontends/controllers/li 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) Index: src/client/Makefile.am =================================================================== --- src/client/Makefile.am (révision 19050) +++ src/client/Makefile.am (copie de travail) @@ -16,7 +16,7 @@ BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILE 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 \ Index: INSTALL.MacOSX =================================================================== --- INSTALL.MacOSX (révision 19050) +++ INSTALL.MacOSX (copie de travail) @@ -1,7 +1,7 @@ Building LyX/Mac-1.5 Ronald Florence <[EMAIL PROTECTED]> -Modified by Bennett Helm <[EMAIL PROTECTED]> and by Anders -Ekberg <[EMAIL PROTECTED]>. +Modified by Bennett Helm <[EMAIL PROTECTED]>, Anders +Ekberg <[EMAIL PROTECTED]> and Jean-Marc Lasgouttes <[EMAIL PROTECTED]>. 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 (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 -framework Cocoa" - 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 +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 ~/Libr 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 Index: configure.ac =================================================================== --- configure.ac (révision 19050) +++ configure.ac (copie de travail) @@ -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>/ 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. # 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 Index: po/POTFILES.in =================================================================== --- po/POTFILES.in (révision 19050) +++ po/POTFILES.in (copie de travail) @@ -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 Index: config/qt4.m4 =================================================================== --- config/qt4.m4 (révision 19050) +++ config/qt4.m4 (copie de travail) @@ -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