From ae4a1c64e39294bb7f3ee658d41a4717bfa774d7 Mon Sep 17 00:00:00 2001 From: riccardom Date: Sat, 9 Apr 2011 18:36:39 +0000 Subject: [PATCH] Disable hud by default on autotools build The hud libagg crash on 64bit so better have it off by default. Use --enable-hud to enable it. From Tobias Jakobi (liquidacid) at #3250391. --- desmume/configure.ac | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/desmume/configure.ac b/desmume/configure.ac index 6fd6c3fae..ab061d062 100644 --- a/desmume/configure.ac +++ b/desmume/configure.ac @@ -93,6 +93,11 @@ if test "x$osmesa" = "xyes" ; then fi AM_CONDITIONAL([HAVE_LIBOSMESA], [test "${useosmesa}" = "yes"]) +dnl - make the usage of libagg for HUD rendering configurable +AC_ARG_ENABLE([hud], + [AC_HELP_STRING([--enable-hud], [Enable HUD rendering, requires libagg])], + [libagg=yes]) + dnl - hack to help zero build gtk frontend macos x package AC_ARG_ENABLE(macosxhack, [AC_HELP_STRING(--enable-macosxhack, hack to build MacOSX package)], @@ -174,9 +179,7 @@ AC_PROVIDE_IFELSE([PKG_PROG_PKG_CONFIG], [ AC_SUBST(ALSA_LIBS) fi - PKG_CHECK_MODULES(LIBAGG, libagg >= 2.5.0, HAVE_LIBAGG=yes, HAVE_LIBAGG=no) - AC_SUBST(LIBAGG_CFLAGS) - AC_SUBST(LIBAGG_LIBS) + PKG_CHECK_MODULES(LIBAGG, libagg >= 2.5.0, FOUND_LIBAGG=yes, FOUND_LIBAGG=no) PKG_CHECK_MODULES(LIBSOUNDTOUCH, soundtouch >= 1.5.0, HAVE_LIBSOUNDTOUCH=yes, HAVE_LIBSOUNDTOUCH=no) AC_SUBST(LIBSOUNDTOUCH_CFLAGS) @@ -200,10 +203,15 @@ if test "x$HAVE_ALSA" = "xno"; then fi AM_CONDITIONAL([HAVE_LIBAGG], [test "${HAVE_LIBAGG}" = "yes"]) -if test "x$HAVE_LIBAGG" = "xyes"; then - AC_DEFINE([HAVE_LIBAGG]) -else - AC_MSG_WARN([Antigrain library not found, HUD will be disabled]) + +if test "x$libagg" = "xyes" ; then + if test "x$FOUND_LIBAGG" = "xyes" ; then + AC_SUBST(LIBAGG_CFLAGS) + AC_SUBST(LIBAGG_LIBS) + AC_DEFINE([HAVE_LIBAGG]) + else + AC_MSG_WARN([HUD rendering enabled, but libagg not found]) + fi fi AM_CONDITIONAL([HAVE_LIBSOUNDTOUCH], [test "${HAVE_LIBSOUNDTOUCH}" = "yes"])