+# Check for the SGI-VIDEO-CONTROL server extension header.
+#
+have_sgivc=no
+with_sgivc_req=unspecified
+AC_ARG_WITH(sgivc-ext,
+[ --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL server
+ extension, if possible (this is the default).
+ --without-sgivc-ext Do not compile in support for this extension.],
+ [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
+if test $with_sgivc = yes; then
+
+ # first check for XSGIvc.h
+ AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes])
+
+ # if that succeeded, then check for the -lXsgivc
+ if test $have_sgivc = yes; then
+ have_sgivc=no
+ AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
+ [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [],
+ -lXext -lX11)
+ fi
+
+ # if that succeeded, then we've really got it.
+ if test $have_sgivc = yes; then
+ AC_DEFINE(HAVE_SGI_VC_EXTENSION)
+ fi
+
+elif test $with_sgivc != no; then
+ echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
+ exit 1
+fi
+
+
+
+
+
+
+
+