summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-06-17 18:51:14 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-06-22 19:47:58 +0200
commit27636d80def676ae8599caadfec5c8657840d232 (patch)
tree75e36bd7eef7531f655140a8aa8bf70115ba76e4 /configure.ac
parentfe2ca14fc2c1b505ca3b6689994e7cde9acd4c4f (diff)
downloadspice-27636d80def676ae8599caadfec5c8657840d232.tar.gz
spice-27636d80def676ae8599caadfec5c8657840d232.tar.xz
spice-27636d80def676ae8599caadfec5c8657840d232.zip
build-sys: Use spice-common m4 macro for opengl
This factorizes a bit of configure.ac m4 code.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac33
1 files changed, 4 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index 76226838..8da30668 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,12 +70,10 @@ esac
dnl =========================================================================
dnl Check optional features
-AC_ARG_ENABLE([opengl],
- AS_HELP_STRING([--enable-opengl],
- [Enable opengl requirement / support (not recommended)]),,
- [enable_opengl="no"])
-AS_IF([test x"$enable_opengl" != "xno"], [enable_opengl="yes"])
-AM_CONDITIONAL(SUPPORT_GL, test "x$enable_opengl" = "xyes")
+SPICE_CHECK_OPENGL([GL])
+AS_IF([test x"$enable_opengl" != "xno"], [
+ AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"])
+])
AC_ARG_ENABLE([lz4],
AS_HELP_STRING([--enable-lz4],[Enable lz4 compression algorithm]),,
@@ -148,35 +146,12 @@ AC_SUBST(SSL_CFLAGS)
AC_SUBST(SSL_LIBS)
AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
-# These are commented out because the gl libraries on RHEL 5 do not have pkgconfig files
-#
-# PKG_CHECK_MODULES(GL, gl glu)
-# AC_SUBST(GL_CFLAGS)
-# AC_SUBST(GL_LIBS)
-# AS_VAR_APPEND([SPICE_REQUIRES], [" gl glu"])
-
-if test "x$enable_opengl" = "xyes"; then
- AC_CHECK_LIB(GL, glBlendFunc, GL_LIBS="$GL_LIBS -lGL", enable_opengl=no)
- AC_CHECK_LIB(GLU, gluSphere, GL_LIBS="$GL_LIBS -lGLU", enable_opengl=no)
- AC_DEFINE([USE_OPENGL], [1], [Define to build with OpenGL support])
- AC_DEFINE([GL_GLEXT_PROTOTYPES], [], [Enable GLExt prototypes])
-
- if test "x$enable_opengl" = "xno"; then
- AC_MSG_ERROR([GL libraries not available])
- fi
-fi
-
-AC_SUBST(GL_CFLAGS)
-AC_SUBST(GL_LIBS)
-AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"])
-
if test "x$enable_lz4" = "xyes"; then
PKG_CHECK_MODULES(LZ4, liblz4)
AC_DEFINE([USE_LZ4], [1], [Define to build with Lz4 support])
fi
AC_SUBST(LZ4_CFLAGS)
AC_SUBST(LZ4_LIBS)
-
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
AC_MSG_CHECKING([for jpeglib.h])
AC_TRY_CPP(