[maemo-developers] [maemo-developers] A set of development questions...

From: Kalle Vahlman kalle.vahlman at gmail.com
Date: Wed Jan 25 10:29:40 EET 2006
On 1/24/06, Simon Budig <simon at budig.de> wrote:
> Tomi Ollila (tomi.ollila at guru.guru-group.fi) wrote:
> > 3  Is there a compiler define that can be used in code to conditionally
> >    compile code when targeting for 770 (and some other code when not for 770).
> >    Currently I use the following kludgy hack:
> >
> >    test -f /etc/init.d/maemo-launcher && XD=-DM4EM0 || XD=
> >
> >    and then use  $XD  in gcc command line.
>
> I use my configure script to check for the presence of the hildon
> libraries. Put this in your configure.ac:
>
>   PKG_CHECK_MODULES(HILDON, hildon-lgpl,
>   [ AC_DEFINE(HILDON)
>     AC_SUBST(HILDON_LIBS)
>     AC_SUBST(HILDON_CFLAGS)],
>   AC_MSG_RESULT([no]))
>
> Then you can #ifdef HILDON your C-code.

Just a quick note that if you don't compile a Gtk+ program, it's
probably better to check for libosso to not require all the
Gtk+-related devel libs at build time (although the SDK rootstraps
naturally has these always, but...).

--
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi

More information about the maemo-developers mailing list