<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div>I have not posted to this list much at all since registering at University and have never attended a LUG meeting. Yes I do hear the cries of 'burn him at the stake' :)</div><div><br></div><div>At little bit of background info.</div><div>Premake[1] is an Open Source cross platform 'configure' type library written in Lua which generates project files, solutions and make files. Currently I am trying to figure out the best and most universal method of detecting the host architecture for Linux distros at runtime for a couple of reasons:</div><div>To let users call out to external executables depending on the arch [2]</div><div>To set the correct location to look for libraries [3]</div><div><br></div><div>My current thinking is the best method is to parse the output of 'uname -m' and this method has been confirmed to me that at least on one distro gives the value of a 32 bit id when a 32 bit distro is installed on a 64 bit system, which is what I am looking for. The other alternatives as I see it are:</div><div>parsing /proc/cpuinfo Although I am not sure if this would give a 64 bit value in the above case</div><div>uname -p Does not always give a valid value, sometimes returning 'unknown'</div><div><br></div><div><br></div><div>The current values that I have can be seen in [4]. Are there any others that are known to yourselves and is this the best method of obtaining the information? Any help would be gratefully received and any calls to burn me will be ignored :)</div><div><br></div><div>Thanks</div><div><br></div><div>Liam </div><div><br></div><div>[1] <a href="http://industriousone.com/premake">http://industriousone.com/premake</a></div><div>[2] <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1582602&group_id=71616&atid=531881">http://sourceforge.net/tracker/index.php?func=detail&aid=1582602&group_id=71616&atid=531881</a></div><div>[3] <a href="http://sourceforge.net/tracker/?func=detail&aid=3121217&group_id=71616&atid=531878">http://sourceforge.net/tracker/?func=detail&aid=3121217&group_id=71616&atid=531878</a></div><div>[4] <a href="http://industriousone.com/topic/native-arch">http://industriousone.com/topic/native-arch</a></div><div><br></div><div>PS Hmm does it show that I do not post to this mailing list much when I sent the first mail to liverpool-request :)</div></body></html>