summaryrefslogtreecommitdiff
path: root/build/configure.ac.enable
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-09-10 23:23:08 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-09-11 00:38:30 -0400
commit391bef58fcb301014adc8b06db7265c5c9b3bee3 (patch)
tree0d4202381656f0bb35c5b5d3abf63fb45215db9e /build/configure.ac.enable
parent4a01b1d9c94beb4b3df9d4c7c8d7411c6afa1034 (diff)
Add support for always-builtin features in the build system
Like image surface and user fonts.
Diffstat (limited to 'build/configure.ac.enable')
-rw-r--r--build/configure.ac.enable43
1 files changed, 28 insertions, 15 deletions
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
index 71e887b82..3c1dae63e 100644
--- a/build/configure.ac.enable
+++ b/build/configure.ac.enable
@@ -21,9 +21,10 @@ dnl "font" for font backends
dnl "functions" for set of functions
dnl "" for private configurations
dnl DEFAULT is the default state of the feature:
-dnl "no" for experimental backends, eg. your favorite new backend
-dnl "yes" for mandatory backends, eg. png
-dnl "auto" for other supported backends, eg. xlib
+dnl "no" for experimental features, eg. your favorite new backend
+dnl "yes" for recommended features, eg. png functions
+dnl "auto" for other supported features, eg. xlib surface backend
+dnl "always" for mandatory features (can't be disabled), eg. image surface backend
dnl COMMANDS are run to check whether the feature can be enabled. Their
dnl result may be cached, so user should not count on them being run.
dnl They should set use_$(ID) to something other than yes if the
@@ -56,13 +57,19 @@ AC_DEFUN([_CAIRO_ENABLE],
[no],,
[yes],,
[auto],,
+ [always],,
[m4_fatal([Invalid default value `]cr_feature_default[' for feature `]cr_feature['])]
)
- AC_ARG_ENABLE(cr_feature_arg,
- AS_HELP_STRING([--enable-]cr_feature_arg[=@<:@no/auto/yes@:>@],
- [Enable cairo's ]cr_feature_name[ feature @<:@default=]cr_feature_default[@:>@]),
- enable_$1=$enableval, enable_$1=cr_feature_default)
+ m4_if(cr_feature_default, [always],
+ [
+ enable_$1=yes
+ ],[
+ AC_ARG_ENABLE(cr_feature_arg,
+ AS_HELP_STRING([--enable-]cr_feature_arg[=@<:@no/auto/yes@:>@],
+ [Enable cairo's ]cr_feature_name[ feature @<:@default=]cr_feature_default[@:>@]),
+ enable_$1=$enableval, enable_$1=cr_feature_default)
+ ])
case $enable_$1 in
no)
use_$1="no (disabled, use --enable-cr_feature_arg to enable)"
@@ -120,7 +127,12 @@ AC_DEFUN([_CAIRO_ENABLE],
AS_IF([test "x$enable_$1" = "xyes" -a "x$use_$1" != xyes],
[
- AC_MSG_ERROR([requested ]cr_feature_name[ feature could not be enabled])
+ AC_MSG_ERROR(
+ m4_case(cr_feature_default,
+ [always], [mandatory],
+ [yes], [recommended],
+ , [requested]
+ ) cr_feature_name[ feature could not be enabled])
])
;;
*)
@@ -236,9 +248,10 @@ dnl
dnl cr_feature expands to the feature id, eg "ft"
dnl cr_feature_name expands to the human-readable name of the feature, eg. "FreeType font"
dnl cr_feature_default expands to the default state of the feature:
-dnl "no" for experimental backends, eg. your favorite new backend
-dnl "yes" for mandatory backends, eg. png
-dnl "auto" for other supported backends, eg. xlib
+dnl "no" for experimental features, eg. your favorite new backend
+dnl "yes" for recommended features, eg. png functions
+dnl "auto" for other supported features, eg. xlib surface backend
+dnl "always" for mandatory features (can't be disabled), eg. image surface backend
dnl cr_what expands to the type of feature:
dnl "surface" for surface backends
dnl "font" for font backends
@@ -487,8 +500,8 @@ CAIRO_FEATURE_VARS_REGISTER([REQUIRES BASE])
CAIRO_FEATURE_VARS_REGISTER([CFLAGS NONPKGCONFIG_CFLAGS])
CAIRO_FEATURE_VARS_REGISTER([LIBS NONPKGCONFIG_LIBS], [$LIBS])
-dnl Generate .pc files for enabled public features
-CAIRO_FEATURE_HOOK_REGISTER(yes,*,!,
+dnl Generate .pc files for enabled non-builtin public features
+CAIRO_FEATURE_HOOK_REGISTER(yes,!always,!,
[
AC_CONFIG_FILES(src/cr_feature_pc:src/cairo-features.pc.in,
[
@@ -510,8 +523,8 @@ CAIRO_FEATURE_HOOK_REGISTER(yes,*,!,
])
])
-dnl Generate -uninstalled.pc files for enabled public features
-CAIRO_FEATURE_HOOK_REGISTER(yes,*,!,
+dnl Generate -uninstalled.pc files for enabled non-builtin public features
+CAIRO_FEATURE_HOOK_REGISTER(yes,!always,!,
[
AC_CONFIG_FILES(cr_feature_uninstalled_pc:src/cairo-features-uninstalled.pc.in,
[