Re: getting started

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

 



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".



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux