+ Added producer_sdl_image as an alternative image and image sequence producer
[melted] / src / modules / sdl / configure
index e7572ca..253d181 100755 (executable)
@@ -3,9 +3,23 @@
 if [ "$help" != "1" ]
 then
 
-cat << EOF >> ../consumers.dat
-sdl                            libmltsdl.so
-EOF
+       sdl-config --version > /dev/null 2>&1
+       disable_sdl=$?
+
+       if [ "$disable_sdl" = "0" ]
+       then
+               echo > config.mak
+               image=`sdl-config --prefix`/include/SDL/SDL_image.h
+               echo "sdl                               libmltsdl$LIBSUF" >> ../consumers.dat
+               echo "sdl_preview               libmltsdl$LIBSUF" >> ../consumers.dat
+               echo "sdl_still                 libmltsdl$LIBSUF" >> ../consumers.dat
+               [ -f "$image" ] && 
+               echo "sdl_image                 libmltsdl$LIBSUF" >> ../producers.dat &&
+               echo "WITH_SDL_IMAGE=1" >> config.mak
+       else
+               echo "- sdl development libs not found: disabling"
+               touch ../disable-sdl
+       fi
 
 fi