Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiago Rezende Campos Falcao <developer@tiagofalcao.com>2009-11-24 01:39:18 (GMT)
committer Tiago Rezende Campos Falcao <developer@tiagofalcao.com>2009-11-24 01:42:31 (GMT)
commit1315294c31214a76af35b8d540e3d792e5d0f850 (patch)
tree024bfafe0fd156813024972fe8424718addd8239
parent22788422e2a2dc5b4a86aff4e32aca1acda85afb (diff)
pkg-config colorblind checktiago
-rw-r--r--configure.in30
1 files changed, 26 insertions, 4 deletions
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