So I'm writing tests for my code, and I want to stub out the calls to library functions (make sure that it's calling the right library calls at the right time, and that it handles errors appropriately).
I think I'm SOL with the C standard library functions, but those aren't the only libraries I'm using.
When building my final executable (not my test executable), I want to use -lfuse
, so I included this line in my configure.ac
AC_CHECK_LIB([fuse], [fuse_main])
However, this also tosses in -lfuse
when it tries to build my check_PROGRAMS
.
Is there some way I can tell autotools that I don't want the -lfuse
library when building my test executable (make check
)? Then I should be able to stub out the library calls as I wish, since there won't be anything else linked with the same name.