DESTDIR and pkg-config variables

Paulo César Pereira de Andrade pcpa at mandriva.com.br
Mon Jan 12 09:27:25 PST 2009


  What is the proper way to correct make distcheck,
when using pkg-config directory variables?

  Sample case is appdefaultdir for Xt/Xaw based
applications. That usually, in configure.ac is:

PKG_CHECK_MODULES(APPDEFS, xt)
appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
AC_SUBST(appdefaultdir)

  And for example, for xgc, in Makefile.am's it is:

appdefaultdir = @appdefaultdir@
dist_appdefault_DATA = \
        app-defaults/Xgc


  But it will fail for make distcheck, as appdefaultdir
should have been specified as "$(datadir)/X11/app-defaults"
and not "/usr/share/X11/app-defaults".

  Is "hacking" xt.pc the proper way to correct the problem?
Or change every package, possibly using an approach like
the one used by all drivers, that is something like:

AC_ARG_WITH(xorg-module-dir,
            AC_HELP_STRING([--with-xorg-module-dir=DIR],
                           [Default xorg module directory
[[default=$libdir/xorg/modules]]]),
            [moduledir="$withval"],
            [moduledir="$libdir/xorg/modules"])


Paulo




More information about the xorg mailing list