Commit ccef49b6f4c011dae721f0146c1866ac32b70805

brlcad 2008-05-04T03:55:24

test with LIBS instead of LDFLAGS but don't persist since that's done later

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/m4/gl.m4 b/m4/gl.m4
index 51f1280..a4cf969 100644
--- a/m4/gl.m4
+++ b/m4/gl.m4
@@ -43,13 +43,14 @@ AC_CHECK_HEADER([GL/gl.h], [AC_DEFINE([HAVE_GL_GL_H], 1, [Define to 1 if you hav
 dnl check whether the OpenGL framework is available
 AC_MSG_CHECKING([for OpenGL framework (Darwin-specific)])
 FRAMEWORK_OPENGL=""
-PRELDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker OpenGL"
+PRELIBS="$LIBS"
+LIBS="$LIBS -Xlinker -framework -Xlinker OpenGL"
 # -Xlinker is used because libtool is busted prior to 1.6 wrt frameworks
 AC_TRY_LINK([#include <OpenGL/gl.h>], [glBegin(GL_POINTS)],
     [FRAMEWORK_OPENGL="-Xlinker -framework -Xlinker OpenGL" ; ac_cv_search_glBegin="-Xlinker -framework -Xlinker OpenGL" ; AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
 with_gl_lib="$FRAMEWORK_OPENGL"
 AC_SUBST(FRAMEWORK_OPENGL)
+LIBS="$PRELIBS"
 
 AC_MSG_CHECKING([for GL library])
 if test "x$with_gl_lib" != "x" ; then