Message forwarded from Danalien

Andras Mantia amantia at kde.org
Sat Dec 6 09:04:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I do something like this to detect if KDE is 3.1.9x or older in a 
configure.in.in:

KDE_VERSION=""
AC_MSG_CHECKING(for KDE version)
KDE_VERSION=`kde-config --version | grep KDE`
AC_MSG_RESULT("$KDE_VERSION")
if test "x`echo $KDE_VERSION | grep 3.1.9`" = "x"; then
    echo "The KDE version is too old, WYSIWYG mode disabled!"
fi


Andras


On Friday 05 December 2003 15:32, Dan Jensen wrote:
> Hello, core people, here is Danalien's reply:
>
> What about '#MIN_CONFIG(3.1)' ?
>
> if we grep in $FRESH_CVS_SRC/, ` grep -in "#MIN_CONFIG" * -r `
>
> We'll get the following in 'admin/ChangeLog':
>      * now #MIN_CONFIG tag takes parameters for KDE_USE_QT, too.
>           e.g. #MIN_CONFIG(2.2) for qt 2.2 usage
>
> looks, promising, but let's first look at the other lines we get,
> at line 250, 251, 253 & 293 of 'admin/cvs.sh':
>
>     250    if head -2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$"
>
> > /dev/null; then
>
>     251       kde_use_qt_param=`cat configure.in.in | sed -n -e
> "s/#MIN_CONFIG(\(.*\))/\1/p"`
>     252    fi
>
> this will set the '$kde_use_qt_param' to '3.1'
>
>     253    if head -2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null;
> then 254       line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
>
> in our case, '$line' gets set to 'AM_INIT_AUTOMAKE([slicker], [0.1],
> [http://slicker.sf.net/])'
>
>     293 if test -f configure.in.in && head -2 configure.in.in | grep
> "^#MIN_CONFIG" > /dev/null; then
>     294         echo $admindir/configure.in.min >> configure.files
>     295 fi
>
> this will append '$admindir/configure.in.min' to configure.files file.
>
>
> now let's grep for, ` grep -in "kde_use_qt_param" * -r ` , and look at line
> 273 & 274  of 'cvs.sh'
> (if you're wondering why?, because everything else we got from our first
> grep is unimportant....)
>
>     273 if test -n "$kde_use_qt_param"; then
>     274       sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \
>     275         configure.in.new > configure.in && mv configure.in
> configure.in.new
>     276 fi
>
> it substitutes the line 'dnl KDE_USE_QT' in 'configure.in.new', with
> 'KDE_USE_QT(3.1)'
>
>
>
> final conclusion, is that '#MIN_CONFIG(3.1)' will only check for a min. QT
> version, and in
> no way, is going to check for a min. KDE version (as the 'KDE_USE_QT  AC-
> macro' is QT only ...).
>
> ( '#MIN_CONFIG(3.1)' is the equalant of using both: '#MIN_CONFIG' and
> 'KDE_USE_QT(3.1)'  in configure.in.in )

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/0ZuFTQdfac6L/08RAtX7AKC5u5xplHTNfR+f5HeFfv/lpfya4gCfTI5t
5FkP0lkLJUynf9CJtp1MDDQ=
=OmBQ
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list