From 3ed9787f4358048965bbc35acf958a75a95261dd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 6 Sep 2008 15:27:24 -0400 Subject: [PATCH] [configure.ac.enable] Add CAIRO_FEATURE_IF_ENABLED --- build/configure.ac.enable | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build/configure.ac.enable b/build/configure.ac.enable index c6251ce16..da658214b 100644 --- a/build/configure.ac.enable +++ b/build/configure.ac.enable @@ -199,6 +199,11 @@ AC_DEFUN([CAIRO_FEATURE_VARS_FOREACH], dnl =========================================================================== +AC_DEFUN([CAIRO_FEATURE_IF_ENABLED], +[ + AS_IF([test "x$use_]m4_default([$1], cr_feature)[" = xyes], [$2], [$3]) +]) + m4_define([_CAIRO_FEATURE_HOOK_MATCH], [ m4_case([$1], @@ -240,12 +245,13 @@ dnl "functions" for set of functions dnl "" for private configurations dnl dnl These four values are also set as $1 to $4. To know if feature was -dnl enabled, compare $use_$1 to string "yes". As in: +dnl enabled use CAIRO_FEATURE_IF_ENABLED: dnl -dnl AS_IF([test "x$use_$1" = "xyes"], -dnl [ -dnl code goes here... -dnl ]) +dnl CAIRO_FEATURE_IF_ENABLED($1, [IF-ENABLED], [IF-DISABLED]) +dnl +dnl or compare $use_$1 to string "yes". As in: +dnl +dnl AS_IF([test "x$use_$1" = "xyes"], [IF-ENABLED], [IF-DISABLED]) dnl AC_DEFUN([CAIRO_FEATURE_HOOK_REGISTER], [