Sorry, I think you are right. I have been compiling ECM a lot recently, and the flag goes with that program's .configure. I need to remember to plug my brain in before posting.
But it is still interesting that the error is similar -- can't find the gmp.h header file.
It shouldn't be long before somebody with the *right* answer chimes in here.