1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# -*- Autoconf -*-
#
# guile-sdl2 --- FFI bindings for SDL2
# Copyright © 2015 David Thompson <davet@gnu.org>
#
# This file is part of guile-sdl2.
#
# Guile-sdl2 is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Guile-sdl2 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 Lesser General Public
# License along with guile-sdl2. If not, see
# <http://www.gnu.org/licenses/>.
AC_INIT(guile-sdl2, 0.1)
AC_CONFIG_SRCDIR(sdl2)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
AM_SILENT_RULES([yes])
AC_CONFIG_FILES([Makefile sdl2/config.scm])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
GUILE_PROGS([2.0.9])
# Core SDL2
PKG_CHECK_MODULES([SDL2], [sdl2])
LIBSDL2="libSDL2"
LIBSDL2_LIBDIR="no"
LIBSDL2_PREFIX="no"
AC_ARG_WITH([libsdl2-prefix],
[AS_HELP_STRING([--with-libsdl2-prefix=DIR], [search for SDL2 in DIR])],
[case "$withval" in
yes|no)
;;
*)
LIBSDL2="$withval/lib/libSDL2"
LIBSDL2_PREFIX="$withval"
LIBSDL2_LIBDIR="$withval/lib"
;;
esac])
dnl Library name suitable for `dynamic-link'.
AC_MSG_CHECKING([for libSDL2 shared library name])
AC_MSG_RESULT([$LIBSDL2])
AC_SUBST([LIBSDL2])
AC_SUBST([LIBSDL2_PREFIX])
AC_SUBST([LIBSDL2_LIBDIR])
# SDL2_image
AC_ARG_WITH([libsdl2_image],
AS_HELP_STRING([--with-libsdl2-image],
[Build with the SDL2_image library]),
[], [with_libsdl2_image=yes])
if test "x$with_libsdl2_image" = "xyes"; then
PKG_CHECK_MODULES([SDL2_image], [SDL2_image])
fi
LIBSDL2_IMAGE="libSDL2_image"
LIBSDL2_IMAGE_LIBDIR="no"
LIBSDL2_IMAGE_PREFIX="no"
AC_ARG_WITH([libsdl2-image-prefix],
[AS_HELP_STRING([--with-libsdl2-image-prefix=DIR],
[search for SDL2_image in DIR])],
[case "$withval" in
yes|no)
;;
*)
LIBSDL2_IMAGE="$withval/lib/libSDL2_image"
LIBSDL2_IMAGE_PREFIX="$withval"
LIBSDL2_IMAGE_LIBDIR="$withval/lib"
;;
esac])
AM_CONDITIONAL([WITH_LIBSDL2_IMAGE], [test "x$with_libsdl2_image" = "xyes"])
if test "x$with_libsdl2_image" = "xyes"; then
AC_MSG_CHECKING([for libSDL2_image shared library name])
AC_MSG_RESULT([$LIBSDL2_IMAGE])
fi
AC_SUBST([LIBSDL2_IMAGE])
AC_SUBST([LIBSDL2_IMAGE_PREFIX])
AC_SUBST([LIBSDL2_IMAGE_LIBDIR])
AC_OUTPUT
|