summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2009-10-03 07:06:03 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-10-03 07:06:03 (GMT)
commit2a85804222ed542e374030caf52007dc4616c3de (patch)
treedcd6e94d4023c0b8299cd7a11b55517966a202fd /configure.in
parent8e8939821cee9d7c81bf5543ff39bbe734f8d2be (diff)
downloadfluxbox_lack-2a85804222ed542e374030caf52007dc4616c3de.zip
fluxbox_lack-2a85804222ed542e374030caf52007dc4616c3de.tar.bz2
build system: checking to link against extensions (Xinerama, Randr, Shape) is not enough, we have to check the headers as well
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in179
1 files changed, 115 insertions, 64 deletions
diff --git a/configure.in b/configure.in
index 8fa5a8e..316edf5 100644
--- a/configure.in
+++ b/configure.in
@@ -199,24 +199,6 @@ fi
199 199
200Xext_lib="" 200Xext_lib=""
201 201
202dnl Check for XShape extension support and proper library files.
203AC_MSG_CHECKING([whether to build support for the XShape extension])
204AC_ARG_ENABLE(
205 shape, [ --enable-shape enable support of the XShape extension ([default=yes])],
206 if test x$enableval = "xyes"; then
207 AC_MSG_RESULT([yes])
208 AC_CHECK_LIB(Xext, XShapeCombineShape,
209 AC_DEFINE(SHAPE, 1, "shaped window support")
210 LIBS="$LIBS -lXext")
211 else
212 AC_MSG_RESULT([no])
213 fi,
214
215 AC_MSG_RESULT([yes])
216 AC_CHECK_LIB(Xext, XShapeCombineShape,
217 AC_DEFINE(SHAPE, 1, "shaped window support")
218 LIBS="$LIBS -lXext")
219)
220 202
221dnl Check for the Slit 203dnl Check for the Slit
222AC_MSG_CHECKING([whether to include the Slit]) 204AC_MSG_CHECKING([whether to include the Slit])
@@ -498,60 +480,129 @@ AC_ARG_ENABLE(
498) 480)
499AM_CONDITIONAL(MULTIBYTE, test x$MULTIBYTE = xtrue) 481AM_CONDITIONAL(MULTIBYTE, test x$MULTIBYTE = xtrue)
500 482
501AC_MSG_CHECKING([whether to have RANDR (The X Resize and Rotate Extension) support]) 483
502AC_ARG_ENABLE( 484dnl Check for Xinerama support and proper library files.
503 randr, 485enableval="yes"
504[ --enable-randr RANDR (The X Resize and Rotate Extension) support ([default=yes])], 486AC_MSG_CHECKING([whether to build support for the Xinerama extension])
505 if test x$enableval = "xyes"; then 487AC_ARG_ENABLE(xinerama,
506 AC_MSG_RESULT([yes]) 488 AC_HELP_STRING([--enable-xinerama],
507 AC_CHECK_LIB(Xrandr, XRRQueryExtension, 489 [enable support of the Xinerama extension [default=yes]]), ,
508 AC_DEFINE(HAVE_RANDR, 1, "randr support") 490 [enableval=yes])
509 LIBS="$LIBS -lXrandr") 491if test "x$enableval" = "xyes"; then
510 else 492 AC_MSG_RESULT([yes])
511 AC_MSG_RESULT([no]) 493 AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
512 fi, 494 AC_MSG_CHECKING([for X11/extensions/Xinerama.h])
495 AC_TRY_COMPILE(
496#include <X11/Xlib.h>
497#include <X11/Xutil.h>
498#include <X11/extensions/Xinerama.h>
499 , XineramaQueryScreens(0, 0),
500 AC_MSG_RESULT([yes])
501 AC_DEFINE(XINERAMA, [1], [Define to 1 if you have XINERAMA])
502 LIBS="$LIBS -lXinerama",
503 AC_MSG_RESULT([no])))
504else
505 AC_MSG_RESULT([no])
506 CONFIGOPTS="$CONFIGOPTS --disable-xinerama"
507fi
508
509dnl Check for XShape extension support and proper library files.
510enableval="yes"
511AC_MSG_CHECKING([whether to build support for the XShape extension])
512AC_ARG_ENABLE(shape,
513 AC_HELP_STRING([--enable-shape],
514 [enable support of the XShape extension [default=yes]]), ,
515 [enableval=yes])
516if test "x$enableval" = "xyes"; then
517 AC_MSG_RESULT([yes])
518 AC_CHECK_LIB(Xext, XShapeCombineShape,
519 AC_MSG_CHECKING([for X11/extensions/shape.h])
520 AC_TRY_COMPILE(
521#include <X11/Xlib.h>
522#include <X11/Xutil.h>
523#include <X11/extensions/shape.h>
524 , long foo = ShapeSet,
525 AC_MSG_RESULT([yes])
526 AC_DEFINE(SHAPE, [1], [Define to 1 if you have SHAPE])
527 LIBS="$LIBS -lXext"
528 FEATURES="$FEATURES XShape",
529 AC_MSG_RESULT([no])))
530else
531 AC_MSG_RESULT([no])
532 CONFIGOPTS="$CONFIGOPTS --disable-shape"
533fi
534
535
536
537dnl Check for RANDR support and proper library files.
538enableval="yes"
539AC_MSG_CHECKING([whether to build support for the Xrandr (X resize and rotate) extension])
540AC_ARG_ENABLE(randr,
541 AC_HELP_STRING([--enable-randr],
542 [enable support of the Xrandr extension [default=yes]]), ,
543 [enableval=yes])
544if test "x$enableval" = "xyes"; then
513 AC_MSG_RESULT([yes]) 545 AC_MSG_RESULT([yes])
514 AC_CHECK_LIB(Xrandr, XRRQueryExtension, 546 AC_CHECK_LIB(Xrandr, XRRQueryExtension,
515 AC_DEFINE(HAVE_RANDR, 1, "randr support") 547 AC_MSG_CHECKING([for X11/extensions/randr.h])
516 LIBS="$LIBS -lXrandr") 548 AC_TRY_COMPILE(
517) 549#include <X11/Xlib.h>
550#include <X11/Xutil.h>
551#include <X11/extensions/Xrandr.h>
552 , XRRQueryExtension(0, 0, 0),
553 AC_MSG_RESULT([yes])
554 AC_DEFINE(HAVE_RANDR, [1], [Define to 1 if you have RANDR])
555 LIBS="$LIBS -lXrandr",
556 AC_MSG_RESULT([no])))
557else
558 AC_MSG_RESULT([no])
559 CONFIGOPTS="$CONFIGOPTS --disable-randr"
560fi
518 561
562enableval="yes"
519AC_MSG_CHECKING([whether to have RANDR 1.2 support]) 563AC_MSG_CHECKING([whether to have RANDR 1.2 support])
520AC_ARG_ENABLE( 564AC_ARG_ENABLE(randr1.2,
521 randr1.2, 565 AC_HELP_STRING([--enable-randr1.2],
522[ --enable-randr1.2 RANDR 1.2 support ([default=yes])], 566 [RANDR 1.2 support [default=yes]]), ,
523 if test x$enableval = "xyes"; then 567 [enableval=yes])
524 AC_MSG_RESULT([yes]) 568if test "x$enableval" = "xyes"; then
525 AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
526 AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support"))
527 else
528 AC_MSG_RESULT([no])
529 fi,
530 AC_MSG_RESULT([yes]) 569 AC_MSG_RESULT([yes])
531 AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, 570 AC_CHECK_LIB(Xrandr, XRRQueryExtension,
532 AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) 571 AC_MSG_CHECKING([for X11/extensions/randr.h])
533) 572 AC_TRY_COMPILE(
573#include <X11/Xlib.h>
574#include <X11/Xutil.h>
575#include <X11/extensions/Xrandr.h>
576 , XRRUpdateConfiguration(0),
577 AC_MSG_RESULT([yes])
578 AC_DEFINE(HAVE_RANDR1_2, [1], [Define to 1 if you have RANDR 1.2])
579 LIBS="$LIBS -lXrandr",
580 AC_MSG_RESULT([no])))
581else
582 AC_MSG_RESULT([no])
583 CONFIGOPTS="$CONFIGOPTS --disable-randr1.2"
584fi
534 585
535dnl Check for Xinerama support
536 586
537AC_MSG_CHECKING([whether to build support for the Xinerama extension])
538AC_ARG_ENABLE(
539 xinerama,
540[ --enable-xinerama enable xinerama extension ([default=yes])],
541 if test x$enableval = "xyes"; then
542 AC_MSG_RESULT([yes])
543 AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
544 AC_DEFINE(XINERAMA, 1, "Xinerama support")
545 LIBS="$LIBS -lXinerama")
546 else
547 AC_MSG_RESULT([no])
548 fi,
549 587
550 AC_MSG_RESULT([yes]) 588# #
551 AC_CHECK_LIB(Xinerama, XineramaQueryScreens, 589# AC_MSG_CHECKING([whether to have RANDR 1.2 support])
552 AC_DEFINE(XINERAMA, 1, "Xinerama support") 590# AC_ARG_ENABLE(
553 LIBS="$LIBS -lXinerama") 591# randr1.2,
554) 592# [ --enable-randr1.2 RANDR 1.2 support ([default=yes])],
593# if test x$enableval = "xyes"; then
594# AC_MSG_RESULT([yes])
595# AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
596# AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support"))
597# else
598# AC_MSG_RESULT([no])
599# fi,
600# AC_MSG_RESULT([yes])
601# AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
602# AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support"))
603# )
604
605
555 606
556AC_ARG_WITH( 607AC_ARG_WITH(
557 menu, 608 menu,