summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..31e685f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,31 @@
+dnl -*- Autoconf -*-
+
+AC_INIT([scales], [0.0.0], [rekado+scales@elephly.net])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([gnu color-tests -Wall -Wno-portability foreign])
+AM_SILENT_RULES([yes])
+
+dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
+dnl Make sure they are available.
+m4_pattern_forbid([PKG_CHECK_MODULES])
+m4_pattern_forbid([GUILE_MODULE_AVAILABLE])
+m4_pattern_forbid([^GUILE_P$])
+
+dnl Search for 'guile' and 'guild'.
+GUILE_PKG([2.2 2.0])
+GUILE_PROGS
+if test "x$GUILD" = "x"; then
+ AC_MSG_ERROR(['guild' binary not found; please check your guile-2.x installation.])
+fi
+
+guilemoduledir="${datarootdir}/guile/site/${GUILE_EFFECTIVE_VERSION}"
+AC_SUBST([guilemoduledir])
+AC_SUBST([GUILE_EFFECTIVE_VERSION])
+
+dnl Substitute placeholders to generate these target files
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([scripts/scales], [chmod +x scripts/scales])
+AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
+ [chmod +x pre-inst-env])
+
+AC_OUTPUT