Just an example of what I've tried to do today. I wanted to write a macro that checks the CXX compiler and set some other variable, say LDFLAGS, differently depending on if 'g++' or 'xlC_r' was found. This is what I put in each file:
configure.ac: ------------- AC_SUBST([LDFLAGS], [AC_TEST_ME([CXX])])
aclocal.m4: ----------- AC_DEFUN([AC_TEST_ME], [ifelse($1, [g++], [-shared], $1, [xlC_r], [-G])] )
But only the literal "CXX" gets passed in to my macro and I don't know how to extract its value if that's possible. So am I going about this the right way?