summaryrefslogtreecommitdiffstats
path: root/chalk/configure.in.in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-26 00:41:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-26 00:41:16 +0000
commit698569f8428ca088f764d704034a1330517b98c0 (patch)
treebf45be6946ebbbee9cce5a5bcf838f4c952d87e6 /chalk/configure.in.in
parent2785103a6bd4de55bd26d79e34d0fdd4b329a73a (diff)
downloadkoffice-698569f8428ca088f764d704034a1330517b98c0.tar.gz
koffice-698569f8428ca088f764d704034a1330517b98c0.zip
Finish rebranding of Krita as Chalk
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238363 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'chalk/configure.in.in')
-rw-r--r--chalk/configure.in.in113
1 files changed, 113 insertions, 0 deletions
diff --git a/chalk/configure.in.in b/chalk/configure.in.in
new file mode 100644
index 00000000..733abe21
--- /dev/null
+++ b/chalk/configure.in.in
@@ -0,0 +1,113 @@
+KDE_CHECK_LIB(Xi, XOpenDisplay, [
+ LIB_XINPUTEXT="-lXi"
+ AC_DEFINE(HAVE_XINPUTEXT, 1, [Define if you have the X11 Input Extension])
+ ])
+AC_SUBST(LIB_XINPUTEXT)
+
+# Check for lcms
+AC_MSG_CHECKING([for lcms >= 1.15])
+
+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])
+
+ echo "#include <lcms/lcms.h>" > conftest.$ac_ext
+ echo "#if LCMS_VERSION < 115" >> conftest.$ac_ext
+ echo "#error Need lcms >= 1.15" >> conftest.$ac_ext
+ echo "#endif" >> conftest.$ac_ext
+ echo "int main() {}" >> conftest.$ac_ext
+
+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])
+
+ echo "#include <lcms.h>" > conftest.$ac_ext
+ echo "#if LCMS_VERSION < 115" >> conftest.$ac_ext
+ echo "#error Need lcms >= 1.15" >> conftest.$ac_ext
+ echo "#endif" >> conftest.$ac_ext
+ echo "int main() {}" >> conftest.$ac_ext
+ else
+ KDE_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
+ # and now debian also does it this way... can't they decide for one way of doing stuff ?
+
+ AC_DEFINE(LCMS_HEADER, <liblcms1/lcms.h>, [The correct header])
+
+ echo "#include <liblcms1/lcms.h>" > conftest.$ac_ext
+ echo "#if LCMS_VERSION < 115" >> conftest.$ac_ext
+ echo "#error Need lcms >= 1.15" >> conftest.$ac_ext
+ echo "#endif" >> conftest.$ac_ext
+ echo "int main() {}" >> conftest.$ac_ext
+
+ fi
+fi
+
+
+ac_link='$LIBTOOL_SHELL --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries -ltqt 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 chalk"
+fi
+
+AC_SUBST(LCMS_LIBS)
+
+# IM 6.1.3 changed the number of arguments to GetMagickInfoList
+
+AC_MSG_CHECKING(if GetMagickInfoList has only 2 arguments)
+CPPFLAGS_TMP="$CPPFLAGS" # Save preprocessor flags
+CPPFLAGS="$LIBMAGICK_CPPFLAGS"
+LDFLAGS_TMP="$LDFLAGS"
+LDFLAGS="$LDFLAGS -ltqt"
+
+AC_TRY_COMPILE(
+ [#include <stdio.h>
+ #if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #include "magick/api.h"],
+ [const char *pattern; unsigned long ncolors; (void)GetMagickInfoList(pattern, &ncolors)],
+ magick_info_list='yes',
+ magick_info_list='no')
+
+CPPFLAGS="$CPPFLAGS_TMP" # Restore preprocessor flags
+LDFLAGS="$LDFLAGS_TMP"
+
+if test "$magick_info_list" = 'yes'; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_OLD_GETMAGICKINFOLIST], 1, [GetMagickInfoList has different number of arguments with versions >= 6.1.3])
+else
+ AC_MSG_RESULT(no)
+fi
+
+# Check for kunittest
+AC_MSG_CHECKING([for kunittest])
+
+have_kunittest_header="no"
+KDE_CHECK_HEADER(kunittest/tester.h, have_kunittest_header="yes", , )
+AM_CONDITIONAL(include_kunittest_tests, test "$have_kunittest_header" = "yes")
+
+# --- OpenGL check ---
+
+AC_HAVE_GL( [], [] )
+
+# --- End of OpenGL check ---
+
+# Check for powf.
+
+AC_CHECK_FUNC(powf, [have_powf="yes"], [AC_CHECK_LIB(m, powf, [have_powf="yes"], [have_powf="no"])])
+
+if test "$have_powf" = 'yes'; then
+ AC_DEFINE([HAVE_POWF], 1, [Define to 1 if your system has powf in <maths.h>])
+fi\