logo       

Re: getting started: msg#00113

sysutils.autoconf.general

Subject: Re: getting started

Rob Benton <rob.benton@xxxxxxxxxxxxxx> writes:

> 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?

You have to distinguish between shell variables and m4 strings. CXX
is the former, so you can get its value at configure-time by writing
$CXX. You can't get its value at autoconf-time because you don't know
it yet. So you'd have to use a shell "if" rather than an m4 "ifelse".





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise