[maemo-developers] How to detect Maemo in automake?
From: Ross Burton ross at burtonini.comDate: Wed Feb 20 16:00:50 EET 2008
- Previous message: How to detect Maemo in automake?
- Next message: How to detect Maemo in automake?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 2008-02-20 at 08:37 -0500, Levi Bard wrote: > > Now for my next question: How do i detect maemo correctly in autoconf? I'd > > like to port a project and add some maemo specific options but don't like to > > do non-portable changes. > > One way is: > AC_ARG_ENABLE(maemo, [ --enable-maemo Enable > Maemo-specific build options], > [enable_maemo=true], > [enable_maemo=false]) > > if test x"$enable_maemo" = xtrue; then > #Do stuff > fi That snippet enables maemo support if you pass --disable-maemo. The 3rd option is evaluated if there is an option specified, so you end up replacing the existing enable_maemo=no with enable_maemo=true. You mean something like this: AC_ARG_ENABLE(maemo, AS_HELP_STRING([--enable-maemo],[enable Maemo-specific features]), [], enable_maemo=no) if test x"$enable_maemo" = xyes; then ... fi The manual explains how AC_ARG_ENABLE works: http://www.gnu.org/software/autoconf/manual/html_node/Package-Options.html I also think that this should be --with instead of --enable (because Maemo is external software, not an optional feature). Ross -- Ross Burton mail: ross at burtonini.com jabber: ross at burtonini.com www: http://www.burtonini.com./ PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF
- Previous message: How to detect Maemo in automake?
- Next message: How to detect Maemo in automake?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]