AM_CPPFLAGS, as the way to modify CPPFLAGS when using Automake.
+2007-08-22 Stepan Kasal <kasal@ucw.cz>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/autoconf.texi (Defining Directories): Mention
+ AM_CPPFLAGS, as the way to modify CPPFLAGS when using Automake.
+
2007-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (AC_SITE_LOAD): Do not overwrite "$@"
@end example
@noindent
-or create a dedicated header file:
+If you are using Automake, you should use @code{AM_CPPFLAGS} instead:
@example
-DISTCLEANFILES = datadir.h
-datadir.h: Makefile
+AM_CPPFLAGS = -DDATADIR='"$(datadir)"'
+@end example
+
+@noindent
+Alternatively, create a dedicated header file:
+
+@example
+DISTCLEANFILES = myprog-paths.h
+myprog-paths.h: Makefile
echo '#define DATADIR "$(datadir)"' >$@@
@end example