[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: possible configure problem for krita
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2004-12-17 13:24:23
Message-ID: 200412171424.25734.boud () valdyas ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Friday 17 December 2004 14:08, Tomas Mecir wrote:
> I wuold go for my solution... The whole ac block could look like this
> ... Untested, but should work ... You'll need to rename variables to
> suit the existing stuff - I didn't look at how are those named ...
Ah, yes -- thanks. Now it's the case that lcms. can be either in include
or in include/lcms, so I've done the following:
# Check for lcms
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])
AC_MSG_CHECKING([for lcms >= 1.14])
echo "#include <lcms/lcms.h" > conftest.$ac_ext
echo "#if LCMS_VERSION < 114" >> conftest.$ac_ext
echo "#error Need lcms < 1.14" >> conftest.$ac_ext
echo "#endif" >> conftest.$ac_ext
echo "int main() {}" >> conftest.$ac_ext
ac_link='$LIBTOOL_SHELL --mode=link ${CXX-g++} -o conftest $CXXFLAGS
$all_includes $CPPFLAGS $LDFLAGS conftest.$ac_ext -llcms 1>&5'
if AC_TRY_EVAL(ac_link) && test -s conftest; then
AC_MSG_RESULT(yes)
HAVELCMS="yes"
LCMS_LIBS="-llcms"
else
AC_MSG_RESULT(no)
HAVELCMS="no"
LCMS_LIBS=""
DO_NOT_COMPILE="$DO_NOT_COMPILE krita"
fi
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])
AC_MSG_CHECKING([for lcms >= 1.14])
echo "#include LCMS_HEADER" > conftest.$ac_ext
echo "#if LCMS_VERSION < 114" >> conftest.$ac_ext
echo "#error Need lcms < 1.14" >> conftest.$ac_ext
echo "#endif" >> conftest.$ac_ext
echo "int main() {}" >> conftest.$ac_ext
ac_link='$LIBTOOL_SHELL --mode=link ${CXX-g++} -o conftest $CXXFLAGS
$all_includes $CPPFLAGS $LDFLAGS conftest.$ac_ext -llcms 1>&5'
if AC_TRY_EVAL(ac_link) && test -s conftest; then
AC_MSG_RESULT(yes)
HAVELCMS="yes"
LCMS_LIBS="-llcms"
else
AC_MSG_RESULT(no)
HAVELCMS="no"
LCMS_LIBS=""
DO_NOT_COMPILE="$DO_NOT_COMPILE krita"
fi
fi
fi
if test "x$HAVELCMS" = "xyes"
then
AC_DEFINE(HAVE_LCMS, 1)
fi
AC_SUBST(LCMS_LIBS)
Is that an acceptable way of doing this, or should I have been smarter?
--
Boudewijn Rempt | "Geef mij maar zuurtjes."
http://www.valdyas.org/fading/index.cgi
[Attachment #5 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic