Lars Segerlund wrote:
I'm trying to find out the os ( build=host ) but i dont want to ship a config guess, and this seem's a simple operation but I can't find the macro to use.
Any help ? Please ?
config.guess exists because it is not a simple operation if it shall be done universally for all systems that are known to developers. If you only target a limited set of OSs, make a case on `uname` being the standard unix tool - `uname -m`-`uname-s` will give you a name that is suitable for most project needs (most even subcase on `uname` output alone) On anything beyond that, don't ask any further, and start shipping config.guess.
http://www.opengroup.org/onlinepubs/007908799/xcu/uname.html case `uname` in Linux) echo "wow" ;; SunOS) echo "whew" ;; *) echo "what?" ;; esac ____________________________________________________________ Btw, did you know that config.guess uses `uname` internally to make a guess on the system type, and that it will then call its cousin script config.sub ? that one will make the gnu'ish name of its arguments, e.g. $ echo `uname -m`-`uname -s` i686-Linux $ sh ./config.sub `uname -m`-`uname -s | tr A-Z a-z` i686-pc-linux-gnu however, as for the size: $ ls -l config.* | cut -c30- 39715 Sep 17 15:22 config.guess 29483 Sep 17 15:22 config.sub and it would not be a good idea to wrap these shell scripts into an ac-macro - because an ac-macro itself is just a snippet of shell commands that can be reused all over the place. That's the whole point of macroitis, ye know, and it is the reason that your request can be regarded as rather pointless. Instead, have yourself a look into config.guess/config.guess and start extracting the commands that solely test for the systems that You are targetting with your software - and perhaps wrap them into an ac-macro that you can reuse across all software projects that you have. No one here will be out to pre-define a subset, and make up an ac-macro for such a subset of systems - the config.* scripts will handle All systems. cheers, guido
