I don't really like the prospect of having #if statements throughout the code,
So hide it behind a macro in a header file:
#if defined(HAVE_FOOBAR) # define FOOBAR(p) FooBar(p) #else # define FOOBAR(p) MyFooBarVersion(p) #endif
Not rocket science.
I don't want my toolkit's functions linked in when unnecessary, and likewise, I don't want the system's functions linked in when unnecessary.
That's the linker's problem.
And if the linker isn't going to cooperate, you can use autoconf to test for the need of a library, and conditionally link to it. There's a pthreads macro out there on one of the major autoconf archives that shows this technique, since various systems put the thread calls in different libraries.
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf