Fixed #1329: Added --with-sdl option in aconfigure script to specify alternate libSDL location

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3672 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/aconfigure.ac b/aconfigure.ac
index 15eaac9..9c802ec 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -759,6 +759,14 @@
 	      AC_MSG_RESULT([Skipping libsamplerate detection])
 	     )
 
+dnl # SDL alt prefix
+AC_ARG_WITH(sdl,
+    AC_HELP_STRING([--with-sdl=DIR],
+		   [Specify alternate libSDL prefix]),
+    [],
+    [with_sdl=no]
+    )
+
 dnl # SDL
 AC_ARG_ENABLE(sdl,
 	      AC_HELP_STRING([--disable-sdl],
@@ -769,13 +777,19 @@
 		fi
 	      ],
 	      [
+		  SDL_CONFIG="sdl-config"
+		  if test "x$with_sdl" != "xno" -a "x$with_sdl" != "x"; then
+			SDL_CONFIG=$with_sdl/bin/sdl-config
+			AC_MSG_RESULT([Using SDL prefix... $with_sdl])
+		  fi
+	      
 		  AC_MSG_CHECKING([SDL availability..])
-		  if sdl-config --version; then
-				  AC_SUBST(ac_sdl_cflags)
+		  if $SDL_CONFIG --version; then
+			  AC_SUBST(ac_sdl_cflags)
 			  AC_SUBST(ac_sdl_ldflags)
-			  ac_sdl_cflags=`sdl-config --cflags`
+			  ac_sdl_cflags=`$SDL_CONFIG --cflags`
 			  ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags"
-			  ac_sdl_ldflags=`sdl-config --libs`
+			  ac_sdl_ldflags=`$SDL_CONFIG --libs`
 			  LIBS="$LIBS $ac_sdl_ldflags"
 		   fi
 	      ])