summaryrefslogtreecommitdiffstats
path: root/krita/configure.in.in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /krita/configure.in.in
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/configure.in.in')
-rw-r--r--krita/configure.in.in110
1 files changed, 110 insertions, 0 deletions
diff --git a/krita/configure.in.in b/krita/configure.in.in
new file mode 100644
index 00000000..2cb413b5
--- /dev/null
+++ b/krita/configure.in.in
@@ -0,0 +1,110 @@
+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 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
+
+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"
+
+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
+
+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\