diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-09-02 00:14:46 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-09-02 20:24:07 -0400 |
commit | e977f32346a602b9644a2c59e612896f34af2c74 (patch) | |
tree | f7603a09e1d8e72bdc4bcbdd7c3edf7c79f385ff /configure.in | |
parent | 1bdd6110f6d5df6556f201e06e519e68640e6215 (diff) |
[configure.in] Create backend .pc files using CAIRO_CONFIG_COMMANDS
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 600af2f9..7b9e049b 100644 --- a/configure.in +++ b/configure.in @@ -219,7 +219,6 @@ AC_DEFUN([CAIRO_CONFIG_COMMANDS], [ _tmp_file=$1.tmp AC_MSG_NOTICE([creating $_config_file]) { - echo "/* Generated by configure. Do not edit */" $2 } >> "$_tmp_file" if cmp -s "$_tmp_file" "$_config_file"; then @@ -330,10 +329,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" - outfile=`echo src/cairo-$1.pc | sed -e s/_/-/g` - AC_MSG_NOTICE([creating $outfile]) - mkdir -p src - AS_IF([sed \ + CAIRO_CONFIG_COMMANDS(m4_bpatsubst(src/cairo-$1.pc,_,-), + [sed \ -e "s,@backend_name@,$1,g" \ -e "s,@Backend_Name@,$2,g" \ -e "s,@BACKEND_BASE@,$$1_BASE,g" \ @@ -345,10 +342,19 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE], -e "s,@libdir@,$libdir,g" \ -e "s,@includedir@,$includedir,g" \ -e "s,@VERSION@,$VERSION,g" \ - $srcdir/src/cairo-backend.pc.in > $outfile],,[ - rm -f "$outfile" - AC_MSG_ERROR([failed creating $outfile]) - ]) + $srcdir/src/cairo-backend.pc.in + ], + [ + $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" fi @@ -1043,6 +1049,7 @@ dnl =========================================================================== 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 '' @@ -1061,6 +1068,7 @@ CAIRO_CONFIG_COMMANDS([src/cairo-features.h], ]) CAIRO_CONFIG_COMMANDS([src/cairo-no-features.h], [ + echo '/* Generated by configure. Do not edit. */' echo '#ifndef CAIRO_NO_FEATURES_H' echo '#define CAIRO_NO_FEATURES_H' echo '' |