summaryrefslogtreecommitdiffstats
path: root/config.tests/unix
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2010-06-10 12:35:05 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-06-10 12:35:05 (GMT)
commitb65a1e0be447abca16f20001efe1be43a0469808 (patch)
treef60e796b135030fbb734b8251b5e2deba3f5fd38 /config.tests/unix
parent0d5649713af91dcce58a623bbef7d38e2fbdf13b (diff)
downloadQt-b65a1e0be447abca16f20001efe1be43a0469808.zip
Qt-b65a1e0be447abca16f20001efe1be43a0469808.tar.gz
Qt-b65a1e0be447abca16f20001efe1be43a0469808.tar.bz2
support for cross building Qt for MinGW (win32-g++) on Unix
This changeset provides the basis for targetting win32-g++ on Unix using the configure shell script: support added to the configure script itself support added to relevant config.tests support added to mingw makefile generator in qmake new makespec: unsupported/win32-g++-cross The makespec is based on the win32-g++ makespec. Merge-request: 2407 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'config.tests/unix')
-rwxr-xr-xconfig.tests/unix/compile.test6
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfotest.cpp7
-rw-r--r--config.tests/unix/iconv/iconv.pro2
-rw-r--r--config.tests/unix/ipv6/ipv6test.cpp5
-rw-r--r--config.tests/unix/odbc/odbc.cpp3
-rw-r--r--config.tests/unix/odbc/odbc.pro3
6 files changed, 22 insertions, 4 deletions
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
index 67a4636..99ebfd2 100755
--- a/config.tests/unix/compile.test
+++ b/config.tests/unix/compile.test
@@ -65,8 +65,10 @@ test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
cd "$OUTDIR/$TEST"
test -r Makefile && $MAKE distclean >/dev/null 2>&1
+# Make sure output from possible previous tests is gone
+rm -f "$EXE" "${EXE}.exe"
-"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
$MAKE
@@ -74,7 +76,7 @@ else
$MAKE >/dev/null 2>&1
fi
-[ -x "$EXE" ] && SUCCESS=yes
+( [ -x "$EXE" ] || [ -x "${EXE}.exe" ] ) && SUCCESS=yes
# done
if [ "$SUCCESS" != "yes" ]; then
diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
index 0c482cc..df6ae10 100644
--- a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
+++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
@@ -42,9 +42,16 @@
/* Sample program for configure to test for getaddrinfo on the unix
platform. we check for all structures and functions required. */
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
+#endif
int main()
{
diff --git a/config.tests/unix/iconv/iconv.pro b/config.tests/unix/iconv/iconv.pro
index 8cdc776..d642da2 100644
--- a/config.tests/unix/iconv/iconv.pro
+++ b/config.tests/unix/iconv/iconv.pro
@@ -1,3 +1,3 @@
SOURCES = iconv.cpp
CONFIG -= qt dylib app_bundle
-mac:LIBS += -liconv
+mac|win32-g++*:LIBS += -liconv
diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp
index 4fb27f2..4243f2d 100644
--- a/config.tests/unix/ipv6/ipv6test.cpp
+++ b/config.tests/unix/ipv6/ipv6test.cpp
@@ -46,9 +46,14 @@ platforms. We check for the required IPv6 data structures. */
#define _HPUX_SOURCE
#endif
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#endif
int main()
{
diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp
index 32602c0..98f3571 100644
--- a/config.tests/unix/odbc/odbc.cpp
+++ b/config.tests/unix/odbc/odbc.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
#include <sql.h>
#include <sqlext.h>
diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro
index c588ede..06a548f 100644
--- a/config.tests/unix/odbc/odbc.pro
+++ b/config.tests/unix/odbc/odbc.pro
@@ -1,4 +1,5 @@
SOURCES = odbc.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lodbc
+win32-g++*:LIBS += -lodbc32
+else:LIBS += -lodbc