On Fri, Apr 04, 2008 at 02:58:50PM +0200, Jean-Marc Lasgouttes wrote: > Enrico Forestieri <[EMAIL PROTECTED]> writes: > > > That will work on cygwin but not on mingw because Windows has > > no support for symlinks. Indeed, there's already something like that > > in autotroll.m4. > > I have indeed put the following code: > > case $host_os in > darwin*) > at_darwin="yes" > QMAKE_ARGS="-spec macx-g++" > ;; > esac > > If you can provide good choices for specs, I will hardcode them (it > seems that there is no other choice).
You can augment that snippet as follows: case $host_os in darwin*) at_darwin="yes" QMAKE_ARGS="-spec macx-g++" ;; *mingw*) MAKE_ARGS="-spec win32-g++" ;; *cygwin*) if test "x$with_x" =xno ; then MAKE_ARGS="-spec cygwin-g++-win32" else MAKE_ARGS="-spec cygwin-g++" fi ;; esac This test needs to be done after checking for X, though. > > checking for the INCPATH to use with Qt... > > -I'../../../MinGW/Qt/4.3.4/include/QtCore' > > -I'../../../MinGW/Qt/4.3.4/include/QtCore' > > -I'../../../MinGW/Qt/4.3.4/include/QtGui' > > -I'../../../MinGW/Qt/4.3.4/include/QtGui' > > -I'../../../MinGW/Qt/4.3.4/include' -I'.' > > -I'c:/MinGW/Qt/4.3.4/include/ActiveQt' -I'.' -I'.' > > -I'../../../MinGW/Qt/4.3.4/mkspecs/win32-g++' > > > > as you can see, the directories are listed as relative paths, making the > > configuration unusable. > > OK, there is some code to work around this in autotroll. Here are the > relevant lines: > > # Kludge!! QMake has a very strange behavior. For instance, if you > # install Qt under your $HOME and run QMake somewhere else under your > # $HOME, it will try to be clever and produce Makefiles with relative > # include paths. In order to avoid this, we will test QMake from a > # temporary directory (usually /tmp). Note that this problem was only > # observed with Qt 4. I was able to overcome this problem as follows: $ mkdir -p /tmp/a/b $ TMPDIR=/tmp/a/b .../configure ... I also checked that TMPDIR=/tmp/a was not sufficient. With this kludge I now get: checking for the DEFINES to use with Qt... -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN checking for the INCPATH to use with Qt... -I'c:/MinGW/Qt/4.3.4/include/QtCore' -I'c:/MinGW/Qt/4.3.4/include/QtCore' -I'c:/MinGW/Qt/4.3.4/include/QtGui' -I'c:/MinGW/Qt/4.3.4/include/QtGui' -I'c:/MinGW/Qt/4.3.4/include' -I'.' -I'c:/MinGW/Qt/4.3.4/include/ActiveQt' -I'.' -I'.' -I'c:/MinGW/Qt/4.3.4/mkspecs/win32-g++' checking for the LDFLAGS to use with Qt... -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows checking for the LIBS to use with Qt... -L'c:/MinGW/Qt/4.3.4/lib' -lmingw32 -lqtmain -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -lz checking for Qt's version... 4.3.4 Note that this is needed for mingw but not for cygwin. I don't know why. -- Enrico