diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/configure.in b/configure.in index b20bf9b..e3ee2aa 100644 --- a/configure.in +++ b/configure.in | |||
@@ -445,45 +445,47 @@ AS_IF(test "x$enable_shape" = "xyes",[ | |||
445 | 445 | ||
446 | 446 | ||
447 | dnl Check for RANDR support and proper library files. | 447 | dnl Check for RANDR support and proper library files. |
448 | enableval="yes" | 448 | |
449 | AC_MSG_CHECKING([whether to build support for the Xrandr (X resize and rotate) extension]) | 449 | AC_MSG_CHECKING([whether to build support for the XRANDR (X Resize And Rotate) extension]) |
450 | AC_ARG_ENABLE(randr, | 450 | AC_ARG_ENABLE(randr, |
451 | AS_HELP_STRING([--enable-randr], [enable support of the Xrandr extension (default=yes)]),, [enableval=yes]) | 451 | AS_HELP_STRING([--enable-randr], [XRANDR extension support (default=no)]),,[enable_randr=yes]) |
452 | 452 | ||
453 | AS_IF(test "x$enable_randr" = "xyes",[ | 453 | AS_IF(test "x$enable_randr" = "xyes", [ |
454 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, | 454 | AC_MSG_RESULT([yes]) |
455 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, [ | ||
455 | AC_MSG_CHECKING([for X11/extensions/Xrandr.h]) | 456 | AC_MSG_CHECKING([for X11/extensions/Xrandr.h]) |
456 | AC_TRY_COMPILE( | 457 | AC_COMPILE_IFELSE([ |
457 | #include <X11/Xlib.h> | 458 | AC_LANG_PROGRAM([[#include <X11/Xlib.h> |
458 | #include <X11/Xutil.h> | 459 | #include <X11/Xutil.h> |
459 | #include <X11/extensions/Xrandr.h> | 460 | #include <X11/extensions/Xrandr.h> |
460 | , XRRQueryExtension(0, 0, 0), | 461 | ]], [[XRRQueryExtension(0, 0, 0);]] |
461 | AC_MSG_RESULT([yes]) | 462 | )], [ |
462 | AC_DEFINE(HAVE_RANDR, [1], [Define to 1 if you have RANDR]) | 463 | AC_MSG_RESULT([yes]) |
463 | LIBS="-lXrandr $LIBS", | 464 | AC_DEFINE(HAVE_RANDR, [1], [Define to 1 if you have RANDR]) |
464 | AC_MSG_RESULT([no])))],[ | 465 | LIBS="-lXrandr $LIBS" |
465 | AC_MSG_RESULT([no]) | 466 | FEATURES="$FEATURES RANDR" |
466 | CONFIGOPTS="$CONFIGOPTS --disable-randr"]) | 467 | |
467 | 468 | AC_MSG_CHECKING([for XRRUpdateConfiguration]) | |
468 | 469 | AC_COMPILE_IFELSE([ | |
469 | AC_MSG_CHECKING([whether to have RANDR 1.2 support]) | 470 | AC_LANG_PROGRAM([[#include <X11/Xlib.h> |
470 | AC_ARG_ENABLE(randr12, | ||
471 | AS_HELP_STRING([--enable-randr12], [RANDR 1.2 support (default=yes)]), , [enable_randr12=yes]) | ||
472 | AS_IF(test "x$enable_randr12" = "xyes",[ | ||
473 | AC_MSG_RESULT([yes]) | ||
474 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, | ||
475 | AC_MSG_CHECKING([for X11/extensions/Xrandr.h]) | ||
476 | AC_TRY_COMPILE( | ||
477 | #include <X11/Xlib.h> | ||
478 | #include <X11/Xutil.h> | 471 | #include <X11/Xutil.h> |
479 | #include <X11/extensions/Xrandr.h> | 472 | #include <X11/extensions/Xrandr.h> |
480 | , XRRUpdateConfiguration(0), | 473 | ]], [[XRRUpdateConfiguration(0);]] |
481 | AC_MSG_RESULT([yes]) | 474 | )], [ |
482 | AC_DEFINE(HAVE_RANDR1_2, [1], [Define to 1 if you have RANDR 1.2]) | 475 | AC_MSG_RESULT([yes]) |
483 | LIBS="-lXrandr $LIBS", | 476 | AC_DEFINE(HAVE_RANDR1_2, [1], [Define to 1 if you have RANDR 1.2]) |
484 | AC_MSG_RESULT([no])))],[ | 477 | ], [ |
478 | AC_MSG_RESULT([no]) | ||
479 | ]) | ||
480 | ], [ | ||
481 | AC_MSG_RESULT([no]) | ||
482 | ]) | ||
483 | ],[ | ||
484 | AC_MSG_RESULT([no]) | ||
485 | ])],[ | ||
485 | AC_MSG_RESULT([no]) | 486 | AC_MSG_RESULT([no]) |
486 | CONFIGOPTS="$CONFIGOPTS --disable-randr1.2"]) | 487 | CONFIGOPTS="$CONFIGOPTS --disable-randr"]) |
488 | |||
487 | 489 | ||
488 | 490 | ||
489 | 491 | ||