On Mon, Jan 12, 2009 at 10:21 AM, Paulo César Pereira de Andrade <[email protected]> wrote: > Julien Cristau wrote: >> On Mon, Jan 12, 2009 at 09:50:46 -0800, Dan Nicholson wrote: >> >>> I think the right way to do this is 1) Keep taking the default from >>> pkg-config and 2) Pass in a value during distcheck with >>> DISTCHECK_CONFIGURE_FLAGS. That'd look something like this: >>> >>> configure.ac: >>> AC_ARG_WITH([appdefaultdir], >>> [AC_HELP_STRING([--with-appdefaultdir=DIR], >>> [Xt app-defaults directory (default: from pkg-config)])], >>> [appdefaultdir="$withval"], >>> [appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`]) >>> >>> Makefile.am: >>> DISTCHECK_CONFIGURE_FLAGS = >>> --with-appdefaultdir='$${datadir}/X11/app-defaults' >>> >>> I just tested that on xfontsel and it works. >>> >> IIRC I did exactly that in xdm. > > Thanks. For simplicity, I feel tempted to remove: > > PKG_CHECK_MODULES(APPDEFS, xt) > appdefaultdir=$(pkg-config --variable=appdefaultdir xt) > AC_SUBST(appdefaultdir) > > from configure.ac, and "hardcode" Makefile.am to: > > appdefaultdir = $(datadir)/X11/app-defaults
If you're going to hardcode it in Makefile.am, then there's no reason to do any checking or substituting in configure. > This mainly, because in my computer I have "app-defaults" > directories in: > > /etc/X11/app-defaults > /etc/X11/<choose-some-language>/app-defaults > /usr/X11R6/lib/X11/app-defaults > /usr/share/apps/kdisplay/app-defaults > /usr/share/app-defaults > /usr/share/X11/app-defaults > /usr/lib/app-defaults > /usr/lib/X11/app-defaults > /opt/kde3/share/apps/kdisplay/app-defaults > /usr/lib/<program-name>/app-defaults Sure, but there should really only be one directory where packages drop their app-defaults. That's what's exposed in $PKG_CONFIG --variable=appdefaultdir xt. Especially since you can build libXt to have its search path be anything you want. Hardcoding $(datadir)/X11/app-defaults completely defeats the purpose of that. -- Dan _______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
