[PATCH] some build improvements for the mac (was Re: compliation problems on mac osx with 1.5rc2)

2007-07-12 Thread Jean-Marc Lasgouttes
 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: 

Re: [PATCH] some build improvements for the mac (was Re: compliation problems on mac osx with 1.5rc2)

2007-07-12 Thread José Matos
On Thursday 12 July 2007 10:52:11 Jean-Marc Lasgouttes wrote:
 Jose', can I apply?

  Yes.

 JMarc

-- 
José Abílio


[PATCH] some build improvements for the mac (was Re: compliation problems on mac osx with 1.5rc2)

2007-07-12 Thread Jean-Marc Lasgouttes
> "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 

Re: [PATCH] some build improvements for the mac (was Re: compliation problems on mac osx with 1.5rc2)

2007-07-12 Thread José Matos
On Thursday 12 July 2007 10:52:11 Jean-Marc Lasgouttes wrote:
> Jose', can I apply?

  Yes.

> JMarc

-- 
José Abílio