configure.ac: Use pkg-config for gles1/2 if available

When building for gles1/2 we now always try and look for a libglesv1_cm
or libglesv2 .pc file with details about where to find the library and
headers.
This commit is contained in:
Robert Bragg 2010-06-18 13:35:09 +01:00
parent d45ac12628
commit c767feecbb

View File

@ -361,7 +361,9 @@ AS_IF([test "x$COGL_DRIVER" = "xgles"],
[],
[AC_MSG_ERROR([Unable to locate required GLES headers])])
PKG_CHECK_EXISTS([glesv1_cm],
[BACKEND_PC_FILES="$BACKEND_PC_FILES glesv1_cm"],
[
# check for upper/lower case libgles_em
# The powervr sdk uses lower case.
AC_CHECK_LIB(GLES_CM, [eglInitialize],
@ -392,6 +394,9 @@ AS_IF([test "x$COGL_DRIVER" = "xgles"],
)
]
)
])
PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"])
],
[2*],
@ -401,11 +406,19 @@ AS_IF([test "x$COGL_DRIVER" = "xgles"],
AC_DEFINE([HAVE_COGL_GLES2], 1, [Have GL/ES for rendering])
AC_SUBST(COGL_GLES_VERSION, [COGL_HAS_GLES2])
PKG_CHECK_EXISTS([glesv2],
[BACKEND_PC_FILES="$BACKEND_PC_FILES glesv2"],
[FLAVOUR_LIBS="$FLAVOUR_LIBS -lGLESv2"])
PKG_CHECK_EXISTS([egl],
[BACKEND_PC_FILES="$BACKEND_PC_FILES egl"],
[
AC_CHECK_HEADERS([EGL/egl.h],
[],
[AC_MSG_ERROR([Unable to locate required GLES headers])])
FLAVOUR_LIBS="$FLAVOUR_LIBS -lGLESv2 -lEGL"
[AC_MSG_ERROR([Unable to locate required EGL headers])])
FLAVOUR_LIBS="$FLAVOUR_LIBS -lEGL"
]
)
],
[fruity],