From 1403e4a67989d627fe84b6e6beeec641c1d7d49e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 16 Dec 2015 23:38:52 -0500 Subject: build: Add SDL2_ttf detection. --- configure.ac | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.3