Initial commit.
[guile-sdl2.git] / configure.ac
CommitLineData
9ce20c40
DT
1# -*- Autoconf -*-
2#
3# guile-sdl2 --- FFI bindings for SDL2
4# Copyright © 2015 David Thompson <davet@gnu.org>
5#
6# This file is part of guile-sdl2.
7#
8# Guile-sdl2 is free software; you can redistribute it and/or modify
9# it under the terms of the GNU Lesser General Public License as
10# published by the Free Software Foundation; either version 3 of the
11# License, or (at your option) any later version.
12#
13# Guile-sdl2 is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU Lesser General Public
19# License along with guile-sdl2. If not, see
20# <http://www.gnu.org/licenses/>.
21
22AC_INIT(guile-sdl2, 0.1)
23AC_CONFIG_SRCDIR(sdl2)
24AC_CONFIG_AUX_DIR([build-aux])
25AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
26AM_SILENT_RULES([yes])
27
28AC_CONFIG_FILES([Makefile sdl2/config.scm])
29AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
30
31GUILE_PROGS([2.0.9])
32PKG_CHECK_MODULES([SDL2], [sdl2])
33
34LIBSDL2="libSDL2"
35LIBSDL2_LIBDIR="no"
36LIBSDL2_PREFIX="no"
37
38AC_ARG_WITH([libsdl2-prefix],
39 [AS_HELP_STRING([--with-libsdl2-prefix=DIR], [search for SDL2 in DIR])],
40 [case "$withval" in
41 yes|no)
42 ;;
43 *)
44 LIBSDL2="$withval/lib/libSDL2"
45 LIBSDL2_PREFIX="$withval"
46 LIBSDL2_LIBDIR="$withval/lib"
47 ;;
48 esac])
49
50dnl Library name suitable for `dynamic-link'.
51AC_MSG_CHECKING([for libSDL2 shared library name])
52AC_MSG_RESULT([$LIBSDL2])
53AC_SUBST([LIBSDL2])
54AC_SUBST([LIBSDL2_PREFIX])
55AC_SUBST([LIBSDL2_LIBDIR])
56
57AC_OUTPUT