Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.#*
*.go
autom4te.cache/
build-aux/
Makefile
Makefile.in
/configure
Expand Down
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ include guile.am
moddir=$(prefix)/share/guile/site/2.0
godir=$(libdir)/guile/2.0/ccache

ACLOCAL_AMFLAGS = -I build-aux

SOURCES = $(wildcard 2d/*.scm 2d/*/*.scm)

EXTRA_DIST += env.in
EXTRA_DIST += env.in \
build-aux/guile-sdl.m4

SUBDIRS = doc
63 changes: 63 additions & 0 deletions build-aux/guile-sdl.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## guile-sdl.m4 --- some -*-autoconf-*- macros for Guile-SDL

# Copyright (C) 2007, 2013 Thien-Thi Nguyen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA

##----------------------------------------------------------------------------

# GUILE_SDL_OPTLIB --- Handle --disable-FOO for optional libraries
#
# $1 is a component, one of: mixer, ttf.
# $2 is a C-language function name.
#
# Arrange for --disable-$1 support.
# If not disabled, check libSDL_$1 for function $2.
# If found, do two things w/ var HAVE_$1 (all upcased):
# - create an AM_CONDITIONAL;
# - set its value to 1 and AC_SUBST it.
#
AC_DEFUN([GUILE_SDL_OPTLIB],[
m4_pushdef([ENABLE], [enable_]$1)
m4_pushdef([ENABLED], [test $[]ENABLE = yes])
m4_pushdef([COND], [AS_TR_CPP([HAVE_]$1)])

AC_ARG_ENABLE([$1],[AC_HELP_STRING([--disable-$1],
[omit bindings for SDL_$1 (default=enabled)])],:,[ENABLE=yes])
AS_IF([ENABLED],[
dnl Use ":" to avoid prepending to $LIBS.
AC_CHECK_LIB([SDL_$1], $2, :, ENABLE=no)
])

AM_CONDITIONAL(COND, ENABLED)

AS_IF([ENABLED],[
COND=1
AC_SUBST(COND)
])

m4_popdef([COND])
m4_popdef([ENABLED])
m4_popdef([ENABLE])
])dnl GUILE_SDL_OPTLIB

##----------------------------------------------------------------------------

# Override libtool's attempt to support C++, Fortran, etc.
AC_DEFUN([_LT_AC_TAGCONFIG],[:])

##----------------------------------------------------------------------------
## guile-sdl.m4 ends here
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dnl -*- Autoconf -*-
AC_INIT(guile-2d, 0.1.0)
AC_CONFIG_SRCDIR(2d)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
AM_SILENT_RULES([yes])

Expand All @@ -23,4 +24,8 @@ PKG_CHECK_MODULES([FTGL], [ftgl >= 2.1])
# Why doesn't freeimage have a pkg-config file?
#PKG_CHECK_MODULES([freeimage], [freeimage >= 3.0])

dnl Bindings for optional libs.
GUILE_SDL_OPTLIB([mixer],[Mix_OpenAudio])
GUILE_SDL_OPTLIB([ttf],[TTF_Init])

AC_OUTPUT