Update buildsystem to target SDL2
Replace sdl-config with sdl2-config, and add few smaller changes.
This commit is contained in:
parent
a06035a35e
commit
185c8af6f5
2 changed files with 18 additions and 32 deletions
26
configure.ac
26
configure.ac
|
@ -24,7 +24,7 @@ AC_PROG_INSTALL
|
|||
AC_PROG_RANLIB
|
||||
|
||||
dnl Check for SDL
|
||||
SDL_VERSION=1.2.0
|
||||
SDL_VERSION=2.0.0
|
||||
AM_PATH_SDL($SDL_VERSION,
|
||||
:,
|
||||
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||
|
@ -32,20 +32,6 @@ AM_PATH_SDL($SDL_VERSION,
|
|||
LIBS="$LIBS $SDL_LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
||||
|
||||
dnl Check if SDL is 1.2.x (1.3 not supported)
|
||||
AC_MSG_CHECKING([SDL version only being 1.2.X])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#include "SDL.h"
|
||||
void blah(){
|
||||
#if SDL_MINOR_VERSION != 2
|
||||
#error "Only SDL 1.2 supported"
|
||||
#endif
|
||||
;
|
||||
}
|
||||
])],AC_MSG_RESULT([yes]),[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Only libSDL 1.2.X supported])])
|
||||
|
||||
dnl Checks for header files.
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
@ -452,13 +438,13 @@ else
|
|||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL_net])
|
||||
AH_TEMPLATE(C_IPX,[Define to 1 to enable IPX over Internet networking, requires SDL_net])
|
||||
AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL2_net])
|
||||
AH_TEMPLATE(C_IPX,[Define to 1 to enable IPX over Internet networking, requires SDL2_net])
|
||||
AC_CHECK_HEADER(SDL_net.h,have_sdl_net_h=yes,)
|
||||
|
||||
AC_CHECK_LIB(SDL_net, SDLNet_Init, have_sdl_net_lib=yes, , )
|
||||
AC_CHECK_LIB(SDL2_net, SDLNet_Init, have_sdl_net_lib=yes, , )
|
||||
if test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
|
||||
LIBS="$LIBS -lSDL_net"
|
||||
LIBS="$LIBS -lSDL2_net"
|
||||
AC_DEFINE(C_MODEM,1)
|
||||
AC_DEFINE(C_IPX,1)
|
||||
else
|
||||
|
@ -492,7 +478,7 @@ if test x$enable_opengl = xyes; then
|
|||
case "$host" in
|
||||
*-*-darwin*)
|
||||
AC_MSG_RESULT(yes)
|
||||
LIBS="$LIBS -framework OpenGL"
|
||||
LIBS="$LIBS -framework OpenGL -framework CoreFoundation"
|
||||
AC_DEFINE(C_OPENGL,1)
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue