Commit a45f4952 authored by Michel Lespinasse's avatar Michel Lespinasse
Browse files

added mingw32 port.

Thanks to Gildas Bazin for contributing.
parent 1574c623
......@@ -7,6 +7,7 @@ code was (re)written by him.
Other contributors include:
Bruno Barreyra <barreyra@ufl.edu> - build fixes
Gildas Bazin <gbazin@netcourrier.com> - mingw32 port
Stephen Crowley <stephenc@dns2.digitalpassage.com> - build fixes
Didier Gautheron <dgautheron@magic.fr> - bug fixes
Ryan C. Gordon <icculus@lokigames.com> - SDL support
......
Unix build instructions
-----------------------
./configure
make
make install
If you install from CVS you'll have to run ./bootstrap first
Building for win32
------------------
There are at least three ways to do it:
- natively on Windows using Microsoft VC++ and the vc++ project
included in this distribution.
- natively on Windows using MSYS + MINGW (www.mingw.org) (MSYS is a
minimal build environnement to compile unixish projects under
windows. It provides all the common unix tools like sh, gmake...)
- or on Linux, using the mingw32 cross-compiler
Building using MSYS + MINGW on windows
--------------------------------------
First you will need to download and install the latest MSYS (version
1.0.7 as of now) and MINGW. The installation is really easy. Begin
with the MSYS auto-installer and once this is done, extract MINGW into
c:\msys\1.0\mingw. You also have to remember to remove the make
utility included with MINGW as it conflicts with the one from MSYS
(just rename or remove c:\msys\1.0\mingw\bin\make.exe).
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.7-i686-2002.04.24-1.exe
http://prdownloads.sourceforge.net/mingw/MinGW-1.1.tar.gz
Then you can build the package using:
# ./configure
# make
Building using the mingw32 cross-compiler
-----------------------------------------
You need to install mingw32 first. For Debian GNU/Linux users, there
is a mingw32 package. Otherwise you might get it from the mingw site
at http://www.mingw.org/download.shtml.
The videolan project also keeps precompiled mingw32 binaries at
http://www.videolan.org/vlc/windows.html . If you install these,
you'll have to set your PATH accordingly to include
/usr/local/cross-tools/bin too.
The build should then proceed using something like:
# CC=i586-mingw32msvc-gcc ./configure --host=i586-mingw32msvc
# make
......@@ -100,7 +100,7 @@ AC_TYPE_SIZE_T
AC_C_BIGENDIAN
dnl Checks for library functions.
AC_CHECK_FUNCS([memalign])
AC_CHECK_FUNCS([memalign gettimeofday])
AC_TYPE_SIGNAL
builtin([include],[libmpeg2/configure.incl])
......
......@@ -32,7 +32,7 @@
#include <fcntl.h>
#include <io.h>
#endif
#ifdef HAVE_SYS_TIME_H
#if defined(HAVE_SYS_TIME_H) && defined(HAVE_GETTIMEOFDAY)
#include <sys/time.h>
#include <signal.h>
#endif
......@@ -52,7 +52,7 @@ static mpeg2dec_t mpeg2dec;
static vo_open_t * output_open = NULL;
static vo_instance_t * output;
#ifdef HAVE_SYS_TIME_H
#if defined(HAVE_SYS_TIME_H) && defined(HAVE_GETTIMEOFDAY)
static void print_fps (int final);
......@@ -118,7 +118,7 @@ static void print_fps (int final)
last_count = frame_counter;
}
#else /* !HAVE_SYS_TIME_H */
#else /* !HAVE_SYS_TIME_H || !HAVE_GETTIMEOFDAY */
static void print_fps (int final)
{
......
......@@ -25,7 +25,8 @@ basedir=`cd $basedir;pwd`
cd $builddir
rm -fr compile_test
for compiler in gcc gcc272 gcc-3.0 cc checkergcc tcc icc; do
for compiler in gcc gcc272 gcc-3.0 cc checkergcc tcc icc \
i586-mingw32msvc-gcc; do
compiler_path=`which $compiler`;
if test x"$compiler_path" = x""; then continue; fi
compiler_inode=`ls -Li $compiler_path|awk '{print $1}'`
......@@ -36,8 +37,12 @@ for compiler in gcc gcc272 gcc-3.0 cc checkergcc tcc icc; do
mkdir compile_test
cd compile_test; tar xzpf $basedir/mpeg2dec-*.tar.gz; cd mpeg2dec-*
host="";
if test x"$compiler" = x"i586-mingw32msvc-gcc"; then
host="--host=i586-mingw32msvc --disable-sdl";
fi
error=1
CC=$compiler ./configure && make && error=0
CC=$compiler ./configure $host && make && error=0
if test x"$error" != x"0"; then exit 1; fi
cd ../..
rm -fr compile_test
......
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