summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-07-26 18:53:52 -0400
committerDavid Thompson <dthompson2@worcester.edu>2013-07-26 18:53:52 -0400
commit1162ae833973fa81f0599b93a944672feb1bb982 (patch)
tree8a378ed0651e9d080b06ea26fbc09964c40803f4
parent4225309c7eaaa2314ead21e1e2cbe44c05e6334c (diff)
Add autotools files.
-rw-r--r--Makefile.am19
-rwxr-xr-xautogen.sh3
-rw-r--r--configure.ac23
-rw-r--r--env.in14
-rw-r--r--guile.am19
5 files changed, 78 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..19f9992
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,19 @@
+include guile.am
+
+moddir=$(prefix)/share/guile/site/2.0
+godir=$(libdir)/guile/2.0/ccache
+
+SOURCES = \
+ 2d/agenda.scm\
+ 2d/animation.scm\
+ 2d/coroutine.scm\
+ 2d/game-loop.scm\
+ 2d/gl.scm\
+ 2d/helpers.scm\
+ 2d/math.scm\
+ 2d/sprite.scm\
+ 2d/texture.scm\
+ 2d/vector.scm\
+ 2d/window.scm
+
+EXTRA_DIST += env.in
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..e756b42
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+autoreconf -vif
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..dbf869d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,23 @@
+dnl -*- Autoconf -*-
+
+AC_INIT(guile-2d, 0.1.0)
+AC_CONFIG_SRCDIR(2d)
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
+AM_SILENT_RULES([yes])
+
+GUILE_PROGS
+
+if $GUILE_TOOLS | grep -q compile; then
+ # everything cool
+ true
+else
+ AC_MSG_ERROR([Guile 2.0 required.])
+fi
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([env], [chmod +x env])
+
+PKG_CHECK_MODULES([SDL], [sdl <= 1.3 sdl >= 1.2])
+
+AC_OUTPUT
diff --git a/env.in b/env.in
new file mode 100644
index 0000000..db507ca
--- /dev/null
+++ b/env.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+GUILE_LOAD_PATH=@abs_top_srcdir@:$GUILE_LOAD_PATH
+if test "@abs_top_srcdir@" != "@abs_top_builddir@"; then
+ GUILE_LOAD_PATH=@abs_top_builddir@:$GUILE_LOAD_PATH
+fi
+GUILE_LOAD_COMPILED_PATH=@abs_top_builddir@:$GUILE_LOAD_PATH
+PATH=@abs_top_builddir@/bin:$PATH
+
+export GUILE_LOAD_PATH
+export GUILE_LOAD_COMPILED_PATH
+export PATH
+
+exec "$@"
diff --git a/guile.am b/guile.am
new file mode 100644
index 0000000..dc1e63f
--- /dev/null
+++ b/guile.am
@@ -0,0 +1,19 @@
+GOBJECTS = $(SOURCES:%.scm=%.go)
+
+nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES)
+nobase_go_DATA = $(GOBJECTS)
+
+# Make sure source files are installed first, so that the mtime of
+# installed compiled files is greater than that of installed source
+# files. See
+# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
+# for details.
+guile_install_go_files = install-nobase_goDATA
+$(guile_install_go_files): install-nobase_modDATA
+
+CLEANFILES = $(GOBJECTS)
+EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
+GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+SUFFIXES = .scm .go
+.scm.go:
+ $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"