diff configure.ac @ 11214:7f19b2b6e093

Remove redundant warning when 'without-opengl' option used.
author Rik <octave@nomad.inbox5.com>
date Tue, 09 Nov 2010 11:32:30 -0800
parents 94d9d412a2a0
children 5036b0ff9597
line wrap: on
line diff
--- a/configure.ac	Tue Nov 09 13:21:15 2010 -0500
+++ b/configure.ac	Tue Nov 09 11:32:30 2010 -0800
@@ -828,7 +828,7 @@
 
 check_opengl=false
 AC_ARG_WITH([opengl],
-  [AS_HELP_STRING([--with-opengl=yes], [use opengl library for graphics])],
+  [AS_HELP_STRING([--without-opengl], [don't use OpenGL libraries, disable native graphics])],
   [if test "x$withval" = xno; then
      warn_opengl="--without-opengl specified.  Native graphics will be disabled."
      AC_MSG_WARN([$warn_opengl])
@@ -844,6 +844,12 @@
 GRAPHICS_LIBS=
 GRAPHICS_CFLAGS=
 
+if test -z "$OPENGL_LIBS"; then
+  if $check_opengl; then
+    warn_fltk_opengl="OpenGL libs (GL and GLU) not found. Native graphics will be disabled."
+  fi
+fi
+
 if test -n "$OPENGL_LIBS"; then
   AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is available])
 
@@ -928,8 +934,6 @@
       AC_MSG_RESULT(no)
     fi
   fi
-else
-  warn_fltk_opengl="OpenGL libs (GL and GLU) not found. Native graphics will be disabled."
 fi
 
 AC_SUBST(GRAPHICS_CFLAGS)