diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2016-11-23 09:55:43 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2016-11-23 10:48:58 +0100 |
commit | bba8ecc0f678b50f521ca06c69a88b7c9f0dc15c (patch) | |
tree | c06b50deeb6c5062a1a6a01f88fc9f8168883afe /configure.ac | |
parent | 0e31e477e5eedff5a87d01b39dc75d381f55e43a (diff) | |
download | ratpoison-bba8ecc0f678b50f521ca06c69a88b7c9f0dc15c.zip |
define HAVE_XRANDR/link with libXrandr when we actually want to
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
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) |