summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in136
1 files changed, 94 insertions, 42 deletions
diff --git a/configure.in b/configure.in
index 98a3f23c..bcd74cfd 100644
--- a/configure.in
+++ b/configure.in
@@ -330,7 +330,8 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
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"
- CAIRO_CONFIG_COMMANDS(m4_bpatsubst(src/cairo-$1.pc,_,-),
+ m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
+ AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
[sed \
-e "s,@backend_name@,$1,g" \
-e "s,@Backend_Name@,$2,g" \
@@ -338,29 +339,62 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
-e "s,@BACKEND_REQUIRES@,$$1_REQUIRES,g" \
-e "s%@BACKEND_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g" \
-e "s,@BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g" \
- -e "s,@prefix@,$prefix,g" \
- -e "s,@exec_prefix@,$exec_prefix,g" \
- -e "s,@libdir@,$libdir,g" \
- -e "s,@includedir@,$includedir,g" \
- -e "s,@VERSION@,$VERSION,g" \
- $srcdir/src/cairo-backend.pc.in
+ -i ]cairo_backend_pc()[ ||
+ AC_MSG_ERROR(failed to update cairo_backend_pc())
],
[
$1_BASE='$$1_BASE'
$1_REQUIRES='$$1_REQUIRES'
$1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
$1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
- prefix='$prefix'
- exec_prefix='$exec_prefix'
- libdir='$libdir'
- includedir='$includedir'
- VERSION='$VERSION'
])
else
- CAIRO_NO_FEATURES="$4 $CAIRO_NO_FEATURES"
+ # 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'
+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)'
+ ])
+ # 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 CAIRO_HAS_$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 ($(CAIRO_HAS_$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
+'
+ # Collect warning message for enabled unsupported backends
AS_IF([test "x$use_[]$1" = xyes && test "x$5" = xno],[
CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE
*** The $2 backend is still under active development and
@@ -374,24 +408,31 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
CAIRO_WARNING_MESSAGE=""
CAIRO_FEATURES=""
CAIRO_NO_FEATURES=""
+CAIRO_SUPPORTED_FEATURES=""
CAIRO_REQUIRES=""
CAIRO_NONPKGCONFIG_CFLAGS=""
CAIRO_NONPKGCONFIG_LIBS="$LIBM"
CAIRO_LDADD=""
CAIRO_CFLAGS=$CAIRO_NONPKGCONFIG_CFLAGS
CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
-
-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"
+CAIRO_CONFIG_AMAKE='# Generated by configure. Do not edit.
+
+include $(top_srcdir)/src/Sources.mk
+
+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 =
+'
+CAIRO_CONFIG_WIN32=$CAIRO_CONFIG_AMAKE'
+enabled_cairo_headers += $(_cairo_nodist_headers) $(_cairo_extra_headers)
+'
dnl ===========================================================================
@@ -793,6 +834,23 @@ AC_SUBST(LIBRSVG_CFLAGS)
AC_SUBST(LIBRSVG_LIBS)
dnl ===========================================================================
+
+dnl XXX make this a private feature?
+CAIRO_BACKEND_ENABLE(test_surfaces, test surfaces, 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" \
@@ -1013,18 +1071,6 @@ AM_CONDITIONAL(CAIRO_HAS_LCOV, test "x$cairo_has_lcov" = "xyes")
dnl ===========================================================================
-AC_ARG_ENABLE(test-surfaces,
- AS_HELP_STRING([--enable-test-surfaces],
- [Add backends for more test suite coverage (no additional public functionality)]),
- [use_test_surfaces=$enableval], [use_test_surfaces=no])
-
-AM_CONDITIONAL(CAIRO_HAS_TEST_SURFACES, test "x$use_test_surfaces" = "xyes")
-if test "x$use_test_surfaces" = "xyes"; then
- AC_DEFINE(CAIRO_HAS_TEST_SURFACES, 1, [define in the extra test surface have been built into cairo for the test suite])
-fi
-
-dnl ===========================================================================
-
AC_ARG_ENABLE(some-floating-point,
AS_HELP_STRING([--disable-some-floating-point],
[Disable certain code paths that rely heavily on double precision
@@ -1048,6 +1094,12 @@ fi
dnl ===========================================================================
+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'])
CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
[
echo '/* Generated by configure. Do not edit. */'
@@ -1067,21 +1119,21 @@ CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
CAIRO_FEATURES='$CAIRO_FEATURES'
CAIRO_NO_FEATURES='$CAIRO_NO_FEATURES'
])
-CAIRO_CONFIG_COMMANDS([src/cairo-no-features.h],
+CAIRO_CONFIG_COMMANDS([src/cairo-supported-features.h],
[
echo '/* Generated by configure. Do not edit. */'
- echo '#ifndef CAIRO_NO_FEATURES_H'
- echo '#define CAIRO_NO_FEATURES_H'
+ 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_NO_FEATURES; do
+ for FEATURE in $CAIRO_SUPPORTED_FEATURES; do
echo "#define CAIRO_HAS_$FEATURE 1"
done
echo ''
echo '#endif'
],[
- CAIRO_NO_FEATURES='$CAIRO_NO_FEATURES'
+ CAIRO_SUPPORTED_FEATURES='$CAIRO_SUPPORTED_FEATURES'
])
AC_CONFIG_FILES([
Makefile