There is, $LDFLAGS, but that contains a lot more than what is needed here. This works. Don't ask me why (it's a very weird problem when using ACML and Intel compilers together), but it works.