diff --git a/autoconf/m4/opengl.m4 b/autoconf/m4/opengl.m4 index e213addf18..bc6187698b 100644 --- a/autoconf/m4/opengl.m4 +++ b/autoconf/m4/opengl.m4 @@ -11,9 +11,11 @@ AC_DEFUN([SM_X_WITH_OPENGL], fi if test -n "$x_libraries"; then - XLIBS="-L$x_libraries -lX11" + XLIBS="-L$x_libraries" fi + XLIBS +="-lX11" + if test -n "$x_includes"; then # See if we can compile X applications without using $XCFLAGS. AC_MSG_CHECKING(if $XCFLAGS is really necessary)