I'm trying to define an autoconf macro which calls m4_include on one of its arguments. However, aclocal and/or automake seem to be choking a bit when I do this. My first idea was to write something simple like the following:
AC_DEFUN([MY_INC], [m4_include([$1])]) but this causes aclocal to fail with the following error message: aclocal-1.11: configure.ac:5: file `$1' does not exist Strange. So I tried to avoid this by being a little trickier: AC_DEFUN([MY_INC2], [m4_apply([m4_include], [[$1]])]) Now aclocal works properly, but the makefiles generated by automake do not: if the m4_included file is newer than aclocal.m4, 'make' will attempt to regenerate aclocal.m4 by calling aclocal. Since aclocal.m4 isn't actually out of date, aclocal does nothing and aclocal.m4 isn't updated. Thus, every 'make' invocation will run aclocal needlessly. 'make dist' correctly picks up the m4_included file in either case. What's going on here? -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)