summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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