diff options
-rw-r--r-- | configure.ac | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 2538a37..00df885 100644 --- a/configure.ac +++ b/configure.ac @@ -145,11 +145,19 @@ AC_CHECK_FUNCS(FT_GlyphSlot_Embolden FT_Library_SetLcdFilter) dnl Check for SDL SDL_VERSION=1.2.4 -AM_PATH_SDL($SDL_VERSION, - [have_sdl=yes - AC_DEFINE_UNQUOTED(HAVE_SDL, 1, [defined if you have sdl])], - [AC_MSG_WARN([*** SDL version $SDL_VERSION not found!]) - have_sdl=no ]) +enable_sdl=auto +AC_ARG_ENABLE(sdl, + AS_HELP_STRING([--enable-sdl], + [build sdl renderer (sdl must be installed)]), + [enable_sdl=$enableval], [enable_sdl=no]) + +if test "x$enable_sdl" != "xno"; then + AM_PATH_SDL($SDL_VERSION, + [have_sdl=yes + AC_DEFINE_UNQUOTED(HAVE_SDL, 1, [defined if you have sdl])], + [AC_MSG_WARN([*** SDL version $SDL_VERSION not found!]) + have_sdl=no ]) +fi AM_CONDITIONAL(HAVE_SDL, test "x$have_sdl" = "xyes") CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" |