diff --git a/ChangeLog b/ChangeLog index 9d6ddb2..741273a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-01-14 Adam Fedor + + * configure.ac: Check for GLX_RGBA_TYPE in glx.h + 2003-01-14 Fred Kiefer * Source/xdps/NSDPSContext.m diff --git a/configure b/configure index 447277f..ba33bfe 100755 --- a/configure +++ b/configure @@ -4634,7 +4634,28 @@ echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6 fi - if test "$have_glx" = yes -a "$ac_cv_header_GL_glx_h" = yes; then + echo "$as_me:$LINENO: checking for GLX_RGBA_TYPE" >&5 +echo $ECHO_N "checking for GLX_RGBA_TYPE... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + #ifdef GLX_RGBA_TYPE + yes + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + have_glx_rgba=yes +else + have_glx_rgba=no +fi +rm -f conftest* + + echo "$as_me:$LINENO: result: $have_glx_rgba" >&5 +echo "${ECHO_T}$have_glx_rgba" >&6 + if test "$have_glx" = yes -a "$ac_cv_header_GL_glx_h" = yes -a "$have_glx_rgba" = yes; then GRAPHIC_LIBS="-lGL ${GRAPHIC_LIBS}" WITH_GLX=yes diff --git a/configure.ac b/configure.ac index ffc1560..ae9962a 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,15 @@ if test "x$enable_glx" = "xyes"; then LIBS="${GRAPHIC_LIBS} ${LIBS}" AC_CHECK_LIB(GL, glXMakeContextCurrent, have_glx=yes, have_glx=no) AC_CHECK_HEADER(GL/glx.h) - if test "$have_glx" = yes -a "$ac_cv_header_GL_glx_h" = yes; then + AC_MSG_CHECKING([for GLX_RGBA_TYPE]) + AC_EGREP_CPP(yes, + [#include + #ifdef GLX_RGBA_TYPE + yes + #endif + ], have_glx_rgba=yes, have_glx_rgba=no) + AC_MSG_RESULT([$have_glx_rgba]) + if test "$have_glx" = yes -a "$ac_cv_header_GL_glx_h" = yes -a "$have_glx_rgba" = yes; then GRAPHIC_LIBS="-lGL ${GRAPHIC_LIBS}" WITH_GLX=yes AC_DEFINE(HAVE_GLX,1,[Define if you have the glx library])