autoconf's -I flag in simple configure.ac cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

it appears that autoconf's -I flag does not show any effect in simple cases
(namely simple test cases without  AC_CONFIG_MACRO_DIRS which implies other
dependencies like AM_INIT_AUTOMAKE).

The simple example below shows that autoconf passes the -I flag on to
autom4te, but the m4-macro defined in m4/help.m4 is not expanded in
configure.  Or is it that hell.m4 is to be explicitly m4_include'd in
configure.ac (which does certainly help here)?  If this was correct, what
exactly should one expect autoconf's -I flag to do - in such a simple case
and in general?

$ cat configure.ac
AC_INIT
## begin
SAY_HELLO
### end
AC_OUTPUT

$ cat m4/hello.m4
AC_DEFUN([SAY_HELLO],[AS_ECHO([Hello!])])

$ autoconf -v -I m4 2>&1 | sed -n '1p'
autoconf: running /usr/bin/autom4te -v -I m4 --language=autoconf
--output=configure configure.ac

$ sed -n '/### begin/,/### end/p' configure
### begin
SAY_HELLO
### end

... thus SAY_HELLO is not expanded in configure.


Help and enlightening comments most welcome,
J.






[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux