Adding make targets for lint/sparse/etc.

Alan Coopersmith alan.coopersmith at
Thu Jul 13 10:03:37 PDT 2006

Donnie Berkholz wrote:
> It would probably be less painful if util-macros installed a pkgconfig
> file so the's could require specific versions.

Can the's require it at configure script generation time?
It doesn't need to be on the system for users building from tarballs,
just for developers running autoconf.

I suppose we could put the check in if we assume that's what
all developers would be using.

Or we could define a new macro XORG_MACROS_VERSION that took an argument
of the minimum version required and printed an error if the version defined
in the macro was too low.   Something like this (having @VERSION@ replaced
by the xorg-macros configure script) seems to work:

# XORG_MACROS_VERSION(required-version)
# -------------------------------------
# If you're using a macro added in Version 1.1 or newer, include this in
# your with the minimum required version, such as:
	AC_MSG_CHECKING([version of xorg-macros.m4 configure was built with])
	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 
	XORG_needed_major=`echo $XORG_needed_version | sed 's/\..*$//'`
	XORG_needed_minor=`echo $XORG_needed_version | sed -e 's/^[0-9]*\.//' -e 
	if test $XORG_MACROS_major -ne $XORG_needed_major ; then
		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - 
requires version ${XORG_MACROS_major}.x])
	if test $XORG_MACROS_minor -lt $XORG_needed_minor ; then
		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - 
requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])

Does using that seem reasonable?

> Putting it in a macro will buy a whole lot if we ever want to change it,
> and the appears much more likely to change (e.g., whenever
> some OS besides solaris wants to add its own lint flags).

I've put the portions into xorg-macros.m4 now.
Worst case for developers who don't update their macros is they'll get
"XORG_WITH_LINT: command not found" message from running configure
and not be able to configure --with-lint until updating.

	-Alan Coopersmith-           alan.coopersmith at
	 Sun Microsystems, Inc. - X Window System Engineering

More information about the xorg mailing list