diff options
author | Grigori Goronzy <greg@blackbox> | 2011-08-08 01:09:24 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-08-08 01:16:37 +0200 |
commit | dcebd5fe2a3bc278ab99bd76b66daa0915c98469 (patch) | |
tree | d957bcd037886c0cd4c23b0c7fed5bdede77a057 /configure.ac | |
parent | 0d391f67d3d1c87cd8e8cff907bd7c6b3b1f9cd8 (diff) | |
download | libass-dcebd5fe2a3bc278ab99bd76b66daa0915c98469.tar.bz2 libass-dcebd5fe2a3bc278ab99bd76b66daa0915c98469.tar.xz |
Add compile time switch for HarfBuzz support
Now that it's possible to switch shapers at runtime, it also becomes a
lot easier to disable them at compile time. Add ifdefs and build system
changes so that HarfBuzz can be safely disabled. It's autodetected now
and enabled if available.
This shuffles a bit of code around, but there are no functional changes.
Note that FriBidi remains mandatory for the time being, but this
shouldn't pose any problems, since it is a small and very portable
library without any special dependencies.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 56655ee..d9496fc 100644 --- a/configure.ac +++ b/configure.ac @@ -40,8 +40,8 @@ AC_ARG_ENABLE([enca], AS_HELP_STRING([--disable-enca], [disable enca (charset autodetect) support @<:@default=check@:>@])) AC_ARG_ENABLE([fontconfig], AS_HELP_STRING([--disable-fontconfig], [disable fontconfig support @<:@default=enabled@:>@])) -AC_ARG_ENABLE([fribidi], AS_HELP_STRING([--disable-fribidi], - [disable bidi support @<:@default=enabled@:>@])) +AC_ARG_ENABLE([harfbuzz], AS_HELP_STRING([--disable-harfbuzz], + [disable HarfBuzz support @<:@default=check@:>@])) PKG_CHECK_MODULES([FREETYPE], freetype2 >= 9.10.3, [ CFLAGS="$CFLAGS $FREETYPE_CFLAGS" @@ -49,6 +49,12 @@ PKG_CHECK_MODULES([FREETYPE], freetype2 >= 9.10.3, [ AC_DEFINE(CONFIG_FREETYPE, 1, [found freetype2 via pkg-config]) ]) +PKG_CHECK_MODULES([FRIBIDI], fribidi >= 0.19.0, [ + CFLAGS="$CFLAGS $FRIBIDI_CFLAGS" + LIBS="$LIBS $FRIBIDI_LIBS" + AC_DEFINE(CONFIG_FRIBIDI, 1, [found fribidi via pkg-config]) + ]) + if test x$enable_fontconfig != xno; then PKG_CHECK_MODULES([FONTCONFIG], fontconfig >= 2.4.2, [ CFLAGS="$CFLAGS $FONTCONFIG_CFLAGS" @@ -58,22 +64,13 @@ PKG_CHECK_MODULES([FONTCONFIG], fontconfig >= 2.4.2, [ ]) fi -if test x$enable_fribidi != xno; then -PKG_CHECK_MODULES([FRIBIDI], fribidi >= 0.19.0, [ - CFLAGS="$CFLAGS $FRIBIDI_CFLAGS" - LIBS="$LIBS $FRIBIDI_LIBS" - AC_DEFINE(CONFIG_FRIBIDI, 1, [found fribidi via pkg-config]) - fribidi=true - ]) -fi - if test x$enable_harfbuzz != xno; then PKG_CHECK_MODULES([HARFBUZZ], harfbuzz >= 0.7.0, [ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS" LIBS="$LIBS $HARFBUZZ_LIBS" AC_DEFINE(CONFIG_HARFBUZZ, 1, [found harfbuzz-ng via pkg-config]) harfbuzz=true - ]) + ], [harfbuzz=false]) fi if test x$enable_enca != xno; then @@ -98,15 +95,13 @@ AM_CONDITIONAL([HAVE_LIBPNG], [test x$libpng = xtrue]) # Add dependent libraries to pkg-config for static linking PKG_REQUIRES="freetype2 >= 9.6.3" +PKG_REQUIRES="fribidi >= 0.19.0, ${PKG_REQUIRES}" if test x$enca = xtrue; then PKG_REQUIRES="enca, ${PKG_REQUIRES}" fi if test x$fontconfig = xtrue; then PKG_REQUIRES="fontconfig >= 2.2.0, ${PKG_REQUIRES}" fi -if test x$fribidi = xtrue; then - PKG_REQUIRES="fribidi >= 0.19.0, ${PKG_REQUIRES}" -fi if test x$harfbuzz = xtrue; then PKG_REQUIRES="harfbuzz >= 0.7.0, ${PKG_REQUIRES}" fi |