Automake shouldn't error out on valid make constructs; doesn't matter if they are GNU make specific--which ifdef isn't--or if they are not. A Makefile.am is nothing more than a Makefile, with some macros.
What automake can do, is output a warning; which it does in some cases already.
