diff --git a/Makefile.am b/Makefile.am index 5dffe92..7411feb 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' + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} SUBDIRS = src diff --git a/configure.ac b/configure.ac index 7566850..0efe9c2 100644 --- a/configure.ac +++ b/configure.ac @@ -57,11 +57,12 @@ AH_TOP([#include "xorg-server.h"]) # Configuration options # ----------------------------------------------------------------------------- # Define a configure option for an alternate input 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`]) AC_SUBST([moduledir]) # Define a configure option to enable/disable lcd panel support