Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-04-11 17:30:08


On Apr 11, 2007, at 8:08 AM, Bas van der Vlies wrote:

>> The OMPI_CHECK_PACKAGE macro is a rather nasty macro that tries
>> to reduce the replication of checking for a header then a
>> library, then setting CFLAGS, LDFLAGS, LIBS, and all that. There
>> are two components that use the TM libraries, so we have a
>> centralized macro that sets the configuration data for the two
>> components. The -I, -L, -ls are set in OMPI_CHECK_PACKAGE.
>> In the OMPI_CHECK_TM macro, you probably want to check for pbs-
>> config, then if that fails, run the OMPI_CHECK_PACKAGE stuff. Of
>> course, you might want to run the OMPI_CHECK_PACKAGE code with
>> CFLAGS and LDFLAGS set to what you get from pbs-config, to make
>> sure the libraries actually work. The way we set flags is a bit
>> weird -- you need to set the environment variables:
>> $1_CPPFLAGS
>> $1_CFLAGS
>> $1_LDFLAGS
>> $1_LIBS
>
> I have made a crude version that uses 'pbs-config' and check uses
> the OMPI_CHECK_PACKAGE macro but in the OMPI_CHECK_PACKAGE_HEADER
> macro /include is appended if it not /usr or /usr/include. So there
> must option to prevent this (pbs-config give the right value). Then
> i do not have to set the CPPFLAGS variable.
>
> OMPI_CHECK_PACKAGE_LIB:
> For the library name there is also -l prepended so i can not use
> the name form 'pbs-config --libs' and it as the same problem as
> with checking the header if it is not standard then /lib is appended.

What about assigning $1_<foo> directly and then passing flags that
will be ignored to OMPI_CHECK_PACKAGE (e.g., "/usr")? I have not
tried this at all -- just hacked this in emacs. So it may not even
compile -- you'll need to test it. See new attachment. :-)

-- 
Jeff Squyres
Cisco Systems