diff options
author | Jens Granseuer <jensgr@gmx.net> | 2006-08-11 13:06:37 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-11 13:06:37 -0400 |
commit | abd16e47d6331bd3811c908e524b4dcb6bd23bf0 (patch) | |
tree | 4ef955e5126d135fec2819bfbca84caa34bfa828 /configure.in | |
parent | 97524a8fdb899de1ae4a3e920fb7bda6d76c5571 (diff) |
[configure] Let env-vars override backend CFLAGS/LIBS (bug 7838)
In particular, $png_REQUIRES can be used now to set the name of the pkg-config
module that contains libpng.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/configure.in b/configure.in index 4bd7ff51..25ea5fc9 100644 --- a/configure.in +++ b/configure.in @@ -134,11 +134,11 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE], AC_CACHE_CHECK([for cairo's $2 backend], cairo_cv_backend_[]$1[]_use, [echo use_[]$1=yes - $1[]_REQUIRES="" - $1[]_CFLAGS="" - $1[]_LIBS="" - $1[]_NONPKGCONFIG_CFLAGS="" - $1[]_NONPKGCONFIG_LIBS="" + $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 @@ -304,14 +304,19 @@ dnl =========================================================================== CAIRO_BACKEND_ENABLE(png, PNG, png, PNG_FUNCTIONS, yes, [ use_png=no - # 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 + 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) |