diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/configure.in b/configure.in index 2bbb2fe..0495d9f 100644 --- a/configure.in +++ b/configure.in @@ -115,19 +115,26 @@ AC_MSG_ERROR([You must have popt 1.5 or newer to compile gcompris.])) AM_ICONV dnl XRANDR Allow us to set the screen resolution dynamically -RANDR_LIBS= -found_randr=no -AC_CHECK_LIB(Xrandr, XRRSetScreenConfigAndRate, +AC_ARG_ENABLE(xrandr, + AC_HELP_STRING( + [--disable-xrandr], + [Turn off xrandr]), + USE_XRANDR="$enableval", USE_XRANDR="yes") +if test "x$USE_XRANDR" == "xyes" ; then + RANDR_LIBS= + found_randr=no + AC_CHECK_LIB(Xrandr, XRRSetScreenConfigAndRate, [AC_CHECK_HEADER(X11/extensions/Xrandr.h, RANDR_LIBS="-L/usr/X11R6/lib/ -lXrandr" found_randr=yes,, [#include <X11/Xlib.h>])], , -L/usr/X11R6/lib/ -lXrandr $ALL_X_LIBS ) -if test "x$found_randr" = "xno"; then - AC_MSG_NOTICE(["Suitable Xrandr extension library not found - you need at least X 4.3. Will not use xrandr for fullscreen."]) - AC_DEFINE_UNQUOTED(XRANDR, 0, [XRANDR NOT Available]) -else - AC_DEFINE_UNQUOTED(XRANDR, 1, [XRANDR Available]) + if test "x$found_randr" = "xno"; then + AC_MSG_NOTICE(["Suitable Xrandr extension library not found - you need at least X 4.3. Will not use xrandr for fullscreen."]) + AC_DEFINE_UNQUOTED(XRANDR, 0, [XRANDR NOT Available]) + else + AC_DEFINE_UNQUOTED(XRANDR, 1, [XRANDR Available]) + fi fi LDFLAGS="${LDFLAGS} ${RANDR_LIBS}" |