[cairo-commit] configure.in src/cairo-backend.pc.in

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Jun 29 07:09:32 PDT 2006


 configure.in            |   20 ++++++++++++--------
 src/cairo-backend.pc.in |    4 ++--
 2 files changed, 14 insertions(+), 10 deletions(-)

New commits:
diff-tree 29caf8915f822778f0e59add7d364a03bcdb8327 (from 195b1142e7a1652e0f65cfd822bba7ea8b6ba505)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Jun 29 16:09:46 2006 +0200

    Fix support for non-pkg-config cflags and libs (needed for supporting
    freetype-config)

diff --git a/configure.in b/configure.in
index 2a3a495..15c2e42 100644
--- a/configure.in
+++ b/configure.in
@@ -120,11 +120,15 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
 			    $1[]_REQUIRES=""
 			    $1[]_CFLAGS=""
 			    $1[]_LIBS=""
+			    $1[]_NONPKGCONFIG_CFLAGS=""
+			    $1[]_NONPKGCONFIG_LIBS=""
 			    $6
 			    cairo_cv_backend_[]$1[]_use=$use_[]$1
 			    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
 			    AC_MSG_CHECKING([whether cairo's $2 backend could be enabled])])
 
 	    # split the backend spec into its components
@@ -132,6 +136,8 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
 	    $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
 
 	    case $enable_[]$1 in
 	      yes)
@@ -148,8 +154,8 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
 	    if test "x$use_[]$1" = xyes; then
 	      CAIRO_FEATURES="$CAIRO_FEATURES $4"
 	      CAIRO_REQUIRES="$CAIRO_REQUIRES $$1_REQUIRES"
-	      CAIRO_CFLAGS="$CAIRO_CFLAGS $$1_CFLAGS"
-	      CAIRO_LIBS="$CAIRO_LIBS $$1_LIBS"
+	      CAIRO_CFLAGS="$CAIRO_CFLAGS $$1_CFLAGS $$1_NONPKGCONFIG_CFLAGS"
+	      CAIRO_LIBS="$CAIRO_LIBS $$1_LIBS $$1_NONPKGCONFIG_LIBS"
 	      outfile=`echo src/cairo-$1.pc | sed -e s/_/-/g`
 	      AC_MSG_NOTICE([creating $outfile])
 	      mkdir -p src
@@ -157,8 +163,8 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
 			-e "s, at backend_name@,$1,g" \
 			-e "s, at Backend_Name@,$2,g" \
 			-e "s, at BACKEND_REQUIRES@,$$1_REQUIRES,g" \
-			-e "s, at BACKEND_LIBS@,$$1_LIBS,g" \
-			-e "s, at BACKEND_CFLAGS@,$$1_CFLAGS,g" \
+			-e "s%@BACKEND_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g" \
+			-e "s, at BACKEND_NONPKGCONFIG_CFLAGS@,$$1_NONPKGCONFIG_CFLAGS,g" \
 			-e "s, at prefix@,$prefix,g" \
 			-e "s, at exec_prefix@,$exec_prefix,g" \
 			-e "s, at libdir@,$libdir,g" \
@@ -385,10 +391,8 @@ CAIRO_BACKEND_ENABLE(ft, FreeType font, 
         else
           AC_MSG_RESULT($FREETYPE_VERSION - OK)
 
-	  cairo_cv_ft_config_CFLAGS=`$FREETYPE_CONFIG --cflags`
-	  cairo_cv_ft_config_LIBS=`$FREETYPE_CONFIG --libs`
-	  FREETYPE_CFLAGS=$cairo_cv_ft_config_CFLAGS
-	  FREETYPE_LIBS=$cairo_cv_ft_config_LIBS
+	  ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
+	  ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`
         fi
       fi
     fi
diff --git a/src/cairo-backend.pc.in b/src/cairo-backend.pc.in
index 325a876..3988ffd 100644
--- a/src/cairo-backend.pc.in
+++ b/src/cairo-backend.pc.in
@@ -8,5 +8,5 @@ Description: @Backend_Name@ backend for 
 Version: @VERSION@
 
 Requires: cairo @BACKEND_REQUIRES@
-Libs: @BACKEND_LIBS@
-Cflags: -I${includedir}/cairo @BACKEND_CFLAGS@
+Libs: @BACKEND_NONPKGCONFIG_LIBS@
+Cflags: -I${includedir}/cairo @BACKEND_NONPKGCONFIG_CFLAGS@


More information about the cairo-commit mailing list