It is a all or nothing approach. Nearly all components depend on SDL.
Therefore, the first component causing SDL to be loaded will decide which SDL
version gets loaded. But this also makes it extreme easy to you to overwrite
this decision:
$ LD_PRELOAD="$HOME/soft/libsdl/./build/.libs/libSDL.so" mupen64plus
If you really want to change the SDL to build against then you need to install
it to get a working sdl-config.
$ cd ~/soft/libsdl
$ ./configure --prefix="$HOME/soft/libsdl-install/"
$ make install
$ cd ~/soft/mupen64plus-foobar
$ make V=1 -C projects/unix SDL_CONFIG="$HOME/soft/libsdl-install/bin/sdl-config" all
But please keep in mind that the first component depending on libSDL will
decide which version of the lib gets loaded. Mixing different version (for
example SDL1.2 and SDL2) will not work as expected.
Kind regards,
Sven