An Example Of AC_SUBST In Practice
To see what is really going on, we need to look at
configure.in and Makefile.am
in tandem.
In configure.in...
PKG_CHECK_MODULES(LIBGLADE, libxml-2.0 >= 2.4.10
atk >= 1.0.0
gtk+-2.0 >= 2.0.0)
AC_SUBST(LIBGLADE_LIBS)
AC_SUBST(LIBGLADE_CFLAGS)
|
and in Makefile.am.
INCLUDES = @LIBGLADE_CFLAGS@
libglade_LDADD = @LIBGLADE_LIBS@
|
Since autoconf defines Makefile variables for each substitution that
it does, the last example could also be written as
INCLUDES = $(LIBGLADE_CFLAGS)
libglade_LDADD = $(LIBGLADE_LIBS)
|