[gtk+] W32: support cairo library in non-standard locations



commit 3a095ad4547c98706bd1acece32a39925251f3a9
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Fri Apr 29 15:54:52 2016 +0000

    W32: support cairo library in non-standard locations
    
    When checking for cairo_win32_surface_create_with_format in -lcairo,
    temporarily put CAIRO_LIBS into LIBS so that AC_CHECK_LIB() can
    find it in weird places like /usr/local/lib, where gcc would not look
    on its own.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765793

 configure.ac |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e1f743d..3718dbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -581,18 +581,21 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
 PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
 
 # Remove this check once cairo_required_version reaches at least 1.16.0
-case $host_os in
-  mingw*)
+AS_CASE([$host_os],
+  [mingw*],
+  [
     PKG_CHECK_MODULES(CAIRO, [cairo >= cairo_required_version])
+    gtk_save_LIBS="$LIBS"
+    LIBS="$CAIRO_LIBS $LIBS"
     AC_CHECK_LIB([cairo], [cairo_win32_surface_create_with_format],
       [AC_MSG_RESULT([found])],
       [AC_MSG_ERROR(
 [cairo_win32_surface_create_with_format is not found in cairo library
 You need a cairo snapshot 1.15.x or 1.16.x release or newer])])
-    ;;
-  *)
-    ;;
-esac
+    LIBS="$gtk_save_LIBS"
+  ],
+  []
+)
 
 
 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]