[cairo-commit] 11 commits - acinclude.m4 autogen.sh build/analysis.ac build/Analysis.mk build/ChangeLog.mk build/configure.ac.analysis build/configure.ac.enable build/configure.ac.system build/configure.ac.tools build/configure.ac.version build/configure.ac.warnings build/enable.ac build/Makefile.am.analysis build/Makefile.am.changelog build/Makefile.am.releasing build/Releasing.mk build/system.ac build/tools.ac build/version.ac build/warnings.ac configure.ac configure.in doc/public Makefile.am src/.gitignore src/Makefile.am src/Makefile.sources src/Makefile.win32 src/README src/Sources.mk
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Sep 4 19:34:27 PDT 2008
Makefile.am | 6
acinclude.m4 | 9
autogen.sh | 13 -
build/Analysis.mk | 35 --
build/ChangeLog.mk | 82 ------
build/Makefile.am.analysis | 35 ++
build/Makefile.am.changelog | 82 ++++++
build/Makefile.am.releasing | 153 ++++++++++++
build/Releasing.mk | 153 ------------
build/analysis.ac | 76 ------
build/configure.ac.analysis | 76 ++++++
build/configure.ac.enable | 428 +++++++++++++++++++++++++++++++++++
build/configure.ac.system | 74 ++++++
build/configure.ac.tools | 28 ++
build/configure.ac.version | 43 +++
build/configure.ac.warnings | 65 +++++
build/enable.ac | 266 ---------------------
build/system.ac | 74 ------
build/tools.ac | 28 --
build/version.ac | 43 ---
build/warnings.ac | 65 -----
configure.ac | 482 +++++++++++++++++++++++++++++++++++++++
configure.in | 536 --------------------------------------------
doc/public/Makefile.am | 2
src/.gitignore | 4
src/Makefile.am | 8
src/Makefile.sources | 246 ++++++++++++++++++++
src/Makefile.win32 | 2
src/README | 2
src/Sources.mk | 246 --------------------
30 files changed, 1739 insertions(+), 1623 deletions(-)
New commits:
commit 4edfdb4b15ff9f1eacaae0fb0739a54e51ca8742
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 22:30:49 2008 -0400
Rename build/*.ac to build/configure.ac.*.
Also rename configure.in to configure.ac (finally)
configure.in -> configure.ac
build/analysis.ac -> build/configure.ac.analysis
build/enable.ac -> build/configure.ac.enable
build/system.ac -> build/configure.ac.system
build/tools.ac -> build/configure.ac.tools
build/version.ac -> build/configure.ac.version
build/warnings.ac -> build/configure.ac.warnings
diff --git a/autogen.sh b/autogen.sh
index 4e32ad2..81bd8ab 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -19,17 +19,16 @@ AUTOHEADER=${AUTOHEADER-autoheader}
AUTOMAKE_FLAGS="--add-missing --foreign"
AUTOCONF=${AUTOCONF-autoconf}
-CONFIGURE_IN=
-test -f configure.in && CONFIGURE_IN=configure.in
-test -f configure.ac && CONFIGURE_IN=configure.ac
+CONFIGURE_AC=
+test -f configure.ac && CONFIGURE_AC=configure.ac
-if test "X$CONFIGURE_IN" = X; then
+if test "X$CONFIGURE_AC" = X; then
echo "$ARGV0: ERROR: No $srcdir/configure.in or $srcdir/configure.ac found."
exit 1
fi
extract_version() {
- grep "^ *$1" $CONFIGURE_IN build/*.ac | sed 's/.*(\[*\([^])]*\)]*).*/\1/'
+ grep "^ *$1" $CONFIGURE_AC build/configure.ac.* | sed 's/.*(\[*\([^])]*\)]*).*/\1/'
}
autoconf_min_vers=`extract_version AC_PREREQ`
diff --git a/build/analysis.ac b/build/analysis.ac
deleted file mode 100644
index 7afc9e0..0000000
--- a/build/analysis.ac
+++ /dev/null
@@ -1,76 +0,0 @@
-dnl ===========================================================================
-dnl
-dnl LCOV
-dnl
-cairo_has_lcov=no
-AC_ARG_ENABLE(gcov,
- AS_HELP_STRING([--enable-gcov],
- [Enable gcov]),
- [use_gcov=$enableval], [use_gcov=no])
-
-if test "x$use_gcov" = "xyes"; then
- dnl we need gcc:
- if test "$GCC" != "yes"; then
- AC_MSG_ERROR([GCC is required for --enable-gcov])
- fi
-
- dnl Check if ccache is being used
- AC_CHECK_PROG(SHTOOL, shtool, shtool)
- case `$SHTOOL path $CC` in
- *ccache*[)] gcc_ccache=yes;;
- *[)] gcc_ccache=no;;
- esac
-
- if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
- AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
- fi
-
- ltp_version_list="1.6 1.5 1.4"
- AC_CHECK_PROG(LTP, lcov, lcov)
- AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
-
- if test "$LTP"; then
- AC_CACHE_CHECK([for ltp version], cairo_cv_ltp_version, [
- cairo_cv_ltp_version=invalid
- ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
- for ltp_check_version in $ltp_version_list; do
- if test "$ltp_version" = "$ltp_check_version"; then
- cairo_cv_ltp_version="$ltp_check_version (ok)"
- fi
- done
- ])
- fi
-
- case $cairo_cv_ltp_version in
- ""|invalid[)]
- ;;
- *)
- cairo_has_lcov=yes
- ;;
- esac
-
- if test "x$cairo_has_lcov" != "xyes"; then
- AC_MSG_ERROR([[To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list.
-Please install the Linux Test Project [http://ltp.sourceforge.net/], and try again.]])
- fi
-
- if test -z "$LTP_GENHTML"; then
- AC_MSG_ERROR([[Could not find genhtml from the LTP package.
-Please install the Linux Test Project [http://ltp.sourceforge.net/], and try again.]])
- fi
-
- AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
-dnl PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
-
- dnl Remove all optimization flags from CFLAGS
- changequote({,})
- CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
- CAIRO_CFLAGS=`echo "$CAIRO_CFLAGS" | $SED -e 's/-O[0-9]*//g'`
- changequote([,])
-
- dnl Add the special gcc flags
- CAIRO_CFLAGS="$CAIRO_CFLAGS -O0 -fprofile-arcs -ftest-coverage"
- CAIRO_LIBS="$CAIRO_LIBS -lgcov"
-fi
-AM_CONDITIONAL(CAIRO_HAS_LCOV, test "x$cairo_has_lcov" = "xyes")
-
diff --git a/build/configure.ac.analysis b/build/configure.ac.analysis
new file mode 100644
index 0000000..7afc9e0
--- /dev/null
+++ b/build/configure.ac.analysis
@@ -0,0 +1,76 @@
+dnl ===========================================================================
+dnl
+dnl LCOV
+dnl
+cairo_has_lcov=no
+AC_ARG_ENABLE(gcov,
+ AS_HELP_STRING([--enable-gcov],
+ [Enable gcov]),
+ [use_gcov=$enableval], [use_gcov=no])
+
+if test "x$use_gcov" = "xyes"; then
+ dnl we need gcc:
+ if test "$GCC" != "yes"; then
+ AC_MSG_ERROR([GCC is required for --enable-gcov])
+ fi
+
+ dnl Check if ccache is being used
+ AC_CHECK_PROG(SHTOOL, shtool, shtool)
+ case `$SHTOOL path $CC` in
+ *ccache*[)] gcc_ccache=yes;;
+ *[)] gcc_ccache=no;;
+ esac
+
+ if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
+ AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
+ fi
+
+ ltp_version_list="1.6 1.5 1.4"
+ AC_CHECK_PROG(LTP, lcov, lcov)
+ AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
+
+ if test "$LTP"; then
+ AC_CACHE_CHECK([for ltp version], cairo_cv_ltp_version, [
+ cairo_cv_ltp_version=invalid
+ ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
+ for ltp_check_version in $ltp_version_list; do
+ if test "$ltp_version" = "$ltp_check_version"; then
+ cairo_cv_ltp_version="$ltp_check_version (ok)"
+ fi
+ done
+ ])
+ fi
+
+ case $cairo_cv_ltp_version in
+ ""|invalid[)]
+ ;;
+ *)
+ cairo_has_lcov=yes
+ ;;
+ esac
+
+ if test "x$cairo_has_lcov" != "xyes"; then
+ AC_MSG_ERROR([[To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list.
+Please install the Linux Test Project [http://ltp.sourceforge.net/], and try again.]])
+ fi
+
+ if test -z "$LTP_GENHTML"; then
+ AC_MSG_ERROR([[Could not find genhtml from the LTP package.
+Please install the Linux Test Project [http://ltp.sourceforge.net/], and try again.]])
+ fi
+
+ AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
+dnl PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
+
+ dnl Remove all optimization flags from CFLAGS
+ changequote({,})
+ CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
+ CAIRO_CFLAGS=`echo "$CAIRO_CFLAGS" | $SED -e 's/-O[0-9]*//g'`
+ changequote([,])
+
+ dnl Add the special gcc flags
+ CAIRO_CFLAGS="$CAIRO_CFLAGS -O0 -fprofile-arcs -ftest-coverage"
+ CAIRO_LIBS="$CAIRO_LIBS -lgcov"
+fi
+AM_CONDITIONAL(CAIRO_HAS_LCOV, test "x$cairo_has_lcov" = "xyes")
+
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
new file mode 100644
index 0000000..062ac7a
--- /dev/null
+++ b/build/configure.ac.enable
@@ -0,0 +1,428 @@
+dnl
+dnl These are the facilities for enable/disabling various backends/features,
+dnl and for collecting CFLAGS/LIBS and generating per backend/feature .pc
+dnl files, assembling list of source files to compile, and creating
+dnl cairo-features.h and other generated files.
+dnl
+
+dnl ===========================================================================
+dnl
+dnl cairo_cache_version should be increased every time that the backend
+dnl detection stuff changes in a way that removing the config.cache file may be
+dnl needed for correct operation. (this is only for the backend detection
+dnl changes; it doesn't have any effect on any other cached thing.)
+dnl
+m4_define(cairo_cache_version, 4)
+
+dnl ===========================================================================
+dnl
+dnl Define a macro to enable features
+dnl - Macro: _CAIRO_ENABLE_FULL (NAMESPACE, NAME, ARG, FEATURE_NAME, DEFAULT, WHAT, COMMANDS)
+dnl
+dnl where:
+dnl
+dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
+dnl NAME is the human-readable name of the backend, eg. "FreeType font"
+dnl ARG is what enables the backend, eg. "freetype" for --enable-freetype
+dnl FEATURE_NAME is the feature conditional, eg. CAIRO_HAS_FT_FONT
+dnl WHAT is the type of feature:
+dnl "surface" for surface backends
+dnl "font" for font backends
+dnl "functions" for set of functions
+dnl "" for private configurations
+dnl DEFAULT is the default state of the backend:
+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 COMMANDS are run to check whether the backend can be enabled. Their
+dnl result may be cached, so user should not count on them being run.
+dnl They should set use_$(NAMESPACE) to something other than yes if the
+dnl backend cannot be built, eg. "no (requires SomeThing)". It then
+dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
+dnl appropriately. Look at the macro definition for more details,
+dnl or ask if in doubt.
+dnl
+AC_DEFUN([_CAIRO_ENABLE_FULL],
+[ AC_ARG_ENABLE([$3],
+ AS_HELP_STRING([--enable-$3=@<:@no/auto/yes@:>@],
+ [Enable cairo's $2 backend @<:@default=$6@:>@]),
+ enable_$1=$enableval, enable_$1=$6)
+ case $enable_$1 in
+ no)
+ use_$1="no (disabled, use --enable-$3 to enable)"
+ ;;
+ yes|auto)
+ if test "x$cairo_cv_backend_[]$1[]_cache_version" != "x[]cairo_cache_version"; then
+ # cached results for this backend (if any) are stale. force rechecking.
+ unset cairo_cv_backend_[]$1[]_use
+ fi
+ AC_CACHE_CHECK([for cairo's $2 backend], cairo_cv_backend_[]$1[]_use,
+ [
+ echo
+ use_[]$1=yes
+ $1[]_REQUIRES=$ac_env_[]$1[]_REQUIRES_value
+ $1[]_CFLAGS=$ac_env_[]$1[]_CFLAGS_value
+ $1[]_LIBS=$ac_env_[]$1[]_LIBS_value
+ $1[]_NONPKGCONFIG_CFLAGS=$ac_env_[]$1[]_NONPKGCONFIG_CFLAGS_value
+ $1[]_NONPKGCONFIG_LIBS=$ac_env_[]$1[]_NONPKGCONFIG_LIBS_value
+ $1[]_BASE=cairo
+ $7
+ cairo_cv_backend_[]$1[]_use=$use_[]$1
+ cairo_cv_backend_[]$1[]_cache_version=cairo_cache_version
+ cairo_cv_backend_[]$1[]_requires=$[]$1[]_REQUIRES
+ cairo_cv_backend_[]$1[]_cflags=$[]$1[]_CFLAGS
+ cairo_cv_backend_[]$1[]_libs=$[]$1[]_LIBS
+ cairo_cv_backend_[]$1[]_nonpkgconfig_cflags=$[]$1[]_NONPKGCONFIG_CFLAGS
+ cairo_cv_backend_[]$1[]_nonpkgconfig_libs=$[]$1[]_NONPKGCONFIG_LIBS
+ cairo_cv_backend_[]$1[]_base=$[]$1[]_BASE
+ AC_MSG_CHECKING([whether cairo's $2 backend could be enabled])
+ ])
+
+ use_[]$1=$cairo_cv_backend_[]$1[]_use
+ $1[]_BASE=$cairo_cv_backend_[]$1[]_base
+
+ $1[]_REQUIRES="$cairo_cv_backend_[]$1[]_requires "
+ $1[]_CFLAGS="$cairo_cv_backend_[]$1[]_cflags "
+ $1[]_LIBS="$cairo_cv_backend_[]$1[]_libs "
+ $1[]_NONPKGCONFIG_CFLAGS="$cairo_cv_backend_[]$1[]_nonpkgconfig_cflags "
+ $1[]_NONPKGCONFIG_LIBS="$cairo_cv_backend_[]$1[]_nonpkgconfig_libs "
+
+ # null the ones that only have space
+ test "x$$1[]_REQUIRES" = "x " && $1[]_REQUIRES=""
+ test "x$$1[]_CFLAGS" = "x " && $1[]_CFLAGS=""
+ test "x$$1[]_LIBS" = "x " && $1[]_LIBS=""
+ test "x$$1[]_NONPKGCONFIG_CFLAGS" = "x " && $1[]_NONPKGCONFIG_CFLAGS=""
+ test "x$$1[]_NONPKGCONFIG_LIBS" = "x " && $1[]_NONPKGCONFIG_LIBS=""
+
+ AS_IF([test "x$enable_$1" = "xyes" -a "x$use_$1" != xyes],
+ [
+ AC_MSG_ERROR([requested $2 backend could not be enabled])
+ ])
+ ;;
+ *)
+ AC_MSG_ERROR([invalid argument passed to --enable-$3: $use_$1, should be one of @<:@no/auto/yes@:>@])
+ ;;
+ esac
+
+ if test "x$use_$1" = xyes; then
+ CAIRO_FEATURES="$4 $CAIRO_FEATURES"
+ CAIRO_REQUIRES="$$1_REQUIRES$CAIRO_REQUIRES"
+ CAIRO_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$$1_CFLAGS$CAIRO_CFLAGS"
+ CAIRO_LIBS="$$1_NONPKGCONFIG_LIBS$$1_LIBS$CAIRO_LIBS"
+ CAIRO_NONPKGCONFIG_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$CAIRO_NONPKGCONFIG_CFLAGS"
+ CAIRO_NONPKGCONFIG_LIBS="$$1_NONPKGCONFIG_LIBS$CAIRO_NONPKGCONFIG_LIBS"
+ m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
+ AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
+ [
+ $SED -i -e "
+ s, at backend_name@,$1,g;
+ s, at Backend_Name@,$2,g;
+ s, at BACKEND_BASE@,$$1_BASE,g;
+ s, at BACKEND_REQUIRES@,$$1_REQUIRES,g;
+ s%@BACKEND_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g;
+ s, at BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g;
+ " "]cairo_backend_pc()[" ||
+ AC_MSG_ERROR(failed to update ]cairo_backend_pc()[)
+ ],[
+ SED='$SED'
+ $1_BASE='$$1_BASE'
+ $1_REQUIRES='$$1_REQUIRES'
+ $1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
+ $1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
+ ])
+ fi
+
+ AM_CONDITIONAL($4, test "x$use_$1" = xyes)
+
+ dnl Collect list of all supported but disabled features
+ AS_IF([test "x$use_$1" != xyes -a "x$6" != xno],
+ [
+ CAIRO_NO_FEATURES="$4 $CAIRO_NO_FEATURES"
+ ])
+
+ dnl Collect list of all (un)supported features and cairo headers
+ AS_IF([test "x$6" = xno],
+ [
+ CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
+unsupported_cairo_headers += $(cairo_$1_headers)'
+ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
+unsupported_cairo_headers += $(cairo_$1_headers)'
+ ],[
+ CAIRO_SUPPORTED_FEATURES="$4 $CAIRO_SUPPORTED_FEATURES"
+ CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
+supported_cairo_headers += $(cairo_$1_headers)'
+ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
+supported_cairo_headers += $(cairo_$1_headers)'
+ ])
+
+ dnl Collect list of all/enabled cairo source files
+ CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
+all_cairo_pkgconf += $(cairo_$1_pkgconf)
+all_cairo_headers += $(cairo_$1_headers)
+all_cairo_private += $(cairo_$1_private)
+all_cairo_sources += $(cairo_$1_sources)
+if $4
+enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
+enabled_cairo_headers += $(cairo_$1_headers)
+enabled_cairo_private += $(cairo_$1_private)
+enabled_cairo_sources += $(cairo_$1_sources)
+endif
+'
+ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
+all_cairo_pkgconf += $(cairo_$1_pkgconf)
+all_cairo_headers += $(cairo_$1_headers)
+all_cairo_private += $(cairo_$1_private)
+all_cairo_sources += $(cairo_$1_sources)
+ifeq ($($4),1)
+enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
+enabled_cairo_headers += $(cairo_$1_headers)
+enabled_cairo_private += $(cairo_$1_private)
+enabled_cairo_sources += $(cairo_$1_sources)
+endif
+'
+ dnl Collect warning message for enabled unsupported backends
+ AS_IF([test "x$use_$1" = xyes -a "x$6" = xno],
+ [
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
+*** The $2 backend 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 $2-backend specific API.
+"
+ ])
+
+ dnl Collect warning message for disabled recommended backends
+ AS_IF([test "x$use_$1" != xyes -a "x$6" = xyes],
+ [
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
+*** It is strictly recommended that you do NOT disable
+*** the $2 backend.
+"
+ ])
+])
+
+m4_pattern_allow(^CAIRO_HAS_)
+m4_define([_CAIRO_BUILD_FEATURE_NAME_NORMALIZED],
+ [CAIRO_HAS_[$1]m4_bmatch([$1],[$2$],,[$2])])
+
+m4_define([_CAIRO_BUILD_FEATURE_NAME],
+[_CAIRO_BUILD_FEATURE_NAME_NORMALIZED(m4_translit([$1],[a-z_ -],[A-Z___]),m4_translit(m4_ifval([$2],[ $2]),[a-z_ -],[A-Z___]))])
+
+dnl Like _CAIRO_ENABLE*, but takes an object type too
+AC_DEFUN([_CAIRO_ENABLE],
+[_CAIRO_ENABLE_FULL(
+ m4_translit([$1],[A-Z_ -],[a-z___]),
+ [$2],
+ m4_translit([$1],[A-Z_ -],[a-z---]),
+ _CAIRO_BUILD_FEATURE_NAME([$1],[$3]),
+ [$3],
+ [$4],
+ [$5]
+)])
+
+dnl ===========================================================================
+dnl
+dnl Define macros to enable various features.
+dnl - Macro: CAIRO_ENABLE_* (NAMESPACE, NAME, DEFAULT, COMMANDS)
+dnl
+dnl where:
+dnl
+dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
+dnl NAME is the human-readable name of the feature, eg. "FreeType"
+dnl DEFAULT is the default state of the backend:
+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 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_$(NAMESPACE) to something other than yes if the
+dnl backend cannot be built, eg. "no (requires SomeThing)". It then
+dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
+dnl appropriately. Look at the macro definition for more details,
+dnl or ask if in doubt.
+dnl
+AC_DEFUN([CAIRO_ENABLE],
+[_CAIRO_ENABLE([$1],[$2],,[$3],[$4])])
+AC_DEFUN([CAIRO_ENABLE_SURFACE_BACKEND],
+[_CAIRO_ENABLE([$1],[$2 surface backend],surface,[$3],[$4])])
+AC_DEFUN([CAIRO_ENABLE_FONT_BACKEND],
+[_CAIRO_ENABLE([$1],[$2 font backend],font,[$3],[$4])])
+AC_DEFUN([CAIRO_ENABLE_FUNCTIONS],
+[_CAIRO_ENABLE([$1],[$2 functions],functions,[$3],[$4])])
+
+dnl ===========================================================================
+dnl
+dnl Report
+dnl
+
+dnl Accumulator for warning messages
+m4_pattern_allow(^CAIRO_WARNING_MESSAGE$)
+CAIRO_WARNING_MESSAGE=""
+
+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 " Image: yes (always builtin)"
+ echo " Xlib: $use_xlib"
+ echo " Xlib Xrender: $use_xlib_xrender"
+ echo " Quartz: $use_quartz"
+ echo " Quartz-image: $use_quartz_image"
+ echo " XCB: $use_xcb"
+ echo " Win32: $use_win32"
+ echo " OS2: $use_os2"
+ echo " PostScript: $use_ps"
+ echo " PDF: $use_pdf"
+ echo " SVG: $use_svg"
+ echo " glitz: $use_glitz"
+ echo " BeOS: $use_beos"
+ echo " DirectFB: $use_directfb"
+ echo ""
+ 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 " PNG functions: $use_png"
+ echo ""
+ echo "and the following debug options:"
+ echo " gcov support: $use_gcov"
+ echo " test surfaces: $use_test_surfaces"
+ echo " ps testing: $test_ps"
+ echo " pdf testing: $test_pdf"
+ echo " svg testing: $test_svg"
+ if test x"$use_win32" = "xyes"; then
+ echo " win32 printing testing: $test_win32_printing"
+ fi
+ echo ""
+ echo "using CFLAGS:"
+ echo $CAIRO_CFLAGS
+ 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"
+])
+
+
+dnl ===========================================================================
+dnl
+dnl All .pc files are generated automatically except for this one
+dnl
+AC_CONFIG_FILES([src/cairo.pc])
+
+
+dnl ===========================================================================
+dnl
+dnl pkg-config requires, non-pkgconfig cflags and libs, and total cflags and libs
+dnl
+
+dnl Accumulators
+CAIRO_REQUIRES=""
+CAIRO_NONPKGCONFIG_CFLAGS=""
+CAIRO_NONPKGCONFIG_LIBS="$LIBS"
+CAIRO_CFLAGS=$CAIRO_NONPKGCONFIG_CFLAGS
+CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
+
+dnl Substitute
+AC_SUBST(CAIRO_REQUIRES)
+AC_SUBST(CAIRO_NONPKGCONFIG_CFLAGS)
+AC_SUBST(CAIRO_NONPKGCONFIG_LIBS)
+AC_SUBST(CAIRO_CFLAGS)
+AC_SUBST(CAIRO_LIBS)
+
+
+dnl ===========================================================================
+dnl
+dnl Generate {src,boilerplate}/Makefile.{am,win32}.config
+dnl
+
+dnl Accumulators
+m4_pattern_allow(^CAIRO_CONFIG_AMAKE$)
+CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
+
+include $(top_srcdir)/src/Makefile.sources
+
+enabled_cairo_pkgconf = cairo.pc
+enabled_cairo_headers = $(cairo_headers)
+enabled_cairo_private = $(cairo_private)
+enabled_cairo_sources = $(cairo_sources)
+all_cairo_pkgconf =
+all_cairo_headers = $(cairo_headers)
+all_cairo_private = $(cairo_private)
+all_cairo_sources = $(cairo_sources)
+supported_cairo_headers = $(cairo_headers)
+unsupported_cairo_headers =
+'
+m4_pattern_allow(^CAIRO_CONFIG_WIN32$)
+CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE
+
+dnl Generate
+CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.am.config],
+ [echo "$CAIRO_CONFIG_AMAKE"],
+ [CAIRO_CONFIG_AMAKE='$CAIRO_CONFIG_AMAKE'])
+CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.win32.config],
+ [echo "$CAIRO_CONFIG_WIN32"],
+ [CAIRO_CONFIG_WIN32='$CAIRO_CONFIG_WIN32'])
+
+
+dnl ===========================================================================
+dnl
+dnl List of enabled, supported but disabled, and all supported features
+dnl
+
+dnl Accumulators
+m4_pattern_allow(^CAIRO_FEATURES$)
+CAIRO_FEATURES=""
+m4_pattern_allow(^CAIRO_NO_FEATURES$)
+CAIRO_NO_FEATURES=""
+m4_pattern_allow(^CAIRO_SUPPORTED_FEATURES$)
+CAIRO_SUPPORTED_FEATURES=""
+
+dnl Generate src/cairo-features.h and src/cairo-supported-features.h
+CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
+[
+ echo '/* Generated by configure. Do not edit. */'
+ echo '#ifndef CAIRO_FEATURES_H'
+ echo '#define CAIRO_FEATURES_H'
+ echo ''
+ for FEATURE in $CAIRO_FEATURES; do
+ echo "#define $FEATURE 1"
+ done | LANG=C sort
+ echo ''
+ for FEATURE in $CAIRO_NO_FEATURES; do
+ echo "/*#undef $FEATURE */"
+ done | LANG=C sort
+ echo ''
+ echo '#endif'
+],[
+ CAIRO_FEATURES='$CAIRO_FEATURES'
+ CAIRO_NO_FEATURES='$CAIRO_NO_FEATURES'
+])
+CAIRO_CONFIG_COMMANDS([$srcdir/src/cairo-supported-features.h],
+[
+ echo '/* Generated by configure. Do not edit. */'
+ echo '#ifndef CAIRO_SUPPORTED_FEATURES_H'
+ echo '#define CAIRO_SUPPORTED_FEATURES_H'
+ echo ''
+ echo '/* This is a dummy header, to trick gtk-doc only */'
+ echo ''
+ for FEATURE in $CAIRO_SUPPORTED_FEATURES; do
+ echo "#define $FEATURE 1"
+ done
+ echo ''
+ echo '#endif'
+],[
+ CAIRO_SUPPORTED_FEATURES='$CAIRO_SUPPORTED_FEATURES'
+])
+
diff --git a/build/configure.ac.system b/build/configure.ac.system
new file mode 100644
index 0000000..2102627
--- /dev/null
+++ b/build/configure.ac.system
@@ -0,0 +1,74 @@
+dnl
+dnl Non-failing checks for functions, headers, libraries, etc go here
+dnl
+
+dnl ====================================================================
+dnl Feature checks
+dnl ====================================================================
+
+AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = "xyes")
+CAIRO_BIGENDIAN
+CAIRO_CHECK_NATIVE_ATOMIC_PRIMITIVES
+CAIRO_CHECK_ATOMIC_OP_NEEDS_MEMORY_BARRIER
+
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+ *-*-mingw*)
+ cairo_os_win32=yes
+ ;;
+ *)
+ cairo_os_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$cairo_os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$cairo_os_win32" = "yes")
+
+AC_MSG_CHECKING([for Sun Solaris (non-POSIX ctime_r)])
+case "$host" in
+ *-*-solaris*)
+ CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+ solaris_posix_pthread=yes
+ ;;
+ *)
+ solaris_posix_pthread=no
+ ;;
+esac
+AC_MSG_RESULT([$solaris_posix_pthread])
+
+dnl ====================================================================
+dnl Library checks
+dnl ====================================================================
+
+AC_CHECK_LIBM
+LIBS="$LIBS $LIBM"
+
+AC_CHECK_LIB(rt, sched_yield, [RT_LIBS=-lrt], [RT_LIBS=])
+CAIROPERF_LIBS=$RT_LIBS
+AC_SUBST(CAIROPERF_LIBS)
+
+dnl ====================================================================
+dnl Header/function checks
+dnl ====================================================================
+
+dnl Checks for precise integer types
+AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h])
+AC_CHECK_TYPES([uint64_t, uint128_t])
+
+dnl Check for socket support for any2ppm daemon
+AC_CHECK_HEADERS([fcntl.h unistd.h signal.h sys/stat.h sys/socket.h sys/poll.h sys/un.h])
+
+dnl check for CPU affinity support
+AC_CHECK_HEADERS([sched.h],
+ [AC_CHECK_FUNCS([sched_getaffinity])])
+
+dnl check for GNU-extensions to fenv
+AC_CHECK_HEADER(fenv.h,
+ [AC_CHECK_FUNCS(feenableexcept fedisableexcept)])
+
+dnl check for misc headers and functions
+AC_CHECK_HEADERS([libgen.h byteswap.h signal.h setjmp.h])
+AC_CHECK_FUNCS([vasnprintf link ctime_r drand48 flockfile])
+
+dnl check for win32 headers (this detects mingw as well)
+AC_CHECK_HEADERS([windows.h], have_windows=yes, have_windows=no)
+
diff --git a/build/configure.ac.tools b/build/configure.ac.tools
new file mode 100644
index 0000000..7f13525
--- /dev/null
+++ b/build/configure.ac.tools
@@ -0,0 +1,28 @@
+
+AC_PATH_PROG(FIND, find)
+AC_PATH_PROG(XARGS, xargs)
+
+GTK_DOC_CHECK([1.6])
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX dnl required for BeOS (and cannot be a conditional dependency)
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE!
+AC_C_INLINE
+
+dnl ===========================================================================
+
+PKG_PROG_PKG_CONFIG()
+if test "x$PKG_CONFIG" = x; then
+ AC_MSG_ERROR([pkg-config >= $PKGCONFIG_REQUIRED required but not found (http://pkgconfig.freedesktop.org/)])
+fi
+
+dnl Check for recent pkg-config which supports Requires.private
+case `$PKG_CONFIG --version` in
+[0.?|0.?.?|0.1[0-7]|0.1[0-7].?]) PKGCONFIG_REQUIRES="Requires"; ;;
+*) PKGCONFIG_REQUIRES="Requires.private"; ;;
+esac
+
+AC_SUBST(PKGCONFIG_REQUIRES)
+
diff --git a/build/configure.ac.version b/build/configure.ac.version
new file mode 100644
index 0000000..0d8805c
--- /dev/null
+++ b/build/configure.ac.version
@@ -0,0 +1,43 @@
+dnl
+dnl Version stuff
+dnl
+
+dnl This macro expands to one of 'git', 'snapshot', or 'release'
+m4_define([cairo_release_status],
+ [m4_if(m4_eval(cairo_version_micro % 2), [1], [git],
+ [m4_if(m4_eval(cairo_version_minor % 2), [1], [snapshot],
+ [release])])])
+
+dnl This is the .so/dll number. 2 for cairo-1.x.x
+m4_define(cairo_version_sonum, m4_eval(cairo_version_major + 1))
+
+dnl The libtool shared library version stuff
+m4_define(cairo_version,
+ m4_eval(cairo_version_major*10000 + cairo_version_minor*100 + cairo_version_micro))
+m4_if(m4_eval(cairo_version_minor % 2), [1],
+ [
+ dnl for unstable releases
+ m4_define(cairo_libtool_revision, 0)
+ ],
+ [
+ dnl for stable releases
+ m4_define(cairo_libtool_revision, cairo_version_micro)
+ ])
+m4_define(cairo_libtool_current,
+ m4_eval(cairo_version_sonum + cairo_version - cairo_libtool_revision))
+m4_define(cairo_libtool_age,
+ m4_eval(cairo_libtool_current - cairo_version_sonum))
+
+CAIRO_VERSION_MAJOR=cairo_version_major
+CAIRO_VERSION_MINOR=cairo_version_minor
+CAIRO_VERSION_MICRO=cairo_version_micro
+CAIRO_VERSION_SONUM=cairo_version_sonum
+CAIRO_RELEASE_STATUS=cairo_release_status
+CAIRO_LIBTOOL_VERSION_INFO=cairo_libtool_current:cairo_libtool_revision:cairo_libtool_age
+AC_SUBST(CAIRO_VERSION_MAJOR)
+AC_SUBST(CAIRO_VERSION_MINOR)
+AC_SUBST(CAIRO_VERSION_MICRO)
+AC_SUBST(CAIRO_VERSION_SONUM)
+AC_SUBST(CAIRO_RELEASE_STATUS)
+AC_SUBST(CAIRO_LIBTOOL_VERSION_INFO)
+
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
new file mode 100644
index 0000000..27b790d
--- /dev/null
+++ b/build/configure.ac.warnings
@@ -0,0 +1,65 @@
+dnl Use lots of warning flags with with gcc and compatible compilers
+
+dnl Note: if you change the following variable, the cache is automatically
+dnl skipped and all flags rechecked. So there's no need to do anything
+dnl else. If for any reason you need to force a recheck, just change
+dnl MAYBE_WARN in an ignorable way (like adding whitespace)
+
+MAYBE_WARN="-Wall -Wextra \
+-Wsign-compare -Werror-implicit-function-declaration \
+-Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
+-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
+-Wpacked -Wswitch-enum -Wmissing-format-attribute \
+-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
+-Wdeclaration-after-statement -Wold-style-definition \
+-Wno-missing-field-initializers -Wno-unused-parameter \
+-Wno-attributes -Wno-long-long -Winline"
+
+dnl We also abuse the warning-flag facility to enable other compiler
+dnl options. Namely, the following:
+MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing"
+
+# invalidate cached value if MAYBE_WARN has changed
+if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then
+ unset cairo_cv_warn_cflags
+fi
+AC_CACHE_CHECK([for supported warning flags], cairo_cv_warn_cflags, [
+ echo
+ WARN_CFLAGS=""
+
+ # Some warning options are not supported by all versions of
+ # gcc, so test all desired options against the current
+ # compiler.
+ #
+ # Note that there are some order dependencies
+ # here. Specifically, an option that disables a warning will
+ # have no net effect if a later option then enables that
+ # warnings, (perhaps implicitly). So we put some grouped
+ # options (-Wall and -Wextra) up front and the -Wno options
+ # last.
+
+ for W in $MAYBE_WARN; do
+ CAIRO_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
+ done
+
+ cairo_cv_warn_cflags=$WARN_CFLAGS
+ cairo_cv_warn_maybe=$MAYBE_WARN
+
+ AC_MSG_CHECKING([which warning flags were supported])
+])
+WARN_CFLAGS="$cairo_cv_warn_cflags"
+CAIRO_CFLAGS="$CAIRO_CFLAGS $WARN_CFLAGS"
+
+# We only wish to enable attribute(warn_unused_result) if we can prevent
+# gcc from generating thousands of warnings about the misapplication of the
+# attribute to void functions and variables.
+AC_CACHE_CHECK([how to enable unused result warnings], cairo_cv_warn_unused_result, [
+ cairo_cv_warn_unused_result=""
+ if echo $WARN_CFLAGS | grep -e '-Wno-attributes' >/dev/null; then
+ AC_TRY_COMPILE([__attribute__((__warn_unused_result__))
+ int f (int i) { return i; }], [],
+ [cairo_cv_warn_unused_result="__attribute__((__warn_unused_result__))"])
+ fi
+])
+AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result],
+ [Define to the value your compiler uses to support the warn-unused-result attribute])
diff --git a/build/enable.ac b/build/enable.ac
deleted file mode 100644
index 062ac7a..0000000
--- a/build/enable.ac
+++ /dev/null
@@ -1,428 +0,0 @@
-dnl
-dnl These are the facilities for enable/disabling various backends/features,
-dnl and for collecting CFLAGS/LIBS and generating per backend/feature .pc
-dnl files, assembling list of source files to compile, and creating
-dnl cairo-features.h and other generated files.
-dnl
-
-dnl ===========================================================================
-dnl
-dnl cairo_cache_version should be increased every time that the backend
-dnl detection stuff changes in a way that removing the config.cache file may be
-dnl needed for correct operation. (this is only for the backend detection
-dnl changes; it doesn't have any effect on any other cached thing.)
-dnl
-m4_define(cairo_cache_version, 4)
-
-dnl ===========================================================================
-dnl
-dnl Define a macro to enable features
-dnl - Macro: _CAIRO_ENABLE_FULL (NAMESPACE, NAME, ARG, FEATURE_NAME, DEFAULT, WHAT, COMMANDS)
-dnl
-dnl where:
-dnl
-dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
-dnl NAME is the human-readable name of the backend, eg. "FreeType font"
-dnl ARG is what enables the backend, eg. "freetype" for --enable-freetype
-dnl FEATURE_NAME is the feature conditional, eg. CAIRO_HAS_FT_FONT
-dnl WHAT is the type of feature:
-dnl "surface" for surface backends
-dnl "font" for font backends
-dnl "functions" for set of functions
-dnl "" for private configurations
-dnl DEFAULT is the default state of the backend:
-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 COMMANDS are run to check whether the backend can be enabled. Their
-dnl result may be cached, so user should not count on them being run.
-dnl They should set use_$(NAMESPACE) to something other than yes if the
-dnl backend cannot be built, eg. "no (requires SomeThing)". It then
-dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
-dnl appropriately. Look at the macro definition for more details,
-dnl or ask if in doubt.
-dnl
-AC_DEFUN([_CAIRO_ENABLE_FULL],
-[ AC_ARG_ENABLE([$3],
- AS_HELP_STRING([--enable-$3=@<:@no/auto/yes@:>@],
- [Enable cairo's $2 backend @<:@default=$6@:>@]),
- enable_$1=$enableval, enable_$1=$6)
- case $enable_$1 in
- no)
- use_$1="no (disabled, use --enable-$3 to enable)"
- ;;
- yes|auto)
- if test "x$cairo_cv_backend_[]$1[]_cache_version" != "x[]cairo_cache_version"; then
- # cached results for this backend (if any) are stale. force rechecking.
- unset cairo_cv_backend_[]$1[]_use
- fi
- AC_CACHE_CHECK([for cairo's $2 backend], cairo_cv_backend_[]$1[]_use,
- [
- echo
- use_[]$1=yes
- $1[]_REQUIRES=$ac_env_[]$1[]_REQUIRES_value
- $1[]_CFLAGS=$ac_env_[]$1[]_CFLAGS_value
- $1[]_LIBS=$ac_env_[]$1[]_LIBS_value
- $1[]_NONPKGCONFIG_CFLAGS=$ac_env_[]$1[]_NONPKGCONFIG_CFLAGS_value
- $1[]_NONPKGCONFIG_LIBS=$ac_env_[]$1[]_NONPKGCONFIG_LIBS_value
- $1[]_BASE=cairo
- $7
- cairo_cv_backend_[]$1[]_use=$use_[]$1
- cairo_cv_backend_[]$1[]_cache_version=cairo_cache_version
- cairo_cv_backend_[]$1[]_requires=$[]$1[]_REQUIRES
- cairo_cv_backend_[]$1[]_cflags=$[]$1[]_CFLAGS
- cairo_cv_backend_[]$1[]_libs=$[]$1[]_LIBS
- cairo_cv_backend_[]$1[]_nonpkgconfig_cflags=$[]$1[]_NONPKGCONFIG_CFLAGS
- cairo_cv_backend_[]$1[]_nonpkgconfig_libs=$[]$1[]_NONPKGCONFIG_LIBS
- cairo_cv_backend_[]$1[]_base=$[]$1[]_BASE
- AC_MSG_CHECKING([whether cairo's $2 backend could be enabled])
- ])
-
- use_[]$1=$cairo_cv_backend_[]$1[]_use
- $1[]_BASE=$cairo_cv_backend_[]$1[]_base
-
- $1[]_REQUIRES="$cairo_cv_backend_[]$1[]_requires "
- $1[]_CFLAGS="$cairo_cv_backend_[]$1[]_cflags "
- $1[]_LIBS="$cairo_cv_backend_[]$1[]_libs "
- $1[]_NONPKGCONFIG_CFLAGS="$cairo_cv_backend_[]$1[]_nonpkgconfig_cflags "
- $1[]_NONPKGCONFIG_LIBS="$cairo_cv_backend_[]$1[]_nonpkgconfig_libs "
-
- # null the ones that only have space
- test "x$$1[]_REQUIRES" = "x " && $1[]_REQUIRES=""
- test "x$$1[]_CFLAGS" = "x " && $1[]_CFLAGS=""
- test "x$$1[]_LIBS" = "x " && $1[]_LIBS=""
- test "x$$1[]_NONPKGCONFIG_CFLAGS" = "x " && $1[]_NONPKGCONFIG_CFLAGS=""
- test "x$$1[]_NONPKGCONFIG_LIBS" = "x " && $1[]_NONPKGCONFIG_LIBS=""
-
- AS_IF([test "x$enable_$1" = "xyes" -a "x$use_$1" != xyes],
- [
- AC_MSG_ERROR([requested $2 backend could not be enabled])
- ])
- ;;
- *)
- AC_MSG_ERROR([invalid argument passed to --enable-$3: $use_$1, should be one of @<:@no/auto/yes@:>@])
- ;;
- esac
-
- if test "x$use_$1" = xyes; then
- CAIRO_FEATURES="$4 $CAIRO_FEATURES"
- CAIRO_REQUIRES="$$1_REQUIRES$CAIRO_REQUIRES"
- CAIRO_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$$1_CFLAGS$CAIRO_CFLAGS"
- CAIRO_LIBS="$$1_NONPKGCONFIG_LIBS$$1_LIBS$CAIRO_LIBS"
- CAIRO_NONPKGCONFIG_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$CAIRO_NONPKGCONFIG_CFLAGS"
- CAIRO_NONPKGCONFIG_LIBS="$$1_NONPKGCONFIG_LIBS$CAIRO_NONPKGCONFIG_LIBS"
- m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
- AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
- [
- $SED -i -e "
- s, at backend_name@,$1,g;
- s, at Backend_Name@,$2,g;
- s, at BACKEND_BASE@,$$1_BASE,g;
- s, at BACKEND_REQUIRES@,$$1_REQUIRES,g;
- s%@BACKEND_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g;
- s, at BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g;
- " "]cairo_backend_pc()[" ||
- AC_MSG_ERROR(failed to update ]cairo_backend_pc()[)
- ],[
- SED='$SED'
- $1_BASE='$$1_BASE'
- $1_REQUIRES='$$1_REQUIRES'
- $1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
- $1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
- ])
- fi
-
- AM_CONDITIONAL($4, test "x$use_$1" = xyes)
-
- dnl Collect list of all supported but disabled features
- AS_IF([test "x$use_$1" != xyes -a "x$6" != xno],
- [
- CAIRO_NO_FEATURES="$4 $CAIRO_NO_FEATURES"
- ])
-
- dnl Collect list of all (un)supported features and cairo headers
- AS_IF([test "x$6" = xno],
- [
- CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
-unsupported_cairo_headers += $(cairo_$1_headers)'
- CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
-unsupported_cairo_headers += $(cairo_$1_headers)'
- ],[
- CAIRO_SUPPORTED_FEATURES="$4 $CAIRO_SUPPORTED_FEATURES"
- CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
-supported_cairo_headers += $(cairo_$1_headers)'
- CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
-supported_cairo_headers += $(cairo_$1_headers)'
- ])
-
- dnl Collect list of all/enabled cairo source files
- CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
-all_cairo_pkgconf += $(cairo_$1_pkgconf)
-all_cairo_headers += $(cairo_$1_headers)
-all_cairo_private += $(cairo_$1_private)
-all_cairo_sources += $(cairo_$1_sources)
-if $4
-enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
-enabled_cairo_headers += $(cairo_$1_headers)
-enabled_cairo_private += $(cairo_$1_private)
-enabled_cairo_sources += $(cairo_$1_sources)
-endif
-'
- CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
-all_cairo_pkgconf += $(cairo_$1_pkgconf)
-all_cairo_headers += $(cairo_$1_headers)
-all_cairo_private += $(cairo_$1_private)
-all_cairo_sources += $(cairo_$1_sources)
-ifeq ($($4),1)
-enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
-enabled_cairo_headers += $(cairo_$1_headers)
-enabled_cairo_private += $(cairo_$1_private)
-enabled_cairo_sources += $(cairo_$1_sources)
-endif
-'
- dnl Collect warning message for enabled unsupported backends
- AS_IF([test "x$use_$1" = xyes -a "x$6" = xno],
- [
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
-*** The $2 backend 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 $2-backend specific API.
-"
- ])
-
- dnl Collect warning message for disabled recommended backends
- AS_IF([test "x$use_$1" != xyes -a "x$6" = xyes],
- [
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
-*** It is strictly recommended that you do NOT disable
-*** the $2 backend.
-"
- ])
-])
-
-m4_pattern_allow(^CAIRO_HAS_)
-m4_define([_CAIRO_BUILD_FEATURE_NAME_NORMALIZED],
- [CAIRO_HAS_[$1]m4_bmatch([$1],[$2$],,[$2])])
-
-m4_define([_CAIRO_BUILD_FEATURE_NAME],
-[_CAIRO_BUILD_FEATURE_NAME_NORMALIZED(m4_translit([$1],[a-z_ -],[A-Z___]),m4_translit(m4_ifval([$2],[ $2]),[a-z_ -],[A-Z___]))])
-
-dnl Like _CAIRO_ENABLE*, but takes an object type too
-AC_DEFUN([_CAIRO_ENABLE],
-[_CAIRO_ENABLE_FULL(
- m4_translit([$1],[A-Z_ -],[a-z___]),
- [$2],
- m4_translit([$1],[A-Z_ -],[a-z---]),
- _CAIRO_BUILD_FEATURE_NAME([$1],[$3]),
- [$3],
- [$4],
- [$5]
-)])
-
-dnl ===========================================================================
-dnl
-dnl Define macros to enable various features.
-dnl - Macro: CAIRO_ENABLE_* (NAMESPACE, NAME, DEFAULT, COMMANDS)
-dnl
-dnl where:
-dnl
-dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
-dnl NAME is the human-readable name of the feature, eg. "FreeType"
-dnl DEFAULT is the default state of the backend:
-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 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_$(NAMESPACE) to something other than yes if the
-dnl backend cannot be built, eg. "no (requires SomeThing)". It then
-dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
-dnl appropriately. Look at the macro definition for more details,
-dnl or ask if in doubt.
-dnl
-AC_DEFUN([CAIRO_ENABLE],
-[_CAIRO_ENABLE([$1],[$2],,[$3],[$4])])
-AC_DEFUN([CAIRO_ENABLE_SURFACE_BACKEND],
-[_CAIRO_ENABLE([$1],[$2 surface backend],surface,[$3],[$4])])
-AC_DEFUN([CAIRO_ENABLE_FONT_BACKEND],
-[_CAIRO_ENABLE([$1],[$2 font backend],font,[$3],[$4])])
-AC_DEFUN([CAIRO_ENABLE_FUNCTIONS],
-[_CAIRO_ENABLE([$1],[$2 functions],functions,[$3],[$4])])
-
-dnl ===========================================================================
-dnl
-dnl Report
-dnl
-
-dnl Accumulator for warning messages
-m4_pattern_allow(^CAIRO_WARNING_MESSAGE$)
-CAIRO_WARNING_MESSAGE=""
-
-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 " Image: yes (always builtin)"
- echo " Xlib: $use_xlib"
- echo " Xlib Xrender: $use_xlib_xrender"
- echo " Quartz: $use_quartz"
- echo " Quartz-image: $use_quartz_image"
- echo " XCB: $use_xcb"
- echo " Win32: $use_win32"
- echo " OS2: $use_os2"
- echo " PostScript: $use_ps"
- echo " PDF: $use_pdf"
- echo " SVG: $use_svg"
- echo " glitz: $use_glitz"
- echo " BeOS: $use_beos"
- echo " DirectFB: $use_directfb"
- echo ""
- 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 " PNG functions: $use_png"
- echo ""
- echo "and the following debug options:"
- echo " gcov support: $use_gcov"
- echo " test surfaces: $use_test_surfaces"
- echo " ps testing: $test_ps"
- echo " pdf testing: $test_pdf"
- echo " svg testing: $test_svg"
- if test x"$use_win32" = "xyes"; then
- echo " win32 printing testing: $test_win32_printing"
- fi
- echo ""
- echo "using CFLAGS:"
- echo $CAIRO_CFLAGS
- 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"
-])
-
-
-dnl ===========================================================================
-dnl
-dnl All .pc files are generated automatically except for this one
-dnl
-AC_CONFIG_FILES([src/cairo.pc])
-
-
-dnl ===========================================================================
-dnl
-dnl pkg-config requires, non-pkgconfig cflags and libs, and total cflags and libs
-dnl
-
-dnl Accumulators
-CAIRO_REQUIRES=""
-CAIRO_NONPKGCONFIG_CFLAGS=""
-CAIRO_NONPKGCONFIG_LIBS="$LIBS"
-CAIRO_CFLAGS=$CAIRO_NONPKGCONFIG_CFLAGS
-CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
-
-dnl Substitute
-AC_SUBST(CAIRO_REQUIRES)
-AC_SUBST(CAIRO_NONPKGCONFIG_CFLAGS)
-AC_SUBST(CAIRO_NONPKGCONFIG_LIBS)
-AC_SUBST(CAIRO_CFLAGS)
-AC_SUBST(CAIRO_LIBS)
-
-
-dnl ===========================================================================
-dnl
-dnl Generate {src,boilerplate}/Makefile.{am,win32}.config
-dnl
-
-dnl Accumulators
-m4_pattern_allow(^CAIRO_CONFIG_AMAKE$)
-CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
-
-include $(top_srcdir)/src/Makefile.sources
-
-enabled_cairo_pkgconf = cairo.pc
-enabled_cairo_headers = $(cairo_headers)
-enabled_cairo_private = $(cairo_private)
-enabled_cairo_sources = $(cairo_sources)
-all_cairo_pkgconf =
-all_cairo_headers = $(cairo_headers)
-all_cairo_private = $(cairo_private)
-all_cairo_sources = $(cairo_sources)
-supported_cairo_headers = $(cairo_headers)
-unsupported_cairo_headers =
-'
-m4_pattern_allow(^CAIRO_CONFIG_WIN32$)
-CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE
-
-dnl Generate
-CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.am.config],
- [echo "$CAIRO_CONFIG_AMAKE"],
- [CAIRO_CONFIG_AMAKE='$CAIRO_CONFIG_AMAKE'])
-CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.win32.config],
- [echo "$CAIRO_CONFIG_WIN32"],
- [CAIRO_CONFIG_WIN32='$CAIRO_CONFIG_WIN32'])
-
-
-dnl ===========================================================================
-dnl
-dnl List of enabled, supported but disabled, and all supported features
-dnl
-
-dnl Accumulators
-m4_pattern_allow(^CAIRO_FEATURES$)
-CAIRO_FEATURES=""
-m4_pattern_allow(^CAIRO_NO_FEATURES$)
-CAIRO_NO_FEATURES=""
-m4_pattern_allow(^CAIRO_SUPPORTED_FEATURES$)
-CAIRO_SUPPORTED_FEATURES=""
-
-dnl Generate src/cairo-features.h and src/cairo-supported-features.h
-CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
-[
- echo '/* Generated by configure. Do not edit. */'
- echo '#ifndef CAIRO_FEATURES_H'
- echo '#define CAIRO_FEATURES_H'
- echo ''
- for FEATURE in $CAIRO_FEATURES; do
- echo "#define $FEATURE 1"
- done | LANG=C sort
- echo ''
- for FEATURE in $CAIRO_NO_FEATURES; do
- echo "/*#undef $FEATURE */"
- done | LANG=C sort
- echo ''
- echo '#endif'
-],[
- CAIRO_FEATURES='$CAIRO_FEATURES'
- CAIRO_NO_FEATURES='$CAIRO_NO_FEATURES'
-])
-CAIRO_CONFIG_COMMANDS([$srcdir/src/cairo-supported-features.h],
-[
- echo '/* Generated by configure. Do not edit. */'
- echo '#ifndef CAIRO_SUPPORTED_FEATURES_H'
- echo '#define CAIRO_SUPPORTED_FEATURES_H'
- echo ''
- echo '/* This is a dummy header, to trick gtk-doc only */'
- echo ''
- for FEATURE in $CAIRO_SUPPORTED_FEATURES; do
- echo "#define $FEATURE 1"
- done
- echo ''
- echo '#endif'
-],[
- CAIRO_SUPPORTED_FEATURES='$CAIRO_SUPPORTED_FEATURES'
-])
-
diff --git a/build/system.ac b/build/system.ac
deleted file mode 100644
index 2102627..0000000
--- a/build/system.ac
+++ /dev/null
@@ -1,74 +0,0 @@
-dnl
-dnl Non-failing checks for functions, headers, libraries, etc go here
-dnl
-
-dnl ====================================================================
-dnl Feature checks
-dnl ====================================================================
-
-AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = "xyes")
-CAIRO_BIGENDIAN
-CAIRO_CHECK_NATIVE_ATOMIC_PRIMITIVES
-CAIRO_CHECK_ATOMIC_OP_NEEDS_MEMORY_BARRIER
-
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
- *-*-mingw*)
- cairo_os_win32=yes
- ;;
- *)
- cairo_os_win32=no
- ;;
-esac
-AC_MSG_RESULT([$cairo_os_win32])
-AM_CONDITIONAL(OS_WIN32, test "$cairo_os_win32" = "yes")
-
-AC_MSG_CHECKING([for Sun Solaris (non-POSIX ctime_r)])
-case "$host" in
- *-*-solaris*)
- CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
- solaris_posix_pthread=yes
- ;;
- *)
- solaris_posix_pthread=no
- ;;
-esac
-AC_MSG_RESULT([$solaris_posix_pthread])
-
-dnl ====================================================================
-dnl Library checks
-dnl ====================================================================
-
-AC_CHECK_LIBM
-LIBS="$LIBS $LIBM"
-
-AC_CHECK_LIB(rt, sched_yield, [RT_LIBS=-lrt], [RT_LIBS=])
-CAIROPERF_LIBS=$RT_LIBS
-AC_SUBST(CAIROPERF_LIBS)
-
-dnl ====================================================================
-dnl Header/function checks
-dnl ====================================================================
-
-dnl Checks for precise integer types
-AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h])
-AC_CHECK_TYPES([uint64_t, uint128_t])
-
-dnl Check for socket support for any2ppm daemon
-AC_CHECK_HEADERS([fcntl.h unistd.h signal.h sys/stat.h sys/socket.h sys/poll.h sys/un.h])
-
-dnl check for CPU affinity support
-AC_CHECK_HEADERS([sched.h],
- [AC_CHECK_FUNCS([sched_getaffinity])])
-
-dnl check for GNU-extensions to fenv
-AC_CHECK_HEADER(fenv.h,
- [AC_CHECK_FUNCS(feenableexcept fedisableexcept)])
-
-dnl check for misc headers and functions
-AC_CHECK_HEADERS([libgen.h byteswap.h signal.h setjmp.h])
-AC_CHECK_FUNCS([vasnprintf link ctime_r drand48 flockfile])
-
-dnl check for win32 headers (this detects mingw as well)
-AC_CHECK_HEADERS([windows.h], have_windows=yes, have_windows=no)
-
diff --git a/build/tools.ac b/build/tools.ac
deleted file mode 100644
index 7f13525..0000000
--- a/build/tools.ac
+++ /dev/null
@@ -1,28 +0,0 @@
-
-AC_PATH_PROG(FIND, find)
-AC_PATH_PROG(XARGS, xargs)
-
-GTK_DOC_CHECK([1.6])
-
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CXX dnl required for BeOS (and cannot be a conditional dependency)
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE!
-AC_C_INLINE
-
-dnl ===========================================================================
-
-PKG_PROG_PKG_CONFIG()
-if test "x$PKG_CONFIG" = x; then
- AC_MSG_ERROR([pkg-config >= $PKGCONFIG_REQUIRED required but not found (http://pkgconfig.freedesktop.org/)])
-fi
-
-dnl Check for recent pkg-config which supports Requires.private
-case `$PKG_CONFIG --version` in
-[0.?|0.?.?|0.1[0-7]|0.1[0-7].?]) PKGCONFIG_REQUIRES="Requires"; ;;
-*) PKGCONFIG_REQUIRES="Requires.private"; ;;
-esac
-
-AC_SUBST(PKGCONFIG_REQUIRES)
-
diff --git a/build/version.ac b/build/version.ac
deleted file mode 100644
index 0d8805c..0000000
--- a/build/version.ac
+++ /dev/null
@@ -1,43 +0,0 @@
-dnl
-dnl Version stuff
-dnl
-
-dnl This macro expands to one of 'git', 'snapshot', or 'release'
-m4_define([cairo_release_status],
- [m4_if(m4_eval(cairo_version_micro % 2), [1], [git],
- [m4_if(m4_eval(cairo_version_minor % 2), [1], [snapshot],
- [release])])])
-
-dnl This is the .so/dll number. 2 for cairo-1.x.x
-m4_define(cairo_version_sonum, m4_eval(cairo_version_major + 1))
-
-dnl The libtool shared library version stuff
-m4_define(cairo_version,
- m4_eval(cairo_version_major*10000 + cairo_version_minor*100 + cairo_version_micro))
-m4_if(m4_eval(cairo_version_minor % 2), [1],
- [
- dnl for unstable releases
- m4_define(cairo_libtool_revision, 0)
- ],
- [
- dnl for stable releases
- m4_define(cairo_libtool_revision, cairo_version_micro)
- ])
-m4_define(cairo_libtool_current,
- m4_eval(cairo_version_sonum + cairo_version - cairo_libtool_revision))
-m4_define(cairo_libtool_age,
- m4_eval(cairo_libtool_current - cairo_version_sonum))
-
-CAIRO_VERSION_MAJOR=cairo_version_major
-CAIRO_VERSION_MINOR=cairo_version_minor
-CAIRO_VERSION_MICRO=cairo_version_micro
-CAIRO_VERSION_SONUM=cairo_version_sonum
-CAIRO_RELEASE_STATUS=cairo_release_status
-CAIRO_LIBTOOL_VERSION_INFO=cairo_libtool_current:cairo_libtool_revision:cairo_libtool_age
-AC_SUBST(CAIRO_VERSION_MAJOR)
-AC_SUBST(CAIRO_VERSION_MINOR)
-AC_SUBST(CAIRO_VERSION_MICRO)
-AC_SUBST(CAIRO_VERSION_SONUM)
-AC_SUBST(CAIRO_RELEASE_STATUS)
-AC_SUBST(CAIRO_LIBTOOL_VERSION_INFO)
-
diff --git a/build/warnings.ac b/build/warnings.ac
deleted file mode 100644
index 27b790d..0000000
--- a/build/warnings.ac
+++ /dev/null
@@ -1,65 +0,0 @@
-dnl Use lots of warning flags with with gcc and compatible compilers
-
-dnl Note: if you change the following variable, the cache is automatically
-dnl skipped and all flags rechecked. So there's no need to do anything
-dnl else. If for any reason you need to force a recheck, just change
-dnl MAYBE_WARN in an ignorable way (like adding whitespace)
-
-MAYBE_WARN="-Wall -Wextra \
--Wsign-compare -Werror-implicit-function-declaration \
--Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
--Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
--Wpacked -Wswitch-enum -Wmissing-format-attribute \
--Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
--Wdeclaration-after-statement -Wold-style-definition \
--Wno-missing-field-initializers -Wno-unused-parameter \
--Wno-attributes -Wno-long-long -Winline"
-
-dnl We also abuse the warning-flag facility to enable other compiler
-dnl options. Namely, the following:
-MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing"
-
-# invalidate cached value if MAYBE_WARN has changed
-if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then
- unset cairo_cv_warn_cflags
-fi
-AC_CACHE_CHECK([for supported warning flags], cairo_cv_warn_cflags, [
- echo
- WARN_CFLAGS=""
-
- # Some warning options are not supported by all versions of
- # gcc, so test all desired options against the current
- # compiler.
- #
- # Note that there are some order dependencies
- # here. Specifically, an option that disables a warning will
- # have no net effect if a later option then enables that
- # warnings, (perhaps implicitly). So we put some grouped
- # options (-Wall and -Wextra) up front and the -Wno options
- # last.
-
- for W in $MAYBE_WARN; do
- CAIRO_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
- done
-
- cairo_cv_warn_cflags=$WARN_CFLAGS
- cairo_cv_warn_maybe=$MAYBE_WARN
-
- AC_MSG_CHECKING([which warning flags were supported])
-])
-WARN_CFLAGS="$cairo_cv_warn_cflags"
-CAIRO_CFLAGS="$CAIRO_CFLAGS $WARN_CFLAGS"
-
-# We only wish to enable attribute(warn_unused_result) if we can prevent
-# gcc from generating thousands of warnings about the misapplication of the
-# attribute to void functions and variables.
-AC_CACHE_CHECK([how to enable unused result warnings], cairo_cv_warn_unused_result, [
- cairo_cv_warn_unused_result=""
- if echo $WARN_CFLAGS | grep -e '-Wno-attributes' >/dev/null; then
- AC_TRY_COMPILE([__attribute__((__warn_unused_result__))
- int f (int i) { return i; }], [],
- [cairo_cv_warn_unused_result="__attribute__((__warn_unused_result__))"])
- fi
-])
-AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result],
- [Define to the value your compiler uses to support the warn-unused-result attribute])
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..08fd0d1
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,482 @@
+AC_PREREQ(2.58)
+CAIRO_PARSE_VERSION
+AC_INIT([cairo],
+ cairo_version_major.cairo_version_minor.cairo_version_micro,
+ [http://bugs.freedesktop.org/enter_bug.cgi?product=cairo])
+AC_CONFIG_SRCDIR(src/cairo.h)
+AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_AUX_DIR(build)
+AM_INIT_AUTOMAKE([1.8])
+
+dnl ===========================================================================
+dnl
+dnl The order of the includes here is rather important
+dnl
+m4_include(build/configure.ac.version) dnl macros setting up various version declares
+m4_include(build/configure.ac.tools) dnl checks for tools we use
+m4_include(build/configure.ac.system) dnl checks for system functions, headers, libs
+m4_include(build/configure.ac.enable) dnl macros for backend/feature enablement
+m4_include(build/configure.ac.warnings) dnl checks for compiler warning
+m4_include(build/configure.ac.analysis) dnl checks for analysis tools (lcov, etc)
+AC_CACHE_SAVE
+
+dnl ===========================================================================
+
+AC_CHECK_LIB(z, compress,
+ [AC_CHECK_HEADER(zlib.h, [have_libz=yes],
+ [have_libz="no (requires zlib http://www.gzip.org/zlib/)"])],
+ [have_libz="no (requires zlib http://www.gzip.org/zlib/)"])
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
+ xlib_REQUIRES="x11"
+ PKG_CHECK_MODULES(xlib, $xlib_REQUIRES, ,
+ [AC_MSG_RESULT(no)
+ xlib_REQUIRES=""
+ AC_PATH_XTRA
+ if test "x$no_x" = xyes; then
+ use_xlib="no (requires X development libraries)"
+ else
+ xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
+ fi])
+])
+
+CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
+ if test "x$use_xlib" != "xyes"; then
+ use_xlib_xrender="no (requires --enable-xlib)"
+ else
+ dnl Check for Xrender header files if the Xrender package is not installed:
+ xlib_xrender_BASE=cairo-xlib
+ xlib_xrender_REQUIRES="xrender >= 0.6"
+ PKG_CHECK_MODULES(xlib_xrender, $xlib_xrender_REQUIRES, ,
+ [AC_MSG_RESULT(no)
+ xlib_xrender_REQUIRES=""
+ old_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS"
+ AC_CHECK_HEADER(X11/extensions/Xrender.h,
+ [xlib_xrender_NONPKGCONFIG_LIBS="-lXrender"],
+ [use_xlib_xrender="no (requires Xrender http://freedesktop.org/Software/xlibs)"])
+ CPPFLAGS=$old_CPPFLAGS
+ ])
+ fi
+])
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, no, [
+ xcb_REQUIRES="xcb >= 0.9.92 xcb-render >= 0.9.92 xcb-renderutil"
+ PKG_CHECK_MODULES(xcb, $xcb_REQUIRES, , [AC_MSG_RESULT(no)
+ use_xcb="no (requires XCB http://xcb.freedesktop.org)"])
+])
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(quartz, Quartz, auto, [
+ dnl There is no pkgconfig for quartz; lets do a header check
+ AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, , [use_quartz="no (ApplicationServices framework not found)"])
+ if test "x$use_quartz" != "xyes" ; then
+ dnl check for CoreGraphics as a separate framework
+ AC_CHECK_HEADER(CoreGraphics/CoreGraphics.h, , [use_quartz="no (CoreGraphics framework not found)"])
+ quartz_LIBS="-Xlinker -framework -Xlinker CoreGraphics"
+ else
+ quartz_LIBS="-Xlinker -framework -Xlinker ApplicationServices"
+ fi
+])
+
+CAIRO_ENABLE_FONT_BACKEND(quartz_font, Quartz, auto, [
+ use_quartz_font=$use_quartz
+])
+
+CAIRO_ENABLE_SURFACE_BACKEND(quartz_image, Quartz Image, no, [
+ use_quartz_image=$use_quartz
+])
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(win32, Microsoft Windows, auto, [
+ if test "x$have_windows" != xyes; then
+ use_win32="no (requires a Win32 platform)"
+ fi
+ win32_LIBS="-lgdi32 -lmsimg32"
+])
+
+CAIRO_ENABLE_FONT_BACKEND(win32_font, Microsoft Windows, auto, [
+ use_win32_font=$use_win32
+])
+
+test_win32_printing=no
+if test "x$use_win32" = "xyes"; then
+ AC_CHECK_PROG(GS, gs, gs)
+ if test "$GS"; then
+ AC_DEFINE([CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE], 1, [Define to 1 if the Win32 Printing backend can be tested (needs ghostscript)])
+ test_win32_printing="yes"
+ else
+ AC_MSG_WARN([Win32 Printing backend will not be tested since ghostscript is not available])
+ test_win32_printing="no (requires ghostscript)"
+ fi
+fi
+
+AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printing" = "xyes")
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(os2, OS/2, no, [
+ case "$host" in
+ *-*-os2*)
+ :
+ ;;
+ *)
+ use_os2="no (requires an OS/2 platform)"
+ ;;
+ esac
+])
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(beos, BeOS/Zeta, no, [
+ case "$host" in
+ *-*-beos)
+ beos_LIBS=""
+ dnl Add libbe and libzeta if available
+ AC_CHECK_LIB(be,main,beos_LIBS="$beos_LIBS -lbe")
+ AC_CHECK_LIB(zeta,main,beos_LIBS="$beos_LIBS -lzeta")
+ ;;
+ *)
+ use_beos="no (requires a BeOS platform)"
+ ;;
+ esac
+])
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
+ use_png=no
+ AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config])
+ if test "x$png_REQUIRES" = x; then
+ # libpng13 is GnuWin32's libpng-1.2.8 :-(
+ for l in libpng12 libpng13 libpng10 ; do
+ if $PKG_CONFIG --exists $l ; then
+ png_REQUIRES=$l
+ use_png=yes
+ break
+ fi
+ done
+ else
+ use_png=yes
+ fi
+
+ if test "x$use_png" = "xyes" ; then
+ PKG_CHECK_MODULES(png, $png_REQUIRES, , AC_MSG_RESULT(no))
+ else
+ AC_MSG_WARN([Could not find libpng in the pkg-config search path])
+ fi
+])
+
+dnl ===========================================================================
+
+GLITZ_MIN_VERSION=0.5.1
+CAIRO_ENABLE_SURFACE_BACKEND(glitz, glitz, no, [
+ glitz_REQUIRES="glitz >= $GLITZ_MIN_VERSION"
+ PKG_CHECK_MODULES(glitz, $glitz_REQUIRES, , [AC_MSG_RESULT(no)
+ use_glitz="no (requires glitz http://freedesktop.org/Software/glitz)"])
+])
+
+if test "x$use_glitz" = "xyes";then
+ PKG_CHECK_MODULES(GLITZ_AGL, glitz-agl >= $GLITZ_MIN_VERSION,
+ [have_glitz_agl=yes], [have_glitz_agl=no; AC_MSG_RESULT(no)])
+ PKG_CHECK_MODULES(GLITZ_EGL, glitz-egl >= $GLITZ_MIN_VERSION,
+ [have_glitz_egl=yes], [have_glitz_egl=no; AC_MSG_RESULT(no)])
+ PKG_CHECK_MODULES(GLITZ_GLX, glitz-glx >= $GLITZ_MIN_VERSION,
+ [have_glitz_glx=yes], [have_glitz_glx=no; AC_MSG_RESULT(no)])
+ PKG_CHECK_MODULES(GLITZ_WGL, glitz-wgl >= $GLITZ_MIN_VERSION,
+ [have_glitz_wgl=yes], [have_glitz_wgl=no; AC_MSG_RESULT(no)])
+
+ if test "x$have_glitz_agl" = "xyes";then
+ AC_DEFINE(CAIRO_CAN_TEST_GLITZ_AGL_SURFACE, 1, [define if glitz backend can be tested against agl])
+ fi
+ if test "x$have_glitz_egl" = "xyes";then
+ AC_DEFINE(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, 1, [define if glitz backend can be tested against egl])
+ fi
+ if test "x$have_glitz_glx" = "xyes";then
+ AC_DEFINE(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, 1, [define if glitz backend can be tested against glx])
+ fi
+ if test "x$have_glitz_wgl" = "xyes";then
+ AC_DEFINE(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, 1, [define if glitz backend can be tested against wgl])
+ fi
+fi
+
+AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_AGL_SURFACE, test "x$have_glitz_agl" = "xyes")
+AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, test "x$have_glitz_egl" = "xyes")
+AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, test "x$have_glitz_glx" = "xyes")
+AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, test "x$have_glitz_wgl" = "xyes")
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(directfb, directfb, no, [
+ directfb_REQUIRES=directfb
+ PKG_CHECK_MODULES(directfb, $directfb_REQUIRES, , AC_MSG_RESULT(no)
+ [use_directfb="no (requires directfb http://www.directfb.org)"])
+])
+
+dnl ===========================================================================
+
+# We use pkg-config to look for freetype2, but fall back to
+# freetype-config if it fails. We prefer pkg-config, since we can
+# then just put freetype2 >= $FREETYPE_MIN_VERSION in
+# Requires.private, but at least up to 2003-06-07, there was no
+# freetype2.pc in the release.
+#
+# FreeType versions come in three forms:
+# release (such as 2.1.9)
+# libtool (such as 9.7.3) (returned by freetype-config and pkg-config)
+# platform-specific/soname (such as 6.3.4)
+# and they recommend you never use the platform-specific version
+# (see docs/VERSION.DLL in freetype2 sources)
+#
+# Set these as appropriate:
+
+# release number - for information only
+FREETYPE_MIN_RELEASE=2.1.9
+# libtool-specific version - this is what is checked
+FREETYPE_MIN_VERSION=9.7.3
+
+CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
+ ft_REQUIRES="fontconfig"
+ PKG_CHECK_MODULES(FONTCONFIG, $ft_REQUIRES,,
+ [AC_MSG_RESULT(no); use_ft="no (requires fontconfig)"])
+
+ if test "x$use_ft" = "xyes"; then
+
+ CAIRO_CHECK_FUNCS_WITH_FLAGS(FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS])
+
+ PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION,
+ [freetype_pkgconfig=yes],
+ [AC_MSG_RESULT(no)
+ freetype_pkgconfig=no])
+
+ if test "x$freetype_pkgconfig" = "xyes"; then
+ ft_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION $ft_REQUIRES"
+ else
+
+ if test -z "$FREETYPE_CONFIG"; then
+ AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ fi
+ if test "x$FREETYPE_CONFIG" = "xno" ; then
+ use_ft='no (freetype-config not found in path or $FREETYPE_CONFIG)'
+ else
+ AC_MSG_CHECKING(freetype2 libtool version)
+
+ FREETYPE_VERSION=`$FREETYPE_CONFIG --version`
+
+ VERSION_DEC=`echo $FREETYPE_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
+ MIN_VERSION_DEC=`echo $FREETYPE_MIN_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
+ if test $VERSION_DEC -lt $MIN_VERSION_DEC; then
+ AC_MSG_RESULT($FREETYPE_VERSION - Too old)
+ use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"
+ else
+ AC_MSG_RESULT($FREETYPE_VERSION - OK)
+
+ ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`
+ fi
+ fi
+ fi
+ fi
+ ft_CFLAGS="$FREETYPE_CFLAGS $FONTCONFIG_CFLAGS"
+ ft_LIBS="$FREETYPE_LIBS $FONTCONFIG_LIBS"
+])
+
+if test "x$use_ft" = "xyes"; then
+ _save_libs="$LIBS"
+ _save_cflags="$CFLAGS"
+ LIBS="$LIBS $ft_LIBS"
+ CFLAGS="$CFLAGS $ft_CFLAGS"
+ AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
+ HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
+ HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
+ [#include <ft2build.h>
+ #include FT_FREETYPE_H])
+ AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
+ [FT_Bitmap_Size structure includes y_ppem field])
+
+ AC_CHECK_FUNCS(FT_GlyphSlot_Embolden FT_Load_Sfnt_Table FT_Library_SetLcdFilter)
+
+ LIBS="$_save_libs"
+ CFLAGS="$_save_cflags"
+fi
+
+dnl ===========================================================================
+
+AC_ARG_ENABLE(pthread,
+ AS_HELP_STRING([--disable-pthread],
+ [Do not use pthread]),
+ [use_pthread=$enableval], [use_pthread=auto])
+
+have_pthread=no
+if test "x$use_pthread" != "xno"; then
+ AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
+fi
+AM_CONDITIONAL(HAVE_PTHREAD, test "x$have_pthread" = "xyes")
+if test "x$have_pthread" = xno -a "x$use_pthread" = xyes; then
+ AC_MSG_ERROR([pthread requested but not found])
+fi
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(ps, PostScript, yes, [
+ # The ps backend requires zlib.
+ use_ps=$have_libz
+ ps_NONPKGCONFIG_LIBS=-lz
+])
+
+dnl ===========================================================================
+
+test_ps=no
+if test "x$use_ps" = "xyes"; then
+ AC_CHECK_PROG(GS, gs, gs)
+ if test "$GS"; then
+ AC_DEFINE([CAIRO_CAN_TEST_PS_SURFACE], 1, [Define to 1 if the PS backend can be tested (needs ghostscript)])
+ test_ps="yes"
+ else
+ AC_MSG_WARN([PS backend will not be tested since ghostscript is not available])
+ test_ps="no (requires ghostscript)"
+ fi
+fi
+
+AM_CONDITIONAL(CAIRO_CAN_TEST_PS_SURFACE, test "x$test_ps" = "xyes")
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(pdf, PDF, yes, [
+ # The pdf backend requires zlib.
+ use_pdf=$have_libz
+ pdf_NONPKGCONFIG_LIBS=-lz
+])
+
+dnl ===========================================================================
+
+POPPLER_VERSION_REQUIRED=0.8.0
+test_pdf=no
+if test "x$use_pdf" = "xyes"; then
+ poppler_DEPENDENCY="poppler-glib >= $POPPLER_VERSION_REQUIRED"
+ PKG_CHECK_MODULES(POPPLER, $poppler_DEPENDENCY pango gtk+-2.0,
+ [CAIRO_CHECK_FUNCS_WITH_FLAGS(poppler_page_render_to_pixbuf, [$POPPLER_CFLAGS], [$POPPLER_LIBS],
+ [test_pdf=yes],
+ [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])],
+ [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])
+ if test "x$test_pdf" = "xyes"; then
+ AC_DEFINE([CAIRO_CAN_TEST_PDF_SURFACE], 1, [Define to 1 if the PDF backend can be tested (need poppler and other dependencies for pdf2png)])
+ else
+ AC_MSG_WARN([PDF backend will not be tested since poppler >= $POPPLER_VERSION_REQUIRED is not available])
+ fi
+fi
+
+AM_CONDITIONAL(CAIRO_CAN_TEST_PDF_SURFACE, test "x$test_pdf" = "xyes")
+AC_SUBST(POPPLER_CFLAGS)
+AC_SUBST(POPPLER_LIBS)
+
+AM_CONDITIONAL(CAIRO_HAS_MULTI_PAGE_SURFACES, test "x$use_ps" = "xyes" -o "x$use_pdf" = "xyes")
+
+dnl ===========================================================================
+
+CAIRO_ENABLE_SURFACE_BACKEND(svg, SVG, yes, [
+ if test "x$use_png" != "xyes"; then
+ use_svg="no (requires --enable-png)"
+ fi
+])
+
+LIBRSVG_VERSION_REQUIRED=2.15.0
+test_svg=no
+if test "x$use_svg" = "xyes"; then
+ librsvg_DEPENDENCY="librsvg-2.0 >= $LIBRSVG_VERSION_REQUIRED"
+ PKG_CHECK_MODULES(LIBRSVG, $librsvg_DEPENDENCY gdk-2.0,
+ [CAIRO_CHECK_FUNCS_WITH_FLAGS(rsvg_pixbuf_from_file, [$LIBRSVG_CFLAGS], [$LIBRSVG_LIBS],
+ [test_svg=yes],
+ [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])],
+ [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])
+ if test "x$test_svg" = "xyes"; then
+ AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested])
+ else
+ AC_MSG_WARN([SVG backend will not be tested since librsvg >= $LIBRSVG_VERSION_REQUIRED is not available])
+ fi
+fi
+
+AM_CONDITIONAL(CAIRO_CAN_TEST_SVG_SURFACE, test "x$test_svg" = "xyes")
+AC_SUBST(LIBRSVG_CFLAGS)
+AC_SUBST(LIBRSVG_LIBS)
+
+dnl ===========================================================================
+
+dnl XXX make this a private feature?
+CAIRO_ENABLE(test_surfaces, test surfaces, no)
+
+dnl ===========================================================================
+
+PIXMAN_VERSION="0.11.2"
+PIXMAN_REQUIRES="pixman-1 >= $PIXMAN_VERSION"
+PKG_CHECK_MODULES(pixman, $PIXMAN_REQUIRES, ,
+ [AC_MSG_ERROR([pixman >= $PIXMAN_VERSION is required
+(http://cairographics.org/releases/)])])
+
+CAIRO_REQUIRES="$PIXMAN_REQUIRES $CAIRO_REQUIRES"
+CAIRO_CFLAGS="$pixman_CFLAGS $CAIRO_CFLAGS"
+CAIRO_LIBS="$pixman_LIBS $CAIRO_LIBS"
+
+dnl ===========================================================================
+dnl Build the external converter if we have any of the test backends
+AM_CONDITIONAL(BUILD_ANY2PPM,
+ test "x$test_svg" = "xyes" \
+ -o "x$test_pdf" = "xyes" ) # -o "x$test_ps" = "xyes")
+
+dnl ===========================================================================
+
+AC_ARG_ENABLE(some-floating-point,
+ AS_HELP_STRING([--disable-some-floating-point],
+ [Disable certain code paths that rely heavily on double precision
+ floating-point calculation. This option can improve
+ performance on systems without a double precision floating-point
+ unit, but might degrade performance on those that do.]), [
+if test "x$enableval" = "xno"; then
+ # A value of 'no' for $enableval means that they want to disable, which
+ # means 'yes' for $disable_some_floating_point.
+ disable_some_floating_point=yes
+fi
+], [disable_some_floating_point=no])
+
+AM_CONDITIONAL(DISABLE_SOME_FLOATING_POINT,
+ test "x$disable_some_floating_point" = "xyes")
+if test "x$disable_some_floating_point" = "xyes"; then
+ AC_DEFINE(DISABLE_SOME_FLOATING_POINT, 1,
+ [Define to 1 to disable certain code paths that rely heavily on
+ double precision floating-point calculation])
+fi
+
+dnl ===========================================================================
+
+AH_BOTTOM([
+#ifdef __cplusplus
+# define CAIRO_BEGIN_DECLS extern "C" {
+# define CAIRO_END_DECLS }
+#else
+# define CAIRO_BEGIN_DECLS
+# define CAIRO_END_DECLS
+#endif
+])
+
+AC_CONFIG_FILES([
+Makefile
+boilerplate/Makefile
+src/Makefile
+test/Makefile
+test/pdiff/Makefile
+perf/Makefile
+util/Makefile
+doc/Makefile
+doc/public/Makefile
+doc/public/version.xml
+])
+
+AC_OUTPUT
+CAIRO_REPORT
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 24a398b..0000000
--- a/configure.in
+++ /dev/null
@@ -1,482 +0,0 @@
-AC_PREREQ(2.58)
-CAIRO_PARSE_VERSION
-AC_INIT([cairo],
- cairo_version_major.cairo_version_minor.cairo_version_micro,
- [http://bugs.freedesktop.org/enter_bug.cgi?product=cairo])
-AC_CONFIG_SRCDIR(src/cairo.h)
-AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_AUX_DIR(build)
-AM_INIT_AUTOMAKE([1.8])
-
-dnl ===========================================================================
-dnl
-dnl The order of the includes here is rather important
-dnl
-m4_include(build/version.ac) dnl macros setting up various version declares
-m4_include(build/tools.ac) dnl checks for tools we use
-m4_include(build/system.ac) dnl checks for system functions, headers, libs
-m4_include(build/enable.ac) dnl macros for backend/feature enablement
-m4_include(build/warnings.ac) dnl checks for compiler warning
-m4_include(build/analysis.ac) dnl checks for analysis tools (lcov, etc)
-AC_CACHE_SAVE
-
-dnl ===========================================================================
-
-AC_CHECK_LIB(z, compress,
- [AC_CHECK_HEADER(zlib.h, [have_libz=yes],
- [have_libz="no (requires zlib http://www.gzip.org/zlib/)"])],
- [have_libz="no (requires zlib http://www.gzip.org/zlib/)"])
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
- xlib_REQUIRES="x11"
- PKG_CHECK_MODULES(xlib, $xlib_REQUIRES, ,
- [AC_MSG_RESULT(no)
- xlib_REQUIRES=""
- AC_PATH_XTRA
- if test "x$no_x" = xyes; then
- use_xlib="no (requires X development libraries)"
- else
- xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
- xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
- fi])
-])
-
-CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
- if test "x$use_xlib" != "xyes"; then
- use_xlib_xrender="no (requires --enable-xlib)"
- else
- dnl Check for Xrender header files if the Xrender package is not installed:
- xlib_xrender_BASE=cairo-xlib
- xlib_xrender_REQUIRES="xrender >= 0.6"
- PKG_CHECK_MODULES(xlib_xrender, $xlib_xrender_REQUIRES, ,
- [AC_MSG_RESULT(no)
- xlib_xrender_REQUIRES=""
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS"
- AC_CHECK_HEADER(X11/extensions/Xrender.h,
- [xlib_xrender_NONPKGCONFIG_LIBS="-lXrender"],
- [use_xlib_xrender="no (requires Xrender http://freedesktop.org/Software/xlibs)"])
- CPPFLAGS=$old_CPPFLAGS
- ])
- fi
-])
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, no, [
- xcb_REQUIRES="xcb >= 0.9.92 xcb-render >= 0.9.92 xcb-renderutil"
- PKG_CHECK_MODULES(xcb, $xcb_REQUIRES, , [AC_MSG_RESULT(no)
- use_xcb="no (requires XCB http://xcb.freedesktop.org)"])
-])
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(quartz, Quartz, auto, [
- dnl There is no pkgconfig for quartz; lets do a header check
- AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, , [use_quartz="no (ApplicationServices framework not found)"])
- if test "x$use_quartz" != "xyes" ; then
- dnl check for CoreGraphics as a separate framework
- AC_CHECK_HEADER(CoreGraphics/CoreGraphics.h, , [use_quartz="no (CoreGraphics framework not found)"])
- quartz_LIBS="-Xlinker -framework -Xlinker CoreGraphics"
- else
- quartz_LIBS="-Xlinker -framework -Xlinker ApplicationServices"
- fi
-])
-
-CAIRO_ENABLE_FONT_BACKEND(quartz_font, Quartz, auto, [
- use_quartz_font=$use_quartz
-])
-
-CAIRO_ENABLE_SURFACE_BACKEND(quartz_image, Quartz Image, no, [
- use_quartz_image=$use_quartz
-])
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(win32, Microsoft Windows, auto, [
- if test "x$have_windows" != xyes; then
- use_win32="no (requires a Win32 platform)"
- fi
- win32_LIBS="-lgdi32 -lmsimg32"
-])
-
-CAIRO_ENABLE_FONT_BACKEND(win32_font, Microsoft Windows, auto, [
- use_win32_font=$use_win32
-])
-
-test_win32_printing=no
-if test "x$use_win32" = "xyes"; then
- AC_CHECK_PROG(GS, gs, gs)
- if test "$GS"; then
- AC_DEFINE([CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE], 1, [Define to 1 if the Win32 Printing backend can be tested (needs ghostscript)])
- test_win32_printing="yes"
- else
- AC_MSG_WARN([Win32 Printing backend will not be tested since ghostscript is not available])
- test_win32_printing="no (requires ghostscript)"
- fi
-fi
-
-AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printing" = "xyes")
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(os2, OS/2, no, [
- case "$host" in
- *-*-os2*)
- :
- ;;
- *)
- use_os2="no (requires an OS/2 platform)"
- ;;
- esac
-])
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(beos, BeOS/Zeta, no, [
- case "$host" in
- *-*-beos)
- beos_LIBS=""
- dnl Add libbe and libzeta if available
- AC_CHECK_LIB(be,main,beos_LIBS="$beos_LIBS -lbe")
- AC_CHECK_LIB(zeta,main,beos_LIBS="$beos_LIBS -lzeta")
- ;;
- *)
- use_beos="no (requires a BeOS platform)"
- ;;
- esac
-])
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
- use_png=no
- AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config])
- if test "x$png_REQUIRES" = x; then
- # libpng13 is GnuWin32's libpng-1.2.8 :-(
- for l in libpng12 libpng13 libpng10 ; do
- if $PKG_CONFIG --exists $l ; then
- png_REQUIRES=$l
- use_png=yes
- break
- fi
- done
- else
- use_png=yes
- fi
-
- if test "x$use_png" = "xyes" ; then
- PKG_CHECK_MODULES(png, $png_REQUIRES, , AC_MSG_RESULT(no))
- else
- AC_MSG_WARN([Could not find libpng in the pkg-config search path])
- fi
-])
-
-dnl ===========================================================================
-
-GLITZ_MIN_VERSION=0.5.1
-CAIRO_ENABLE_SURFACE_BACKEND(glitz, glitz, no, [
- glitz_REQUIRES="glitz >= $GLITZ_MIN_VERSION"
- PKG_CHECK_MODULES(glitz, $glitz_REQUIRES, , [AC_MSG_RESULT(no)
- use_glitz="no (requires glitz http://freedesktop.org/Software/glitz)"])
-])
-
-if test "x$use_glitz" = "xyes";then
- PKG_CHECK_MODULES(GLITZ_AGL, glitz-agl >= $GLITZ_MIN_VERSION,
- [have_glitz_agl=yes], [have_glitz_agl=no; AC_MSG_RESULT(no)])
- PKG_CHECK_MODULES(GLITZ_EGL, glitz-egl >= $GLITZ_MIN_VERSION,
- [have_glitz_egl=yes], [have_glitz_egl=no; AC_MSG_RESULT(no)])
- PKG_CHECK_MODULES(GLITZ_GLX, glitz-glx >= $GLITZ_MIN_VERSION,
- [have_glitz_glx=yes], [have_glitz_glx=no; AC_MSG_RESULT(no)])
- PKG_CHECK_MODULES(GLITZ_WGL, glitz-wgl >= $GLITZ_MIN_VERSION,
- [have_glitz_wgl=yes], [have_glitz_wgl=no; AC_MSG_RESULT(no)])
-
- if test "x$have_glitz_agl" = "xyes";then
- AC_DEFINE(CAIRO_CAN_TEST_GLITZ_AGL_SURFACE, 1, [define if glitz backend can be tested against agl])
- fi
- if test "x$have_glitz_egl" = "xyes";then
- AC_DEFINE(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, 1, [define if glitz backend can be tested against egl])
- fi
- if test "x$have_glitz_glx" = "xyes";then
- AC_DEFINE(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, 1, [define if glitz backend can be tested against glx])
- fi
- if test "x$have_glitz_wgl" = "xyes";then
- AC_DEFINE(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, 1, [define if glitz backend can be tested against wgl])
- fi
-fi
-
-AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_AGL_SURFACE, test "x$have_glitz_agl" = "xyes")
-AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, test "x$have_glitz_egl" = "xyes")
-AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, test "x$have_glitz_glx" = "xyes")
-AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, test "x$have_glitz_wgl" = "xyes")
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(directfb, directfb, no, [
- directfb_REQUIRES=directfb
- PKG_CHECK_MODULES(directfb, $directfb_REQUIRES, , AC_MSG_RESULT(no)
- [use_directfb="no (requires directfb http://www.directfb.org)"])
-])
-
-dnl ===========================================================================
-
-# We use pkg-config to look for freetype2, but fall back to
-# freetype-config if it fails. We prefer pkg-config, since we can
-# then just put freetype2 >= $FREETYPE_MIN_VERSION in
-# Requires.private, but at least up to 2003-06-07, there was no
-# freetype2.pc in the release.
-#
-# FreeType versions come in three forms:
-# release (such as 2.1.9)
-# libtool (such as 9.7.3) (returned by freetype-config and pkg-config)
-# platform-specific/soname (such as 6.3.4)
-# and they recommend you never use the platform-specific version
-# (see docs/VERSION.DLL in freetype2 sources)
-#
-# Set these as appropriate:
-
-# release number - for information only
-FREETYPE_MIN_RELEASE=2.1.9
-# libtool-specific version - this is what is checked
-FREETYPE_MIN_VERSION=9.7.3
-
-CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
- ft_REQUIRES="fontconfig"
- PKG_CHECK_MODULES(FONTCONFIG, $ft_REQUIRES,,
- [AC_MSG_RESULT(no); use_ft="no (requires fontconfig)"])
-
- if test "x$use_ft" = "xyes"; then
-
- CAIRO_CHECK_FUNCS_WITH_FLAGS(FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS])
-
- PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION,
- [freetype_pkgconfig=yes],
- [AC_MSG_RESULT(no)
- freetype_pkgconfig=no])
-
- if test "x$freetype_pkgconfig" = "xyes"; then
- ft_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION $ft_REQUIRES"
- else
-
- if test -z "$FREETYPE_CONFIG"; then
- AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
- fi
- if test "x$FREETYPE_CONFIG" = "xno" ; then
- use_ft='no (freetype-config not found in path or $FREETYPE_CONFIG)'
- else
- AC_MSG_CHECKING(freetype2 libtool version)
-
- FREETYPE_VERSION=`$FREETYPE_CONFIG --version`
-
- VERSION_DEC=`echo $FREETYPE_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
- MIN_VERSION_DEC=`echo $FREETYPE_MIN_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
- if test $VERSION_DEC -lt $MIN_VERSION_DEC; then
- AC_MSG_RESULT($FREETYPE_VERSION - Too old)
- use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"
- else
- AC_MSG_RESULT($FREETYPE_VERSION - OK)
-
- ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
- ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`
- fi
- fi
- fi
- fi
- ft_CFLAGS="$FREETYPE_CFLAGS $FONTCONFIG_CFLAGS"
- ft_LIBS="$FREETYPE_LIBS $FONTCONFIG_LIBS"
-])
-
-if test "x$use_ft" = "xyes"; then
- _save_libs="$LIBS"
- _save_cflags="$CFLAGS"
- LIBS="$LIBS $ft_LIBS"
- CFLAGS="$CFLAGS $ft_CFLAGS"
- AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
- HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
- HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
- [#include <ft2build.h>
- #include FT_FREETYPE_H])
- AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
- [FT_Bitmap_Size structure includes y_ppem field])
-
- AC_CHECK_FUNCS(FT_GlyphSlot_Embolden FT_Load_Sfnt_Table FT_Library_SetLcdFilter)
-
- LIBS="$_save_libs"
- CFLAGS="$_save_cflags"
-fi
-
-dnl ===========================================================================
-
-AC_ARG_ENABLE(pthread,
- AS_HELP_STRING([--disable-pthread],
- [Do not use pthread]),
- [use_pthread=$enableval], [use_pthread=auto])
-
-have_pthread=no
-if test "x$use_pthread" != "xno"; then
- AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
-fi
-AM_CONDITIONAL(HAVE_PTHREAD, test "x$have_pthread" = "xyes")
-if test "x$have_pthread" = xno -a "x$use_pthread" = xyes; then
- AC_MSG_ERROR([pthread requested but not found])
-fi
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(ps, PostScript, yes, [
- # The ps backend requires zlib.
- use_ps=$have_libz
- ps_NONPKGCONFIG_LIBS=-lz
-])
-
-dnl ===========================================================================
-
-test_ps=no
-if test "x$use_ps" = "xyes"; then
- AC_CHECK_PROG(GS, gs, gs)
- if test "$GS"; then
- AC_DEFINE([CAIRO_CAN_TEST_PS_SURFACE], 1, [Define to 1 if the PS backend can be tested (needs ghostscript)])
- test_ps="yes"
- else
- AC_MSG_WARN([PS backend will not be tested since ghostscript is not available])
- test_ps="no (requires ghostscript)"
- fi
-fi
-
-AM_CONDITIONAL(CAIRO_CAN_TEST_PS_SURFACE, test "x$test_ps" = "xyes")
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(pdf, PDF, yes, [
- # The pdf backend requires zlib.
- use_pdf=$have_libz
- pdf_NONPKGCONFIG_LIBS=-lz
-])
-
-dnl ===========================================================================
-
-POPPLER_VERSION_REQUIRED=0.8.0
-test_pdf=no
-if test "x$use_pdf" = "xyes"; then
- poppler_DEPENDENCY="poppler-glib >= $POPPLER_VERSION_REQUIRED"
- PKG_CHECK_MODULES(POPPLER, $poppler_DEPENDENCY pango gtk+-2.0,
- [CAIRO_CHECK_FUNCS_WITH_FLAGS(poppler_page_render_to_pixbuf, [$POPPLER_CFLAGS], [$POPPLER_LIBS],
- [test_pdf=yes],
- [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])],
- [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])
- if test "x$test_pdf" = "xyes"; then
- AC_DEFINE([CAIRO_CAN_TEST_PDF_SURFACE], 1, [Define to 1 if the PDF backend can be tested (need poppler and other dependencies for pdf2png)])
- else
- AC_MSG_WARN([PDF backend will not be tested since poppler >= $POPPLER_VERSION_REQUIRED is not available])
- fi
-fi
-
-AM_CONDITIONAL(CAIRO_CAN_TEST_PDF_SURFACE, test "x$test_pdf" = "xyes")
-AC_SUBST(POPPLER_CFLAGS)
-AC_SUBST(POPPLER_LIBS)
-
-AM_CONDITIONAL(CAIRO_HAS_MULTI_PAGE_SURFACES, test "x$use_ps" = "xyes" -o "x$use_pdf" = "xyes")
-
-dnl ===========================================================================
-
-CAIRO_ENABLE_SURFACE_BACKEND(svg, SVG, yes, [
- if test "x$use_png" != "xyes"; then
- use_svg="no (requires --enable-png)"
- fi
-])
-
-LIBRSVG_VERSION_REQUIRED=2.15.0
-test_svg=no
-if test "x$use_svg" = "xyes"; then
- librsvg_DEPENDENCY="librsvg-2.0 >= $LIBRSVG_VERSION_REQUIRED"
- PKG_CHECK_MODULES(LIBRSVG, $librsvg_DEPENDENCY gdk-2.0,
- [CAIRO_CHECK_FUNCS_WITH_FLAGS(rsvg_pixbuf_from_file, [$LIBRSVG_CFLAGS], [$LIBRSVG_LIBS],
- [test_svg=yes],
- [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])],
- [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])
- if test "x$test_svg" = "xyes"; then
- AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested])
- else
- AC_MSG_WARN([SVG backend will not be tested since librsvg >= $LIBRSVG_VERSION_REQUIRED is not available])
- fi
-fi
-
-AM_CONDITIONAL(CAIRO_CAN_TEST_SVG_SURFACE, test "x$test_svg" = "xyes")
-AC_SUBST(LIBRSVG_CFLAGS)
-AC_SUBST(LIBRSVG_LIBS)
-
-dnl ===========================================================================
-
-dnl XXX make this a private feature?
-CAIRO_ENABLE(test_surfaces, test surfaces, no)
-
-dnl ===========================================================================
-
-PIXMAN_VERSION="0.11.2"
-PIXMAN_REQUIRES="pixman-1 >= $PIXMAN_VERSION"
-PKG_CHECK_MODULES(pixman, $PIXMAN_REQUIRES, ,
- [AC_MSG_ERROR([pixman >= $PIXMAN_VERSION is required
-(http://cairographics.org/releases/)])])
-
-CAIRO_REQUIRES="$PIXMAN_REQUIRES $CAIRO_REQUIRES"
-CAIRO_CFLAGS="$pixman_CFLAGS $CAIRO_CFLAGS"
-CAIRO_LIBS="$pixman_LIBS $CAIRO_LIBS"
-
-dnl ===========================================================================
-dnl Build the external converter if we have any of the test backends
-AM_CONDITIONAL(BUILD_ANY2PPM,
- test "x$test_svg" = "xyes" \
- -o "x$test_pdf" = "xyes" ) # -o "x$test_ps" = "xyes")
-
-dnl ===========================================================================
-
-AC_ARG_ENABLE(some-floating-point,
- AS_HELP_STRING([--disable-some-floating-point],
- [Disable certain code paths that rely heavily on double precision
- floating-point calculation. This option can improve
- performance on systems without a double precision floating-point
- unit, but might degrade performance on those that do.]), [
-if test "x$enableval" = "xno"; then
- # A value of 'no' for $enableval means that they want to disable, which
- # means 'yes' for $disable_some_floating_point.
- disable_some_floating_point=yes
-fi
-], [disable_some_floating_point=no])
-
-AM_CONDITIONAL(DISABLE_SOME_FLOATING_POINT,
- test "x$disable_some_floating_point" = "xyes")
-if test "x$disable_some_floating_point" = "xyes"; then
- AC_DEFINE(DISABLE_SOME_FLOATING_POINT, 1,
- [Define to 1 to disable certain code paths that rely heavily on
- double precision floating-point calculation])
-fi
-
-dnl ===========================================================================
-
-AH_BOTTOM([
-#ifdef __cplusplus
-# define CAIRO_BEGIN_DECLS extern "C" {
-# define CAIRO_END_DECLS }
-#else
-# define CAIRO_BEGIN_DECLS
-# define CAIRO_END_DECLS
-#endif
-])
-
-AC_CONFIG_FILES([
-Makefile
-boilerplate/Makefile
-src/Makefile
-test/Makefile
-test/pdiff/Makefile
-perf/Makefile
-util/Makefile
-doc/Makefile
-doc/public/Makefile
-doc/public/version.xml
-])
-
-AC_OUTPUT
-CAIRO_REPORT
commit 49f060252a2f40c727909d9e55463f40dcea2cdf
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 22:25:33 2008 -0400
Rename build/*.mk to build/Makefile.am.*
Namely:
build/Analysis.mk -> build/Makefile.am.analysis
build/ChangeLog.mk -> build/Makefile.am.changelog
build/Releasing.mk -> build/Makefile.am.releasing
diff --git a/Makefile.am b/Makefile.am
index b5fc674..6b9b778 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,6 +58,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
--enable-test-surfaces
-include $(srcdir)/build/ChangeLog.mk
-include $(srcdir)/build/Releasing.mk
-include $(srcdir)/build/Analysis.mk
+include $(srcdir)/build/Makefile.am.changelog
+include $(srcdir)/build/Makefile.am.releasing
+include $(srcdir)/build/Makefile.am.analysis
diff --git a/build/Analysis.mk b/build/Analysis.mk
deleted file mode 100644
index d0e00ca..0000000
--- a/build/Analysis.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-if CAIRO_HAS_LCOV
-# use recursive makes in order to ignore errors during check/perf
-lcov:
- -$(MAKE) $(AM_MAKEFLAGS) check
- $(MAKE) $(AM_MAKEFLAGS) genlcov
-lcov-perf:
- -$(MAKE) $(AM_MAKEFLAGS) perf
- $(MAKE) $(AM_MAKEFLAGS) genlcov
-
-# we have to massage the lcov.info file slightly to hide the effect of libtool
-# placing the objects files in the .libs/ directory separate from the *.c
-genlcov:
- $(LTP) --directory $(top_builddir) --path $(top_builddir) --capture --output-file cairo-lcov.info --test-name CAIRO_TEST --no-checksum
- $(SED) -e 's#.libs/##' \
- -e 's#boilerplate/src#src#' \
- -e 's#$(shell pwd)#$(shell cd $(top_srcdir) && pwd)#' \
- < cairo-lcov.info > cairo-lcov.info.tmp
- LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory cairo-lcov --title "Cairo Code Coverage" --show-details cairo-lcov.info.tmp
- $(RM) cairo-lcov.info.tmp
-else
-lcov lcov-perf genlcov:
- @echo You need to configure Cairo with support for gcov enabled.
- @echo e.g, ./configure --enable-gcov
-endif
-
-lcov-clean:
-if CAIRO_HAS_LCOV
- -$(LTP) --directory $(top_builddir) -z
-endif
- -$(RM) -r cairo-lcov.info cairo-lcov
- -$(FIND) -name '*.gcda' -print | $(XARGS) $(RM)
-
-distclean-local: lcov-clean
-
-.PHONY: lcov lcov-perf genlcov lcov-clean
diff --git a/build/ChangeLog.mk b/build/ChangeLog.mk
deleted file mode 100644
index b9fbdcf..0000000
--- a/build/ChangeLog.mk
+++ /dev/null
@@ -1,82 +0,0 @@
-# Creating ChangeLog files from git log:
-
-# We always create a ChangeLog that contains the most recent changes, and
-# multiple others for changes between major releases (other than the last such
-# segment that we put in 'ChangeLog'. The old ones are named
-# ChangeLog.pre-X.Y where X.Y is the version number of the major release.
-
-CURR_CHANGELOG_VERSION=$(CAIRO_VERSION_MAJOR).$$(echo "($(CAIRO_VERSION_MINOR)+1)/2*2" | bc)
-# examines $version
-PREV_CHANGELOG_VERSION=$$(if test "x$$(echo "($$version-0.1)*2/2"|bc)" = "x$$(echo "$$version*2/2"|bc)"; \
- then echo "$$version-$$(echo "$$version" | sed 's/[0-9]/0/g;s/[0-9]$$/2/')"; \
- else echo "$$version-1.0"; \
- fi | bc | sed 's/[.]0*/./;s/^0[.]\?$$/initial/;s/[.]$$/.0/')
-
-CHANGELOGS = ChangeLog \
- `version=$(CURR_CHANGELOG_VERSION); \
- version=$(PREV_CHANGELOG_VERSION); \
- while test "x$$version" != xinitial; do \
- echo ChangeLog.pre-$$version; \
- version=$(PREV_CHANGELOG_VERSION); \
- done`
-
-MAINTAINERCLEANFILES += $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-*
-DISTCLEANFILES += $(srcdir)/ChangeLog.cache-*
-
-changelogs:
- @$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
-
-dist-hook: changelogs
- changelogs="$(CHANGELOGS)"; \
- for changelog in $$changelogs; do \
- cp $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
- cp $$changelog $(distdir)/; \
- done
-
-$(srcdir)/ChangeLog:
- @if test -d "$(srcdir)/.git"; then \
- version=$(CURR_CHANGELOG_VERSION); \
- prev=$(PREV_CHANGELOG_VERSION).0; \
- nearest_tag=`git-describe | sed 's/-.*//'`; \
- before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
- after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
- $(MAKE) $(AM_MAKEFLAGS) $$before $$after && \
- echo Creating $@ && \
- { echo '# Generated by configure. Do not edit.'; echo; \
- cat $$after; echo; cat $$before; } > $@; \
- else \
- test -f $@ || \
- (echo A git checkout is required to generate $@ >&2 && \
- echo A git checkout is required to generate this file >> $@); \
- fi
-
-DISTCLEANFILES += ChangeLog.cache-*
-
-ChangeLog.cache-*..: .git
-
-ChangeLog%: $(srcdir)/ChangeLog%
-
-$(srcdir)/ChangeLog.cache-% $(srcdir)/ChangeLog.pre-%:
- @echo Creating $@
- @if test -d "$(srcdir)/.git"; then \
- (cd "$(srcdir)" && \
- version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
- if echo "$@" | grep -q '^ChangeLog[.]cache'; then \
- spec=$$version; \
- else \
- to=$$version; \
- test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
- from=$(PREV_CHANGELOG_VERSION); \
- test "x$$to" = x || to=$$to.0; \
- test "x$$from" = xinitial || from=$$from.0; \
- spec=$$from..$$to; \
- fi; \
- $(srcdir)/build/missing --run git-log --stat "$$spec") > $@.tmp \
- && mv -f $@.tmp $@ \
- || ($(RM) $@.tmp; \
- echo Failed to generate $@, your $@ may be outdated >&2); \
- else \
- echo A git checkout is required to generate $@ >&2; \
- fi
-
-.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog
diff --git a/build/Makefile.am.analysis b/build/Makefile.am.analysis
new file mode 100644
index 0000000..d0e00ca
--- /dev/null
+++ b/build/Makefile.am.analysis
@@ -0,0 +1,35 @@
+if CAIRO_HAS_LCOV
+# use recursive makes in order to ignore errors during check/perf
+lcov:
+ -$(MAKE) $(AM_MAKEFLAGS) check
+ $(MAKE) $(AM_MAKEFLAGS) genlcov
+lcov-perf:
+ -$(MAKE) $(AM_MAKEFLAGS) perf
+ $(MAKE) $(AM_MAKEFLAGS) genlcov
+
+# we have to massage the lcov.info file slightly to hide the effect of libtool
+# placing the objects files in the .libs/ directory separate from the *.c
+genlcov:
+ $(LTP) --directory $(top_builddir) --path $(top_builddir) --capture --output-file cairo-lcov.info --test-name CAIRO_TEST --no-checksum
+ $(SED) -e 's#.libs/##' \
+ -e 's#boilerplate/src#src#' \
+ -e 's#$(shell pwd)#$(shell cd $(top_srcdir) && pwd)#' \
+ < cairo-lcov.info > cairo-lcov.info.tmp
+ LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory cairo-lcov --title "Cairo Code Coverage" --show-details cairo-lcov.info.tmp
+ $(RM) cairo-lcov.info.tmp
+else
+lcov lcov-perf genlcov:
+ @echo You need to configure Cairo with support for gcov enabled.
+ @echo e.g, ./configure --enable-gcov
+endif
+
+lcov-clean:
+if CAIRO_HAS_LCOV
+ -$(LTP) --directory $(top_builddir) -z
+endif
+ -$(RM) -r cairo-lcov.info cairo-lcov
+ -$(FIND) -name '*.gcda' -print | $(XARGS) $(RM)
+
+distclean-local: lcov-clean
+
+.PHONY: lcov lcov-perf genlcov lcov-clean
diff --git a/build/Makefile.am.changelog b/build/Makefile.am.changelog
new file mode 100644
index 0000000..b9fbdcf
--- /dev/null
+++ b/build/Makefile.am.changelog
@@ -0,0 +1,82 @@
+# Creating ChangeLog files from git log:
+
+# We always create a ChangeLog that contains the most recent changes, and
+# multiple others for changes between major releases (other than the last such
+# segment that we put in 'ChangeLog'. The old ones are named
+# ChangeLog.pre-X.Y where X.Y is the version number of the major release.
+
+CURR_CHANGELOG_VERSION=$(CAIRO_VERSION_MAJOR).$$(echo "($(CAIRO_VERSION_MINOR)+1)/2*2" | bc)
+# examines $version
+PREV_CHANGELOG_VERSION=$$(if test "x$$(echo "($$version-0.1)*2/2"|bc)" = "x$$(echo "$$version*2/2"|bc)"; \
+ then echo "$$version-$$(echo "$$version" | sed 's/[0-9]/0/g;s/[0-9]$$/2/')"; \
+ else echo "$$version-1.0"; \
+ fi | bc | sed 's/[.]0*/./;s/^0[.]\?$$/initial/;s/[.]$$/.0/')
+
+CHANGELOGS = ChangeLog \
+ `version=$(CURR_CHANGELOG_VERSION); \
+ version=$(PREV_CHANGELOG_VERSION); \
+ while test "x$$version" != xinitial; do \
+ echo ChangeLog.pre-$$version; \
+ version=$(PREV_CHANGELOG_VERSION); \
+ done`
+
+MAINTAINERCLEANFILES += $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-*
+DISTCLEANFILES += $(srcdir)/ChangeLog.cache-*
+
+changelogs:
+ @$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
+
+dist-hook: changelogs
+ changelogs="$(CHANGELOGS)"; \
+ for changelog in $$changelogs; do \
+ cp $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
+ cp $$changelog $(distdir)/; \
+ done
+
+$(srcdir)/ChangeLog:
+ @if test -d "$(srcdir)/.git"; then \
+ version=$(CURR_CHANGELOG_VERSION); \
+ prev=$(PREV_CHANGELOG_VERSION).0; \
+ nearest_tag=`git-describe | sed 's/-.*//'`; \
+ before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
+ after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
+ $(MAKE) $(AM_MAKEFLAGS) $$before $$after && \
+ echo Creating $@ && \
+ { echo '# Generated by configure. Do not edit.'; echo; \
+ cat $$after; echo; cat $$before; } > $@; \
+ else \
+ test -f $@ || \
+ (echo A git checkout is required to generate $@ >&2 && \
+ echo A git checkout is required to generate this file >> $@); \
+ fi
+
+DISTCLEANFILES += ChangeLog.cache-*
+
+ChangeLog.cache-*..: .git
+
+ChangeLog%: $(srcdir)/ChangeLog%
+
+$(srcdir)/ChangeLog.cache-% $(srcdir)/ChangeLog.pre-%:
+ @echo Creating $@
+ @if test -d "$(srcdir)/.git"; then \
+ (cd "$(srcdir)" && \
+ version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
+ if echo "$@" | grep -q '^ChangeLog[.]cache'; then \
+ spec=$$version; \
+ else \
+ to=$$version; \
+ test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
+ from=$(PREV_CHANGELOG_VERSION); \
+ test "x$$to" = x || to=$$to.0; \
+ test "x$$from" = xinitial || from=$$from.0; \
+ spec=$$from..$$to; \
+ fi; \
+ $(srcdir)/build/missing --run git-log --stat "$$spec") > $@.tmp \
+ && mv -f $@.tmp $@ \
+ || ($(RM) $@.tmp; \
+ echo Failed to generate $@, your $@ may be outdated >&2); \
+ else \
+ echo A git checkout is required to generate $@ >&2; \
+ fi
+
+.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog
diff --git a/build/Makefile.am.releasing b/build/Makefile.am.releasing
new file mode 100644
index 0000000..2f71038
--- /dev/null
+++ b/build/Makefile.am.releasing
@@ -0,0 +1,153 @@
+# Some custom targets to make it easier to release things.
+#
+# To make real stable releases or devel snapshots, use either:
+# make release-check
+# or make release-publish
+#
+# To make a quick properly named (date and git hash stamped) tarball:
+# make snapshot
+
+snapshot:
+ distdir="$(distdir)-`date '+%Y%m%d'`"; \
+ test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git-rev-parse HEAD | cut -c 1-6`; \
+ $(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
+
+RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
+RELEASE_UPLOAD_HOST = cairographics.org
+RELEASE_UPLOAD_BASE = /srv/cairo.freedesktop.org/www
+RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)/$(RELEASE_OR_SNAPSHOT)s
+RELEASE_URL_BASE = http://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
+RELEASE_ANNOUNCE_LIST = cairo-announce at cairographics.org (and CC gnome-announce-list at gnome.org)
+
+MANUAL_DATED = cairo-manual-`date +%Y%m%d`
+MANUAL_TAR_FILE = $(MANUAL_DATED).tar.gz
+MANUAL_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)
+
+tar_file = $(PACKAGE)-$(VERSION).tar.gz
+sha1_file = $(tar_file).sha1
+gpg_file = $(sha1_file).asc
+
+$(sha1_file): $(tar_file)
+ sha1sum $^ > $@
+
+$(gpg_file): $(sha1_file)
+ @echo "Please enter your GPG password to sign the checksum."
+ gpg --armor --sign $^
+
+release-verify-sane-changelogs: changelogs
+ @echo -n "Checking that the ChangeLog files are sane..."
+ @if grep -q "is required to generate" $(CHANGELOGS); then \
+ (echo "Ouch." && echo "Some of the ChangeLogs are not generated correctly." \
+ && echo "Remove ChangeLog* and make changelogs" \
+ && false); else :; fi
+ @echo "Good."
+
+release-verify-sane-tests:
+ @echo "Checking that the test suite is sane..."
+ @cd test && $(MAKE) $(AM_MAKEFLAGS) release-verify-sane-tests
+
+release-verify-even-micro:
+ @echo -n "Checking that $(VERSION) has an even micro component..."
+ @test "$(CAIRO_VERSION_MICRO)" = "`echo $(CAIRO_VERSION_MICRO)/2*2 | bc`" \
+ || (echo "Ouch." && echo "The version micro component '$(CAIRO_VERSION_MICRO)' is not an even number." \
+ && echo "The version in configure.in must be incremented before a new release." \
+ && false)
+ @echo "Good."
+
+release-verify-newer:
+ @echo -n "Checking that no $(VERSION) release already exists..."
+ @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \
+ || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \
+ && echo "Are you sure you have an updated checkout?" \
+ && echo "This should never happen." \
+ && false)
+ @echo "Good."
+
+release-remove-old:
+ $(RM) $(tar_file) $(sha1_file) $(gpg_file)
+
+# Maybe it's just my system, but somehow group sticky bits keep
+# getting set and this causes failures in un-tarring on some systems.
+# Until I figure out where the sticky bit is coming from, just clean
+# these up before building a release.
+release-cleanup-group-sticky:
+ find . -type f | xargs chmod g-s
+
+release-check: release-verify-sane-changelogs release-verify-sane-tests release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky distcheck
+
+release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file)
+ mkdir -p releases
+ scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
+ mv $(tar_file) $(sha1_file) $(gpg_file) releases
+ ssh $(RELEASE_UPLOAD_HOST) "rm -f $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_file) $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
+ git-tag -s -m "cairo $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO) release" $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO)
+
+release-publish-message: releases/$(sha1_file)
+ @echo "Please follow the instructions in RELEASING to push stuff out and"
+ @echo "send out the announcement mails. Here is the excerpt you need:"
+ @echo ""
+ @echo "Subject: $(PACKAGE) $(RELEASE_OR_SNAPSHOT) $(VERSION) now available"
+ @echo ""
+ @echo "============================== CUT HERE =============================="
+ @echo "A new $(PACKAGE) $(RELEASE_OR_SNAPSHOT) $(VERSION) is now available from:"
+ @echo ""
+ @echo " $(RELEASE_URL_BASE)/$(tar_file)"
+ @echo ""
+ @echo " which can be verified with:"
+ @echo ""
+ @echo " $(RELEASE_URL_BASE)/$(sha1_file)"
+ @echo -n " "
+ @cat releases/$(sha1_file)
+ @echo ""
+ @echo " $(RELEASE_URL_BASE)/$(gpg_file)"
+ @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
+ @echo ""
+ @echo " Additionally, a git clone of the source tree:"
+ @echo ""
+ @echo " git clone git://git.cairographics.org/git/cairo"
+ @echo ""
+ @echo " will include a signed $(VERSION) tag which points to a commit named:"
+ @echo " `git cat-file tag $(VERSION) | grep ^object | sed -e 's,object ,,'`"
+ @echo ""
+ @echo " which can be verified with:"
+ @echo " git verify-tag $(VERSION)"
+ @echo ""
+ @echo " and can be checked out with a command such as:"
+ @echo " git checkout -b build $(VERSION)"
+ @echo ""
+ @echo "============================== CUT HERE =============================="
+
+release-publish: release-upload release-publish-message
+
+doc-publish: doc
+ rm -rf ./$(MANUAL_DATED)
+ cp -a doc/public/html $(MANUAL_DATED)
+ tar czf $(MANUAL_TAR_FILE) $(MANUAL_DATED)
+ scp $(MANUAL_TAR_FILE) $(RELEASE_UPLOAD_HOST):$(MANUAL_UPLOAD_DIR)
+ ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && tar xzf $(MANUAL_TAR_FILE) && rm -f manual && ln -s $(MANUAL_DATED) manual && ln -sf $(MANUAL_TAR_FILE) cairo-manual.tar.gz"
+
+
+
+if OS_WIN32
+
+# Win32 package zipfiles
+runtime_zip_file = $(PACKAGE)-$(VERSION).zip
+developer_zip_file = $(PACKAGE)-dev-$(VERSION).zip
+
+$(runtime_zip_file): install
+ -$(RM) $@
+ pwd=`pwd`; cd $(prefix); \
+ zip "$$pwd"/$@ bin/libcairo-$(CAIRO_VERSION_SONUM).dll
+
+$(developer_zip_file): install
+ -$(RM) $@
+ pwd=`pwd`; cd $(prefix); \
+ zip -r "$$pwd"/$@ include/cairo lib/libcairo.dll.a lib/cairo.lib lib/pkgconfig/cairo.pc lib/pkgconfig/cairo-*.pc share/gtk-doc/html/cairo
+
+zips: $(runtime_zip_file) $(developer_zip_file)
+
+endif
+
+
+.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish docs-publish
+
diff --git a/build/Releasing.mk b/build/Releasing.mk
deleted file mode 100644
index 2f71038..0000000
--- a/build/Releasing.mk
+++ /dev/null
@@ -1,153 +0,0 @@
-# Some custom targets to make it easier to release things.
-#
-# To make real stable releases or devel snapshots, use either:
-# make release-check
-# or make release-publish
-#
-# To make a quick properly named (date and git hash stamped) tarball:
-# make snapshot
-
-snapshot:
- distdir="$(distdir)-`date '+%Y%m%d'`"; \
- test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git-rev-parse HEAD | cut -c 1-6`; \
- $(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
-
-RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
-RELEASE_UPLOAD_HOST = cairographics.org
-RELEASE_UPLOAD_BASE = /srv/cairo.freedesktop.org/www
-RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)/$(RELEASE_OR_SNAPSHOT)s
-RELEASE_URL_BASE = http://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
-RELEASE_ANNOUNCE_LIST = cairo-announce at cairographics.org (and CC gnome-announce-list at gnome.org)
-
-MANUAL_DATED = cairo-manual-`date +%Y%m%d`
-MANUAL_TAR_FILE = $(MANUAL_DATED).tar.gz
-MANUAL_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)
-
-tar_file = $(PACKAGE)-$(VERSION).tar.gz
-sha1_file = $(tar_file).sha1
-gpg_file = $(sha1_file).asc
-
-$(sha1_file): $(tar_file)
- sha1sum $^ > $@
-
-$(gpg_file): $(sha1_file)
- @echo "Please enter your GPG password to sign the checksum."
- gpg --armor --sign $^
-
-release-verify-sane-changelogs: changelogs
- @echo -n "Checking that the ChangeLog files are sane..."
- @if grep -q "is required to generate" $(CHANGELOGS); then \
- (echo "Ouch." && echo "Some of the ChangeLogs are not generated correctly." \
- && echo "Remove ChangeLog* and make changelogs" \
- && false); else :; fi
- @echo "Good."
-
-release-verify-sane-tests:
- @echo "Checking that the test suite is sane..."
- @cd test && $(MAKE) $(AM_MAKEFLAGS) release-verify-sane-tests
-
-release-verify-even-micro:
- @echo -n "Checking that $(VERSION) has an even micro component..."
- @test "$(CAIRO_VERSION_MICRO)" = "`echo $(CAIRO_VERSION_MICRO)/2*2 | bc`" \
- || (echo "Ouch." && echo "The version micro component '$(CAIRO_VERSION_MICRO)' is not an even number." \
- && echo "The version in configure.in must be incremented before a new release." \
- && false)
- @echo "Good."
-
-release-verify-newer:
- @echo -n "Checking that no $(VERSION) release already exists..."
- @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \
- || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \
- && echo "Are you sure you have an updated checkout?" \
- && echo "This should never happen." \
- && false)
- @echo "Good."
-
-release-remove-old:
- $(RM) $(tar_file) $(sha1_file) $(gpg_file)
-
-# Maybe it's just my system, but somehow group sticky bits keep
-# getting set and this causes failures in un-tarring on some systems.
-# Until I figure out where the sticky bit is coming from, just clean
-# these up before building a release.
-release-cleanup-group-sticky:
- find . -type f | xargs chmod g-s
-
-release-check: release-verify-sane-changelogs release-verify-sane-tests release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky distcheck
-
-release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file)
- mkdir -p releases
- scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
- mv $(tar_file) $(sha1_file) $(gpg_file) releases
- ssh $(RELEASE_UPLOAD_HOST) "rm -f $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_file) $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
- git-tag -s -m "cairo $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO) release" $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO)
-
-release-publish-message: releases/$(sha1_file)
- @echo "Please follow the instructions in RELEASING to push stuff out and"
- @echo "send out the announcement mails. Here is the excerpt you need:"
- @echo ""
- @echo "Subject: $(PACKAGE) $(RELEASE_OR_SNAPSHOT) $(VERSION) now available"
- @echo ""
- @echo "============================== CUT HERE =============================="
- @echo "A new $(PACKAGE) $(RELEASE_OR_SNAPSHOT) $(VERSION) is now available from:"
- @echo ""
- @echo " $(RELEASE_URL_BASE)/$(tar_file)"
- @echo ""
- @echo " which can be verified with:"
- @echo ""
- @echo " $(RELEASE_URL_BASE)/$(sha1_file)"
- @echo -n " "
- @cat releases/$(sha1_file)
- @echo ""
- @echo " $(RELEASE_URL_BASE)/$(gpg_file)"
- @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
- @echo ""
- @echo " Additionally, a git clone of the source tree:"
- @echo ""
- @echo " git clone git://git.cairographics.org/git/cairo"
- @echo ""
- @echo " will include a signed $(VERSION) tag which points to a commit named:"
- @echo " `git cat-file tag $(VERSION) | grep ^object | sed -e 's,object ,,'`"
- @echo ""
- @echo " which can be verified with:"
- @echo " git verify-tag $(VERSION)"
- @echo ""
- @echo " and can be checked out with a command such as:"
- @echo " git checkout -b build $(VERSION)"
- @echo ""
- @echo "============================== CUT HERE =============================="
-
-release-publish: release-upload release-publish-message
-
-doc-publish: doc
- rm -rf ./$(MANUAL_DATED)
- cp -a doc/public/html $(MANUAL_DATED)
- tar czf $(MANUAL_TAR_FILE) $(MANUAL_DATED)
- scp $(MANUAL_TAR_FILE) $(RELEASE_UPLOAD_HOST):$(MANUAL_UPLOAD_DIR)
- ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && tar xzf $(MANUAL_TAR_FILE) && rm -f manual && ln -s $(MANUAL_DATED) manual && ln -sf $(MANUAL_TAR_FILE) cairo-manual.tar.gz"
-
-
-
-if OS_WIN32
-
-# Win32 package zipfiles
-runtime_zip_file = $(PACKAGE)-$(VERSION).zip
-developer_zip_file = $(PACKAGE)-dev-$(VERSION).zip
-
-$(runtime_zip_file): install
- -$(RM) $@
- pwd=`pwd`; cd $(prefix); \
- zip "$$pwd"/$@ bin/libcairo-$(CAIRO_VERSION_SONUM).dll
-
-$(developer_zip_file): install
- -$(RM) $@
- pwd=`pwd`; cd $(prefix); \
- zip -r "$$pwd"/$@ include/cairo lib/libcairo.dll.a lib/cairo.lib lib/pkgconfig/cairo.pc lib/pkgconfig/cairo-*.pc share/gtk-doc/html/cairo
-
-zips: $(runtime_zip_file) $(developer_zip_file)
-
-endif
-
-
-.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish docs-publish
-
commit 7ad076442d70c239c963c574849b2fb352ccd63a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 22:21:29 2008 -0400
Rename src/*.mk to src/Makefile.*
Namely:
src/Sources.mk -> src/Makefile.sources
src/Config.mk -> src/Makefile.am.config
src/Config.mk.win32 -> src/Makefile.win32.config
diff --git a/autogen.sh b/autogen.sh
index 170c883..4e32ad2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -182,8 +182,8 @@ do_cmd $ACLOCAL $ACLOCAL_FLAGS
do_cmd $AUTOHEADER
-# create dummy src/Config.mk, which will later be created by configure
-echo > src/Config.mk
+# create dummy src/Makefile.am.config, which will later be created by configure
+echo > src/Makefile.am.config
do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
diff --git a/build/enable.ac b/build/enable.ac
index 649a998..062ac7a 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -344,14 +344,14 @@ AC_SUBST(CAIRO_LIBS)
dnl ===========================================================================
dnl
-dnl Generate {src,boilerplate}/Config.mk{,.win32}
+dnl Generate {src,boilerplate}/Makefile.{am,win32}.config
dnl
dnl Accumulators
m4_pattern_allow(^CAIRO_CONFIG_AMAKE$)
CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
-include $(top_srcdir)/src/Sources.mk
+include $(top_srcdir)/src/Makefile.sources
enabled_cairo_pkgconf = cairo.pc
enabled_cairo_headers = $(cairo_headers)
@@ -368,10 +368,10 @@ m4_pattern_allow(^CAIRO_CONFIG_WIN32$)
CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE
dnl Generate
-CAIRO_CONFIG_COMMANDS([$srcdir/src/Config.mk],
+CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.am.config],
[echo "$CAIRO_CONFIG_AMAKE"],
[CAIRO_CONFIG_AMAKE='$CAIRO_CONFIG_AMAKE'])
-CAIRO_CONFIG_COMMANDS([$srcdir/src/Config.mk.win32],
+CAIRO_CONFIG_COMMANDS([$srcdir/src/Makefile.win32.config],
[echo "$CAIRO_CONFIG_WIN32"],
[CAIRO_CONFIG_WIN32='$CAIRO_CONFIG_WIN32'])
diff --git a/doc/public/Makefile.am b/doc/public/Makefile.am
index 2b6af97..d2a65e1 100644
--- a/doc/public/Makefile.am
+++ b/doc/public/Makefile.am
@@ -16,7 +16,7 @@ DOC_SOURCE_DIR=../../src
HFILE_GLOB=$(top_srcdir)/src/cairo-*.h
CFILE_GLOB=$(top_srcdir)/src/cairo-*.c $(top_srcdir)/src/cairo-*.h
-include $(top_srcdir)/src/Config.mk
+include $(top_srcdir)/src/Makefile.am.config
# Headers to ignore
IGNORE_HFILES= \
diff --git a/src/.gitignore b/src/.gitignore
index 3a51a8a..e03cc64 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -2,14 +2,14 @@
.libs
Makefile
Makefile.in
+Makefile.am.config
+Makefile.win32.config
*.gcda
*.gcno
*.la
*.lo
*.loT
*.pc
-Config.mk
-Config.mk.win32
cairo-features.h
cairo-supported-features.h
cairo.def
diff --git a/src/Makefile.am b/src/Makefile.am
index 736502a..7f9e11e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-include $(srcdir)/Config.mk
+include $(srcdir)/Makefile.am.config
EXTRA_DIST =
CLEANFILES =
@@ -13,8 +13,8 @@ export_symbols = -export-symbols cairo.def
cairo_def_dependency = cairo.def
endif
-EXTRA_DIST += cairo-supported-features.h cairo-features-win32.h Config.mk.win32
-MAINTAINERCLEANFILES += cairo-supported-features.h $(srcdir)/cairo-features-win32.h $(srcdir)/Config.mk.win32
+EXTRA_DIST += cairo-supported-features.h cairo-features-win32.h Makefile.win32.config
+MAINTAINERCLEANFILES += cairo-supported-features.h $(srcdir)/cairo-features-win32.h $(srcdir)/Makefile.win32.config
$(top_builddir)/config.h: $(top_srcdir)/config.h.in
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h
diff --git a/src/Makefile.sources b/src/Makefile.sources
new file mode 100644
index 0000000..4b916fa
--- /dev/null
+++ b/src/Makefile.sources
@@ -0,0 +1,246 @@
+# Makefile.am.sources
+#
+# This file is the canonical location listing all the source files used
+# to build the cairo library. Every source file is categorized as one of:
+#
+# * public header file
+# * private header file (must end in -private.h except for cairoint.h)
+# * source code file
+#
+# Every source file should be specified exactly once, grouped with the
+# feature that uses the source file. If more than one feature use the
+# file (like pdf_operators or font_subset files), the files should be
+# appended to to the base cairo files, and the code inside them
+# enabled/disabled using C preprocessor macros defined in cairoint.h.
+# See how pdf_operators or font_subset are handled.
+#
+# The sources are picked up according to the configured features
+# by the generated file Makefile.am.config or Makefile.win32.config.
+#
+# These are a few special source files. Those are not included in this
+# file to not confuse build systems. Each build system must handle them
+# separately. These files include:
+#
+# * cairo-features.h:
+# This file is generated by configure and includes macros signifying
+# which features are enabled. This file should be installed like
+# other public headers, but should NOT be distributed in the cairo
+# distribution.
+#
+# * cairo-features-win32.h:
+# This is a dummy file for use as cairo-featurs.h when building on
+# win32. This file is not used during the build and should NOT be
+# installed.
+#
+# * cairo-version.h:
+# This is a dummy header file used during the build, but it should
+# NOT be installed. Its sole purpose is to make sure changes in the
+# cairo version do not trigger a full rebuild of the library, but
+# just the functions actually using the version information.
+#
+# * $(top_srcdir)/cairo-version.h:
+# This is the real file holding the cairo version number. This file
+# should be installed like other public headers. This is used during
+# the build by cairo-version.c only.
+#
+# * cairo-supported-features.h:
+# This file is generated by configure and includes macros signifying
+# all supported features. This is used by gtk-doc to generate
+# documentation for all those macros, enabled or not.
+# This file is NOT used during the build of the library and should
+# NOT be installed or distributed.
+#
+# Please follow the strict syntax of this file, including keeping file
+# lists sorted.
+#
+
+cairo_headers = cairo.h cairo-deprecated.h
+cairo_private = \
+ cairoint.h \
+ cairo-analysis-surface-private.h \
+ cairo-arc-private.h \
+ cairo-atomic-private.h \
+ cairo-cache-private.h \
+ cairo-clip-private.h \
+ cairo-compiler-private.h \
+ cairo-fixed-private.h \
+ cairo-fixed-type-private.h \
+ cairo-freelist-private.h \
+ cairo-gstate-private.h \
+ cairo-hash-private.h \
+ cairo-malloc-private.h \
+ cairo-meta-surface-private.h \
+ cairo-mutex-impl-private.h \
+ cairo-mutex-list-private.h \
+ cairo-mutex-private.h \
+ cairo-mutex-type-private.h \
+ cairo-output-stream-private.h \
+ cairo-paginated-private.h \
+ cairo-paginated-surface-private.h \
+ cairo-path-fixed-private.h \
+ cairo-path-private.h \
+ cairo-private.h \
+ cairo-reference-count-private.h \
+ cairo-region-private.h \
+ cairo-scaled-font-private.h \
+ cairo-skiplist-private.h \
+ cairo-surface-fallback-private.h \
+ cairo-surface-private.h \
+ cairo-types-private.h \
+ cairo-user-font-private.h \
+ cairo-wideint-private.h \
+ cairo-wideint-type-private.h \
+ $(NULL)
+cairo_sources = \
+ cairo-analysis-surface.c \
+ cairo-arc.c \
+ cairo-array.c \
+ cairo-atomic.c \
+ cairo-base85-stream.c \
+ cairo-bentley-ottmann.c \
+ cairo.c \
+ cairo-cache.c \
+ cairo-clip.c \
+ cairo-color.c \
+ cairo-debug.c \
+ cairo-fixed.c \
+ cairo-font-face.c \
+ cairo-font-options.c \
+ cairo-freelist.c \
+ cairo-gstate.c \
+ cairo-hash.c \
+ cairo-hull.c \
+ cairo-image-surface.c \
+ cairo-lzw.c \
+ cairo-matrix.c \
+ cairo-meta-surface.c \
+ cairo-misc.c \
+ cairo-mutex.c \
+ cairo-output-stream.c \
+ cairo-paginated-surface.c \
+ cairo-path-bounds.c \
+ cairo-path.c \
+ cairo-path-fill.c \
+ cairo-path-fixed.c \
+ cairo-path-stroke.c \
+ cairo-pattern.c \
+ cairo-pen.c \
+ cairo-polygon.c \
+ cairo-rectangle.c \
+ cairo-region.c \
+ cairo-scaled-font.c \
+ cairo-skiplist.c \
+ cairo-slope.c \
+ cairo-spline.c \
+ cairo-stroke-style.c \
+ cairo-surface.c \
+ cairo-surface-fallback.c \
+ cairo-traps.c \
+ cairo-unicode.c \
+ cairo-user-font.c \
+ cairo-version.c \
+ cairo-wideint.c \
+ $(NULL)
+
+_cairo_font_subset_private = \
+ cairo-scaled-font-subsets-private.h \
+ cairo-truetype-subset-private.h \
+ cairo-type1-private.h \
+ cairo-type3-glyph-surface-private.h \
+ $(NULL)
+_cairo_font_subset_sources = \
+ cairo-cff-subset.c \
+ cairo-scaled-font-subsets.c \
+ cairo-truetype-subset.c \
+ cairo-type1-fallback.c \
+ cairo-type1-subset.c \
+ cairo-type3-glyph-surface.c \
+ $(NULL)
+cairo_private += $(_cairo_font_subset_private)
+cairo_sources += $(_cairo_font_subset_sources)
+
+_cairo_pdf_operators_private = cairo-pdf-operators-private.h
+_cairo_pdf_operators_sources = cairo-pdf-operators.c
+cairo_private += $(_cairo_pdf_operators_private)
+cairo_sources += $(_cairo_pdf_operators_sources)
+
+cairo_png_sources = cairo-png.c
+
+cairo_ps_headers = cairo-ps.h
+cairo_ps_private = cairo-ps-surface-private.h
+cairo_ps_sources = cairo-ps-surface.c
+
+cairo_pdf_headers = cairo-pdf.h
+cairo_pdf_private = cairo-pdf-surface-private.h
+cairo_pdf_sources = cairo-pdf-surface.c cairo-deflate-stream.c
+
+cairo_svg_headers = cairo-svg.h
+cairo_svg_private = cairo-svg-surface-private.h
+cairo_svg_sources = cairo-svg-surface.c
+
+cairo_ft_headers = cairo-ft.h
+cairo_ft_private = cairo-ft-private.h
+cairo_ft_sources = cairo-ft-font.c
+
+# These are private, even though they look like public headers
+cairo_test_surfaces_private = \
+ test-fallback-surface.h \
+ test-meta-surface.h \
+ test-paginated-surface.h \
+ $(NULL)
+cairo_test_surfaces_sources = \
+ test-fallback-surface.c \
+ test-meta-surface.c \
+ test-paginated-surface.c \
+ $(NULL)
+
+cairo_xlib_headers = cairo-xlib.h
+cairo_xlib_private = \
+ cairo-xlib-private.h \
+ cairo-xlib-surface-private.h \
+ cairo-xlib-xrender-private.h \
+ $(NULL)
+cairo_xlib_sources = \
+ cairo-xlib-display.c \
+ cairo-xlib-screen.c \
+ cairo-xlib-surface.c \
+ cairo-xlib-visual.c \
+ $(NULL)
+
+cairo_xlib_xrender_headers = cairo-xlib-xrender.h
+
+# XXX split xcb-xrender. or better yet, merge it into xcb. xcb is so recent
+# that it's hard to imagine having xcb but not render.
+cairo_xcb_headers = cairo-xcb.h cairo-xcb-xrender.h
+cairo_xcb_sources = cairo-xcb-surface.c
+
+cairo_quartz_headers = cairo-quartz.h
+cairo_quartz_private = cairo-quartz-private.h
+cairo_quartz_sources = cairo-quartz-surface.c
+
+cairo_quratz_image_headers = cairo-quartz-image.h
+cairo_quratz_image_sources = cairo-quartz-image-surface.c
+
+cairo_quartz_font_sources = cairo-quartz-font.c
+
+cairo_win32_headers = cairo-win32.h
+cairo_win32_private = cairo-win32-private.h
+cairo_win32_sources = cairo-win32-surface.c cairo-win32-printing-surface.c
+
+cairo_win32_font_sources = cairo-win32-font.c
+
+cairo_os2_headers = cairo-os2.h
+cairo_os2_private = cairo-os2-private.h
+cairo_os2_sources = cairo-os2-surface.c
+
+# automake is stupid enough to always use c++ linker if we enable the
+# following lines, even if beos surface is not enabled. Disable it for now.
+cairo_beos_headers = cairo-beos.h
+#cairo_beos_sources = cairo-beos-surface.cpp
+
+cairo_glitz_headers = cairo-glitz.h
+cairo_glitz_private = cairo-glitz-private.h
+cairo_glitz_sources = cairo-glitz-surface.c
+
+cairo_directfb_headers = cairo-directfb.h
+cairo_directfb_sources = cairo-directfb-surface.c
diff --git a/src/Makefile.win32 b/src/Makefile.win32
index 753fb9a..fadb32f 100644
--- a/src/Makefile.win32
+++ b/src/Makefile.win32
@@ -2,7 +2,7 @@ SUBMAKEFILE = 1
include ../Makefile.win32
-include Config.mk.win32
+include Makefile.win32.config
srcdir = `pwd`
diff --git a/src/README b/src/README
index 2d3d0e9..7c464b5 100644
--- a/src/README
+++ b/src/README
@@ -22,7 +22,7 @@ To add new backends you need to basically:
* Modify $(top_srcdir)/configure.in to add checks for your backend.
- * Modify Sources.mk to add source files for your backend,
+ * Modify Makefile.sources to add source files for your backend,
* Modify $(top_srcdir)/boilerplate/ to add boilerplate code for
testing your new backend.
diff --git a/src/Sources.mk b/src/Sources.mk
deleted file mode 100644
index 8652dad..0000000
--- a/src/Sources.mk
+++ /dev/null
@@ -1,246 +0,0 @@
-# Sources.mk
-#
-# This file is the canonical location listing all the source files used
-# to build the cairo library. Every source file is categorized as one of:
-#
-# * public header file
-# * private header file (must end in -private.h except for cairoint.h)
-# * source code file
-#
-# Every source file should be specified exactly once, grouped with the
-# backend/feature that uses the source file. If more than one
-# backend/feature use the file (like pdf_operators or font_subset files),
-# the files should be appended to to the base cairo files, and the code
-# inside them enabled/disabled using C preprocessor macros defined in
-# cairoint.h. See how pdf_operators or font_subset are handled.
-#
-# The sources are picked up according to the configured backends/features
-# by the generated file Config.mk or Config.mk.win32.
-#
-# These are a few special source files. Those are not included in this
-# file to not confuse build systems. Each build system must handle them
-# separately. These files include:
-#
-# * cairo-features.h:
-# This file is generated by configure and includes macros signifying
-# which backends/features are enabled. This file should be installed
-# like other public headers, but should NOT be distributed in the
-# cairo distribution.
-#
-# * cairo-features-win32.h:
-# This is a dummy file for use as cairo-featurs.h when building on
-# win32. This file is not used during the build and should NOT be
-# installed.
-#
-# * cairo-version.h:
-# This is a dummy header file used during the build, but it should
-# NOT be installed. Its sole purpose is to make sure changes in the
-# cairo version do not trigger a full rebuild of the library, but
-# just the functions actually using the version information.
-#
-# * $(top_srcdir)/cairo-version.h:
-# This is the real file holding the cairo version number. This file
-# should be installed like other public headers. This is used during
-# the build by cairo-version.c only.
-#
-# * cairo-supported-features.h:
-# This file is generated by configure and includes macros signifying
-# all supported supported backends/features. This is used by gtk-doc
-# to generate documentation for all those macros, enabled or not.
-# This file is NOT used during the build of the library and should NOT
-# be installed or distributed.
-#
-# Please follow the strict syntax of this file, including keeping file
-# lists sorted.
-#
-
-cairo_headers = cairo.h cairo-deprecated.h
-cairo_private = \
- cairoint.h \
- cairo-analysis-surface-private.h \
- cairo-arc-private.h \
- cairo-atomic-private.h \
- cairo-cache-private.h \
- cairo-clip-private.h \
- cairo-compiler-private.h \
- cairo-fixed-private.h \
- cairo-fixed-type-private.h \
- cairo-freelist-private.h \
- cairo-gstate-private.h \
- cairo-hash-private.h \
- cairo-malloc-private.h \
- cairo-meta-surface-private.h \
- cairo-mutex-impl-private.h \
- cairo-mutex-list-private.h \
- cairo-mutex-private.h \
- cairo-mutex-type-private.h \
- cairo-output-stream-private.h \
- cairo-paginated-private.h \
- cairo-paginated-surface-private.h \
- cairo-path-fixed-private.h \
- cairo-path-private.h \
- cairo-private.h \
- cairo-reference-count-private.h \
- cairo-region-private.h \
- cairo-scaled-font-private.h \
- cairo-skiplist-private.h \
- cairo-surface-fallback-private.h \
- cairo-surface-private.h \
- cairo-types-private.h \
- cairo-user-font-private.h \
- cairo-wideint-private.h \
- cairo-wideint-type-private.h \
- $(NULL)
-cairo_sources = \
- cairo-analysis-surface.c \
- cairo-arc.c \
- cairo-array.c \
- cairo-atomic.c \
- cairo-base85-stream.c \
- cairo-bentley-ottmann.c \
- cairo.c \
- cairo-cache.c \
- cairo-clip.c \
- cairo-color.c \
- cairo-debug.c \
- cairo-fixed.c \
- cairo-font-face.c \
- cairo-font-options.c \
- cairo-freelist.c \
- cairo-gstate.c \
- cairo-hash.c \
- cairo-hull.c \
- cairo-image-surface.c \
- cairo-lzw.c \
- cairo-matrix.c \
- cairo-meta-surface.c \
- cairo-misc.c \
- cairo-mutex.c \
- cairo-output-stream.c \
- cairo-paginated-surface.c \
- cairo-path-bounds.c \
- cairo-path.c \
- cairo-path-fill.c \
- cairo-path-fixed.c \
- cairo-path-stroke.c \
- cairo-pattern.c \
- cairo-pen.c \
- cairo-polygon.c \
- cairo-rectangle.c \
- cairo-region.c \
- cairo-scaled-font.c \
- cairo-skiplist.c \
- cairo-slope.c \
- cairo-spline.c \
- cairo-stroke-style.c \
- cairo-surface.c \
- cairo-surface-fallback.c \
- cairo-traps.c \
- cairo-unicode.c \
- cairo-user-font.c \
- cairo-version.c \
- cairo-wideint.c \
- $(NULL)
-
-_cairo_font_subset_private = \
- cairo-scaled-font-subsets-private.h \
- cairo-truetype-subset-private.h \
- cairo-type1-private.h \
- cairo-type3-glyph-surface-private.h \
- $(NULL)
-_cairo_font_subset_sources = \
- cairo-cff-subset.c \
- cairo-scaled-font-subsets.c \
- cairo-truetype-subset.c \
- cairo-type1-fallback.c \
- cairo-type1-subset.c \
- cairo-type3-glyph-surface.c \
- $(NULL)
-cairo_private += $(_cairo_font_subset_private)
-cairo_sources += $(_cairo_font_subset_sources)
-
-_cairo_pdf_operators_private = cairo-pdf-operators-private.h
-_cairo_pdf_operators_sources = cairo-pdf-operators.c
-cairo_private += $(_cairo_pdf_operators_private)
-cairo_sources += $(_cairo_pdf_operators_sources)
-
-cairo_png_sources = cairo-png.c
-
-cairo_ps_headers = cairo-ps.h
-cairo_ps_private = cairo-ps-surface-private.h
-cairo_ps_sources = cairo-ps-surface.c
-
-cairo_pdf_headers = cairo-pdf.h
-cairo_pdf_private = cairo-pdf-surface-private.h
-cairo_pdf_sources = cairo-pdf-surface.c cairo-deflate-stream.c
-
-cairo_svg_headers = cairo-svg.h
-cairo_svg_private = cairo-svg-surface-private.h
-cairo_svg_sources = cairo-svg-surface.c
-
-cairo_ft_headers = cairo-ft.h
-cairo_ft_private = cairo-ft-private.h
-cairo_ft_sources = cairo-ft-font.c
-
-# These are private, even though they look like public headers
-cairo_test_surfaces_private = \
- test-fallback-surface.h \
- test-meta-surface.h \
- test-paginated-surface.h \
- $(NULL)
-cairo_test_surfaces_sources = \
- test-fallback-surface.c \
- test-meta-surface.c \
- test-paginated-surface.c \
- $(NULL)
-
-cairo_xlib_headers = cairo-xlib.h
-cairo_xlib_private = \
- cairo-xlib-private.h \
- cairo-xlib-surface-private.h \
- cairo-xlib-xrender-private.h \
- $(NULL)
-cairo_xlib_sources = \
- cairo-xlib-display.c \
- cairo-xlib-screen.c \
- cairo-xlib-surface.c \
- cairo-xlib-visual.c \
- $(NULL)
-
-cairo_xlib_xrender_headers = cairo-xlib-xrender.h
-
-# XXX split xcb-xrender. or better yet, merge it into xcb. xcb is so recent
-# that it's hard to imagine having xcb but not render.
-cairo_xcb_headers = cairo-xcb.h cairo-xcb-xrender.h
-cairo_xcb_sources = cairo-xcb-surface.c
-
-cairo_quartz_headers = cairo-quartz.h
-cairo_quartz_private = cairo-quartz-private.h
-cairo_quartz_sources = cairo-quartz-surface.c
-
-cairo_quratz_image_headers = cairo-quartz-image.h
-cairo_quratz_image_sources = cairo-quartz-image-surface.c
-
-cairo_quartz_font_sources = cairo-quartz-font.c
-
-cairo_win32_headers = cairo-win32.h
-cairo_win32_private = cairo-win32-private.h
-cairo_win32_sources = cairo-win32-surface.c cairo-win32-printing-surface.c
-
-cairo_win32_font_sources = cairo-win32-font.c
-
-cairo_os2_headers = cairo-os2.h
-cairo_os2_private = cairo-os2-private.h
-cairo_os2_sources = cairo-os2-surface.c
-
-# automake is stupid enough to always use c++ linker if we enable the
-# following lines, even if beos surface is not enabled. Disable it for now.
-cairo_beos_headers = cairo-beos.h
-#cairo_beos_sources = cairo-beos-surface.cpp
-
-cairo_glitz_headers = cairo-glitz.h
-cairo_glitz_private = cairo-glitz-private.h
-cairo_glitz_sources = cairo-glitz-surface.c
-
-cairo_directfb_headers = cairo-directfb.h
-cairo_directfb_sources = cairo-directfb-surface.c
commit 8da361470fb8a4e11c7292dbfc57e3dafef7b7f0
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 21:59:27 2008 -0400
[configure.in] Forbid arbitrary CAIRO_ patterns in the output
diff --git a/acinclude.m4 b/acinclude.m4
index 1969370..09a8a43 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2,8 +2,6 @@ dnl -*- mode: autoconf -*-
# serial 1
-m4_pattern_forbid([_CAIRO])
-
dnl Usage:
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
AC_DEFUN([GTK_DOC_CHECK],
@@ -120,6 +118,15 @@ esac
])# AX_C_FLOAT_WORDS_BIGENDIAN
+
+dnl ==========================================================================
+dnl
+dnl Cairo-specific macros
+dnl
+m4_pattern_forbid([CAIRO])
+
+dnl ==========================================================================
+
dnl Usage:
dnl CAIRO_BIGENDIAN
dnl
diff --git a/build/enable.ac b/build/enable.ac
index fd91cca..649a998 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -201,6 +201,7 @@ endif
])
])
+m4_pattern_allow(^CAIRO_HAS_)
m4_define([_CAIRO_BUILD_FEATURE_NAME_NORMALIZED],
[CAIRO_HAS_[$1]m4_bmatch([$1],[$2$],,[$2])])
@@ -255,6 +256,7 @@ dnl Report
dnl
dnl Accumulator for warning messages
+m4_pattern_allow(^CAIRO_WARNING_MESSAGE$)
CAIRO_WARNING_MESSAGE=""
AC_DEFUN([CAIRO_REPORT],
@@ -346,6 +348,7 @@ dnl Generate {src,boilerplate}/Config.mk{,.win32}
dnl
dnl Accumulators
+m4_pattern_allow(^CAIRO_CONFIG_AMAKE$)
CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
include $(top_srcdir)/src/Sources.mk
@@ -361,6 +364,7 @@ all_cairo_sources = $(cairo_sources)
supported_cairo_headers = $(cairo_headers)
unsupported_cairo_headers =
'
+m4_pattern_allow(^CAIRO_CONFIG_WIN32$)
CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE
dnl Generate
@@ -378,8 +382,11 @@ dnl List of enabled, supported but disabled, and all supported features
dnl
dnl Accumulators
+m4_pattern_allow(^CAIRO_FEATURES$)
CAIRO_FEATURES=""
+m4_pattern_allow(^CAIRO_NO_FEATURES$)
CAIRO_NO_FEATURES=""
+m4_pattern_allow(^CAIRO_SUPPORTED_FEATURES$)
CAIRO_SUPPORTED_FEATURES=""
dnl Generate src/cairo-features.h and src/cairo-supported-features.h
commit 33ed2fffb571fd50e07417d93ecaa288749b79d2
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 21:13:39 2008 -0400
[build/enable.ac] Add a feature "type" argument (font, surface, ...)
diff --git a/build/enable.ac b/build/enable.ac
index 4ba71cf..fd91cca 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -17,14 +17,19 @@ m4_define(cairo_cache_version, 4)
dnl ===========================================================================
dnl
dnl Define a macro to enable features
-dnl - Macro: _CAIRO_ENABLE_NORMALIZED (NAMESPACE, NAME, ARG, FEATURE_NAME, DEFAULT, COMMANDS)
+dnl - Macro: _CAIRO_ENABLE_FULL (NAMESPACE, NAME, ARG, FEATURE_NAME, DEFAULT, WHAT, COMMANDS)
dnl
dnl where:
dnl
dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
dnl NAME is the human-readable name of the backend, eg. "FreeType font"
dnl ARG is what enables the backend, eg. "freetype" for --enable-freetype
-dnl FEATURE_NAME is what's used in cairo-features.h, eg. FT_FONT for CAIRO_HAS_FT_FONT
+dnl FEATURE_NAME is the feature conditional, eg. CAIRO_HAS_FT_FONT
+dnl WHAT is the type of feature:
+dnl "surface" for surface backends
+dnl "font" for font backends
+dnl "functions" for set of functions
+dnl "" for private configurations
dnl DEFAULT is the default state of the backend:
dnl "no" for experimental backends, eg. your favorite new backend
dnl "yes" for mandatory backends, eg. png
@@ -37,11 +42,11 @@ dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
dnl appropriately. Look at the macro definition for more details,
dnl or ask if in doubt.
dnl
-AC_DEFUN([_CAIRO_ENABLE_NORMALIZED],
+AC_DEFUN([_CAIRO_ENABLE_FULL],
[ AC_ARG_ENABLE([$3],
AS_HELP_STRING([--enable-$3=@<:@no/auto/yes@:>@],
- [Enable cairo's $2 backend @<:@default=$5@:>@]),
- enable_$1=$enableval, enable_$1=$5)
+ [Enable cairo's $2 backend @<:@default=$6@:>@]),
+ enable_$1=$enableval, enable_$1=$6)
case $enable_$1 in
no)
use_$1="no (disabled, use --enable-$3 to enable)"
@@ -61,7 +66,7 @@ AC_DEFUN([_CAIRO_ENABLE_NORMALIZED],
$1[]_NONPKGCONFIG_CFLAGS=$ac_env_[]$1[]_NONPKGCONFIG_CFLAGS_value
$1[]_NONPKGCONFIG_LIBS=$ac_env_[]$1[]_NONPKGCONFIG_LIBS_value
$1[]_BASE=cairo
- $6
+ $7
cairo_cv_backend_[]$1[]_use=$use_[]$1
cairo_cv_backend_[]$1[]_cache_version=cairo_cache_version
cairo_cv_backend_[]$1[]_requires=$[]$1[]_REQUIRES
@@ -127,16 +132,16 @@ AC_DEFUN([_CAIRO_ENABLE_NORMALIZED],
])
fi
- AM_CONDITIONAL(CAIRO_HAS_$4, test "x$use_$1" = xyes)
+ AM_CONDITIONAL($4, test "x$use_$1" = xyes)
dnl Collect list of all supported but disabled features
- AS_IF([test "x$use_$1" != xyes -a "x$5" != xno],
+ AS_IF([test "x$use_$1" != xyes -a "x$6" != xno],
[
CAIRO_NO_FEATURES="$4 $CAIRO_NO_FEATURES"
])
dnl Collect list of all (un)supported features and cairo headers
- AS_IF([test "x$5" = xno],
+ AS_IF([test "x$6" = xno],
[
CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
unsupported_cairo_headers += $(cairo_$1_headers)'
@@ -156,7 +161,7 @@ all_cairo_pkgconf += $(cairo_$1_pkgconf)
all_cairo_headers += $(cairo_$1_headers)
all_cairo_private += $(cairo_$1_private)
all_cairo_sources += $(cairo_$1_sources)
-if CAIRO_HAS_$4
+if $4
enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
enabled_cairo_headers += $(cairo_$1_headers)
enabled_cairo_private += $(cairo_$1_private)
@@ -168,7 +173,7 @@ all_cairo_pkgconf += $(cairo_$1_pkgconf)
all_cairo_headers += $(cairo_$1_headers)
all_cairo_private += $(cairo_$1_private)
all_cairo_sources += $(cairo_$1_sources)
-ifeq ($(CAIRO_HAS_$4),1)
+ifeq ($($4),1)
enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
enabled_cairo_headers += $(cairo_$1_headers)
enabled_cairo_private += $(cairo_$1_private)
@@ -176,7 +181,7 @@ enabled_cairo_sources += $(cairo_$1_sources)
endif
'
dnl Collect warning message for enabled unsupported backends
- AS_IF([test "x$use_$1" = xyes -a "x$5" = xno],
+ AS_IF([test "x$use_$1" = xyes -a "x$6" = xno],
[
CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
*** The $2 backend is still under active development and
@@ -187,7 +192,7 @@ endif
])
dnl Collect warning message for disabled recommended backends
- AS_IF([test "x$use_$1" != xyes -a "x$5" = xyes],
+ AS_IF([test "x$use_$1" != xyes -a "x$6" = xyes],
[
CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
*** It is strictly recommended that you do NOT disable
@@ -196,19 +201,23 @@ endif
])
])
-dnl Like _CAIRO_ENABLE_NORMALIZED, but sanities input
-AC_DEFUN([_CAIRO_ENABLE],
-[
- _CAIRO_ENABLE_NORMALIZED(
- m4_translit([$1],[A-Z_ -],[a-z___]),
- [$2],
- m4_translit([$3],[A-Z_ -],[a-z---]),
- m4_translit([$4],[a-z_ -],[A-Z___]),
- [$5],
- [$6]
- )
-])
+m4_define([_CAIRO_BUILD_FEATURE_NAME_NORMALIZED],
+ [CAIRO_HAS_[$1]m4_bmatch([$1],[$2$],,[$2])])
+m4_define([_CAIRO_BUILD_FEATURE_NAME],
+[_CAIRO_BUILD_FEATURE_NAME_NORMALIZED(m4_translit([$1],[a-z_ -],[A-Z___]),m4_translit(m4_ifval([$2],[ $2]),[a-z_ -],[A-Z___]))])
+
+dnl Like _CAIRO_ENABLE*, but takes an object type too
+AC_DEFUN([_CAIRO_ENABLE],
+[_CAIRO_ENABLE_FULL(
+ m4_translit([$1],[A-Z_ -],[a-z___]),
+ [$2],
+ m4_translit([$1],[A-Z_ -],[a-z---]),
+ _CAIRO_BUILD_FEATURE_NAME([$1],[$3]),
+ [$3],
+ [$4],
+ [$5]
+)])
dnl ===========================================================================
dnl
@@ -232,13 +241,13 @@ dnl appropriately. Look at the macro definition for more details,
dnl or ask if in doubt.
dnl
AC_DEFUN([CAIRO_ENABLE],
-[_CAIRO_ENABLE([$1],[$2],[$1],[$1],[$3],[$4])])
+[_CAIRO_ENABLE([$1],[$2],,[$3],[$4])])
AC_DEFUN([CAIRO_ENABLE_SURFACE_BACKEND],
-[_CAIRO_ENABLE([$1],[$2 surface backend],[$1],[$1_SURFACE],[$3],[$4])])
+[_CAIRO_ENABLE([$1],[$2 surface backend],surface,[$3],[$4])])
AC_DEFUN([CAIRO_ENABLE_FONT_BACKEND],
-[_CAIRO_ENABLE([$1],[$2 font backend],[$1],m4_bpatsubst([$1],[_font$],[])[_FONT],[$3],[$4])])
+[_CAIRO_ENABLE([$1],[$2 font backend],font,[$3],[$4])])
AC_DEFUN([CAIRO_ENABLE_FUNCTIONS],
-[_CAIRO_ENABLE([$1],[$2 functions],[$1],[$1_FUNCTIONS],[$3],[$4])])
+[_CAIRO_ENABLE([$1],[$2 functions],functions,[$3],[$4])])
dnl ===========================================================================
dnl
@@ -381,11 +390,11 @@ CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
echo '#define CAIRO_FEATURES_H'
echo ''
for FEATURE in $CAIRO_FEATURES; do
- echo "#define CAIRO_HAS_$FEATURE 1"
+ echo "#define $FEATURE 1"
done | LANG=C sort
echo ''
for FEATURE in $CAIRO_NO_FEATURES; do
- echo "/*#undef CAIRO_HAS_$FEATURE */"
+ echo "/*#undef $FEATURE */"
done | LANG=C sort
echo ''
echo '#endif'
@@ -402,7 +411,7 @@ CAIRO_CONFIG_COMMANDS([$srcdir/src/cairo-supported-features.h],
echo '/* This is a dummy header, to trick gtk-doc only */'
echo ''
for FEATURE in $CAIRO_SUPPORTED_FEATURES; do
- echo "#define CAIRO_HAS_$FEATURE 1"
+ echo "#define $FEATURE 1"
done
echo ''
echo '#endif'
commit c8e75f10079e410cc1925000b14f6d1606216723
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 21:13:17 2008 -0400
[acinclude.m4] Disallow "_CAIRO" patterns in the output
Eases m4 writing.
diff --git a/acinclude.m4 b/acinclude.m4
index a2d0b30..1969370 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2,6 +2,8 @@ dnl -*- mode: autoconf -*-
# serial 1
+m4_pattern_forbid([_CAIRO])
+
dnl Usage:
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
AC_DEFUN([GTK_DOC_CHECK],
commit 86ef1dff59c5f1f11b8a672c6d3a16babc8fd8f9
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 19:50:32 2008 -0400
[configure.in] Break CAIRO_BACKEND_ENABLE into feature-specific ones
diff --git a/build/enable.ac b/build/enable.ac
index 5c04153..4ba71cf 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -16,8 +16,8 @@ m4_define(cairo_cache_version, 4)
dnl ===========================================================================
dnl
-dnl Define a macro to enable backends.
-dnl - Macro: CAIRO_BACKEND_ENABLE (NAMESPACE, NAME, ARG, FEATURE_NAME, DEFAULT, COMMANDS)
+dnl Define a macro to enable features
+dnl - Macro: _CAIRO_ENABLE_NORMALIZED (NAMESPACE, NAME, ARG, FEATURE_NAME, DEFAULT, COMMANDS)
dnl
dnl where:
dnl
@@ -37,7 +37,7 @@ dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
dnl appropriately. Look at the macro definition for more details,
dnl or ask if in doubt.
dnl
-AC_DEFUN([CAIRO_BACKEND_ENABLE],
+AC_DEFUN([_CAIRO_ENABLE_NORMALIZED],
[ AC_ARG_ENABLE([$3],
AS_HELP_STRING([--enable-$3=@<:@no/auto/yes@:>@],
[Enable cairo's $2 backend @<:@default=$5@:>@]),
@@ -196,7 +196,49 @@ endif
])
])
+dnl Like _CAIRO_ENABLE_NORMALIZED, but sanities input
+AC_DEFUN([_CAIRO_ENABLE],
+[
+ _CAIRO_ENABLE_NORMALIZED(
+ m4_translit([$1],[A-Z_ -],[a-z___]),
+ [$2],
+ m4_translit([$3],[A-Z_ -],[a-z---]),
+ m4_translit([$4],[a-z_ -],[A-Z___]),
+ [$5],
+ [$6]
+ )
+])
+
+dnl ===========================================================================
+dnl
+dnl Define macros to enable various features.
+dnl - Macro: CAIRO_ENABLE_* (NAMESPACE, NAME, DEFAULT, COMMANDS)
+dnl
+dnl where:
+dnl
+dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
+dnl NAME is the human-readable name of the feature, eg. "FreeType"
+dnl DEFAULT is the default state of the backend:
+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 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_$(NAMESPACE) to something other than yes if the
+dnl backend cannot be built, eg. "no (requires SomeThing)". It then
+dnl should also set $(NAMESPACE)_REQUIRES/CFLAGS/LIBS/...
+dnl appropriately. Look at the macro definition for more details,
+dnl or ask if in doubt.
+dnl
+AC_DEFUN([CAIRO_ENABLE],
+[_CAIRO_ENABLE([$1],[$2],[$1],[$1],[$3],[$4])])
+AC_DEFUN([CAIRO_ENABLE_SURFACE_BACKEND],
+[_CAIRO_ENABLE([$1],[$2 surface backend],[$1],[$1_SURFACE],[$3],[$4])])
+AC_DEFUN([CAIRO_ENABLE_FONT_BACKEND],
+[_CAIRO_ENABLE([$1],[$2 font backend],[$1],m4_bpatsubst([$1],[_font$],[])[_FONT],[$3],[$4])])
+AC_DEFUN([CAIRO_ENABLE_FUNCTIONS],
+[_CAIRO_ENABLE([$1],[$2 functions],[$1],[$1_FUNCTIONS],[$3],[$4])])
dnl ===========================================================================
dnl
diff --git a/configure.in b/configure.in
index d283e55..24a398b 100644
--- a/configure.in
+++ b/configure.in
@@ -29,7 +29,7 @@ AC_CHECK_LIB(z, compress,
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(xlib, Xlib, xlib, XLIB_SURFACE, auto, [
+CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
xlib_REQUIRES="x11"
PKG_CHECK_MODULES(xlib, $xlib_REQUIRES, ,
[AC_MSG_RESULT(no)
@@ -43,7 +43,7 @@ CAIRO_BACKEND_ENABLE(xlib, Xlib, xlib, XLIB_SURFACE, auto, [
fi])
])
-CAIRO_BACKEND_ENABLE(xlib_xrender, Xlib Xrender, xlib-xrender, XLIB_XRENDER_SURFACE, auto, [
+CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
if test "x$use_xlib" != "xyes"; then
use_xlib_xrender="no (requires --enable-xlib)"
else
@@ -65,7 +65,7 @@ CAIRO_BACKEND_ENABLE(xlib_xrender, Xlib Xrender, xlib-xrender, XLIB_XRENDER_SURF
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(xcb, XCB, xcb, XCB_SURFACE, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, no, [
xcb_REQUIRES="xcb >= 0.9.92 xcb-render >= 0.9.92 xcb-renderutil"
PKG_CHECK_MODULES(xcb, $xcb_REQUIRES, , [AC_MSG_RESULT(no)
use_xcb="no (requires XCB http://xcb.freedesktop.org)"])
@@ -73,7 +73,7 @@ CAIRO_BACKEND_ENABLE(xcb, XCB, xcb, XCB_SURFACE, no, [
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(quartz, Quartz, quartz, QUARTZ_SURFACE, auto, [
+CAIRO_ENABLE_SURFACE_BACKEND(quartz, Quartz, auto, [
dnl There is no pkgconfig for quartz; lets do a header check
AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, , [use_quartz="no (ApplicationServices framework not found)"])
if test "x$use_quartz" != "xyes" ; then
@@ -85,24 +85,24 @@ CAIRO_BACKEND_ENABLE(quartz, Quartz, quartz, QUARTZ_SURFACE, auto, [
fi
])
-CAIRO_BACKEND_ENABLE(quartz_font, Quartz font, quartz-font, QUARTZ_FONT, auto, [
+CAIRO_ENABLE_FONT_BACKEND(quartz_font, Quartz, auto, [
use_quartz_font=$use_quartz
])
-CAIRO_BACKEND_ENABLE(quartz_image, Quartz Image, quartz-image, QUARTZ_IMAGE_SURFACE, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(quartz_image, Quartz Image, no, [
use_quartz_image=$use_quartz
])
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, win32, WIN32_SURFACE, auto, [
+CAIRO_ENABLE_SURFACE_BACKEND(win32, Microsoft Windows, auto, [
if test "x$have_windows" != xyes; then
use_win32="no (requires a Win32 platform)"
fi
win32_LIBS="-lgdi32 -lmsimg32"
])
-CAIRO_BACKEND_ENABLE(win32_font, Microsoft Windows font, win32-font, WIN32_FONT, auto, [
+CAIRO_ENABLE_FONT_BACKEND(win32_font, Microsoft Windows, auto, [
use_win32_font=$use_win32
])
@@ -122,7 +122,7 @@ AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printin
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(os2, OS/2, os2, OS2_SURFACE, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(os2, OS/2, no, [
case "$host" in
*-*-os2*)
:
@@ -135,9 +135,10 @@ CAIRO_BACKEND_ENABLE(os2, OS/2, os2, OS2_SURFACE, no, [
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, beos, BEOS_SURFACE, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(beos, BeOS/Zeta, no, [
case "$host" in
*-*-beos)
+ beos_LIBS=""
dnl Add libbe and libzeta if available
AC_CHECK_LIB(be,main,beos_LIBS="$beos_LIBS -lbe")
AC_CHECK_LIB(zeta,main,beos_LIBS="$beos_LIBS -lzeta")
@@ -150,7 +151,7 @@ CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, beos, BEOS_SURFACE, no, [
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(png, PNG functions, png, PNG_FUNCTIONS, yes, [
+CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
use_png=no
AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config])
if test "x$png_REQUIRES" = x; then
@@ -176,7 +177,7 @@ CAIRO_BACKEND_ENABLE(png, PNG functions, png, PNG_FUNCTIONS, yes, [
dnl ===========================================================================
GLITZ_MIN_VERSION=0.5.1
-CAIRO_BACKEND_ENABLE(glitz, glitz, glitz, GLITZ_SURFACE, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(glitz, glitz, no, [
glitz_REQUIRES="glitz >= $GLITZ_MIN_VERSION"
PKG_CHECK_MODULES(glitz, $glitz_REQUIRES, , [AC_MSG_RESULT(no)
use_glitz="no (requires glitz http://freedesktop.org/Software/glitz)"])
@@ -213,7 +214,7 @@ AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, test "x$have_glitz_wgl" = "xyes
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(directfb, directfb, directfb, DIRECTFB_SURFACE, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(directfb, directfb, no, [
directfb_REQUIRES=directfb
PKG_CHECK_MODULES(directfb, $directfb_REQUIRES, , AC_MSG_RESULT(no)
[use_directfb="no (requires directfb http://www.directfb.org)"])
@@ -241,7 +242,7 @@ FREETYPE_MIN_RELEASE=2.1.9
# libtool-specific version - this is what is checked
FREETYPE_MIN_VERSION=9.7.3
-CAIRO_BACKEND_ENABLE(ft, FreeType font, freetype, FT_FONT, auto, [
+CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
ft_REQUIRES="fontconfig"
PKG_CHECK_MODULES(FONTCONFIG, $ft_REQUIRES,,
[AC_MSG_RESULT(no); use_ft="no (requires fontconfig)"])
@@ -324,7 +325,7 @@ fi
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(ps, PostScript, ps, PS_SURFACE, yes, [
+CAIRO_ENABLE_SURFACE_BACKEND(ps, PostScript, yes, [
# The ps backend requires zlib.
use_ps=$have_libz
ps_NONPKGCONFIG_LIBS=-lz
@@ -348,7 +349,7 @@ AM_CONDITIONAL(CAIRO_CAN_TEST_PS_SURFACE, test "x$test_ps" = "xyes")
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(pdf, PDF, pdf, PDF_SURFACE, yes, [
+CAIRO_ENABLE_SURFACE_BACKEND(pdf, PDF, yes, [
# The pdf backend requires zlib.
use_pdf=$have_libz
pdf_NONPKGCONFIG_LIBS=-lz
@@ -380,7 +381,7 @@ AM_CONDITIONAL(CAIRO_HAS_MULTI_PAGE_SURFACES, test "x$use_ps" = "xyes" -o "x$use
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(svg, SVG, svg, SVG_SURFACE, yes, [
+CAIRO_ENABLE_SURFACE_BACKEND(svg, SVG, yes, [
if test "x$use_png" != "xyes"; then
use_svg="no (requires --enable-png)"
fi
@@ -409,7 +410,7 @@ AC_SUBST(LIBRSVG_LIBS)
dnl ===========================================================================
dnl XXX make this a private feature?
-CAIRO_BACKEND_ENABLE(test_surfaces, test surfaces, test-surfaces, TEST_SURFACES, no)
+CAIRO_ENABLE(test_surfaces, test surfaces, no)
dnl ===========================================================================
commit 4a96eb79ce75b60025c3da0a7782ffc2bd712ee7
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 17:50:15 2008 -0400
[build/enable.ac] Reformat for readability
diff --git a/build/enable.ac b/build/enable.ac
index 80fa147..5c04153 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -38,75 +38,78 @@ dnl appropriately. Look at the macro definition for more details,
dnl or ask if in doubt.
dnl
AC_DEFUN([CAIRO_BACKEND_ENABLE],
- [AC_ARG_ENABLE([$3],
- AS_HELP_STRING([--enable-$3=@<:@no/auto/yes@:>@],
- [Enable cairo's $2 backend @<:@default=$5@:>@]),
- enable_$1=$enableval, enable_$1=$5)
- if test "x$enable_$1" = xno; then
- use_$1="no (disabled, use --enable-$3 to enable)"
- else
- if test "x$cairo_cv_backend_[]$1[]_cache_version" != "x[]cairo_cache_version"; then
- # cached results for this backend (if any) are stale. force rechecking.
- unset cairo_cv_backend_[]$1[]_use
- fi
- AC_CACHE_CHECK([for cairo's $2 backend], cairo_cv_backend_[]$1[]_use,
- [echo
- use_[]$1=yes
- $1[]_REQUIRES=$ac_env_[]$1[]_REQUIRES_value
- $1[]_CFLAGS=$ac_env_[]$1[]_CFLAGS_value
- $1[]_LIBS=$ac_env_[]$1[]_LIBS_value
- $1[]_NONPKGCONFIG_CFLAGS=$ac_env_[]$1[]_NONPKGCONFIG_CFLAGS_value
- $1[]_NONPKGCONFIG_LIBS=$ac_env_[]$1[]_NONPKGCONFIG_LIBS_value
- $1[]_BASE=cairo
- $6
- cairo_cv_backend_[]$1[]_use=$use_[]$1
- cairo_cv_backend_[]$1[]_cache_version=cairo_cache_version
- cairo_cv_backend_[]$1[]_requires=$[]$1[]_REQUIRES
- cairo_cv_backend_[]$1[]_cflags=$[]$1[]_CFLAGS
- cairo_cv_backend_[]$1[]_libs=$[]$1[]_LIBS
- cairo_cv_backend_[]$1[]_nonpkgconfig_cflags=$[]$1[]_NONPKGCONFIG_CFLAGS
- cairo_cv_backend_[]$1[]_nonpkgconfig_libs=$[]$1[]_NONPKGCONFIG_LIBS
- cairo_cv_backend_[]$1[]_base=$[]$1[]_BASE
- AC_MSG_CHECKING([whether cairo's $2 backend could be enabled])])
-
- use_[]$1=$cairo_cv_backend_[]$1[]_use
- $1[]_BASE=$cairo_cv_backend_[]$1[]_base
-
- $1[]_REQUIRES="$cairo_cv_backend_[]$1[]_requires "
- $1[]_CFLAGS="$cairo_cv_backend_[]$1[]_cflags "
- $1[]_LIBS="$cairo_cv_backend_[]$1[]_libs "
- $1[]_NONPKGCONFIG_CFLAGS="$cairo_cv_backend_[]$1[]_nonpkgconfig_cflags "
- $1[]_NONPKGCONFIG_LIBS="$cairo_cv_backend_[]$1[]_nonpkgconfig_libs "
-
- # null the ones that only have space
- test "x$$1[]_REQUIRES" = "x " && $1[]_REQUIRES=""
- test "x$$1[]_CFLAGS" = "x " && $1[]_CFLAGS=""
- test "x$$1[]_LIBS" = "x " && $1[]_LIBS=""
- test "x$$1[]_NONPKGCONFIG_CFLAGS" = "x " && $1[]_NONPKGCONFIG_CFLAGS=""
- test "x$$1[]_NONPKGCONFIG_LIBS" = "x " && $1[]_NONPKGCONFIG_LIBS=""
-
- case $enable_[]$1 in
- yes)
- AS_IF([test "x$use_[]$1" = xyes],,[
- AC_MSG_ERROR([requested $2 backend could not be enabled])
+[ AC_ARG_ENABLE([$3],
+ AS_HELP_STRING([--enable-$3=@<:@no/auto/yes@:>@],
+ [Enable cairo's $2 backend @<:@default=$5@:>@]),
+ enable_$1=$enableval, enable_$1=$5)
+ case $enable_$1 in
+ no)
+ use_$1="no (disabled, use --enable-$3 to enable)"
+ ;;
+ yes|auto)
+ if test "x$cairo_cv_backend_[]$1[]_cache_version" != "x[]cairo_cache_version"; then
+ # cached results for this backend (if any) are stale. force rechecking.
+ unset cairo_cv_backend_[]$1[]_use
+ fi
+ AC_CACHE_CHECK([for cairo's $2 backend], cairo_cv_backend_[]$1[]_use,
+ [
+ echo
+ use_[]$1=yes
+ $1[]_REQUIRES=$ac_env_[]$1[]_REQUIRES_value
+ $1[]_CFLAGS=$ac_env_[]$1[]_CFLAGS_value
+ $1[]_LIBS=$ac_env_[]$1[]_LIBS_value
+ $1[]_NONPKGCONFIG_CFLAGS=$ac_env_[]$1[]_NONPKGCONFIG_CFLAGS_value
+ $1[]_NONPKGCONFIG_LIBS=$ac_env_[]$1[]_NONPKGCONFIG_LIBS_value
+ $1[]_BASE=cairo
+ $6
+ cairo_cv_backend_[]$1[]_use=$use_[]$1
+ cairo_cv_backend_[]$1[]_cache_version=cairo_cache_version
+ cairo_cv_backend_[]$1[]_requires=$[]$1[]_REQUIRES
+ cairo_cv_backend_[]$1[]_cflags=$[]$1[]_CFLAGS
+ cairo_cv_backend_[]$1[]_libs=$[]$1[]_LIBS
+ cairo_cv_backend_[]$1[]_nonpkgconfig_cflags=$[]$1[]_NONPKGCONFIG_CFLAGS
+ cairo_cv_backend_[]$1[]_nonpkgconfig_libs=$[]$1[]_NONPKGCONFIG_LIBS
+ cairo_cv_backend_[]$1[]_base=$[]$1[]_BASE
+ AC_MSG_CHECKING([whether cairo's $2 backend could be enabled])
])
- ;;
- auto)
- ;;
- *)
- AC_MSG_ERROR([invalid argument passed to --enable-$3: $use_$1, should be one of @<:@no/auto/yes@:>@])
- ;;
- esac
- if test "x$use_[]$1" = xyes; then
- CAIRO_FEATURES="$4 $CAIRO_FEATURES"
- CAIRO_REQUIRES="$$1_REQUIRES$CAIRO_REQUIRES"
- CAIRO_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$$1_CFLAGS$CAIRO_CFLAGS"
- CAIRO_LIBS="$$1_NONPKGCONFIG_LIBS$$1_LIBS$CAIRO_LIBS"
- CAIRO_NONPKGCONFIG_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$CAIRO_NONPKGCONFIG_CFLAGS"
- CAIRO_NONPKGCONFIG_LIBS="$$1_NONPKGCONFIG_LIBS$CAIRO_NONPKGCONFIG_LIBS"
- m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
- AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
- [$SED -i -e "
+
+ use_[]$1=$cairo_cv_backend_[]$1[]_use
+ $1[]_BASE=$cairo_cv_backend_[]$1[]_base
+
+ $1[]_REQUIRES="$cairo_cv_backend_[]$1[]_requires "
+ $1[]_CFLAGS="$cairo_cv_backend_[]$1[]_cflags "
+ $1[]_LIBS="$cairo_cv_backend_[]$1[]_libs "
+ $1[]_NONPKGCONFIG_CFLAGS="$cairo_cv_backend_[]$1[]_nonpkgconfig_cflags "
+ $1[]_NONPKGCONFIG_LIBS="$cairo_cv_backend_[]$1[]_nonpkgconfig_libs "
+
+ # null the ones that only have space
+ test "x$$1[]_REQUIRES" = "x " && $1[]_REQUIRES=""
+ test "x$$1[]_CFLAGS" = "x " && $1[]_CFLAGS=""
+ test "x$$1[]_LIBS" = "x " && $1[]_LIBS=""
+ test "x$$1[]_NONPKGCONFIG_CFLAGS" = "x " && $1[]_NONPKGCONFIG_CFLAGS=""
+ test "x$$1[]_NONPKGCONFIG_LIBS" = "x " && $1[]_NONPKGCONFIG_LIBS=""
+
+ AS_IF([test "x$enable_$1" = "xyes" -a "x$use_$1" != xyes],
+ [
+ AC_MSG_ERROR([requested $2 backend could not be enabled])
+ ])
+ ;;
+ *)
+ AC_MSG_ERROR([invalid argument passed to --enable-$3: $use_$1, should be one of @<:@no/auto/yes@:>@])
+ ;;
+ esac
+
+ if test "x$use_$1" = xyes; then
+ CAIRO_FEATURES="$4 $CAIRO_FEATURES"
+ CAIRO_REQUIRES="$$1_REQUIRES$CAIRO_REQUIRES"
+ CAIRO_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$$1_CFLAGS$CAIRO_CFLAGS"
+ CAIRO_LIBS="$$1_NONPKGCONFIG_LIBS$$1_LIBS$CAIRO_LIBS"
+ CAIRO_NONPKGCONFIG_CFLAGS="$$1_NONPKGCONFIG_CFLAGS$CAIRO_NONPKGCONFIG_CFLAGS"
+ CAIRO_NONPKGCONFIG_LIBS="$$1_NONPKGCONFIG_LIBS$CAIRO_NONPKGCONFIG_LIBS"
+ m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
+ AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
+ [
+ $SED -i -e "
s, at backend_name@,$1,g;
s, at Backend_Name@,$2,g;
s, at BACKEND_BASE@,$$1_BASE,g;
@@ -115,37 +118,40 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
s, at BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g;
" "]cairo_backend_pc()[" ||
AC_MSG_ERROR(failed to update ]cairo_backend_pc()[)
- ],
- [
- SED='$SED'
- $1_BASE='$$1_BASE'
- $1_REQUIRES='$$1_REQUIRES'
- $1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
- $1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
- ])
- else
- # Collect list of all supported but disabled features
- AS_IF([test "x$5" = xno],,[
- CAIRO_NO_FEATURES="$4 $CAIRO_NO_FEATURES"
- ])
- fi
- fi
- AM_CONDITIONAL(CAIRO_HAS_$4, test "x$use_$1" = xyes)
- # Collect list of all supported features and cairo headers
- AS_IF([test "x$5" = xno],[
- CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
+ ],[
+ SED='$SED'
+ $1_BASE='$$1_BASE'
+ $1_REQUIRES='$$1_REQUIRES'
+ $1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
+ $1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
+ ])
+ fi
+
+ AM_CONDITIONAL(CAIRO_HAS_$4, test "x$use_$1" = xyes)
+
+ dnl Collect list of all supported but disabled features
+ AS_IF([test "x$use_$1" != xyes -a "x$5" != xno],
+ [
+ CAIRO_NO_FEATURES="$4 $CAIRO_NO_FEATURES"
+ ])
+
+ dnl Collect list of all (un)supported features and cairo headers
+ AS_IF([test "x$5" = xno],
+ [
+ CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
unsupported_cairo_headers += $(cairo_$1_headers)'
- CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
+ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
unsupported_cairo_headers += $(cairo_$1_headers)'
- ],[
- CAIRO_SUPPORTED_FEATURES="$4 $CAIRO_SUPPORTED_FEATURES"
- CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
+ ],[
+ CAIRO_SUPPORTED_FEATURES="$4 $CAIRO_SUPPORTED_FEATURES"
+ CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
supported_cairo_headers += $(cairo_$1_headers)'
- CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
+ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
supported_cairo_headers += $(cairo_$1_headers)'
])
- # Collect list of all/enabled cairo source files
- CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
+
+ dnl Collect list of all/enabled cairo source files
+ CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
all_cairo_pkgconf += $(cairo_$1_pkgconf)
all_cairo_headers += $(cairo_$1_headers)
all_cairo_private += $(cairo_$1_private)
@@ -157,7 +163,7 @@ enabled_cairo_private += $(cairo_$1_private)
enabled_cairo_sources += $(cairo_$1_sources)
endif
'
- CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
+ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_WIN32'
all_cairo_pkgconf += $(cairo_$1_pkgconf)
all_cairo_headers += $(cairo_$1_headers)
all_cairo_private += $(cairo_$1_private)
@@ -169,24 +175,26 @@ enabled_cairo_private += $(cairo_$1_private)
enabled_cairo_sources += $(cairo_$1_sources)
endif
'
- # Collect warning message for enabled unsupported backends
- AS_IF([test "x$use_[]$1" = xyes && test "x$5" = xno],[
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
+ dnl Collect warning message for enabled unsupported backends
+ AS_IF([test "x$use_$1" = xyes -a "x$5" = xno],
+ [
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
*** The $2 backend 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 $2-backend specific API.
"
- ],)
- # Collect warning message for disabled recommended backends
- AS_IF([test "x$use_[]$1" != xyes && test "x$5" = xyes],[
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
+ ])
+
+ dnl Collect warning message for disabled recommended backends
+ AS_IF([test "x$use_$1" != xyes -a "x$5" = xyes],
+ [
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
*** It is strictly recommended that you do NOT disable
*** the $2 backend.
"
- ],)
])
-
+])
commit c28882728cbdc7e70caa2a869ded2b4f180a2f33
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 17:22:07 2008 -0400
[configure.in] Remove unused variables
diff --git a/build/enable.ac b/build/enable.ac
index cf0a832..80fa147 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -302,9 +302,7 @@ all_cairo_sources = $(cairo_sources)
supported_cairo_headers = $(cairo_headers)
unsupported_cairo_headers =
'
-CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE'
-enabled_cairo_headers += $(_cairo_nodist_headers) $(_cairo_extra_headers)
-'
+CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE
dnl Generate
CAIRO_CONFIG_COMMANDS([$srcdir/src/Config.mk],
commit 47547cf05140a539fff0a2afb7e9d155e5d40f27
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 16:41:51 2008 -0400
[configure.in] Move report generation to build/enable.ac
diff --git a/build/enable.ac b/build/enable.ac
index e4556b6..cf0a832 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -187,15 +187,106 @@ endif
],)
])
+
+
+
+dnl ===========================================================================
+dnl
+dnl Report
+dnl
+
+dnl Accumulator for warning messages
CAIRO_WARNING_MESSAGE=""
-CAIRO_FEATURES=""
-CAIRO_NO_FEATURES=""
-CAIRO_SUPPORTED_FEATURES=""
+
+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 " Image: yes (always builtin)"
+ echo " Xlib: $use_xlib"
+ echo " Xlib Xrender: $use_xlib_xrender"
+ echo " Quartz: $use_quartz"
+ echo " Quartz-image: $use_quartz_image"
+ echo " XCB: $use_xcb"
+ echo " Win32: $use_win32"
+ echo " OS2: $use_os2"
+ echo " PostScript: $use_ps"
+ echo " PDF: $use_pdf"
+ echo " SVG: $use_svg"
+ echo " glitz: $use_glitz"
+ echo " BeOS: $use_beos"
+ echo " DirectFB: $use_directfb"
+ echo ""
+ 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 " PNG functions: $use_png"
+ echo ""
+ echo "and the following debug options:"
+ echo " gcov support: $use_gcov"
+ echo " test surfaces: $use_test_surfaces"
+ echo " ps testing: $test_ps"
+ echo " pdf testing: $test_pdf"
+ echo " svg testing: $test_svg"
+ if test x"$use_win32" = "xyes"; then
+ echo " win32 printing testing: $test_win32_printing"
+ fi
+ echo ""
+ echo "using CFLAGS:"
+ echo $CAIRO_CFLAGS
+ 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"
+])
+
+
+dnl ===========================================================================
+dnl
+dnl All .pc files are generated automatically except for this one
+dnl
+AC_CONFIG_FILES([src/cairo.pc])
+
+
+dnl ===========================================================================
+dnl
+dnl pkg-config requires, non-pkgconfig cflags and libs, and total cflags and libs
+dnl
+
+dnl Accumulators
CAIRO_REQUIRES=""
CAIRO_NONPKGCONFIG_CFLAGS=""
CAIRO_NONPKGCONFIG_LIBS="$LIBS"
CAIRO_CFLAGS=$CAIRO_NONPKGCONFIG_CFLAGS
CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
+
+dnl Substitute
+AC_SUBST(CAIRO_REQUIRES)
+AC_SUBST(CAIRO_NONPKGCONFIG_CFLAGS)
+AC_SUBST(CAIRO_NONPKGCONFIG_LIBS)
+AC_SUBST(CAIRO_CFLAGS)
+AC_SUBST(CAIRO_LIBS)
+
+
+dnl ===========================================================================
+dnl
+dnl Generate {src,boilerplate}/Config.mk{,.win32}
+dnl
+
+dnl Accumulators
CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
include $(top_srcdir)/src/Sources.mk
@@ -215,18 +306,26 @@ CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE'
enabled_cairo_headers += $(_cairo_nodist_headers) $(_cairo_extra_headers)
'
-AC_SUBST(CAIRO_REQUIRES)
-AC_SUBST(CAIRO_NONPKGCONFIG_CFLAGS)
-AC_SUBST(CAIRO_NONPKGCONFIG_LIBS)
-AC_SUBST(CAIRO_CFLAGS)
-AC_SUBST(CAIRO_LIBS)
-
+dnl Generate
CAIRO_CONFIG_COMMANDS([$srcdir/src/Config.mk],
[echo "$CAIRO_CONFIG_AMAKE"],
[CAIRO_CONFIG_AMAKE='$CAIRO_CONFIG_AMAKE'])
CAIRO_CONFIG_COMMANDS([$srcdir/src/Config.mk.win32],
[echo "$CAIRO_CONFIG_WIN32"],
[CAIRO_CONFIG_WIN32='$CAIRO_CONFIG_WIN32'])
+
+
+dnl ===========================================================================
+dnl
+dnl List of enabled, supported but disabled, and all supported features
+dnl
+
+dnl Accumulators
+CAIRO_FEATURES=""
+CAIRO_NO_FEATURES=""
+CAIRO_SUPPORTED_FEATURES=""
+
+dnl Generate src/cairo-features.h and src/cairo-supported-features.h
CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
[
echo '/* Generated by configure. Do not edit. */'
@@ -262,3 +361,4 @@ CAIRO_CONFIG_COMMANDS([$srcdir/src/cairo-supported-features.h],
],[
CAIRO_SUPPORTED_FEATURES='$CAIRO_SUPPORTED_FEATURES'
])
+
diff --git a/configure.in b/configure.in
index 6bfa5ed..d283e55 100644
--- a/configure.in
+++ b/configure.in
@@ -475,62 +475,7 @@ util/Makefile
doc/Makefile
doc/public/Makefile
doc/public/version.xml
-src/cairo.pc
])
AC_OUTPUT
-
-dnl ===========================================================================
-
-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 " Image: yes (always builtin)"
-echo " Xlib: $use_xlib"
-echo " Xlib Xrender: $use_xlib_xrender"
-echo " Quartz: $use_quartz"
-echo " Quartz-image: $use_quartz_image"
-echo " XCB: $use_xcb"
-echo " Win32: $use_win32"
-echo " OS2: $use_os2"
-echo " PostScript: $use_ps"
-echo " PDF: $use_pdf"
-echo " SVG: $use_svg"
-echo " glitz: $use_glitz"
-echo " BeOS: $use_beos"
-echo " DirectFB: $use_directfb"
-echo ""
-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 " PNG functions: $use_png"
-echo ""
-echo "and the following debug options:"
-echo " gcov support: $use_gcov"
-echo " test surfaces: $use_test_surfaces"
-echo " ps testing: $test_ps"
-echo " pdf testing: $test_pdf"
-echo " svg testing: $test_svg"
-if test x"$use_win32" = "xyes"; then
- echo " win32 printing testing: $test_win32_printing"
-fi
-echo ""
-echo "using CFLAGS:"
-echo $CAIRO_CFLAGS
-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"
+CAIRO_REPORT
commit 37f82a4d1b95586859552958306376fd72a4a1cd
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Sep 4 16:13:05 2008 -0400
Get rid of CAIRO_LDADD in favor of CAIRO_LIBS
diff --git a/build/analysis.ac b/build/analysis.ac
index 009530d..7afc9e0 100644
--- a/build/analysis.ac
+++ b/build/analysis.ac
@@ -70,7 +70,7 @@ dnl PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
dnl Add the special gcc flags
CAIRO_CFLAGS="$CAIRO_CFLAGS -O0 -fprofile-arcs -ftest-coverage"
- CAIRO_LDADD="$CAIRO_LDADD -lgcov"
+ CAIRO_LIBS="$CAIRO_LIBS -lgcov"
fi
AM_CONDITIONAL(CAIRO_HAS_LCOV, test "x$cairo_has_lcov" = "xyes")
diff --git a/build/enable.ac b/build/enable.ac
index c390e7b..e4556b6 100644
--- a/build/enable.ac
+++ b/build/enable.ac
@@ -194,7 +194,6 @@ CAIRO_SUPPORTED_FEATURES=""
CAIRO_REQUIRES=""
CAIRO_NONPKGCONFIG_CFLAGS=""
CAIRO_NONPKGCONFIG_LIBS="$LIBS"
-CAIRO_LDADD=""
CAIRO_CFLAGS=$CAIRO_NONPKGCONFIG_CFLAGS
CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
@@ -220,7 +219,6 @@ AC_SUBST(CAIRO_REQUIRES)
AC_SUBST(CAIRO_NONPKGCONFIG_CFLAGS)
AC_SUBST(CAIRO_NONPKGCONFIG_LIBS)
AC_SUBST(CAIRO_CFLAGS)
-AC_SUBST(CAIRO_LDADD)
AC_SUBST(CAIRO_LIBS)
CAIRO_CONFIG_COMMANDS([$srcdir/src/Config.mk],
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c40178..736502a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,7 +36,7 @@ libcairo_la_SOURCES = \
$(enabled_cairo_sources) \
$(NULL)
libcairo_la_LDFLAGS = -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols)
-libcairo_la_LIBADD = $(CAIRO_LIBS) $(CAIRO_LDADD)
+libcairo_la_LIBADD = $(CAIRO_LIBS)
libcairo_la_DEPENDENCIES = $(cairo_def_dependency)
# Special headers
More information about the cairo-commit
mailing list