Re: How to detect Maemo in automake?
Dnia Wednesday, 20 of February 2008, Alberto Garcia napisał: On Wed, Feb 20, 2008 at 02:00:50PM +, Ross Burton wrote: Now for my next question: How do i detect maemo correctly in autoconf? I think that he meant how to *detect* Maemo (i.e, without having to ask the user). I used to check for the existence of libosso, but since it's available in Debian (http://packages.debian.org/libosso) I'm also checking whether we're running inside the scratchbox, so you could use something like this: if $PKG_CONFIG --exists libosso readlink /etc|grep -q ^/targets; then DETECTED_PLATFORM=maemo fi If there's an official way (or just a better one) to detect if we're compiling for Maemo I'd like to know. I wonder why this is really needed... If application is for Maemo then it use its libraries (libosso, libhildon) and should check for those libraries not for scratchbox. Or --enable-maemo switch should be used - if someone wants to build software for Maemo then adding one parametr to ./configure call should be enough. Think about people who use normal cross-compilation (for example OpenEmbedded) instead of scarybox. -- JID: hrw-jabber.org OpenEmbedded developer/consultant You can close your eyes to reality, but not to memories. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
ext Till Harbaum / Lists wrote: Am Mittwoch 20 Februar 2008 schrieb Juha Kallioinen: As of now it's available for Gregale, latest Bora and Chinook SDKs. It was an afterthought, so unfortunately it's not installed in those by default as of yet. So in many ways it's not universally usable right now. Any future release of the SDK will have it there by default. Very nice, i'll give it a try. Wouldn't a deb build dependency to maemo-version-dev even resolve the problem that it's not installed by default? Well yes, but aren't you then just limited to maemo environment? I think the original question in this thread was how to detect maemo in automake to enable some maemo specific features and if you just put a build dependency to maemo-version then it won't be buildable in any other environment since the package isn't available in other environments. Cheers, Juah -- Juha Kallioinen JID: [EMAIL PROTECTED] ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
On Thu, Feb 21, 2008 at 11:15:31AM +0100, Marcin Juszkiewicz wrote: I wonder why this is really needed... If application is for Maemo then it use its libraries (libosso, libhildon) and should check for those libraries not for scratchbox. Yeah, but if your desktop PC happens to have libosso installed (it's included in Debian) then autoconf will detect that you're compiling for Maemo. In my case compiling for Maemo means compiling using the Maemo SDK (and probably for the Nokia 770/N800/N810). And scratchbox seems to be the official way to use the Maemo SDK. Anyway that was only an example that I think is probably good enough for most cases. If not, just pass the --enable-maemo switch to override autodetection and that's it :) -- Alberto García González http://people.igalia.com/berto/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
Dnia Thursday, 21 of February 2008, Alberto Garcia napisał: On Thu, Feb 21, 2008 at 11:15:31AM +0100, Marcin Juszkiewicz wrote: I wonder why this is really needed... If application is for Maemo then it use its libraries (libosso, libhildon) and should check for those libraries not for scratchbox. Yeah, but if your desktop PC happens to have libosso installed (it's included in Debian) then autoconf will detect that you're compiling for Maemo. If you screw configure phase by not providing informations where headers are then it can. But its bug of person who do compilation. In my case compiling for Maemo means compiling using the Maemo SDK (and probably for the Nokia 770/N800/N810). And scratchbox seems to be the official way to use the Maemo SDK. It does not mean that it is best way ;D I heard enough complains about scarybox to not even touch it with long stick. With OE I can just bitbake gvim and result is package which works on device. No need to remember which libraries to build (and how). -- JID: hrw-jabber.org OpenEmbedded developer/consultant If it works, don't fix it. -- Sam Rayburn ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
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 -- Oohbuntoo is an ancient african word meaning, not just a big bucket and a scheduling calendar for sharing access to the modern science of linguistics in the bathroom. --leeta http://www.gnu.org/philosophy/shouldbefree.html ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
How to detect Maemo in automake?
Hi, first of all: Thanks for the useful replies so far. 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. Regards, Till ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
On Wed, Feb 20, 2008 at 02:00:50PM +, Ross Burton wrote: Now for my next question: How do i detect maemo correctly in autoconf? One way is: AC_ARG_ENABLE(maemo,[ --enable-maemo Enable Maemo-specific build options], [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 I think that he meant how to *detect* Maemo (i.e, without having to ask the user). I used to check for the existence of libosso, but since it's available in Debian (http://packages.debian.org/libosso) I'm also checking whether we're running inside the scratchbox, so you could use something like this: if $PKG_CONFIG --exists libosso readlink /etc|grep -q ^/targets; then DETECTED_PLATFORM=maemo fi If there's an official way (or just a better one) to detect if we're compiling for Maemo I'd like to know. -- Alberto García González http://people.igalia.com/berto/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
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: [EMAIL PROTECTED] jabber: [EMAIL PROTECTED] www: http://www.burtonini.com./ PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
On Wed, 2008-02-20 at 15:10 +0100, Alberto Garcia wrote: I think that he meant how to *detect* Maemo (i.e, without having to ask the user). I used to check for the existence of libosso, but since it's available in Debian (http://packages.debian.org/libosso) I'm also checking whether we're running inside the scratchbox, so you could use something like this: if $PKG_CONFIG --exists libosso readlink /etc|grep -q ^/targets; then DETECTED_PLATFORM=maemo fi What if I want a maemo build on Ubuntu Mobile, or any other system which has the Maemo stack? It's best to make it explicit at configure time because having too much magic means it breaks if your assumptions fail. Ross -- Ross Burton mail: [EMAIL PROTECTED] jabber: [EMAIL PROTECTED] www: http://www.burtonini.com./ PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
On Wed, Feb 20, 2008 at 02:29:18PM +, Ross Burton wrote: What if I want a maemo build on Ubuntu Mobile, or any other system which has the Maemo stack? It's best to make it explicit at configure time because having too much magic means it breaks if your assumptions fail. Indeed, but you can just make a basic detection based on the platforms your app is designed for and let the user override it with a configure switch. -- Alberto García González http://people.igalia.com/berto/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
ext Alberto Garcia wrote: On Wed, Feb 20, 2008 at 02:00:50PM +, Ross Burton wrote: Now for my next question: How do i detect maemo correctly in autoconf? One way is: AC_ARG_ENABLE(maemo,[ --enable-maemo Enable Maemo-specific build options], [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 I think that he meant how to *detect* Maemo (i.e, without having to ask the user). I used to check for the existence of libosso, but since it's available in Debian (http://packages.debian.org/libosso) I'm also checking whether we're running inside the scratchbox, so you could use something like this: if $PKG_CONFIG --exists libosso readlink /etc|grep -q ^/targets; then DETECTED_PLATFORM=maemo fi If there's an official way (or just a better one) to detect if we're compiling for Maemo I'd like to know. There's a new package 'maemo-version' which can be installed into the SDK. This package can be used to detect which version of the SDK is being used or more generally that you are in a maemo environment. The maemo-version-dev package provides a .pc file that you can check with pkg-config. As of now it's available for Gregale, latest Bora and Chinook SDKs. It was an afterthought, so unfortunately it's not installed in those by default as of yet. So in many ways it's not universally usable right now. Any future release of the SDK will have it there by default. Cheers, Juha -- Juha Kallioinen JID: [EMAIL PROTECTED] ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to detect Maemo in automake?
Am Mittwoch 20 Februar 2008 schrieb Juha Kallioinen: As of now it's available for Gregale, latest Bora and Chinook SDKs. It was an afterthought, so unfortunately it's not installed in those by default as of yet. So in many ways it's not universally usable right now. Any future release of the SDK will have it there by default. Very nice, i'll give it a try. Wouldn't a deb build dependency to maemo-version-dev even resolve the problem that it's not installed by default? Till ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers