[cairo-commit] 5 commits - build/configure.ac.enable src/cairo-backend.pc.in src/cairo-features.pc.in test/pdiff
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Sep 10 09:43:36 PDT 2008
build/configure.ac.enable | 66 ++++++++++++++++++++++++++++------------------
src/cairo-backend.pc.in | 12 --------
src/cairo-features.pc.in | 12 ++++++++
test/pdiff/Makefile.am | 2 -
4 files changed, 54 insertions(+), 38 deletions(-)
New commits:
commit 5e5a2b9da70f559afa00bfd6e2011d573e729071
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Sep 10 12:41:57 2008 -0400
More fixes for pkgconfig files
Should all work now.
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
index 43d759a..beae488 100644
--- a/build/configure.ac.enable
+++ b/build/configure.ac.enable
@@ -41,12 +41,14 @@ AC_DEFUN([_CAIRO_ENABLE],
,
[m4_fatal([invalid feature name `$1'])]
)
- m4_define([cr_feature], [$1])
- m4_define([cr_feature_name], m4_normalize([$2]))
- m4_define([cr_feature_what], m4_normalize([$3]))
- m4_define([cr_feature_default], m4_normalize([$4]))
- m4_define([cr_feature_commands], [$5])
- m4_define([cr_feature_commands_len], m4_len([$5]))
+ m4_pushdef([cr_feature], [$1])dnl
+ m4_pushdef([cr_feature_name], m4_normalize([$2]))dnl
+ m4_pushdef([cr_feature_what], m4_normalize([$3]))dnl
+ m4_pushdef([cr_feature_default], m4_normalize([$4]))dnl
+ m4_pushdef([cr_feature_commands], [$5])dnl
+ m4_pushdef([cr_feature_commands_len], m4_len([$5]))dnl
+
+ m4_pushdef([cr_feature_arg], m4_translit([$1],_,-))dnl
dnl Sanity check default
m4_case(
@@ -57,8 +59,6 @@ AC_DEFUN([_CAIRO_ENABLE],
[m4_fatal([Invalid default value `]cr_feature_default[' for feature `]cr_feature['])]
)
- m4_define([cr_feature_arg], m4_translit([$1],[_],[-]))
-
AC_ARG_ENABLE(cr_feature_arg,
AS_HELP_STRING([--enable-]cr_feature_arg[=@<:@no/auto/yes@:>@],
[Enable cairo's ]cr_feature_name[ feature @<:@default=]cr_feature_default[@:>@]),
@@ -140,6 +140,15 @@ AC_DEFUN([_CAIRO_ENABLE],
_CAIRO_FEATURE_HOOKS(cr_feature, cr_feature_name, cr_feature_default, cr_feature_what)
+
+
+ m4_popdef([cr_feature])dnl
+ m4_popdef([cr_feature_name])dnl
+ m4_popdef([cr_feature_what])dnl
+ m4_popdef([cr_feature_default])dnl
+ m4_popdef([cr_feature_commands])dnl
+ m4_popdef([cr_feature_commands_len])dnl
+ m4_popdef([cr_feature_arg])dnl
])
@@ -317,9 +326,12 @@ m4_pattern_allow(^CAIRO_HAS_)
dnl
-dnl Define cr_feature_pc ala other cr_feature_* macros
+dnl Define cr_feature_pc_modname and cr_feature_pc ala other cr_feature_* macros
+dnl
+m4_define([cr_feature_pc_modname],
+ [[cairo-]m4_translit(cr_feature,_,-)])
m4_define([cr_feature_pc],
- [m4_bpatsubst([cairo-]cr_feature[.pc],_,-)])
+ [cr_feature_pc_modname[.pc]])
dnl ===========================================================================
@@ -458,12 +470,12 @@ CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
AC_CONFIG_FILES(src/cr_feature_pc:src/cairo-features.pc.in,
[
$SED -i -e "
- s, at backend_name@,$1,g;
- s, at Backend_Name@,cr_feature_name,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;
+ s%@FEATURE_PC@%]cr_feature_pc_modname[%g;
+ s%@FEATURE_NAME@%]cr_feature_name[%g;
+ s%@FEATURE_BASE@%$$1_BASE%g;
+ s%@FEATURE_REQUIRES@%$$1_REQUIRES%g;
+ s%@FEATURE_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g;
+ s%@FEATURE_NONPKGCONFIG_CFLAGS@%$$1_NONPKGCONFIG_CFLAGS%g;
" "]src/cr_feature_pc[" ||
AC_MSG_ERROR(failed to update ]src/cr_feature_pc[)
],[
diff --git a/src/cairo-features.pc.in b/src/cairo-features.pc.in
index 862063c..34908ec 100644
--- a/src/cairo-features.pc.in
+++ b/src/cairo-features.pc.in
@@ -3,10 +3,10 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-Name: cairo- at backend_name@
-Description: @Backend_Name@ backend for cairo graphics library
+Name: @FEATURE_PC@
+Description: @FEATURE_NAME@ for cairo graphics library
Version: @VERSION@
-Requires: @BACKEND_BASE@ @BACKEND_REQUIRES@
-Libs: @BACKEND_NONPKGCONFIG_LIBS@
-Cflags: -I${includedir}/cairo @BACKEND_NONPKGCONFIG_CFLAGS@
+Requires: @FEATURE_BASE@ @FEATURE_REQUIRES@
+Libs: @FEATURE_NONPKGCONFIG_LIBS@
+Cflags: -I${includedir}/cairo @FEATURE_NONPKGCONFIG_CFLAGS@
commit 43a42d0a195422260dbef0961e1cff34b1a36010
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Sep 10 12:41:32 2008 -0400
[test/pdiff/Makefile.am] Another automake warning fix
diff --git a/test/pdiff/Makefile.am b/test/pdiff/Makefile.am
index 6abae51..b900463 100644
--- a/test/pdiff/Makefile.am
+++ b/test/pdiff/Makefile.am
@@ -13,7 +13,7 @@ perceptualdiff_SOURCES = \
args.h \
perceptualdiff.c
-INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src $(CAIRO_CFLAGS)
+AC_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(CAIRO_CFLAGS)
LDADD = libpdiff.la $(top_builddir)/src/libcairo.la
#
# Delete intermediate files as well
commit 95214e80a55d362ece30d8f2cd513b2771aeaa3e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Sep 10 12:19:21 2008 -0400
[configure.ac.enable] Fix warning messages
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
index 4597f95..43d759a 100644
--- a/build/configure.ac.enable
+++ b/build/configure.ac.enable
@@ -551,16 +551,16 @@ dnl
dnl Accumulator for warning messages
CAIRO_FEATURE_VARS_REGISTER([WARNING_MESSAGE])
-dnl Collect warning message for enabled unsupported backends
+dnl Collect warning message for enabled unsupported features
CAIRO_FEATURE_HOOK_REGISTER(yes,no,*,
[
CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([The ]cr_feature_name[ feature is still under active development and is included in this release only as a preview. It does NOT fully work yet and incompatible changes may yet be made to ]cr_feature_name[ specific API.], [--- ],, 78)m4_newline"
])
-dnl Collect warning message for disabled recommended backends
+dnl Collect warning message for disabled recommended features
CAIRO_FEATURE_HOOK_REGISTER(no,yes,*,
[
- CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([It is strictly recommended that you do NOT disable the ]cr_feature_name[ backend.], [+++ ],, 78)m4_newline"
+ CAIRO_WARNING_MESSAGE="$CAIRO_WARNING_MESSAGE]m4_newline[m4_text_wrap([It is strictly recommended that you do NOT disable the ]cr_feature_name[ feature.], [+++ ],, 78)m4_newline"
])
commit 9dd9289c4ad517abf1d9013d5d6f85e418f9dd78
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Sep 10 12:18:27 2008 -0400
Rename cairo-backend.pc.in to cairo-features.pc.in
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
index 115ce9e..4597f95 100644
--- a/build/configure.ac.enable
+++ b/build/configure.ac.enable
@@ -455,7 +455,7 @@ CAIRO_FEATURE_VARS_REGISTER([LIBS NONPKGCONFIG_LIBS], [$LIBS])
dnl Generate .pc files for enabled features
CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
[
- AC_CONFIG_FILES(src/cr_feature_pc:src/cairo-backend.pc.in,
+ AC_CONFIG_FILES(src/cr_feature_pc:src/cairo-features.pc.in,
[
$SED -i -e "
s, at backend_name@,$1,g;
diff --git a/src/cairo-backend.pc.in b/src/cairo-backend.pc.in
deleted file mode 100644
index 862063c..0000000
--- a/src/cairo-backend.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: cairo- at backend_name@
-Description: @Backend_Name@ backend for cairo graphics library
-Version: @VERSION@
-
-Requires: @BACKEND_BASE@ @BACKEND_REQUIRES@
-Libs: @BACKEND_NONPKGCONFIG_LIBS@
-Cflags: -I${includedir}/cairo @BACKEND_NONPKGCONFIG_CFLAGS@
diff --git a/src/cairo-features.pc.in b/src/cairo-features.pc.in
new file mode 100644
index 0000000..862063c
--- /dev/null
+++ b/src/cairo-features.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: cairo- at backend_name@
+Description: @Backend_Name@ backend for cairo graphics library
+Version: @VERSION@
+
+Requires: @BACKEND_BASE@ @BACKEND_REQUIRES@
+Libs: @BACKEND_NONPKGCONFIG_LIBS@
+Cflags: -I${includedir}/cairo @BACKEND_NONPKGCONFIG_CFLAGS@
commit cf71e7c39b431b5b85aefe0249c9870d240e390b
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Sep 10 12:15:20 2008 -0400
[configure.ac.enable] Actually install pkgconfig files
Oops. Reported by Shunichi Fuji.
diff --git a/build/configure.ac.enable b/build/configure.ac.enable
index ba70303..115ce9e 100644
--- a/build/configure.ac.enable
+++ b/build/configure.ac.enable
@@ -316,6 +316,11 @@ dnl Allow feature tags in the output
m4_pattern_allow(^CAIRO_HAS_)
+dnl
+dnl Define cr_feature_pc ala other cr_feature_* macros
+m4_define([cr_feature_pc],
+ [m4_bpatsubst([cairo-]cr_feature[.pc],_,-)])
+
dnl ===========================================================================
dnl
@@ -408,24 +413,24 @@ dnl Collect list of all/enabled cairo source files
CAIRO_FEATURE_HOOK_REGISTER(*,*,*,
[
CAIRO_CONFIG_AMAKE=$CAIRO_CONFIG_AMAKE'
-all_cairo_pkgconf += $(cairo_$1_pkgconf)
+all_cairo_pkgconf += cr_feature_pc
all_cairo_headers += $(cairo_$1_headers)
all_cairo_private += $(cairo_$1_private)
all_cairo_sources += $(cairo_$1_sources)
if cr_feature_tag
-enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
+enabled_cairo_pkgconf += cr_feature_pc
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_pkgconf += cr_feature_pc
all_cairo_headers += $(cairo_$1_headers)
all_cairo_private += $(cairo_$1_private)
all_cairo_sources += $(cairo_$1_sources)
ifeq ($(cr_feature_tag),1)
-enabled_cairo_pkgconf += $(cairo_$1_pkgconf)
+enabled_cairo_pkgconf += cr_feature_pc
enabled_cairo_headers += $(cairo_$1_headers)
enabled_cairo_private += $(cairo_$1_private)
enabled_cairo_sources += $(cairo_$1_sources)
@@ -450,8 +455,7 @@ CAIRO_FEATURE_VARS_REGISTER([LIBS NONPKGCONFIG_LIBS], [$LIBS])
dnl Generate .pc files for enabled features
CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
[
- m4_define([cairo_backend_pc], m4_bpatsubst(src/cairo-$1.pc,_,-))
- AC_CONFIG_FILES(cairo_backend_pc():src/cairo-backend.pc.in,
+ AC_CONFIG_FILES(src/cr_feature_pc:src/cairo-backend.pc.in,
[
$SED -i -e "
s, at backend_name@,$1,g;
@@ -460,8 +464,8 @@ CAIRO_FEATURE_HOOK_REGISTER(yes,*,*,
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()[)
+ " "]src/cr_feature_pc[" ||
+ AC_MSG_ERROR(failed to update ]src/cr_feature_pc[)
],[
SED='$SED'
$1_BASE='$$1_BASE'
More information about the cairo-commit
mailing list