mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fixed build errors with custom SDL location (resolves issue 774)
Uses SDL2's sdl2.m4 macros, which are installed along with SDL2. This ensures that the correct flags are given to the compiler and linker.
This commit is contained in:
@@ -34,7 +34,6 @@ AS_VAR_IF([cxx11name], [no], AC_MSG_ERROR([Can't LÖVE without C++11]), CXXFLAGS
|
||||
|
||||
# Libraries
|
||||
AC_SEARCH_LIBS([sqrt], [m], [], AC_MSG_ERROR([Can't LÖVE without C math library]))
|
||||
AC_SEARCH_LIBS([SDL_Init], [SDL2], [], AC_MSG_ERROR([Can't LÖVE without SDL 2]))
|
||||
AC_SEARCH_LIBS([glLoadIdentity], [GL], [], AC_MSG_ERROR([Can't LÖVE without OpenGL]))
|
||||
AC_SEARCH_LIBS([alSourcePlay], [openal], [], AC_MSG_ERROR([Can't LÖVE without OpenAL]))
|
||||
AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL]))
|
||||
@@ -44,9 +43,11 @@ AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without
|
||||
AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile]))
|
||||
|
||||
# Includes
|
||||
AC_CHECK_HEADER([SDL2/SDL.h], [includes="$includes -I/usr/include/SDL2"])
|
||||
AC_CHECK_HEADER([freetype2/freetype/config/ftheader.h], [includes="$includes -I/usr/include/freetype2"])
|
||||
|
||||
# SDL 2, treated seperately because it combines setting SDL2_LIBS and SDL2_CFLAGS into one step
|
||||
AM_PATH_SDL2([], [], AC_MSG_ERROR([Can't LÖVE without SDL 2]))
|
||||
|
||||
# Lua, treated seperately because of --with-lua
|
||||
AC_ARG_WITH([lua], [AS_HELP_STRING([--with-lua], [Select the lua implementation])],
|
||||
[], [with_lua=lua])
|
||||
|
||||
@@ -7,6 +7,7 @@ inc_libraries="$inc_current/libraries"
|
||||
|
||||
cat > Makefile.am << EOF
|
||||
AM_CPPFLAGS = -I$inc_current -I$inc_modules -I$inc_libraries -I$inc_libraries/enet/libenet/include \$(LOVE_INCLUDES) \$(FILE_OFFSET)
|
||||
AM_CXXFLAGS = \$(SDL_CFLAGS)
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
SUBDIRS =
|
||||
|
||||
@@ -27,7 +28,7 @@ endif
|
||||
|
||||
# libLÖVE
|
||||
lib_LTLIBRARIES = liblove.la
|
||||
liblove_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS)
|
||||
liblove_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS) \$(SDL_LIBS)
|
||||
liblove_la_SOURCES = \\
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user