Kaydet (Commit) 063afe51 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Check for the msi* build requirements in configure.in + update README.cross.

Change-Id: I0da3e604ebd0665c5405174957d852677195126b
üst 67e3e8bd
...@@ -93,6 +93,16 @@ zypper in mingw32-cross-gcc mingw32-cross-gcc-c++ mingw32-python-devel \ ...@@ -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-libcppunit-devel mingw32-libredland mingw32-libredland-devel \
mingw32-libmythes mingw32-libmythes-devel mingw32-libmythes mingw32-libmythes-devel
You also need wine, ideally:
zypper ar http://download.opensuse.org/repositories/Emulators:/Wine/<your_os>/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 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 tells you, and either remove one of the --with-system-*, or install the
missing dependency. missing dependency.
......
...@@ -74,8 +74,6 @@ else ...@@ -74,8 +74,6 @@ else
fi fi
AC_SUBST(CROSS_COMPILING) AC_SUBST(CROSS_COMPILING)
AC_PATH_PROG(WINEGCC, winegcc)
AC_PROG_EGREP AC_PROG_EGREP
# AC_PROG_EGREP doesn't set GREP on all systems as well # AC_PROG_EGREP doesn't set GREP on all systems as well
AC_PATH_PROG(GREP, grep) AC_PATH_PROG(GREP, grep)
...@@ -2366,6 +2364,24 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then ...@@ -2366,6 +2364,24 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_PROG_CC AC_PROG_CC
fi 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 <stdio.h>
],[
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"` COMPATH=`dirname "$CC"`
if test "$COMPATH" = "."; then if test "$COMPATH" = "."; then
AC_PATH_PROGS(COMPATH, $CC) AC_PATH_PROGS(COMPATH, $CC)
......
...@@ -27,7 +27,7 @@ TARGET=sn_makecab ...@@ -27,7 +27,7 @@ TARGET=sn_makecab
$(BIN)/makecab.exe.so: $(BIN)/makecab.exe $(BIN)/makecab.exe.so: $(BIN)/makecab.exe
$(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 -------------------------------------------------------------- # --- Targets --------------------------------------------------------------
......
...@@ -27,7 +27,7 @@ TARGET=sn_msidb ...@@ -27,7 +27,7 @@ TARGET=sn_msidb
$(BIN)/msidb.exe.so: $(BIN)/msidb.exe $(BIN)/msidb.exe.so: $(BIN)/msidb.exe
$(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 -------------------------------------------------------------- # --- Targets --------------------------------------------------------------
......
...@@ -27,7 +27,7 @@ TARGET=sn_msiinfo ...@@ -27,7 +27,7 @@ TARGET=sn_msiinfo
$(BIN)/msiinfo.exe.so: $(BIN)/msiinfo.exe $(BIN)/msiinfo.exe.so: $(BIN)/msiinfo.exe
$(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 -------------------------------------------------------------- # --- Targets --------------------------------------------------------------
......
...@@ -27,7 +27,7 @@ TARGET=sn_msimsp ...@@ -27,7 +27,7 @@ TARGET=sn_msimsp
$(BIN)/msimsp.exe.so: $(BIN)/msimsp.exe $(BIN)/msimsp.exe.so: $(BIN)/msimsp.exe
$(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 -------------------------------------------------------------- # --- Targets --------------------------------------------------------------
......
...@@ -27,7 +27,7 @@ TARGET=sn_msitran ...@@ -27,7 +27,7 @@ TARGET=sn_msitran
$(BIN)/msitran.exe.so: $(BIN)/msitran.exe $(BIN)/msitran.exe.so: $(BIN)/msitran.exe
$(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 -------------------------------------------------------------- # --- Targets --------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment