[PATCH app-x11perf] config: use Autoconf rather than sed to substitute $libdir

Gaetan Nadon memsize at videotron.ca
Fri Jan 21 13:40:52 PST 2011

On Fri, 2011-01-21 at 17:34 +0100, Julien Cristau wrote:

> On Fri, Jan 21, 2011 at 08:31:23 -0500, Gaetan Nadon wrote:
> > The path substitution in x11perfcomp script can be done at configuration
> > time using Autoconf. This is an alternative to using sed and requires
> > less Makefile work.
> > 
> > Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> > ---
> >  Makefile.am    |   14 +------
> >  configure.ac   |    6 +++-
> >  x11pcomp.cpp   |  103 ------------------------------------------------------
> >  x11perfcomp.in |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 112 insertions(+), 116 deletions(-)
> >  delete mode 100644 x11pcomp.cpp
> >  create mode 100644 x11perfcomp.in
> > 
> I'm not sure.  Using autoconf means you get the non-expanded version of
> the variable, which means you need to keep track of which variables have
> to be defined in x11perfcomp.in.  At least in theory that could change
> in a new autoconf version.

Good question, always check if what you are using is part of the public
interface and not some internal implementation.

The variables and thier relationships are all part of the public
interface. These values are the default values, a user can override
with --bindir or --libdir.


        A prefix used in constructing the default values of some of the
        variables listed below. The default value of exec_prefix should
        be $(prefix). (If you are using Autoconf, write it as


        The directory for object files and libraries of object code.
        [...] The value of libdir should normally be ‘/usr/local/lib’,
        but write it as ‘$(exec_prefix)/lib’. (If you are using
        Autoconf, write it as ‘@libdir@’.)

In theory it could change, and it has in the past. The datarootdir
variable was introduced upon which datadir is based. This change was
done in a way that was backward compatible.

I am confident that using these variables is safe in the long run. It
also correctly supports a configuration making use of --libdir.

> Cheers,
> Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110121/c4324888/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110121/c4324888/attachment.pgp>

More information about the xorg-devel mailing list