forked from mia/Aegisub
Initial support for external libass with pkg-config
This introduces the configure option --with-external-libass; the internal copy is still used by default. Fixes #917. Originally committed to SVN as r4356.
This commit is contained in:
parent
61ab7d1f2c
commit
8f67d48487
2 changed files with 15 additions and 8 deletions
|
@ -5,7 +5,7 @@ if HAVE_UNIVCHARDET
|
||||||
univchardet = universalchardet
|
univchardet = universalchardet
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WITH_LIBASS
|
if WITH_INTERNAL_LIBASS
|
||||||
libass = libass
|
libass = libass
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ m4_define([fontconfig_required_version], [2.4])
|
||||||
m4_define([freetype_required_version], [9.7.0])
|
m4_define([freetype_required_version], [9.7.0])
|
||||||
m4_define([pkgconfig_required_version], [0.20])
|
m4_define([pkgconfig_required_version], [0.20])
|
||||||
m4_define([wx_required_version], [2.9.0])
|
m4_define([wx_required_version], [2.9.0])
|
||||||
|
m4_define([libass_required_version], [0.9.7])
|
||||||
|
|
||||||
|
|
||||||
#######
|
#######
|
||||||
|
@ -757,9 +758,11 @@ fi
|
||||||
# Subtitle Provider
|
# Subtitle Provider
|
||||||
###################
|
###################
|
||||||
|
|
||||||
AC_ARG_ENABLE(libass, [ --disable-libass disable libass support (default=enabled)],libass_disabled="(disabled)")
|
AC_ARG_ENABLE(libass, [ --disable-libass disable libass support (default=enabled)], libass_disabled="(disabled)")
|
||||||
|
AC_ARG_WITH(external-libass, [ --with-external-libass link to external libass (default=use internal)])
|
||||||
|
|
||||||
if test "$enable_libass" != "no"; then
|
if test "$enable_libass" != "no"; then
|
||||||
|
if test "$with_external_libass" != "yes"; then
|
||||||
if test "$agi_cv_with_iconv" = "yes"; then
|
if test "$agi_cv_with_iconv" = "yes"; then
|
||||||
LIBASS_LIBS="-L../libass -lass_aegisub"
|
LIBASS_LIBS="-L../libass -lass_aegisub"
|
||||||
LIBASS_CFLAGS="-I../libass"
|
LIBASS_CFLAGS="-I../libass"
|
||||||
|
@ -768,6 +771,9 @@ if test "$enable_libass" != "no"; then
|
||||||
AC_MSG_WARN([libiconv is required for libass support.])
|
AC_MSG_WARN([libiconv is required for libass support.])
|
||||||
with_libass="no"
|
with_libass="no"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version, [with_libass="yes"], [with_libass="no"])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$with_libass" = "yes" || test "$enable_libass" != "no"; then
|
if test "$with_libass" = "yes" || test "$enable_libass" != "no"; then
|
||||||
|
@ -777,6 +783,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"])
|
AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"])
|
||||||
|
AM_CONDITIONAL([WITH_INTERNAL_LIBASS], [test "$with_libass" = "yes" && test "$with_external_libass" != "yes"])
|
||||||
AC_SUBST(LIBASS_LIBS)
|
AC_SUBST(LIBASS_LIBS)
|
||||||
AC_SUBST(LIBASS_CFLAGS)
|
AC_SUBST(LIBASS_CFLAGS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue