diff --git a/README.cross b/README.cross index ee0b0f7ee983..1142ab9aa12a 100644 --- a/README.cross +++ b/README.cross @@ -93,6 +93,16 @@ zypper in mingw32-cross-gcc mingw32-cross-gcc-c++ mingw32-python-devel \ mingw32-libcppunit-devel mingw32-libredland mingw32-libredland-devel \ mingw32-libmythes mingw32-libmythes-devel +You also need wine, ideally: + +zypper ar http://download.opensuse.org/repositories/Emulators:/Wine//Emulators:Wine.repo + +zypper in wine wine-devel wine-devel-32bit + +And in order to be able to use 'winegcc -m32', also + +zypper in glibc-devel-32bit gcc-32bit + There might be more that are missing, please read carefully what autogen.sh tells you, and either remove one of the --with-system-*, or install the missing dependency. diff --git a/configure.in b/configure.in index 264c6c600320..73f07d0969a5 100644 --- a/configure.in +++ b/configure.in @@ -74,8 +74,6 @@ else fi AC_SUBST(CROSS_COMPILING) -AC_PATH_PROG(WINEGCC, winegcc) - AC_PROG_EGREP # AC_PROG_EGREP doesn't set GREP on all systems as well AC_PATH_PROG(GREP, grep) @@ -2366,6 +2364,24 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then AC_PROG_CC fi +dnl We need winegcc when building MinGW build to be able to cross-build msi tools +AC_PATH_PROG(WINEGCC, winegcc) +if test "$WITH_MINGW" = "yes" ; then + if test "$WINEGCC" = ""; then + AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit]) + fi + CC_save="$CC" + CC="$WINEGCC -m32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include + ],[ +printf ("hello world\n"); + ])],, + [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])] + ) + CC="$CC_save" +fi + COMPATH=`dirname "$CC"` if test "$COMPATH" = "."; then AC_PATH_PROGS(COMPATH, $CC) diff --git a/setup_native/source/win32/wintools/makecab/makefile.mk b/setup_native/source/win32/wintools/makecab/makefile.mk index b30a52052a29..c7f277bc4570 100644 --- a/setup_native/source/win32/wintools/makecab/makefile.mk +++ b/setup_native/source/win32/wintools/makecab/makefile.mk @@ -27,7 +27,7 @@ TARGET=sn_makecab $(BIN)/makecab.exe.so: $(BIN)/makecab.exe $(BIN)/makecab.exe: - $(WINEGCC) -o $(BIN)/makecab.exe makecab.c parseddf.c -mconsole -lmsi + $(WINEGCC) -o $(BIN)/makecab.exe makecab.c parseddf.c -m32 -mconsole -lmsi # --- Targets -------------------------------------------------------------- diff --git a/setup_native/source/win32/wintools/msidb/makefile.mk b/setup_native/source/win32/wintools/msidb/makefile.mk index 6c1f0f33c05b..96c100fb838f 100644 --- a/setup_native/source/win32/wintools/msidb/makefile.mk +++ b/setup_native/source/win32/wintools/msidb/makefile.mk @@ -27,7 +27,7 @@ TARGET=sn_msidb $(BIN)/msidb.exe.so: $(BIN)/msidb.exe $(BIN)/msidb.exe: - $(WINEGCC) -o $(BIN)/msidb.exe msidb.c -municode -lmsi + $(WINEGCC) -o $(BIN)/msidb.exe msidb.c -m32 -municode -lmsi # --- Targets -------------------------------------------------------------- diff --git a/setup_native/source/win32/wintools/msiinfo/makefile.mk b/setup_native/source/win32/wintools/msiinfo/makefile.mk index d7aab3b1018e..8faf933547f2 100644 --- a/setup_native/source/win32/wintools/msiinfo/makefile.mk +++ b/setup_native/source/win32/wintools/msiinfo/makefile.mk @@ -27,7 +27,7 @@ TARGET=sn_msiinfo $(BIN)/msiinfo.exe.so: $(BIN)/msiinfo.exe $(BIN)/msiinfo.exe: - $(WINEGCC) -o $(BIN)/msiinfo.exe msiinfo.c -mconsole -municode -lmsi + $(WINEGCC) -o $(BIN)/msiinfo.exe msiinfo.c -m32 -mconsole -municode -lmsi # --- Targets -------------------------------------------------------------- diff --git a/setup_native/source/win32/wintools/msimsp/makefile.mk b/setup_native/source/win32/wintools/msimsp/makefile.mk index a7936623f4b7..8ecb5fc68cab 100644 --- a/setup_native/source/win32/wintools/msimsp/makefile.mk +++ b/setup_native/source/win32/wintools/msimsp/makefile.mk @@ -27,7 +27,7 @@ TARGET=sn_msimsp $(BIN)/msimsp.exe.so: $(BIN)/msimsp.exe $(BIN)/msimsp.exe: - $(WINEGCC) -o $(BIN)/msimsp.exe msimsp.c -mconsole -lmsi + $(WINEGCC) -o $(BIN)/msimsp.exe msimsp.c -m32 -mconsole -lmsi # --- Targets -------------------------------------------------------------- diff --git a/setup_native/source/win32/wintools/msitran/makefile.mk b/setup_native/source/win32/wintools/msitran/makefile.mk index 4b5ed738d607..910f8c50d6b0 100644 --- a/setup_native/source/win32/wintools/msitran/makefile.mk +++ b/setup_native/source/win32/wintools/msitran/makefile.mk @@ -27,7 +27,7 @@ TARGET=sn_msitran $(BIN)/msitran.exe.so: $(BIN)/msitran.exe $(BIN)/msitran.exe: - $(WINEGCC) -o $(BIN)/msitran.exe msitran.c -mconsole -lmsi + $(WINEGCC) -o $(BIN)/msitran.exe msitran.c -m32 -mconsole -lmsi # --- Targets --------------------------------------------------------------