From aa7cc5a2dc2eaf94e29b1b70939a32a05ac1e3f7 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 13 Apr 2008 05:10:27 +0000 Subject: [PATCH] Add support for CSRI (ASA), this has been tested and confirmed as working. Compiling libass/asa in at the same time is OK. Originally committed to SVN as r2174. --- aegisub/Makefile.am | 17 +++++++++++++++-- configure.in | 19 ++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index ae956f461..c375333b6 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -53,6 +53,11 @@ aegisub_LDFLAGS += @AVFORMAT_LDFLAGS@ @AVCODEC_LDFLAGS@ @SWSCALE_LDFLAGS@ aegisub_LDADD += libaudiovideo_ffmpeg.a endif +noinst_LIBRARIES += libsubtitle_provider.a +libsubtitle_provider_a_SOURCES = subtitles_provider.cpp +libsubtitle_provider_a_CPPFLAGS = @CSRI_CFLAGS@ +aegisub_LDADD += libsubtitle_provider.a + if WITH_LIBASS noinst_LIBRARIES += libsubtitle_ass.a libsubtitle_ass_a_SOURCES = subtitles_provider_libass.cpp @@ -62,6 +67,15 @@ aegisub_LDADD += libsubtitle_ass.a aegisub_LDFLAGS += @FONTCONFIG_LIBS@ endif +if WITH_CSRI +noinst_LIBRARIES += libsubtitle_csri.a +libsubtitle_csri_a_SOURCES = subtitles_provider_csri.cpp +libsubtitle_csri_a_CPPFLAGS = @ICONV_CFLAGS@ @CSRI_CFLAGS@ +LIBS += @CSRI_LIBS@ +aegisub_LDADD += libsubtitle_csri.a +aegisub_LDFLAGS += @FONTCONFIG_LIBS@ +endif + if HAVE_AUTO4_LUA noinst_LIBRARIES += libauto4_lua.a libauto4_lua_a_SOURCES = auto4_lua.cpp auto4_lua_assfile.cpp auto4_lua_dialog.cpp auto4_lua_scriptreader.cpp @@ -144,6 +158,7 @@ EXTRA_aegisub_SOURCES = \ spellchecker_hunspell.cpp \ stdwx.cpp \ subtitle_format_prs.cpp \ + subtitles_provider_csri.cpp \ subtitles_provider_libass.cpp \ video_provider_avs.cpp \ video_provider_dshow.cpp \ @@ -260,8 +275,6 @@ aegisub_SOURCES = \ subtitle_format_srt.cpp \ subtitle_format_ttxt.cpp \ subtitle_format_txt.cpp \ - subtitles_provider.cpp \ - subtitles_provider_csri.cpp \ text_file_writer.cpp \ thesaurus.cpp \ thesaurus_myspell.cpp \ diff --git a/configure.in b/configure.in index 9c959e4a2..e5f44e850 100644 --- a/configure.in +++ b/configure.in @@ -467,6 +467,23 @@ AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"]) +AC_ARG_ENABLE(csri, [ --disable-csri disable CSRI (ASA) support (default=enabled)],csri_disabled="(disabled)") + +if test "$enable_csri" != "no"; then + PKG_CHECK_MODULES(CSRI, csri >= 0.1.0, with_csri="yes", with_csri="no") + if test "$with_csri"="yes"; then + AC_DEFINE(WITH_CSRI, 1, [Enable CSRI (ASA) Subtitle Provider]) + fi +else + $with_csri = "no" +fi + +AM_CONDITIONAL([WITH_CSRI], [test "$with_csri" = "yes"]) + +PKG_CHECK_MODULES(ASA, asa >= 0.3.2, with_asa="yes", with_asa="no") + + + ########### ## Hunspell ########### @@ -879,7 +896,7 @@ Video Providers ffmpeg: $with_ffmpeg $ffmpeg_disabled Subtitle Providers: - asa: $with_asa + csri (asa): $with_csri (requires iconv, fontconfig) $csri_disabled libass $with_libass (requires iconv, fontconfig) $libass_disabled Misc Packages: