I need to check for Erlang libraries on my configure.ac but the list of erlang apps is on a separate file, and I have to run a program to extract that list.
Normally, I can do this:
AC_ERLANG_CHECK_LIB([app1])
AC_ERLANG_CHECK_LIB([app2])
However, since the actual apps are on a separate file (and I don't want to repeat them on configure.ac, I was thinking on doing somewhere along the lines of:
DEPS=`some command that gets app1, app2`
# DEPS=app1 app2
m4_foreach_w(dep, "$DEPS", [AC_ERLANG_CHECK_LIB([dep])])
I know that "$DEPS" is the wrong argument here, since it needs the actual value for that - something like [app1 app2]. I also know that the evaluation of the DEPS variable isn't done untile ./configure is called, while m4_foreach_w requires the value of DEPS prior.
Any idea how to solve this?