Re: autconf, configure & purify...

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

 



Hello Antony,

* Boggis, Antony wrote on Fri, Oct 24, 2008 at 01:47:43AM CEST:
> After much googling and no answers (and least, none I can understand)
> I am resorting to querying the wisdom of this list (and excuse me if
> cc'ing is frowned upon).

Yeah, it's usually nicer to choose one list only; or set a followup to
one and mention that in the message.

> Now, I wish to introduce the usage of Purify into the equation.

Most syntax issues of your code have already been addressed.  Remains
the semantics: it substitutes PURIFY and USE_PURIFY (why this one BTW?),
adds to CPPFLAGS, and defines USE_PURIFY.

Remains the question: does anything in your Makefile.am files use
$(PURIFY)?

One hack I'd try would be to, after your snippet, and after AC_PROG_CC,
but before AC_PROG_LIBTOOL, set
  CC="$PURIFY $CC"

so that purify is invoked along with the compiler.  FWIW, I haven't used
this beast in years, but that's how it used to work back then (with the
arrival of valgrind, we've never looked back though).

As a much cheaper alternative (that may or may not clash with libtool a
bit) than any code changes for purify, one can try to
  make clean
  env CC="purify gcc" make -e all

which usually worked, too.

> So, I have the following section in configure.ac:

> if test "$enable_purify" = "true"; then

FWIW the 'true' does not need quoting.

>   AC_CHECK_PROGS(PURIFY,purify purify2002)
> 
>   if test -z $PURIFY; then

This however does need quoting: if $PURIFY can ever be empty, then the
shell will complain about a missing argument to 'test -z'.  So use
  if test -z "$PURIFY"; ...

>      AC_MSG_ERROR([purify requested, but unable to find purify])
>   fi
> 

Hope that helps.

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

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

  Powered by Linux