diff --git a/Makefile.am b/Makefile.am index 64c019e..655afeb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,10 @@ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# During distcheck, system locations (as provided by pkg-config) may +# not be writable; provide instead relative locations. +DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules' + # Order: vmwgfx before src SUBDIRS = man saa vmwgfx src vmwarectrl diff --git a/configure.ac b/configure.ac index 1c6f90a..7362cdd 100644 --- a/configure.ac +++ b/configure.ac @@ -50,11 +50,12 @@ AM_PROG_CC_C_O AH_TOP([#include "xorg-server.h"]) # Define a configure option for an alternate module directory +PKG_PROG_PKG_CONFIG([0.25]) AC_ARG_WITH(xorg-module-dir, AS_HELP_STRING([--with-xorg-module-dir=DIR], - [Default xorg module directory [[default=$libdir/xorg/modules]]]), + [Default xorg module directory]), [moduledir="$withval"], - [moduledir="$libdir/xorg/modules"]) + [moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`]) # Define a configure option to build the vmwarectrl client tool AC_ARG_ENABLE(vmwarectrl-client,