diff options
author | spiff_ <spiff_@svn> | 2010-05-12 01:18:47 +0000 |
---|---|---|
committer | spiff_ <spiff_@svn> | 2010-05-12 01:18:47 +0000 |
commit | dc6575d9fa4519b9a5c700db06a6acd6ecbe18d6 (patch) | |
tree | 6e42863df493904f6c299b01d064aa395999747f | |
parent | 1a7df9e82a8dfa3fe7583a5f4c5e879e41c33cbb (diff) |
fixed: fall back to internal libass if the system one does not cut it
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30033 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | configure.in | 21 | ||||
-rw-r--r-- | lib/libass/xbmc/Makefile.in | 10 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h | 4 |
4 files changed, 31 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in index be48250334..48144734a3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -64,7 +64,7 @@ DVDPCODECS_DIRS= \ xbmc/cores/dvdplayer/Codecs \ xbmc/cores/dvdplayer/Codecs/libdvd \ xbmc/cores/dvdplayer/Codecs/libbdnav -ifeq ($(findstring osx,$(ARCH)),osx) +ifneq (@USE_EXTERNAL_LIBASS@,1) DVDPCODECS_DIRS+=lib/libass/xbmc endif @@ -326,7 +326,7 @@ python: dllloader dvdpcodecs: dllloader $(MAKE) -C xbmc/cores/dvdplayer/Codecs $(MAKE) -C xbmc/cores/dvdplayer/Codecs/libdvd -ifeq ($(findstring osx,$(ARCH)), osx) +ifneq (@USE_EXTERNAL_LIBASS@,1) $(MAKE) -C lib/libass/xbmc endif eventclients: diff --git a/configure.in b/configure.in index a6a7dba593..754d9d5dd6 100644 --- a/configure.in +++ b/configure.in @@ -272,6 +272,8 @@ AC_ARG_ENABLE([external-python], [use_external_python=$enableval], [use_external_python=$use_external_libraries]) +USE_EXTERNAL_LIBASS=1 + ### End of external library options # PCRE is a requirement @@ -317,6 +319,7 @@ if test "$host_vendor" = "apple" ; then LDFLAGS="$LDFLAGS -L/opt/local/lib" LDFLAGS="$LDFLAGS -L/opt/local/lib/mysql5/mysql" LDFLAGS="$LDFLAGS -L/opt/local/lib/samba3" + USE_EXTERNAL_LIBASS=0 fi # Add top source directory for all builds so we can use config.h @@ -446,8 +449,7 @@ else AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library)) AC_CHECK_LIB([rt], [clock_gettime],, AC_MSG_ERROR($missing_library)) AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([ass], [ass_set_message_cb],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([ass], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([ass], [ass_set_message_cb],,USE_EXTERNAL_LIBASS=0) PKG_CHECK_MODULES([ALSA], [alsa], [INCLUDES+=" $ALSA_CFLAGS"; LIBS+=" $ALSA_LIBS"], @@ -1176,8 +1178,13 @@ OUTPUT_FILES="Makefile \ if test "$host_vendor" = "apple"; then OUTPUT_FILES+=" \ - xbmc/cores/paplayer/FLACCodec/Makefile \ + xbmc/cores/paplayer/FLACCodec/Makefile" +fi + +if test $USE_EXTERNAL_LIBASS; then + OUTPUT_FILES+=" \ lib/libass/xbmc/Makefile" + AC_DEFINE([USE_EXTERNAL_LIBASS], [1], [Whether to use external libass library.])], fi # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding @@ -1197,6 +1204,7 @@ AC_SUBST(BUILD_DVDCSS) AC_SUBST(BUILD_GOOM) AC_SUBST(USE_EXTERNAL_FFMPEG) AC_SUBST(USE_EXTERNAL_LIBA52) +AC_SUBST(USE_EXTERNAL_LIBASS) AC_SUBST(USE_EXTERNAL_LIBDTS) AC_SUBST(USE_EXTERNAL_LIBMPEG2) AC_SUBST(USE_EXTERNAL_LIBWAVPACK) @@ -1509,8 +1517,13 @@ XB_CONFIG_MODULE([lib/libass], [ if test "$host_vendor" = "apple" ; then CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 + else + CFLAGS="$CFLAGS -fPIC" \ + ./configure \ + --host=$host_alias \ + --build=$build_alias fi -], [0]) +], [$USE_EXTERNAL_LIBASS]) XB_CONFIG_MODULE([xbmc/lib/libid3tag/libid3tag],[ if test "$host_vendor" = "apple" ; then diff --git a/lib/libass/xbmc/Makefile.in b/lib/libass/xbmc/Makefile.in index 82dfd8a532..2ca93e0f06 100644 --- a/lib/libass/xbmc/Makefile.in +++ b/lib/libass/xbmc/Makefile.in @@ -8,6 +8,7 @@ DIRS=.. .PHONY: compile +ifeq ($(findstring osx,$(ARCH)), osx) $(SLIB): ../libass/.libs/libass.dylib $(CXX) -bundle -flat_namespace -undefined suppress -shared -fPIC \ -mmacosx-version-min=10.4 -o $@ ../libass/.libs/*.o @@ -17,5 +18,14 @@ $(SLIB): ../libass/.libs/libass.dylib ../libass/.libs/libass.dylib: compile export MACOSX_DEPLOYMENT_TARGET=10.4 $(MAKE) -C .. +else +$(SLIB): ../libass/.libs/libass.so + $(CXX) -shared -fPIC -o $(SLIB) ../libass/.libs/*.o \ + `cat ../../../xbmc/cores/DllLoader/exports/wrapper.def` \ + ../../../xbmc/cores/DllLoader/exports/wrapper.o + +../libass/.libs/libass.so: compile + $(MAKE) -C .. +endif include $(abs_top_srcdir)/Makefile.include diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h b/xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h index 82f0f15141..3fc3302672 100644 --- a/xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h +++ b/xbmc/cores/dvdplayer/DVDSubtitles/DllLibass.h @@ -25,7 +25,7 @@ #include "config.h" #endif extern "C" { -#if defined(_LINUX) && !defined(__APPLE__) +#if (defined USE_EXTERNAL_LIBASS) #include <ass/ass.h> #else #include "../../../lib/libass/libass/ass.h" @@ -70,7 +70,7 @@ public: , void *data)=0; }; -#if defined(_LINUX) && !defined(__APPLE__) +#if (defined USE_EXTERNAL_LIBASS) class DllLibass : public DllDynamic, DllLibassInterface { |