]> git.sesse.net Git - vlc/commitdiff
*Contribs: Yet another x264 patch
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 11 Sep 2006 13:34:17 +0000 (13:34 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 11 Sep 2006 13:34:17 +0000 (13:34 +0000)
extras/contrib/src/Patches/x264-svn-win32.patch

index c3399d94421efe4204a9c5ab873e72ae18dd21fc..20b74e6965c5ca8f961e767ffa049f67a80b4c5a 100644 (file)
@@ -1,62 +1,56 @@
 Index: configure
 ===================================================================
---- configure  (révision 547)
-+++ configure  (copie de travail)
-@@ -66,48 +66,147 @@
+--- configure  (revision 560)
++++ configure  (working copy)
+@@ -66,8 +66,109 @@
  
  EXE=""
  
--UNAMES="`uname -s`"
 +AR="ar"
 +AROPTS="rc"
 +RANLIB="ranlib"
 +
-+UNAMES="`uname -s |tr A-Z a-z`"
-+UNAMEM="`uname -m |tr A-Z a-z`"
-+
+ MACHINE="$(./config.guess)"
 +# parse options
 +
 +for opt do
 +    optarg="${opt#*=}"
 +    case "$opt" in
-+       --crosscompile=*)
-+           CROSS="$optarg"
-+           CC="$CROSS-gcc"
-+           AR="$CROSS-ar"
-+           RANLIB="$CROSS-ranlib"
-+           UNAMES="`echo $CROSS | cut -d- -f2`"
-+           UNAMEM="`echo $CROSS | cut -d- -f1`"
-+           ;;
-+       --prefix=*)
-+           prefix="$optarg"
-+           ;;
-+       --exec-prefix=*)
-+           eprefix="$optarg"
-+           ;;
-+       --bindir=*)
-+           bindir="$optarg"
-+           ;;
-+       --libdir=*)
-+           libdir="$optarg"
-+           ;;
-+       --includedir=*)
-+           includedir="$optarg"
-+           ;;
++      --crosscompile=*)
++            CROSS="$optarg"
++            CC="$CROSS-gcc"
++            AR="$CROSS-ar"
++            RANLIB="$CROSS-ranlib"
++            MACHINE="`echo $CROSS | sed -e 's/-/-x-/g'`"
++          ;;
++        --prefix=*)
++            prefix="$optarg"
++            ;;
++        --exec-prefix=*)
++            exec_prefix="$optarg"
++            ;;
++        --bindir=*)
++            bindir="$optarg"
++            ;;
++        --libdir=*)
++            libdir="$optarg"
++            ;;
++        --includedir=*)
++            includedir="$optarg"
++            ;;
 +        --enable-avis-input)
-+            if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
-+                CFLAGS="$CFLAGS -DAVIS_INPUT"
-+                LDFLAGS="$LDFLAGS -lvfw32"
-+                avis_input="yes"
-+            fi
++            avis_input="yes"
++            ;;
++        --disable-avis-input)
++            avis_input="no"
 +            ;;
 +        --enable-mp4-output)
-+            CFLAGS="$CFLAGS -DMP4_OUTPUT"
-+            LDFLAGS="$LDFLAGS -lgpac_static"
-+            if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
-+                LDFLAGS="$LDFLAGS -lwinmm"
-+            fi
 +            mp4_output="yes"
 +            ;;
++        --disable-mp4-output)
++            mp4_output="no"
++            ;;
 +        --extra-asflags=*)
 +            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
 +            ;;
@@ -69,18 +63,12 @@ Index: configure
 +            VFW_LDFLAGS="${opt#--extra-ldflags=}"
 +            ;;
 +        --enable-pthread)
-+            CFLAGS="$CFLAGS -DHAVE_PTHREAD=1"
 +            pthread="yes"
-+            case $SYS in
-+              MINGW|CYGWIN|BEOS)
-+                ;;
-+              *)
-+                LDFLAGS="$LDFLAGS -lpthread"
-+                ;;
-+            esac
++            ;;
++        --disable-pthread)
++            pthread="no"
 +            ;;
 +        --enable-debug)
-+            CFLAGS="$CFLAGS -g"
 +            debug="yes"
 +            ;;
 +        --enable-gprof)
@@ -89,13 +77,26 @@ Index: configure
 +            gprof="yes"
 +            ;;
 +        --enable-pic)
-+            CFLAGS="$CFLAGS -fPIC"
-+            ASFLAGS="$ASFLAGS -D__PIC__"
 +            pic="yes"
 +            ;;
 +        --enable-vfw)
 +            vfw="yes"
 +            ;;
++        --disable-vfw)
++            vfw="no"
++            ;;
++        --enable-gtk)
++            gtk="yes"
++            ;;
++        --disable-gtk)
++            gtk="no"
++            ;;
++        --enable-shared)
++            shared="yes"
++            if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
++                pic="yes"
++            fi
++            ;;
 +        --enable-visualize)
 +            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
 +            CFLAGS="$CFLAGS -DVISUALIZE=1"
@@ -107,83 +108,16 @@ Index: configure
 +    esac
 +done
 +
- case "$UNAMES" in
--  BeOS)
-+  beos)
++
+ case "${MACHINE#*-*-}" in
+   beos*)
      SYS="BEOS"
-     CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
-     ;;
--  Darwin)
-+  darwin)
-     SYS="MACOSX"
-     CFLAGS="$CFLAGS -falign-loops=16"
-     LDFLAGS="$LDFLAGS -lm -lmx"
-     ;;
--  FreeBSD)
-+  freebsd)
-     SYS="FREEBSD"
-     LDFLAGS="$LDFLAGS -lm"
-     ;;
--  NetBSD)
-+  netbsd)
-     SYS="NETBSD"
-     LDFLAGS="$LDFLAGS -lm"
-     ;;
--  OpenBSD)
-+  openbsd)
-     SYS="OPENBSD"
-     CFLAGS="$CFLAGS -I/usr/X11R6/include"
-     LDFLAGS="$LDFLAGS -lm"
-     ;;
--  Linux)
-+  linux)
-     SYS="LINUX"
-     CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
-     LDFLAGS="$LDFLAGS -lm"
-     ;;
--  CYGWIN*)
-+  cygwin*)
-     SYS="CYGWIN"
-     CFLAGS="$CFLAGS -mno-cygwin"
-     LDFLAGS="$LDFLAGS -mno-cygwin"
-     EXE=".exe"
-     DEVNULL="NUL"
-     ;;
--  MINGW*)
-+  mingw*)
-     SYS="MINGW"
-     EXE=".exe"
-     DEVNULL="NUL"
-     ;;
--  SunOS)
-+  sunos)
-     SYS="SunOS"
-     CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
-     LDFLAGS="$LDFLAGS -lm"
-@@ -119,9 +218,8 @@
-     ;;
+@@ -180,96 +281,6 @@
  esac
  
--UNAMEM="`uname -m`"
- case "$UNAMEM" in
--  i386|i486|i586|i686|BePC)
-+  i386|i486|i586|i686|bepc)
-     ARCH="X86"
-     CFLAGS="$CFLAGS -DHAVE_MMXEXT -DHAVE_SSE2"
-     AS="nasm"
-@@ -142,7 +240,7 @@
-     AS="yasm"
-     ASFLAGS="-f elf -m amd64"
-     ;;
--  "Power Macintosh"|ppc|ppc64)
-+  "power macintosh"|ppc|ppc64)
-     ARCH="PPC"
-     if [ $SYS = MACOSX ]
-     then
-@@ -191,95 +289,6 @@
  CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
- # parse options
+-
+-# parse options
 -
 -for opt do
 -    optarg="${opt#*=}"
@@ -233,7 +167,6 @@ Index: configure
 -            pthread="no"
 -            ;;
 -        --enable-debug)
--            CFLAGS="$CFLAGS -g"
 -            debug="yes"
 -            ;;
 -        --enable-gprof)
@@ -276,20 +209,20 @@ Index: configure
  # autodetect options that weren't forced nor disabled
  
  if test "$pthread" = "auto" ; then
-@@ -365,6 +374,9 @@
+@@ -361,6 +372,9 @@
  VFW=$vfw
  GTK=$gtk
  EXE=$EXE
-+AR=$AR
-+AROPTS=$AROPTS
-+RANLIB=$RANLIB
++AR=$AR 
++AROPTS=$AROPTS 
++RANLIB=$RANLIB 
  VIS=$vis
  HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
  DEVNULL=$DEVNULL
 Index: Makefile
 ===================================================================
---- Makefile   (révision 547)
-+++ Makefile   (copie de travail)
+--- Makefile   (revision 560)
++++ Makefile   (working copy)
 @@ -64,8 +64,8 @@
  default: $(DEP) x264$(EXE)
  
@@ -314,7 +247,7 @@ Index: Makefile
        install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
 -      install x264 $(DESTDIR)$(bindir)
 -      ranlib $(DESTDIR)$(libdir)/libx264.a
-+      install x264$(EXE)  $(DESTDIR)$(bindir)
++      install x264$(EXE) $(DESTDIR)$(bindir)
 +      $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
        $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
        $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))