summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-07 14:54:33 +0200
committerwm4 <wm4@nowhere>2015-09-07 15:17:33 +0200
commit928f7a3c7e53daee99b3a27a50199192393e224f (patch)
tree85c360f700d51d15f370f38b990a46fe65fd5cb4
parent717d40037d4b4799def7dc14b5e375b3d1fc53f4 (diff)
downloadlibass-928f7a3c7e53daee99b3a27a50199192393e224f.tar.bz2
libass-928f7a3c7e53daee99b3a27a50199192393e224f.tar.xz
configure: make fontconfig optional
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ba0f5e0..6ebaacf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,8 @@ AC_ARG_ENABLE([directwrite], AS_HELP_STRING([--disable-directwrite],
[disable DirectWrite support (win32 only) @<:@default=check@:>@]))
AC_ARG_ENABLE([coretext], AS_HELP_STRING([--disable-coretext],
[disable CoreText support (OSX only) @<:@default=check@:>@]))
+AC_ARG_ENABLE([require-system-font-provider], AS_HELP_STRING([--disable-require-system-font-provider],
+ [allow compilation even if no system font provider was found @<:@default=enabled:>@]))
AC_ARG_ENABLE([harfbuzz], AS_HELP_STRING([--disable-harfbuzz],
[disable HarfBuzz support @<:@default=check@:>@]))
AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm],
@@ -145,7 +147,7 @@ PKG_CHECK_MODULES([FONTCONFIG], fontconfig >= 2.4.2, [
LIBS="$LIBS $FONTCONFIG_LIBS"
AC_DEFINE(CONFIG_FONTCONFIG, 1, [found fontconfig via pkg-config])
fontconfig=true
- ])
+ ], [fontconfig=false])
fi
if test x$enable_coretext != xno; then
@@ -238,6 +240,17 @@ if test x$directwrite = xtrue; then
pkg_libs="${pkg_libs} -ldwrite"
fi
+if test x$enable_require_system_font_provider != xno &&
+ test x$fontconfig != xtrue &&
+ test x$directwrite != xtrue &&
+ test x$coretext != xtrue
+then
+ AC_MSG_ERROR([\
+Either DirectWrite (on Windows), CoreText (on OSX), or Fontconfig\
+(Linux, other) is required. If you really want to compile without\
+a system font provider, add --disable-require-system-font-provider])
+fi
+
AC_SUBST([PKG_LIBS_DEFAULT], [$(test x$enable_shared = xno && echo ${pkg_libs})])
AC_SUBST([PKG_REQUIRES_DEFAULT], [$(test x$enable_shared = xno && echo ${pkg_requires})])
AC_SUBST([PKG_LIBS_PRIVATE], [$(test x$enable_shared = xno || echo ${pkg_libs})])