I'm writing a regression test for our package that is currently using autotools (i.e., autoconf/automake). The following Makefile.am exemplifies the simplest check. When make check is invoked, it compiles tester.c to generate tester and then launches tester.sh that ends up invoking test (among other commands). That works fine.
However, for some tests I need to pass some information gathered at configure time to tester.sh. So is it possible to pass this information as a parameter? The value is available in a variable in the Makefile (i.e. it is AC_SUBSTed) but these variables are not forwarded to child processes spawned by the make command. If that's not possible, would it be feasible to have an extra rule that is executed before tester.sh that generates a file with the parameters that are captured later through tester.sh?
File Makefile.am
check_PROGRAMS = tester
TESTS = tester.sh
tester_SOURCES = tester.c