+where you installed Qt for /path/to/Qt4 (as above).
+
+Dependent on the Qt-libraries you have and the build system you're using
+you have to tell configure the compiler and compiler options to use.
+If your Qt-libraries don't match your compiler defaults you may
+adjust some environment variables to do so.
+
+
+1. Environment
+
+(a) Qt-4.6 self compiled universal libs
+
+ Since MacOSX 10.6 the default is to compile 64bit applications.
+ We have to change the default if using that build system.
+
+ export CPPFLAGS="-arch i386"
+ export LDFLAGS="-arch i386"
+
+(b) Qt-4.6 libraries 64bit
+
+ You're at least on MacOSX 10.6 and don't have to change anything.
+ Note: Your LyX binary will run only on 10.6 64bit Intel machines.
+ Additionally you'll have to provide your Qt libraries somehow...
+ FIXME: actually this is a dream, 64bit LyX crashes on startup!
+
+(c) Qt-4.6 self compiled libraries with Tiger support
+
+ You have to choose the gcc4.0 compiler suite and the correct SDK:
+
+ export CC=gcc-4.0
+ export OBJC=gcc-4.0
+ export CXX=g++-4.0
+ export CPPFLAGS="-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
+ export LDFLAGS="-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
+
+(d) When working without pkgconfig or pkgconfig fails to detect Carbon and Appkit frameworks
+
+ Current pkgconfig from macports is able to detect the frameworks Qt4 is using.
+ The build of LyX succeeds because the frameworks are added automatically to the linker options.
+ If you need to add them yourself because of link errors, e. g.
+ lyx Undefined symbols: "_FSPathMakeRef"...
+ you have to verify the required frameworks with otool and add them to the LDFLAGS.
+
+ Check the output of
+ otool -L /path/to/QT4/lib/libQtGui.dylib
+ and look for lines with Frameworks.
+
+ Currently there are two different Qt4 builds available for download:
+ * with Tiger support it's with Carbon. You have to add
+ export LDFLAGS="$LDFLAGS -framework ApplicationServices -framework Carbon -framework AppKit"
+ * with Cocoa framework without Tiger support you have to add
+ export LDFLAGS="$LDFLAGS -framework ApplicationServices -framework Cocoa -framework AppKit"
+
+ Note: The latter is untested.
+
+(e) When working with the Qt4 frameworks provided by Nokia
+
+ We have to help again with some environment variables to make configure work.
+
+ In case pkgconfig is installed... disable it.
+ The Qt4 frameworks come without the required .pc files.