<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
I went through the exercise of writing a configure.ac as it would
have been following the xorg patterns. The pre-reqs are util-macros
v1.19 with autoconf 2.62 (yet unreleased).<br>
<br>
The discussion would also apply to the other utils repos.<br>
<blockquote><tt>AC_PREREQ(2.62)</tt><tt><br>
</tt><tt>AC_INIT([xcb-util-wm],[0.4.0],</tt><tt><br>
</tt><tt>
[<a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/enter_bug.cgi?product=xcb&component=Utils">https://bugs.freedesktop.org/enter_bug.cgi?product=xcb&component=Utils</a>],</tt><tt><br>
</tt><tt> [xcb-util-wm])</tt><tt><br>
</tt><tt>AC_CONFIG_SRCDIR([Makefile.am])</tt><tt><br>
</tt><tt>AC_CONFIG_HEADERS([config.h])</tt><tt><br>
</tt><tt>AC_CONFIG_MACRO_DIR([m4])</tt><tt><br>
</tt><tt><br>
</tt><tt># Initialize Automake</tt><tt><br>
</tt><tt>AM_INIT_AUTOMAKE([foreign dist-bzip2])</tt><tt><br>
</tt><tt>AM_MAINTAINER_MODE</tt><tt><br>
</tt><tt><br>
</tt><tt># Initialize libtool</tt><tt><br>
</tt><tt>LT_PREREQ([2.2])</tt><tt><br>
</tt><tt>LT_INIT()</tt><tt><br>
</tt><tt><br>
</tt><tt># Require xorg-macros minimum of 1.19 - For XORG_WITH_M4</tt><tt><br>
</tt><tt>m4_ifndef([XORG_MACROS_VERSION],</tt><tt><br>
</tt><tt> [m4_fatal([must install xorg-macros 1.19 or
later before running autoconf/autogen])])</tt><tt><br>
</tt><tt>XORG_MACROS_VERSION(1.19)</tt><tt><br>
</tt><tt>XORG_DEFAULT_OPTIONS</tt><tt><br>
</tt><tt>XORG_WITH_M4</tt><tt><br>
</tt><tt><br>
</tt><tt># Obtain compiler/linker options from XCB</tt><tt><br>
</tt><tt>PKG_CHECK_MODULES([XCB], [xcb >= 1.4] [xcb-proto >=
1.6])</tt><tt><br>
</tt><tt><br>
</tt><tt>AC_CONFIG_FILES([Makefile</tt><tt><br>
</tt><tt> icccm/Makefile</tt><tt><br>
</tt><tt> icccm/xcb-icccm.pc</tt><tt><br>
</tt><tt> ewmh/Makefile</tt><tt><br>
</tt><tt> ewmh/xcb-ewmh.pc</tt><tt><br>
</tt><tt> xcb_util_intro])</tt><tt><br>
</tt><tt>AC_OUTPUT</tt><br>
</blockquote>
I see several benefits:<br>
<blockquote>
<ul>
<li>Looks trivial like any other configure.ac file given the
size of the module</li>
<li>Virtually no code reuse needed among util repos, given
util-macros does most of the job</li>
<li>No need for the extra complexity of submodules bring
(learning curve) <br>
</li>
<li>No macro maintenance in m4</li>
<li>Util repos won't have --with-doxygen or --enable-devel-doc
if they don't need to<br>
</li>
<li>The standard xorg autogen.sh will do the job (no need to
check for m4)<br>
</li>
</ul>
</blockquote>
<u>What had to change:</u><br>
<blockquote>The line for xcbincludedir and pkgconfigdir is moved to
the appropriate makefiles<br>
<br>
The test using pkg-config variable xcbproto_version is replaced
with the common PKG_CHECK_MODULES test. I checked all versions of
xcb and xcb-proto. The only scenario where the test might be
useful is if someone has a 1.4 or 1.5 libxcb that was compiled
with 1.5 xcb-proto, and an xcb-proto 1.6 package is sitting on
disk but not used to compile libxcb. This scenario (hacked
installation) is outside the scope of module configuration. I am
not saying it has not been useful in the past, however.<br>
<br>
As a suggestion, requiring libxcb at 1.6 would remove any doubt
regarding the level at which xcb-proto was used to compile libxcb.<br>
<br>
Even we keep the more sophisticated xcb-proto level test, the
proposal still stand.<br>
</blockquote>
<u>Lowest maintenance cost</u><br>
<blockquote>The idea is to lower the cost of maintenance. Having all
util repos off the common-m4 submodule and fully benefiting from
xorg infra-structure, there is a benefit for both the maintainer
and the users.<br>
</blockquote>
<br>
<blockquote><br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
<br>
<br>
<br>
</body>
</html>