Autoconf macro for ROOT?

Is there a standard (or even non-standard) autoconf macro available that checks for the presence of ROOT libraries etc? I found one for MySQL based on mysql_config which I suppose could guide me on how to write one for ROOT based on root-config. However, if someone has already done this, then it would save me a little time.

In the root bundle there a m4 macro file root.m4 in the $ROOTSYS/build/misc directory.

The macro give few warning with recente autoconf version but is working, at least in my case, and is documented within the code.

This the part of my file that search for ROOT

ROOT_PATH(,[ AC_DEFINE([HAVE_ROOT],,[Root library]) AC_CHECK_LIB([dl],[dlopen],[],AC_MSG_ERROR([Root libraries not linking properly])) ],AC_MSG_RESULT([Some parts of software will be not compiled])) AM_CONDITIONAL(EXISTROOT,test x$no_root = "x")

if you are using autoconf with automake in the you can use @ROOTLIBS@, @ROOTLIBDIR@, and @ROOTCFLAGS@ variables.[/code]

I guess I should have dug around a little more in the root source. That is just what I was looking for. Thanks!