summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-09-16 04:33:37 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-09-16 19:45:02 -0400
commit2161cb5baf1287a4a1a448f09e7fa885f635bfd1 (patch)
tree532b46dabbb3f0dc0d7e59d9f4405d1afa398ba4
parenta341cb5a98e3eadd5ccb47f9b1e696cb52f7ce9e (diff)
[configure.ac] Warn if no native surface backend is enabled, err if no native font
-rw-r--r--build/aclocal.cairo.m41
-rw-r--r--build/configure.ac.features50
2 files changed, 38 insertions, 13 deletions
diff --git a/build/aclocal.cairo.m4 b/build/aclocal.cairo.m4
index 79c2ff8d..73a64f64 100644
--- a/build/aclocal.cairo.m4
+++ b/build/aclocal.cairo.m4
@@ -146,3 +146,4 @@ AH_BOTTOM([
])dnl
])
+AC_DEFUN([CAIRO_TEXT_WRAP], [m4_text_wrap([$1], [$2],, 78)])
diff --git a/build/configure.ac.features b/build/configure.ac.features
index cf9f2f87..f0f76fca 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -313,18 +313,48 @@ CAIRO_ACCUMULATORS_REGISTER([WARNING_MESSAGE],m4_newline()m4_newline)dnl
dnl Collect warning message for enabled unsupported public features
CAIRO_FEATURE_HOOK_REGISTER(yes,no,!,
[dnl
- CAIRO_ACCUMULATE([WARNING_MESSAGE], m4_text_wrap([The ]cr_feature_name[ feature is still under active development and is included in this release only as a preview. It does NOT fully work yet and incompatible changes may yet be made to ]cr_feature_name[ specific API.], [--- ],, 78))
+ CAIRO_ACCUMULATE([WARNING_MESSAGE], CAIRO_TEXT_WRAP([The ]cr_feature_name[ feature is still under active development and is included in this release only as a preview. It does NOT fully work yet and incompatible changes may yet be made to ]cr_feature_name[ specific API.], [--- ]))
])dnl
dnl Collect warning message for disabled recommended features
CAIRO_FEATURE_HOOK_REGISTER(no,yes,*,
[dnl
- CAIRO_ACCUMULATE([WARNING_MESSAGE], m4_text_wrap([It is strictly recommended that you do NOT disable the ]cr_feature_name[ feature.], [+++ ],, 78))
+ CAIRO_ACCUMULATE([WARNING_MESSAGE], CAIRO_TEXT_WRAP([It is strictly recommended that you do NOT disable the ]cr_feature_name[ feature.], [+++ ]))
+])dnl
+
+
+dnl Collect enabled native surface backend features
+CAIRO_ACCUMULATORS_REGISTER([NATIVE_SURFACE_BACKENDS])dnl
+CAIRO_FEATURE_HOOK_REGISTER(yes,auto,surface,
+[dnl
+ CAIRO_ACCUMULATE([NATIVE_SURFACE_BACKENDS], [$1])
+])dnl
+
+dnl Collect warning message if no native surface backend feature enabled
+AC_CONFIG_COMMANDS_PRE(dnl
+[dnl
+ AS_IF([test -z "$CAIRO_NATIVE_SURFACE_BACKENDS"],dnl
+ [dnl
+ CAIRO_ACCUMULATE([WARNING_MESSAGE], CAIRO_TEXT_WRAP([It is strictly recommended that you enable the native surface backend feature for your platform.], [*** ]))
+ ])
+])dnl
+
+
+
+dnl Collect enabled native font backend features
+CAIRO_ACCUMULATORS_REGISTER([NATIVE_FONT_BACKENDS])dnl
+CAIRO_FEATURE_HOOK_REGISTER(yes,auto,font,
+[dnl
+ CAIRO_ACCUMULATE([NATIVE_FONT_BACKENDS], [$1])
])dnl
AC_DEFUN([CAIRO_REPORT],
[dnl
+ if test -z "$CAIRO_NATIVE_FONT_BACKENDS"; then
+ AC_MSG_ERROR([Cairo requires at least one native font backend. Please install FreeType and fontconfig and try again.])
+ fi
+
V="$CAIRO_VERSION_MAJOR.$CAIRO_VERSION_MINOR.$CAIRO_VERSION_MICRO"
echo ""
echo "cairo (version $V [[$CAIRO_RELEASE_STATUS]]) will be compiled with the following surface backends:"
@@ -361,17 +391,11 @@ AC_DEFUN([CAIRO_REPORT],
if test x"$use_win32" = "xyes"; then
echo " win32 printing testing: $test_win32_printing"
fi
- echo ""
-
- if test x"$use_ft" != "xyes" && \
- test x"$use_win32_font" != "xyes" && \
- test x"$use_quartz_font" != "xyes" ; then
-
- AC_MSG_ERROR([Cairo requires at least one font backend.
- Please install freetype and fontconfig, then try again:
- http://freetype.org/ http://fontconfig.org/
- ])
- fi
echo "$CAIRO_WARNING_MESSAGE"
+ echo ""
+ AS_IF([test -z "$CAIRO_NATIVE_FONT_BACKENDS"],dnl
+ [dnl
+ AC_MSG_ERROR([Cairo requires at least one native font backend. Please install FreeType and fontconfig and try again.])
+ ])
])dnl