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

Change-Id: I0da3e604ebd0665c5405174957d852677195126b
This commit is contained in:
Jan Holesovsky 2012-07-23 18:16:46 +02:00
parent 67e3e8bdb4
commit 063afe5104
7 changed files with 33 additions and 7 deletions

View file

@ -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/<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
tells you, and either remove one of the --with-system-*, or install the
missing dependency.

View file

@ -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 <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"`
if test "$COMPATH" = "."; then
AC_PATH_PROGS(COMPATH, $CC)

View file

@ -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 --------------------------------------------------------------

View file

@ -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 --------------------------------------------------------------

View file

@ -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 --------------------------------------------------------------

View file

@ -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 --------------------------------------------------------------

View file

@ -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 --------------------------------------------------------------