X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=m4%2Fx11.m4;h=bff7e63177260fd27b28fdb5625282702d13641c;hb=cc4e44e8376f5b76cb23f8cd642f32e0e41b9150;hp=d840d34a3c9027197a82d9669f65ee58f54ae801;hpb=65315ca4377a8b034fffbcbd0965e2b332cdb1ba;p=chaz%2Fopenbox diff --git a/m4/x11.m4 b/m4/x11.m4 index d840d34a..bff7e631 100644 --- a/m4/x11.m4 +++ b/m4/x11.m4 @@ -302,6 +302,59 @@ AC_DEFUN([X11_EXT_SYNC], fi ]) +# X11_EXT_AUTH() +# +# Check for the presence of the "Xau" X Window System extension. +# Defines "AUTH, sets the $(AUTH) variable to "yes", and sets the $(LIBS) +# appropriately if the extension is present. +AC_DEFUN([X11_EXT_AUTH], +[ + AC_REQUIRE([X11_DEVEL]) + + # Store these + OLDLIBS=$LIBS + OLDCPPFLAGS=$CPPFLAGS + + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + LIBS="$LIBS $X_LIBS" + + AC_CHECK_LIB([Xau], [XauReadAuth], + AC_MSG_CHECKING([for X11/Xauth.h]) + AC_TRY_LINK( + [ + #include + #include + #include + ], + [ + ], + [ + AC_MSG_RESULT([yes]) + AUTH="yes" + AC_DEFINE([AUTH], [1], [Found the Xauth extension]) + + XAUTH_CFLAGS="" + XAUTH_LIBS="-lXau" + AC_SUBST(XAUTH_CFLAGS) + AC_SUBST(XAUTH_LIBS) + ], + [ + AC_MSG_RESULT([no]) + AUTH="no" + ]) + ) + + LIBS=$OLDLIBS + CPPFLAGS=$OLDCPPFLAGS + + AC_MSG_CHECKING([for the Xauth extension]) + if test "$AUTH" = "yes"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +]) + # X11_SM() # # Check for the presence of SMlib for session management.