changeset 28359:75c87b15bcee

configure.ac: Move check for gl2ps to after Qt and OpenGL detection. * configure.ac: The check for glp2s is conditional on $opengl_graphics which is set during the checks for Qt presence and capabilities. Move the check for gl2ps to after Qt and OpenGL detection.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 24 May 2020 10:41:11 +0200
parents 3c5304bbb71e
children 668b38ab90f7
files configure.ac
diffstat 1 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sat May 23 18:53:35 2020 -0700
+++ b/configure.ac	Sun May 24 10:41:11 2020 +0200
@@ -1809,25 +1809,6 @@
   [fontconfig.h fontconfig/fontconfig.h], [FcInit],
   [], [don't use fontconfig library, OpenGL graphics will not be fully functional])
 
-## Check for gl2ps which is required for printing with OpenGL graphics.
-
-if test $opengl_graphics = yes; then
-  AC_CHECK_HEADERS([gl2ps.h],
-    [GL2PS_LIBS="-lgl2ps"],
-    [warn_gl2ps="gl2ps library not found.  Printing of OpenGL graphics will be disabled."])
-
-  if test -n "$warn_gl2ps"; then
-    OCTAVE_CONFIGURE_WARNING([warn_gl2ps])
-  else
-    save_LIBS="$LIBS"
-    LIBS="$GL2PS_LIBS $LIBS"
-    AC_CHECK_FUNCS([gl2psLineJoin])
-    LIBS="$save_LIBS"
-  fi
-
-  AC_SUBST(GL2PS_LIBS)
-fi
-
 ### GUI/Qt related tests.
 
 QT_VERSIONS="5"
@@ -1992,6 +1973,25 @@
   opengl_graphics=yes
 fi
 
+## Check for gl2ps which is required for printing with OpenGL graphics.
+
+if test $opengl_graphics = yes; then
+  AC_CHECK_HEADERS([gl2ps.h],
+    [GL2PS_LIBS="-lgl2ps"],
+    [warn_gl2ps="gl2ps library not found.  Printing of OpenGL graphics will be disabled."])
+
+  if test -n "$warn_gl2ps"; then
+    OCTAVE_CONFIGURE_WARNING([warn_gl2ps])
+  else
+    save_LIBS="$LIBS"
+    LIBS="$GL2PS_LIBS $LIBS"
+    AC_CHECK_FUNCS([gl2psLineJoin])
+    LIBS="$save_LIBS"
+  fi
+
+  AC_SUBST(GL2PS_LIBS)
+fi
+
 ### Check for the qrupdate library
 
 dnl No need to adjust FFLAGS because only link is attempted.