diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2011-06-12 13:32:38 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2011-06-12 13:32:38 +0800 |
commit | 2ae030fa6069a659130a753ebf829532add62209 (patch) | |
tree | 4646329acc2c2bfac8f00706a6cbb106dbc6c4a6 | |
parent | f7dab0abd585a226f6e33fe8eaf360dfdeb6bcbe (diff) |
configure: allow user to disable sdl support completely
-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" |