* Move the addition of SDL's stuff to CPPFLAGS and LIBS to the "platform selection" part
* Make sure to also check for and link against OpenGL git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5939 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
6150e58b45
commit
e9ea1df8d9
|
@ -1,13 +1,10 @@
|
|||
CPPFLAGS=$(SDL_CFLAGS)
|
||||
LIBS=$(SDL_LIBS)
|
||||
|
||||
lib_LTLIBRARIES = libbetawidget.la
|
||||
|
||||
libbetawidget_la_SOURCES = font.c geom.c hBox.c spacer.c textEntry.c vector.c \
|
||||
widget.c window.c
|
||||
|
||||
libbetawidget_la_CPPFLAGS = $(CAIRO_SVG_CFLAGS) -DLIB_COMPILE=1
|
||||
libbetawidget_la_LDFLAGS = $(CAIRO_SVG_LIBS)
|
||||
libbetawidget_la_LDFLAGS = $(CAIRO_SVG_LIBS) $(OPENGL_LIBS)
|
||||
|
||||
# FIXME: Headers required for the public API should be placed in the
|
||||
# inlude_HEADERS directory.
|
||||
|
@ -17,6 +14,9 @@ noinst_HEADERS = clipboard.h font.h geom.h hBox.h internal-cairo.h keycode.h \
|
|||
# Platform selection
|
||||
PLATFORM=platform/sdl
|
||||
|
||||
CPPFLAGS += $(SDL_CFLAGS)
|
||||
LIBS += $(SDL_LIBS)
|
||||
|
||||
libbetawidget_la_SOURCES += $(PLATFORM)/event.c $(PLATFORM)/init.c \
|
||||
$(PLATFORM)/time.c
|
||||
|
||||
|
|
|
@ -32,10 +32,6 @@ if test "x$enable_static" = "xyes" ; then
|
|||
PKG_CONFIG="${PKG_CONFIG} --static"
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([SDL], [sdl >= 1.2])
|
||||
PKG_CHECK_MODULES([CAIRO_SVG], [cairo-svg])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
|
||||
|
@ -53,5 +49,24 @@ AC_FUNC_MALLOC
|
|||
AC_FUNC_REALLOC
|
||||
AC_CHECK_FUNCS([memmove strdup])
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([SDL], [sdl >= 1.2])
|
||||
PKG_CHECK_MODULES([CAIRO_SVG], [cairo-svg])
|
||||
|
||||
# Look for OpenGL
|
||||
AC_CHECK_HEADER(SDL/SDL_opengl.h, ,
|
||||
AC_MSG_ERROR([SDL OpenGL header not found. Please install SDL with OpenGL support.]))
|
||||
AC_CHECK_LIB(GL, main,
|
||||
OPENGL_LIBS="-lGL",
|
||||
AC_CHECK_LIB(opengl32, main,
|
||||
OPENGL_LIBS="-lopengl32",
|
||||
AC_MSG_ERROR([OpenGL library not found.])))
|
||||
AC_CHECK_LIB(GLU, main,
|
||||
OPENGL_LIBS="${OPENGL_LIBS} -lGLU",
|
||||
AC_CHECK_LIB(glu32, main,
|
||||
OPENGL_LIBS="${OPENGL_LIBS} -lglu32",
|
||||
AC_MSG_ERROR([GLU library not found.])))
|
||||
AC_SUBST([OPENGL_LIBS], [${OPENGL_LIBS}])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
|
Loading…
Reference in New Issue