summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-12-16 23:38:52 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-12-16 23:38:52 -0500
commit1403e4a67989d627fe84b6e6beeec641c1d7d49e (patch)
tree62afa0efd8f02826d7f684d716dcf914f88559c4 /configure.ac
parentcc099b061c9466f5d0d3220c71d1c43f13b139d2 (diff)
build: Add SDL2_ttf detection.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2aa1696..a91406b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,4 +95,42 @@ AC_SUBST([LIBSDL2_IMAGE])
AC_SUBST([LIBSDL2_IMAGE_PREFIX])
AC_SUBST([LIBSDL2_IMAGE_LIBDIR])
+# SDL2_ttf
+AC_ARG_WITH([libsdl2_ttf],
+ AS_HELP_STRING([--with-libsdl2-ttf],
+ [Build with the SDL2_ttf library]),
+ [], [with_libsdl2_ttf=yes])
+
+if test "x$with_libsdl2_ttf" = "xyes"; then
+ PKG_CHECK_MODULES([SDL2_ttf], [SDL2_ttf])
+fi
+
+LIBSDL2_TTF="libSDL2_ttf"
+LIBSDL2_TTF_LIBDIR="no"
+LIBSDL2_TTF_PREFIX="no"
+
+AC_ARG_WITH([libsdl2-ttf-prefix],
+ [AS_HELP_STRING([--with-libsdl2-ttf-prefix=DIR],
+ [search for SDL2_ttf in DIR])],
+ [case "$withval" in
+ yes|no)
+ ;;
+ *)
+ LIBSDL2_TTF="$withval/lib/libSDL2_ttf"
+ LIBSDL2_TTF_PREFIX="$withval"
+ LIBSDL2_TTF_LIBDIR="$withval/lib"
+ ;;
+ esac])
+
+AM_CONDITIONAL([WITH_LIBSDL2_TTF], [test "x$with_libsdl2_ttf" = "xyes"])
+
+if test "x$with_libsdl2_ttf" = "xyes"; then
+ AC_MSG_CHECKING([for libSDL2_ttf shared library name])
+ AC_MSG_RESULT([$LIBSDL2_TTF])
+fi
+
+AC_SUBST([LIBSDL2_TTF])
+AC_SUBST([LIBSDL2_TTF_PREFIX])
+AC_SUBST([LIBSDL2_TTF_LIBDIR])
+
AC_OUTPUT