Message forwarded from Danalien

Andras Mantia amantia at
Sun Dec 7 12:11:46 GMT 2003

Hash: SHA1

On Saturday 06 December 2003 15:16, Dan Jensen wrote:
> On Saturday 06 December 2003 11:58, Andras wrote:
> > I do something like this to detect if KDE is 3.1.9x or older in a
> >
> >
> > AC_MSG_CHECKING(for KDE version)
> > KDE_VERSION=`kde-config --version | grep KDE`
> > if test "x`echo $KDE_VERSION | grep 3.1.9`" = "x"; then
> >     echo "The KDE version is too old, WYSIWYG mode disabled!"
> > fi
> dear, andras.
> What you are doing there, is an 'explicit version check'. Meaning, that if
> the user got anything else that's higher than the version you are 'greping'
> for, it'll still *bork bork*, (like 3.2.0 , 3.2.1, ... 4.1.0 ;-) ...),
Of course the check must be adapted as soon as KDE 3.2 is labeled as KDE 3.2. 
But it will work for all KDE 3.2.x versions if you grep for "3.2". I don't 
know if it's enough for you, but surely enough for me. It's not usable to 
check for example KDE 3.2.2 or newer. In that case you can write a small test 
programs which returns 1 if KDE version > the requested one or 0 in another 
case. You need in something like this (not tested):
#include <kdeversion.h>

int main(int argc,char **argv)
#if KDE_IS_VERSION(3, 2, 2)
  return 1;
  return 0;

AC_MSG_CHECKING(for KDE version)
        echo " (should be OK)",
        echo " (not so good)"
        AC_MSG_ERROR(" You need KDE 3.2.2 or newer."),
        echo " (not so good)"
        AC_MSG_ERROR(" You need KDE 3.2.2 or newer.")

Anyway, I re-read the original mail and I see that you already have a 
solution, the only problem is that it's not in the admin dir. :-)


> and 
> at the same time give the illusion that it works fine with anyting lower,
> but the matter of the fact is that it's *borking* because it didn't find
> the exact version you are greping for ;-).
> And nothing we could use, as we are bound to have people useing not exact
> the same version of kde in the future (some, 3.2.0, other 3.2.1 other
> 3.2.2...4.1.0 :) etc).
> Our way, we set a 'barrier' that their kde version has to pass, if it does
> then fine, else, they'll get a message to update to atleast equal or a
> higher version then what is required.
> //danalien

- -- 
Quanta Plus developer -
K Desktop Environment -
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)


More information about the kde-core-devel mailing list