Depending on the platform the boost python examples do not
always build.
On Linux (gcc/boost1.42) this is not an issue. If we compile
BOOST_ROOT/libs/python/example/std_pair_ext
...
This builds a shared library std_pair_ext.so

ldd bin/gcc-4.2.1/debug/std_pair_ext.so
        linux-gate.so.1 =>  (0xffffe000)
        libboost_python.so.1.42.0 => /var/tmp/ma0/boost/boost_1_42_0/bin.v2/libs/python/build/gcc-4.2.1/debug/libboost_python.so.1.42.0 (0xb7e7e000)
        libutil.so.1 => /lib/libutil.so.1 (0xb7e58000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7e40000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7e3c000)
        libstdc++.so.6 => /usr/local/apps/gcc/4.2.1/ILP32/lib/gcc/i686-pc-linux-gnu/4.2.1/libstdc++.so.6 (0xb7d4e000)
        libm.so.6 => /lib/libm.so.6 (0xb7d29000)
        libgcc_s.so.1 => /usr/local/apps/gcc/4.2.1/ILP32/lib/gcc/i686-pc-linux-gnu/4.2.1/libgcc_s.so.1 (0xb7d1d000)
        libc.so.6 => /lib/libc.so.6 (0xb7be9000)
        /lib/ld-linux.so.2 (0x80000000)

It can be seen that libutil, libpthread,libstdc , etc, get implicitly linked.
Its not clear if this controlled by python-extension rule, or ldconfig
or bjam rules for building shared libs ?

However on HPUX(aCC/boost 1.42), the equivalent libs for
aCC compiler do not get linked, as a result the examples fail
during the import step, due to unresolved symbols.

For my app, currently I am using python-extension rule in my jamfile,
and hence suffer the same problems.
Is there a way for me change python-extension rule ,  so
that the additional std libs on HPUX get pulled in ?

If not, is there any way, hacky or not, of conditionally adding
the libs for HPUX only. i.e _equivalent_ to:

#ifdef LINUX
lib pthread  ;
python-extension ecf_ext : [ glob src/*.cpp ]
            ...
             pthread
           : <variant>debug:<define>DEBUG
           ;
#endif

#ifdef HPUX
lib pthread  ;
lib std_v2 ;
lib stream ;
lib Csup ;
lib unwind ;
lib m ;
python-extension ecf_ext : [ glob src/*.cpp ]
         .....
         pthread
         std_v2
         stream
         Csup
         unwind
         m
           : <variant>debug:<define>DEBUG
           ;
#endif

Any help appreciated.

  Best regards,
Ta,
   Avi