That's an unfortunate collision - you could try adding CFLAGS=-UPACKAGE_VERSION
to your command line to undefine it.
Using AC_CONFIG_HEADERS([config.h])
(explanation here) will prevent the -D
flags from being passed to the compiler; then, in the files where you don't want the defines, simply don't #include "config.h"
.
Ultimately, though, if you plan to continue using Autotools for your package, it would be better to refactor the existing define, because keeping it is likely to cause hard-to-track-down errors down the line.