On Wed, Oct 14, 2009 at 05:36:36AM +0100, Dr. David Kirkby wrote: > I'm trying to modify this macro > > http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_count_cpus.m4 > > which attempt to get the number of CPUs in a system. I'd like to extend > it to cover Solaris, AIX and HP-UX. > > It seems sensible to me to only do a test on a platform it will work on, > so I think thinking of something like > > if `uname` = "HP-UX" > write test for HP-UX > fi > > or I could check if __hpux__ is defined or not. See AC_CANONICAL_HOST for the way of identifying the host platform. However, we generally omit explicit assumptions about the right test for a certain system type. Instead, try each test unconditionally and use the first one that works. The code you reference currently does this. Consider checking processor count and cache characteristics at runtime. If a OS distribution ships binaries of your software, they will run on a wide range of processor configurations. You might need `configure'-time checks to verify the availability of the APIs you would use at runtime.
Attachment:
pgphsad1BB5c9.pgp
Description: PGP signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf