[vlc-devel] [PATCH] contrib/theora: fix broken compiler differenciation

Felix Paul Kühne fkuehne at videolan.org
Sat Jun 14 12:40:02 CEST 2014


This solves compilation issues from the future.
---
 .../libtheora-compiler-differentiation.patch       | 25 ++++++++++++++++++++++
 contrib/src/theora/rules.mak                       |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 contrib/src/theora/libtheora-compiler-differentiation.patch

diff --git a/contrib/src/theora/libtheora-compiler-differentiation.patch b/contrib/src/theora/libtheora-compiler-differentiation.patch
new file mode 100644
index 0000000..872ebc1
--- /dev/null
+++ b/contrib/src/theora/libtheora-compiler-differentiation.patch
@@ -0,0 +1,25 @@
+diff -ru libtheora/configure.ac libtheora-fixed/configure.ac
+--- libtheora/configure.ac	2009-10-01 20:00:33.000000000 +0200
++++ libtheora-fixed/configure.ac	2014-06-13 20:21:16.000000000 +0200
+@@ -155,8 +155,20 @@
+ 
+ dnl Set some target options
+ 
++cc_compiler=unknown
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#if ! __clang__
++                                    #error
++                                    #endif
++                                    ]])],
++                  cc_compiler=clang,
++                  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#if ! __GNUC__
++                                                       #error
++                                                       #endif
++                                                       ]])],
++                                     cc_compiler=gcc, [])])
++
+ cflags_save="$CFLAGS"
+-if test -z "$GCC"; then
++if test $cc_compiler != "gcc" ; then
+         case $host in 
+         *)
+                 DEBUG="-g -DDEBUG"
diff --git a/contrib/src/theora/rules.mak b/contrib/src/theora/rules.mak
index 4024788..ea4c879 100644
--- a/contrib/src/theora/rules.mak
+++ b/contrib/src/theora/rules.mak
@@ -16,6 +16,7 @@ $(TARBALLS)/libtheora-$(THEORA_VERSION).tar.xz:
 
 libtheora: libtheora-$(THEORA_VERSION).tar.xz .sum-theora
 	$(UNPACK)
+	$(APPLY) $(SRC)/theora/libtheora-compiler-differentiation.patch
 	$(UPDATE_AUTOCONFIG)
 	$(MOVE)
 
-- 
1.8.5.2 (Apple Git-48)




More information about the vlc-devel mailing list