From bba8ecc0f678b50f521ca06c69a88b7c9f0dc15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Wed, 23 Nov 2016 09:55:43 +0100 Subject: define HAVE_XRANDR/link with libXrandr when we actually want to --- configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'configure.ac') 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) -- cgit v1.2.3