1dnl autoconf macros for detecting libmng 2dnl add this to your aclocal or acinclude to make use of it 3dnl 4dnl (c) 2000 Ralph Giles <giles@ashlu.bc.ca> 5dnl 6 7dnl A basic check: looks for libmng and its dependencies 8dnl and adds the required bits to CFLAGS and LIBS 9 10# check for libmng 11AC_DEFUN(LIBMNG_CHECK, [ 12 dnl prerequisites first 13 AC_CHECK_LIB(jpeg, jpeg_set_defaults) 14 AC_CHECK_LIB(z, inflate) 15 dnl now the library 16 AC_CHECK_LIB(mng, mng_readdisplay, [_libmng_present=1]) 17 AC_CHECK_HEADER(libmng.h) 18 dnl see if we need the optional link dependency 19 AC_CHECK_LIB(lcms, cmsCreateRGBProfile, [ 20 AC_CHECK_HEADER(lcms.h) 21 AC_CHECK_LIB(mng, mnglcms_initlibrary, [ 22 LIBS="$LIBS -llcms" 23 AC_DEFINE(HAVE_LIBLCMS) 24 _libmng_present=1 25 ]) 26 ]) 27 if test $_libmng_present -eq 1; then 28 LIBS="-lmng $LIBS" 29 AC_DEFINE(HAVE_LIBMNG) 30 fi 31 _libmng_present= 32]) 33 34dnl end LIBMNG macros 35