[maemo-developers] Find out OS version in configure script
From: Till Harbaum / Lists lists at harbaum.orgDate: Wed Apr 29 21:40:53 EEST 2009
- Previous message: Find out OS version in configure script
- Next message: Find out OS version in configure script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
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
Till
Am Mittwoch 29 April 2009 schrieb Cornelius Hald:
> Hi,
>
> I´m wondering what is the recomended way to find out the OS version in my configure script?
> Do I have to check for library availability and then make a guess or is there some test program that I can call or some file with the version name?
>
> I´m trying to build my app using Chinook, Diablo and Fremantle. Therefore I need to introduce some #ifdef statements...
>
> Thanks!
> Conny
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
- Previous message: Find out OS version in configure script
- Next message: Find out OS version in configure script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
