From: 11rcombs Date: Mon, 27 Jan 2014 00:14:53 +0000 (-0600) Subject: Check for YASM in configure X-Git-Tag: 0.11.0~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c933a8ee96cd2a6bb0219df126a725e03f041665;p=libass Check for YASM in configure --- diff --git a/configure.ac b/configure.ac index f7e6527..c623c09 100644 --- a/configure.ac +++ b/configure.ac @@ -46,17 +46,10 @@ AC_ARG_ENABLE([fontconfig], AS_HELP_STRING([--disable-fontconfig], AC_ARG_ENABLE([harfbuzz], AS_HELP_STRING([--disable-harfbuzz], [disable HarfBuzz support @<:@default=check@:>@])) AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm], - [disable compiling with ASM @<:@default=enabled@:>@]), + [disable compiling with ASM @<:@default=check@:>@]), [asm=false], [asm=true]) -AM_CONDITIONAL([ASM], [test x$asm = xtrue]) - -AM_COND_IF([ASM], - [AC_DEFINE(CONFIG_ASM, 1, [ASM enabled])], - [AC_DEFINE(CONFIG_ASM, 0, [ASM disabled])] - ) - test "${ASFLAGS+set}" = set || ASFLAGS="" AC_SUBST([ASFLAGS], ["$ASFLAGS"]) @@ -83,6 +76,24 @@ case $host in WIN32=true ;; esac +if test x$INTEL = xtrue ; then + if test x$asm = xtrue ; then + AC_CHECK_PROG(YASM_CHECK,yasm,yes) + if test x$YASM_CHECK != xyes ; then + AC_MSG_WARN(YASM was not found; ASM functions are disabled.) + AC_MSG_WARN(Install yasm for a significantly faster libass build.) + asm=false + fi + fi +fi + +AM_CONDITIONAL([ASM], [test x$asm = xtrue]) + +AM_COND_IF([ASM], + [AC_DEFINE(CONFIG_ASM, 1, [ASM enabled])], + [AC_DEFINE(CONFIG_ASM, 0, [ASM enabled])] + ) + AM_CONDITIONAL([INTEL], [test x$INTEL = xtrue]) AM_CONDITIONAL([X86], [test x$X86 = xtrue]) AM_CONDITIONAL([X64], [test x$X64 = xtrue])