summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-12-16 22:51:16 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-12-16 23:15:09 -0500
commit1de096a76ca8c06bbd305f1f1c437707e53fbce8 (patch)
tree79855bc77a950707e40b610538a14b9c592b3813 /configure.ac
parent28503ef3b65b69f243a6fc10db04f28c1ae34bb1 (diff)
build: Add SDL2_image detection.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 41 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5d25c46..2aa1696 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ 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"
@@ -54,4 +56,43 @@ 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