[csw-maintainers] OpenCSW distribution specific pre-processor macro

Peter FELECAN pfelecan at opencsw.org
Tue Dec 13 14:20:55 CET 2011


In many cases I'm interested in supplying a package which have build
dependencies on the presence or absence of OpenCSW packages on a Solaris
system.

This is easy to provide for the GCC suite by adding to the predefined
macros one such as __opencsw__.

An example:

   I need to provide a default value for the SHELL environment variable
   and for a OpenCSW enabled system I prefer /opt/csw/bin/bash instead
   of /usr/bin/bash (I know that this can be solved by running
   /usr/bin/env bash); consequently, when building on such a system I
   can provide a sensible value by depending on the specific macro
   existence.

I think that for other languages and tools (specifically autotools),
there are situations where such a discrimination can be useful.

Comments, observations, criticisms, &c
-- 
Peter


More information about the maintainers mailing list