autoconf
[Top][All Lists]
Advanced

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

building xcb without check


From: Trevor Woerner
Subject: building xcb without check
Date: Wed, 3 Aug 2005 11:12:25 -0400

I've been doing some investigation with the CHECK unit test suite
[http://check.sourceforge.net/] that is used in xcb
[http://xcb.freedesktop.org/wiki/]. That's a great tool, something for
which I had been looking for a long time! I especially like the way it
integrates with the autofoo framework.

Everything seems to work well IF you have CHECK installed properly,
but if you don't... special care needs to be taken
[http://xcb.freedesktop.org/wiki/NoCheck].

Personally, things that I ./configure and compile on my own I like to
install into /usr/local/packages/<pacakge-version> and then use stow
[http://directory.fsf.org/stow.html] to symlink those things into
/usr/local/.... For this reason my check.m4 file ended up installed
into /usr/local/share/aclocal, a location that is not checked by
default by the aclocal program.

One way to fix this is to simply copy (as root) the check.m4 file into
/usr/share/aclocal (a location that is checked by aclocal). Another
solution is to pass the "-I" (capital i) flag to aclocal as in:

aclocal -I/usr/local/share/aclocal

This will get aclocal to find the check.m4 macro and include it into
the generated aclocal.m4.

Unfortunately the autoreconf tool (which our autogen.sh script uses)
doesn't provide a means to pass this option onto the aclocal program.
In other words: the user would have to explicitly call "aclocal -I..."
themselves, then they can use autoreconf (or keep calling all the
subprograms individually).

But what if the user really doesn't have CHECK installed and has no
interest in installing it? I've been reading through the autofoo docs
and I think I've found the proper solution. I've attached it as a
diff. Could people with faster connections (who can pull down fresh
xcb trees in seconds) please give this a whirl both with and without
CHECK installed?

Note that it's also possible to provide a "--without-check" option to
./configure even if you have CHECK installed but don't want to use it
(i.e. aren't going to run the checks and would rather keep the extra
code out of the binary).

The solution I'm trying is to use the m4_ifdef() macro. Note: if you
don't have CHECK installed aclocal will still give a warning.

I've tested this on my machine and it appears to work fine for all three cases:
1) don't have CHECK
2) have CHECK but don't want to use it (--without-check)
3) have CHECK and want to use it

But please test before you consider applying this patch because my
source tree already has all the autofoo-generated files and I'm not
100% certain that I deleted all the necessary files each time.

Attachment: diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]