--- /dev/null
+EXTRA_DIST = doc
+
+consoledir = $(pkgdatadir)
+nodist_console_DATA = $(srcdir)/src/console.map
+
+if XMODMAP
+ # Without this set, we won't try to install the Xmodmap file.
+ xmodmapdir = $(pkgdatadir)
+ nodist_xmodmap_DATA = $(srcdir)/src/Xmodmap
+endif
+
+nodist_doc_DATA = $(srcdir)/doc/README
--- /dev/null
+#!/bin/sh
+autoreconf --force --install
--- /dev/null
+AC_INIT([emacs-keys], [0.0.1], [michael@orlitzky.com])
+AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz])
+
+# --enable-Xmodmap flag, disabled by default, that decides whether or
+# not we install the Xmodmap file.
+AC_ARG_ENABLE(
+ [Xmodmap],
+ [ --enable-Xmodmap install the Xmodmap file [[default=no]]],
+ [case "${enableval}" in
+ yes) xmodmap=true ;;
+ no) xmodmap=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-xmodmap]) ;;
+ esac],[xmodmap=false])
+ AM_CONDITIONAL([XMODMAP], [test x$xmodmap = xtrue])
+
+# List of output files.
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT
+++ /dev/null
-PN = emacs-keys
-PREFIX := /usr/local
-
-# So that "make" doesn't try to install stuff.
-all:
-
-install-console: $(DESTDIR)$(PREFIX)/share/$(PN)/console.map
-install-xorg: $(DESTDIR)$(PREFIX)/share/$(PN)/Xmodmap
-
-$(DESTDIR)$(PREFIX)/share/$(PN)%: src/%
- install -D --mode=644 $< $@