Use QuesoGLC's pkg-config file for build configuration.

Closes #2458.
master
safety0ff 2011-02-26 14:38:04 -05:00
parent 3889f42f25
commit bfe900b78e
2 changed files with 9 additions and 23 deletions

View File

@ -338,13 +338,7 @@ AS_IF([test "x$enable_sound" = "xyes"],[
PKG_CHECK_MODULES([OGGVORBIS], [vorbisfile >= 1.1])
])
if test "x$enable_static" = "xyes" ; then
# If linking statically, make sure to include the direct dependencies of
# QuesoGLC as well, because it does not have a pkg-config file.
# FIXME Remove this whenever QuesoGLC has a pkg-config file
PKG_CHECK_MODULES([FONTCONFIG], [fontconfig])
PKG_CHECK_MODULES([FREETYPE], [freetype2])
fi
PKG_CHECK_MODULES([OPENGLC], [quesoglc >= 0.7.2])
system_glee=false
if test "x$host_os_mingw32" != "xyes" ; then
@ -418,21 +412,6 @@ AC_CHECK_LIB(GLU, main,
[${OPENGL_LIBS} -lm]), [${OPENGL_LIBS} -lm])
AC_SUBST([OPENGL_LIBS], [${OPENGL_LIBS}])
# Look for OpenGLC
AC_CHECK_HEADER(GL/glc.h, ,
AC_MSG_ERROR([OpenGLC header not found. Please install QuesoGLC: http://quesoglc.sourceforge.net/]))
AC_CHECK_LIB(GLC, main,
OPENGLC_LIBS="-lGLC",
AC_CHECK_LIB(glc32, main,
OPENGLC_LIBS="-lglc32",
AC_MSG_ERROR([OpenGLC library not found. Please install QuesoGLC: http://quesoglc.sourceforge.net/])))
if test "x$enable_static" = "xyes" ; then
# If linking statically, make sure to link against the direct dependencies, too.
# FIXME Remove this whenever QuesoGLC has a pkg-config file
OPENGLC_LIBS="${OPENGLC_LIBS} ${FONTCONFIG_LIBS} ${FREETYPE_LIBS}"
fi
AC_SUBST([OPENGLC_LIBS], [${OPENGLC_LIBS}])
# When (cross-)compiling for Windows (MinGW) we need to link in BFD for the Dr.
# MinGW derived exception handler.
if test "x$host_os_mingw32" = "xyes" ; then

View File

@ -10,7 +10,8 @@ PKG_MD5SUM:=b009f87f5cc2e79106cf1bf8ca45418d
TARGETS:= \
$(TOPDIR)/build/libs/lib/libGLC.la \
$(TOPDIR)/build/libs/include/GL/glc.h
$(TOPDIR)/build/libs/include/GL/glc.h \
$(TOPDIR)/build/libs/lib/pkgconfig/quesoglc.pc
include $(TOPDIR)/rules.mk
@ -39,6 +40,12 @@ $(PKG_SOURCEBASE)/build/libGLC.la: $(PKG_SOURCEBASE)/config.status
$(TOPDIR)/build/libs/lib/libGLC.la: $(PKG_SOURCEBASE)/build/libGLC.la
$(MAKE) -C $(PKG_SOURCEBASE)/build install-libLTLIBRARIES
$(PKG_SOURCEBASE)/quesoglc.pc: $(PKG_SOURCEBASE)/config.status
$(MAKE) -C $(PKG_SOURCEBASE) quesoglc.pc && sed -i -e "s/,\s*$$//" $(PKG_SOURCEBASE)/quesoglc.pc # Remove extraneous comma (autoconfigure artifact)
$(TOPDIR)/build/libs/lib/pkgconfig/quesoglc.pc: $(PKG_SOURCEBASE)/quesoglc.pc
$(MAKE) -C $(PKG_SOURCEBASE) install-pkgconfigDATA
$(PKG_SOURCEBASE)/include/GL/glc.h: extract-stamp
$(TOPDIR)/build/libs/include/GL/glc.h: $(PKG_SOURCEBASE)/include/GL/glc.h $(PKG_SOURCEBASE)/config.status