Re: using a macro inside AC_OUTPUT



ERDI Gergo wrote:

Hi,

Has anyone found a workaround in a GNOME project to using a macro inside
AC_OUTPUT? The problem is, automake-1.4 is too dumb to properly run the m4
code in configure.in, and thus doesn't pick up the filenames in AC_OUTPUT
that would be the result of macros.

For example, in orbitcpp I wrote this:

define(ORBITCPP_TEST_SUBDIRS, [ dnl
	test/cpp/testname/$1/Makefile
	test/cpp/testname/$1/generated/Makefile
	ifelse($#, 1, , [ORBITCPP_TEST_SUBDIRS(builtin(shift, $@))]) dnl
])

define(ORBITCPP_TEST, [ dnl
	pushdef([testname], $1)
	test/cpp/testname/Makefile
	ORBITCPP_TEST_SUBDIRS($2) dnl
	popdef([testname]) dnl
])

but if I want to later use it inside AC_OUTPUT:

AC_OUTPUT(
	ORBITCPP_TEST(unions, [atomic_types, struct])
)

I get an error from automake-1.4:

configure.in: 96: required file `./ORBITCPP_TEST(unions.in' not found

(note that autoconf properly expands the macro)

Has anyone found a workaround for this before?
Try using the AC_CONFIG_FILES() macro. You can make any number of calls to AC_CONFIG_FILES(), so it might serve your purpose.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/



_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers



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