On a Solaris 8 system running CC v6.2 if I have an external function
defined as

extern "C" int x(char *, int *);

How do I link this such that LD doesn't complain if the library that
actually contains x isn't available via LD_LIBRARY_PATH. The
containing library is currently optional and may not be installed on
the system; I've tried using dlopen/dlsym and that sort of works, but
this has it owne set of problems not related to this so I can't really
use them.

Is there an equivalent to lazyload for the actual link step?