Blob Blame History Raw
From 7a6e7dcabca0060c385f3377b7c826457064bf16 Mon Sep 17 00:00:00 2001
From: Michael Jumper <mike.jumper@guac-dev.org>
Date: Tue, 16 Jul 2013 11:27:46 -0700
Subject: [PATCH] Fix library function tests in configure.ac (AC_CHECK_FUNCS
 provides no means of specifying the library to check).

---
 configure.ac |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index b1c0ac9..e2b4eca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,8 +87,15 @@ AC_SUBST(CUNIT_LIBS)
 # Library functions
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
-AC_CHECK_FUNCS([clock_gettime gettimeofday memmove memset select strdup png_get_io_ptr \
-                cairo_format_stride_for_width nanosleep])
+AC_CHECK_FUNCS([clock_gettime gettimeofday memmove memset select strdup nanosleep])
+
+AC_CHECK_DECL([png_get_io_ptr],
+	[AC_DEFINE([HAVE_PNG_GET_IO_PTR])],,
+	[#include <png.h>])
+
+AC_CHECK_DECL([cairo_format_stride_for_width],
+	[AC_DEFINE([HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH])],,
+	[#include <cairo/cairo.h>])
 
 # Typedefs
 AC_TYPE_SIZE_T
-- 
1.7.10.4