We have a bit of a messed up makefile system which we are going to fix up. But in the mean time I need to add a workaround, and I am wandering if you can ask the compiler (or linker) to link a library, but only if it exists. I know how to fix the makefile but that will take some time and in the meantime I want a quick hack...
So I have somthng like:
gcc <...other options...> -L ./some/path -l somelibrary
When libsomelibrary.so does not exist this gives an error. I want it to continue in this case without linking. Is that possible? - some linker option?
somelibrarywith$SOMELIBvar, and only set it if the check that such lib exists succeeds.