Check for sdl2-config when doing the SDL version test.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 15 Aug 2012 23:48:59 -0400
changeset 595 7ba87def9569
parent 590 a99fe1338de1
child 596 719dade41745
Check for sdl2-config when doing the SDL version test.
acinclude.m4
--- a/acinclude.m4	Wed Jun 15 16:02:44 2011 -0400
+++ b/acinclude.m4	Wed Aug 15 23:48:59 2012 -0400
@@ -27,7 +27,15 @@
 
   AC_REQUIRE([AC_CANONICAL_TARGET])
   PATH="$prefix/bin:$prefix/usr/bin:$PATH"
-  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
+  AC_PATH_PROG(SDL1_CONFIG, sdl-config, no, [$PATH])
+  AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
+
+  if test "$SDL2_CONFIG" != "no" ; then
+    SDL_CONFIG=$SDL2_CONFIG
+  else
+    SDL_CONFIG=$SDL1_CONFIG
+  fi
+
   min_sdl_version=ifelse([$1], ,0.11.0,$1)
   AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
   no_sdl=""