autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass AC_ARG_ENABLE an argument


From: Richard Dawe
Subject: Re: How to pass AC_ARG_ENABLE an argument
Date: Sun, 21 Dec 2003 14:36:34 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031

Hello.

Dave Kirkby wrote:
        I want to allow a configure script to be told the number of CPUs
to build some software for. The manual says 'AC_ARG_ENABLE' can read an
agument, but I can't for the life of me see how to get it. I basically
want to have something AC_DEFINE CPUS to be an integer read whilst
configuring the program.

I have no idea if this will work for your software, but:

Wouldn't it be better to detect the number of processors at runtime? See (for glibc on Linux):

    info libc sysconf constant

and search for the constant "_SC_NPROCESSORS_ONLN".

Bye, Rich =]

--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]

"You can't evaluate a man by logic alone."
  -- McCoy, "I, Mudd", Star Trek





reply via email to

[Prev in Thread] Current Thread [Next in Thread]