[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Commit to kde-common was: Re: Needed feature in 3.2
From:       Michael Ritzert <kde () ritzert ! de>
Date:       2002-12-15 19:30:39
[Download RAW message or body]

Am Sonntag, 15. Dezember 2002 20:16 schrieb Michael Ritzert:
> Since noone objected, I'm away from the sources for a few days and I
> consider the patch safe as it touches little common code, I'm going to
> commit now.

Or at least I try... ;-)
Can someone with enough "Karma" please check and commit the attached patch? If 
this is not Ok, I can of course deviate from the tiff example I had and put 
the code in kdelibs/configure.in.

The rest is in, but disabled currently because there is no way the needed 
variables in config.h get set.

Michael

["kde-common.diff" (text/x-diff)]

Index: admin/acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.311
diff -u -3 -p -r2.311 acinclude.m4.in
--- admin/acinclude.m4.in	15 Dec 2002 14:48:42 -0000	2.311
+++ admin/acinclude.m4.in	15 Dec 2002 19:25:58 -0000
@@ -1877,6 +1877,7 @@ AC_DEFUN(KDE_CHECK_KIMGIO,
    AC_REQUIRE([AC_FIND_TIFF])
    AC_REQUIRE([AC_FIND_JPEG])
    AC_REQUIRE([AC_FIND_PNG])
+   AC_REQUIRE([AC_FIND_JASPER])
    AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
 
    if test "$1" = "existance"; then
@@ -2499,6 +2500,48 @@ else
   AC_MSG_RESULT(no)
   LIBPNG=""
   AC_SUBST(LIBPNG)
+fi
+])
+
+
+AC_DEFUN(AC_FIND_JASPER,
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_MSG_CHECKING([for jasper])
+AC_CACHE_VAL(ac_cv_jasper,
+[
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_LANG_C
+AC_TRY_LINK(dnl
+    [
+    #include<jasper/jasper.h>
+    ],
+    [
+    return( jas_init() );
+    ],
+    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
+    eval "ac_cv_jasper=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
+  LIB_JASPER="$ac_cv_jasper"
+  AC_SUBST(LIB_JASPER)
+  AC_MSG_RESULT($ac_cv_jasper)
+else
+  AC_MSG_RESULT(no)
+  LIB_JASPER=""
+  AC_SUBST(LIB_JASPER)
 fi
 ])
 

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic