From 1315294c31214a76af35b8d540e3d792e5d0f850 Mon Sep 17 00:00:00 2001 From: Tiago Rezende Campos Falcao Date: Tue, 24 Nov 2009 01:39:18 +0000 Subject: pkg-config colorblind check --- diff --git a/configure.in b/configure.in index 2cec7bf..c6661ab 100644 --- a/configure.in +++ b/configure.in @@ -230,10 +230,32 @@ else fi dnl Checking for the presence of the colorblind library. -AC_CHECK_LIB(colorblind, colorblind_create, COLORBLIND_LIBS=-lcolorblind, have_colorblind=no) -if test "x$COLORBLIND_LIBS" != "x" ; then - AC_CHECK_HEADERS([colorblind.h], have_colorblind=yes, have_colorblind=no) - AC_DEFINE(HAVE_LIBCOLORBLIND, 1, [The colorblind library is present.]) +want_colorblind="auto" +have_colorblind="no" +AC_ARG_ENABLE([colorblind], + AC_HELP_STRING([--disable-colorblind], + [disable colorblind fix. @<:@default=auto@:>@]), + [ + if test "x${enableval}" = "xyes" ; then + want_colorblind="yes" + else + want_colorblind="no" + fi + ]) + + +if test "x${want_colorblind}" = "xyes" -o "x${want_colorblind}" = "xauto" ; then + PKG_CHECK_MODULES([COLORBLIND], + [colorblind], + [ + have_colorblind="yes" + AC_DEFINE(HAVE_COLORBLIND, 1, [have colorblind fix.]) + ], + [ + if test "x${want_colorblind}" = "xyes" -a "x${use_strict}" = "xyes" ; then + AC_MSG_ERROR([Colorblind not found (strict dependencies checking)]) + fi + ]) fi dnl WIN32 Specifics -- cgit v0.9.1