summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2016-11-23 09:55:43 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2016-11-23 10:48:58 +0100
commitbba8ecc0f678b50f521ca06c69a88b7c9f0dc15c (patch)
treec06b50deeb6c5062a1a6a01f88fc9f8168883afe /configure.ac
parent0e31e477e5eedff5a87d01b39dc75d381f55e43a (diff)
downloadratpoison-bba8ecc0f678b50f521ca06c69a88b7c9f0dc15c.zip
define HAVE_XRANDR/link with libXrandr when we actually want to
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index ef44eb3..63ee565 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,18 +184,19 @@ AC_CHECK_HEADERS([X11/extensions/Xrandr.h], [], [], [
])
CPPFLAGS="$mysavedCPPFLAGS"
-AC_CHECK_LIB(Xrandr, XRRGetScreenResources,
- [X_LIBS="-lXrandr $X_LIBS"
- AC_DEFINE(HAVE_LIBXRANDR, 1, [Xrandr])],
- [], [$X_LIBS $X_EXTRA_LIBS])
+# XXX Find out why ":" is so important below, with no argument
+# half of config.h ends up #undef'd
+AC_CHECK_LIB(Xrandr, XRRGetScreenResources, [: nothing], [], [$X_LIBS $X_EXTRA_LIBS])
compile_xrandr=no
AS_CASE(["$with_xrandr:$ac_cv_header_X11_extensions_Xrandr_h:$ac_cv_lib_Xrandr_XRRGetScreenResources"],
[yes:no:*], [AC_MSG_ERROR([*** Can't enable Xrandr support, header Xrandr.h not found.])],
[yes:*:no], [AC_MSG_ERROR([*** Can't enable Xrandr support, libXrandr not found.])],
- [yes:yes:yes|check:yes:yes], [compile_xrandr=yes])
+ [yes:yes:yes|check:yes:yes], [X_LIBS="-lXrandr $X_LIBS"
+ AC_DEFINE(HAVE_XRANDR, 1, [Xrandr])
+ compile_xrandr=yes])
-AM_CONDITIONAL(HAVE_LIBXRANDR, [test "$compile_xrandr" = yes])
+AM_CONDITIONAL(HAVE_XRANDR, [test "$compile_xrandr" = yes])
AC_SUBST(X_LIBS)
AC_SUBST(X_EXTRA_LIBS)