From 78910c9cdba0b882e21abfdb5399e9cd7412fc61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= Date: Sat, 6 Apr 2013 16:16:54 +0200 Subject: [PATCH 4/7] Fix detection of gl by pkg-config * fix detection by pkg-config and run when available * fixe a typo s/GL_FLAG/GL_CFLAGS/g --- m4/ax_check_gl.m4 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/m4/ax_check_gl.m4 b/m4/ax_check_gl.m4 index cdb15d8..964220d 100644 --- a/m4/ax_check_gl.m4 +++ b/m4/ax_check_gl.m4 @@ -70,7 +70,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 14 +#serial 15 m4_define([_AX_CHECK_GL_PROGRAM], [AC_LANG_PROGRAM([[ @@ -354,7 +354,7 @@ AC_DEFUN([_AX_CHECK_GL_PKG_CONFIG],dnl # check headers AC_LANG_PUSH([C]) _AX_CHECK_GL_SAVE_FLAGS() - CFLAGS="${GL_FLAGS} ${CFLAGS}" + CFLAGS="${GL_CFLAGS} ${CFLAGS}" AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [ax_check_gl_have_headers="yes";break], @@ -404,9 +404,12 @@ AC_DEFUN([_AX_CHECK_GL],[dnl _AX_CHECK_GL_NEED_X() # try first pkgconfig - AS_IF([test "X${PKG_CONFIG}" != "X"], - [ ax_check_gl_pkg_config=no], - [ _AX_CHECK_GL_PKG_CONFIG()]) + AC_MSG_CHECKING([for a working OpenGL implementation by pkg-config]) + AS_IF([test "X${PKG_CONFIG}" = "X"], + [ AC_MSG_RESULT([no]) + ax_check_gl_pkg_config=no], + [ AC_MSG_RESULT([yes]) + _AX_CHECK_GL_PKG_CONFIG()]) # if no pkgconfig or pkgconfig fail try manual way AS_IF([test "X$ax_check_gl_pkg_config" = "Xno"], -- 1.7.10.4