|
|
|
@ -19,30 +19,31 @@ AM_PROG_CC_C_O
|
|
|
|
|
# -----------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
have_lcms_header='no'
|
|
|
|
|
KDE_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
|
|
|
|
|
if test "$have_lcms_header" = 'yes'
|
|
|
|
|
then
|
|
|
|
|
AC_DEFINE(LCMS_HEADER, <lcms/lcms.h>, [The correct header])
|
|
|
|
|
KDE_CHECK_HEADER(lcms2.h,have_lcms2_header='yes',,)
|
|
|
|
|
if test "$have_lcms2_header" = 'yes'; then
|
|
|
|
|
AC_DEFINE(LCMS_HEADER, <lcms2.h>, [LCMS header])
|
|
|
|
|
else
|
|
|
|
|
# Alternative! Debian does it this way...
|
|
|
|
|
KDE_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
|
|
|
|
|
if test "$have_lcms_header" = 'yes'
|
|
|
|
|
then
|
|
|
|
|
AC_DEFINE(LCMS_HEADER, <lcms.h>, [The correct header])
|
|
|
|
|
if test "$have_lcms_header" = 'yes'; then
|
|
|
|
|
AC_DEFINE(LCMS_HEADER, <lcms.h>, [LCMS header])
|
|
|
|
|
else
|
|
|
|
|
KDE_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
|
|
|
|
|
if test "$have_lcms_header" = 'yes'; then
|
|
|
|
|
AC_DEFINE(LCMS_HEADER, <lcms/lcms.h>, [LCMS header])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
LCMS_LIBS=''
|
|
|
|
|
have_lcms='no'
|
|
|
|
|
if test "$have_lcms_header" = 'yes'
|
|
|
|
|
then
|
|
|
|
|
saved_cflags="$CFLAGS"
|
|
|
|
|
saved_ldflags="$LDFLAGS"
|
|
|
|
|
saved_libs=$LIBS
|
|
|
|
|
LIBS="$LIBS -llcms"
|
|
|
|
|
CFLAGS="$CFLAGS $all_includes -I/usr/include/tqt"
|
|
|
|
|
LDFLAGS="$LDFLAGS $all_libraries"
|
|
|
|
|
|
|
|
|
|
saved_libs=$LIBS
|
|
|
|
|
saved_cflags="$CFLAGS"
|
|
|
|
|
saved_ldflags="$LDFLAGS"
|
|
|
|
|
CFLAGS="$CFLAGS $all_includes -I/usr/include/tqt"
|
|
|
|
|
LDFLAGS="$LDFLAGS $all_libraries"
|
|
|
|
|
if test "$have_lcms2_header" = 'yes'; then
|
|
|
|
|
LIBS="$LIBS -llcms2"
|
|
|
|
|
AC_TRY_LINK([
|
|
|
|
|
#define inline __inline /* gcc is in ansi mode */
|
|
|
|
|
#include LCMS_HEADER
|
|
|
|
@ -51,12 +52,26 @@ choke!
|
|
|
|
|
#endif
|
|
|
|
|
], [
|
|
|
|
|
cmsOpenProfileFromFile("foo", "r");
|
|
|
|
|
],
|
|
|
|
|
[LCMS_LIBS='-llcms2'; have_lcms='yes'])
|
|
|
|
|
else
|
|
|
|
|
if test "$have_lcms_header" = 'yes'; then
|
|
|
|
|
LIBS="$LIBS -llcms"
|
|
|
|
|
AC_TRY_LINK([
|
|
|
|
|
#define inline __inline /* gcc is in ansi mode */
|
|
|
|
|
#include LCMS_HEADER
|
|
|
|
|
#if LCMS_VERSION < 112
|
|
|
|
|
choke!
|
|
|
|
|
#endif
|
|
|
|
|
], [
|
|
|
|
|
cmsOpenProfileFromFile("foo", "r");
|
|
|
|
|
],
|
|
|
|
|
[LCMS_LIBS='-llcms'; have_lcms='yes'])
|
|
|
|
|
LIBS=$saved_libs
|
|
|
|
|
CFLAGS=$saved_cflags
|
|
|
|
|
LDFLAGS=$saved_ldflags
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
LIBS=$saved_libs
|
|
|
|
|
CFLAGS=$saved_cflags
|
|
|
|
|
LDFLAGS=$saved_ldflags
|
|
|
|
|
|
|
|
|
|
if test -z "$LCMS_LIBS"; then
|
|
|
|
|
DO_NOT_COMPILE="$DO_NOT_COMPILE libkdcraw"
|
|
|
|
|