[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getting started
From: |
Rob Benton |
Subject: |
getting started |
Date: |
Thu, 22 Apr 2004 17:32:19 -0500 |
User-agent: |
Mozilla Thunderbird 0.5 (X11/20040306) |
Hey everybody, I'm just getting started with all the autotools and I was
looking for a little help. I've been over all I could find about the
autoconf and m4 docs but I'm not quite clear and how to write my own
macros and what format they should be in. All the autoconf docs refer
to the m4 docs on the subject of writing macros. Using just m4 syntax
in the aclocal.m4 file didn't seem to work.
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?
- getting started,
Rob Benton <=