karlstav / cava

Cross-platform Audio Visualizer
MIT License
4.22k stars 232 forks source link

Build without SDL installed #480

Closed antiprism closed 1 year ago

antiprism commented 1 year ago

Hi Karl

I am building cava with a minimal set of features on Volumio 3, which is based on debian bullseye.

I have installed these packages

sudo apt install build-essential autoconf make libtool libfftw3-dev libiniparser-dev libasound2-dev autoconf-archive

./autogen.sh runs fine. This is the configure command (I also get the same error if I do not include --disable-output-sdl-glsl --disable-output-sdl)

./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --disable-output-sdl-glsl --disable-output-sdl --program-prefix=mpd_oled_

This leads to the following error

...
checking for iniparser_load in -liniparser... yes
iniparser > 3.2 test OK
configure: Checking OS
configure: Linux detected
checking that generated files are newer than configure... done
configure: error: conditional "SDL_GLSL" was never defined.
Usually this means the macro was only invoked conditionally.

The reason might be that the following line is inside an if block

AM_CONDITIONAL([SDL_GLSL], [test "x$have_opengl" = "xyes"])

Adrian

karlstav commented 1 year ago

Hi @antiprism,

you are absolutely right, I put the whole check inside the if sdl block since the sdl_glsl mode relies on both sdl and opengl. But the AM_CONDITIONAL should most likely be outside the if block.