[cairo-commit] 5 commits - autogen.sh build/aclocal.cairo.m4 build/configure.ac.features INSTALL test/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Sep 16 16:57:18 PDT 2008


 INSTALL                     |   67 ++++++++++++++++++++++----------------------
 autogen.sh                  |    1 
 build/aclocal.cairo.m4      |    1 
 build/configure.ac.features |   60 ++++++++++++++++++++++++++++-----------
 test/Makefile.am            |    2 +
 5 files changed, 80 insertions(+), 51 deletions(-)

New commits:
commit d857c4d7653e06003b7b75fb92da988664b2545d
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 16 19:56:47 2008 -0400

    [autogen.sh] Remove --enable-gtk-doc from configure options
    
    Cause cworth doesn't like it.

diff --git a/autogen.sh b/autogen.sh
index ed9ece8..f3170ba 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -190,6 +190,5 @@ rm -f config.cache
 do_cmd $srcdir/configure \
 	--cache-file=config.cache \
 	--disable-static \
-	--enable-gtk-doc \
 	--enable-test-surfaces \
 	${1+"$@"} && echo "Now type \`make' to compile $PROJECT." || exit 1
commit a5a18dbf610ef6562d7ee9d6d927d89af6839c60
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 16 19:44:49 2008 -0400

    [INSTALL] Update

diff --git a/INSTALL b/INSTALL
index 9c5d145..1ee0f48 100644
--- a/INSTALL
+++ b/INSTALL
@@ -66,34 +66,33 @@ More detailed build instructions
 	(NOTE: On Mac OS X, at least, use DYLD_LIBRARY_PATH in place
 	       of LD_LIBRARY_PATH above.)
 
-    --enable-quartz
-    --enable-atsui
-    --enable-xcb
-    --enable-glitz
-    --enable-beos
-    --enable-os2
-    --enable-directfb
-
-	Some of cairo's backends are marked as experimental and will
-	not be built by default. If you would like to build and
-	experiment with these backends, you will need to pass one of
-	the above options to the configure script. You may need to
-	have certain libraries installed first as discussed in the
-	dependencies section of the README file.
-
-    --disable-xlib
-    --disable-win32
-    --disable-png
-    --disable-freetype
-    --disable-ps
-    --disable-pdf
-    --disable-svg
-
-	Cairo's configure script detects the libraries needed to build
-	each stable backend, and when it finds them, enables each
-	backend. If you would like to override this detection and
-	disable a backend, (even when it would be possible to build
-	it), use one of the options above to disable the backend.
+    --enable-XYZ
+    --enable-XYZ=yes
+    --enable-XYZ=auto
+    --enable-XYZ=no
+    --disable-XYZ
+
+   Cairo's various font and surface backends and other features can be
+   enabled or disabled at configure time.  Features can be divided into
+   three categories based on their default state:
+
+     * default=yes: These are the recommended features like PNG functions
+       and PS/PDF/SVG backends.  It is highly recommended to not disable
+       these features but if that's really what one wants, they can be
+       disabled using --disable-XYZ.
+
+     * default=auto: These are the "native" features, that is, they are
+       platform specific, like the Xlib surface backend.  You probably
+       want one or two of these.  They will be automatically enabled if
+       all their required facilities are available.  Or you can use
+       --enable-XYZ or --disable-XYZ to make your desire clear, and then
+       cairo errs during configure if your intention cannot be followed.
+
+     * default=no: These are the "experimental" features, and hence by
+       default off.  Use --enabled-XYZ to enable them.
+
+   The list of all features and their default state can be seen in the
+   output of ./configure --help.
 
 2) Compile the package:
 
@@ -156,16 +155,18 @@ contributions to cairo. Since you're not using a packaged tar file,
 you're going to need some additional tools beyond just a C compiler in
 order to compile cairo. Specifically, you need the following utilities:
 
-	automake (1.8 or newer)
+	automake
 	autoconf
-	libtool
+	autoheader
+	aclocal
+	libtoolize
+	gtk-doc (recommended)
 
 Hopefully your platform of choice has packages readily available so
 that you can easily install things with your system's package
 management tool, (such as "apt-get install automake" on Debian or "yum
-install automake" on Fedora, etc.). Note that Mac OS X ships with it's
-own utility called libtool which is not what you want, (the one you do
-want goes by the name of glibtool).
+install automake" on Fedora, etc.). Note that Mac OS X ships with
+glibtoolize instead of libtoolize.
 
 Once you have all of those packages installed, the next step is to run
 the autogen.sh script. That can be as simple as:
commit ff9a2af19e406807b3a962b930ec66b22a6a5974
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 16 16:05:57 2008 -0400

    [test] Make test programs depend on check programs
    
    Since they use them when being run.

diff --git a/test/Makefile.am b/test/Makefile.am
index 57aa781..57faebb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -978,6 +978,8 @@ check-valgrind:
 	$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute valgrind $(VALGRIND_FLAGS)' 2>&1 | tee valgrind-log
 
 
+$(TESTS): $(check_PROGRAMS)
+
 %.log: % $(check_PROGRAMS)
 	-./$<
 
commit 9e2ef481aa86b01fbdc91d4908ad312bca85db89
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 16 04:36:23 2008 -0400

    [configure.ac] Clean up report syntax

diff --git a/build/configure.ac.features b/build/configure.ac.features
index f0f76fc..e23d9ce 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -357,7 +357,9 @@ AC_DEFUN([CAIRO_REPORT],
 
 	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:"
+	echo "cairo (version $V [[$CAIRO_RELEASE_STATUS]]) will be compiled with:"
+	echo ""
+	echo "The following surface backends:"
 	echo "  Image:         yes (always builtin)"
 	echo "  Xlib:          $use_xlib"
 	echo "  Xlib Xrender:  $use_xlib_xrender"
@@ -373,16 +375,16 @@ AC_DEFUN([CAIRO_REPORT],
 	echo "  BeOS:          $use_beos"
 	echo "  DirectFB:      $use_directfb"
 	echo ""
-	echo "the following font backends:"
+	echo "The following font backends:"
 	echo "  User:          yes (always builtin)"
 	echo "  FreeType:      $use_ft"
 	echo "  Win32:         $use_win32_font"
 	echo "  Quartz:        $use_quartz_font"
 	echo ""
-	echo "the following features:"
+	echo "The following functions:"
 	echo "  PNG functions: $use_png"
 	echo ""
-	echo "and the following debug options:"
+	echo "And the following internal features:"
 	echo "  gcov support:  $use_gcov"
 	echo "  test surfaces: $use_test_surfaces"
 	echo "  ps testing:    $test_ps"
commit 2161cb5baf1287a4a1a448f09e7fa885f635bfd1
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Sep 16 04:33:37 2008 -0400

    [configure.ac] Warn if no native surface backend is enabled, err if no native font

diff --git a/build/aclocal.cairo.m4 b/build/aclocal.cairo.m4
index 79c2ff8..73a64f6 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 cf9f2f8..f0f76fc 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
 


More information about the cairo-commit mailing list