From 69077169545427acb2e8a3f1a487e6c144ed6f20 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 29 Mar 2022 01:52:01 -0700 Subject: build: make sdl2 and rototiller bin optional Now that there's a decoupled libtil usable by alternative frontends by vendoring rototiller, the build should support fb-less rototiller-less configurations. In lieu of this change glimmer's build requires sdl2 despite not actually utilizing sdl_fb. Now that shouldn't be necessary, should there be neither libdrm or sdl2 present we'll only produce libtil and no rototiller binary at all. --- configure.ac | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3abca76..974b33d 100644 --- a/configure.ac +++ b/configure.ac @@ -8,29 +8,27 @@ AM_SILENT_RULES([yes]) LT_INIT([disable-shared]) PKG_CHECK_MODULES(DRM, libdrm, - AM_CONDITIONAL(ENABLE_DRM, true) + AM_CONDITIONAL(ENABLE_DRM, declare build_rototiller=true) AC_DEFINE(HAVE_DRM, [1], [Define to 1 with drm present]), AM_CONDITIONAL(ENABLE_DRM, false) ) -LIBS="$DRM_LIBS $LIBS" -CFLAGS="$DRM_CFLAGS $CFLAGS" +PKG_CHECK_MODULES(SDL, sdl2, + AM_CONDITIONAL(ENABLE_SDL, declare build_rototiller=true) + AC_DEFINE(HAVE_SDL, [1], [Define to 1 with sdl2 present]), + AM_CONDITIONAL(ENABLE_SDL, false) +) + +AM_CONDITIONAL(ENABLE_ROTOTILLER, [test "x$build_rototiller" = xtrue]) + +LIBS="$DRM_LIBS $SDL_LIBS $LIBS" +CFLAGS="$DRM_CFLAGS $SDL_CFLAGS $CFLAGS" AX_PTHREAD LIBS="$PTHREAD_LIBS $LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +CFLAGS="$PTHREAD_CFLAGS $CFLAGS" CC="$PTHREAD_CC" -dnl Check for SDL -SDL_VERSION=2.0 -AM_PATH_SDL2($SDL_VERSION, - :, - AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) -) - -CFLAGS="$CFLAGS $SDL_CFLAGS" -LIBS="$LIBS $SDL_LIBS" - AC_CONFIG_FILES([ Makefile src/Makefile -- cgit v1.2.1