[maemo-developers] Find out OS version in configure script
From: Cornelius Hald hald at icandy.deDate: Wed Apr 29 22:14:52 EEST 2009
- Previous message: Find out OS version in configure script
- Next message: Maintenance break maemo.org autobuilder now
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Till, > that's imho what maemo-version is there for. I use it this way: > > PKG_CHECK_EXISTS(maemo-version, [ > VERSION=`pkg-config --modversion maemo-version` > AC_MSG_NOTICE([Configuring for Maemo $VERSION]) > CFLAGS="$CFLAGS -DMAEMO_VERSION=\\\"$VERSION\\\"" > MAJOR=`echo $VERSION | cut -b1 -` > CFLAGS="$CFLAGS -DMAEMO_VERSION_MAJOR=$MAJOR" > ], [ > AC_MSG_ERROR([maemo-version not found]) > ]) > > And in my program i can then do things like > > #if MAEMO_VERSION_MAJOR == 5 > do_something(); > #endif this is what I was looking for. I didn't know that a package called maemo-version exists. Thanks a lot for the information :) Just for reference, this is the solution with which I came up: PKG_CHECK_EXISTS([hildon-1 >= 2.1.62], [AC_DEFINE([HILDON_HAS_APP_MENU], [1], [Does hildon app menu exist])]) Cheers! Conny
- Previous message: Find out OS version in configure script
- Next message: Maintenance break maemo.org autobuilder now
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]