From e90c3678d9e54bc9251619fdee2d7341f042167b Mon Sep 17 00:00:00 2001
From: Mark Tiefenbruck <mark@fluxbox.org>
Date: Fri, 28 Dec 2007 12:55:51 -0800
Subject: move #define SHAPE to config.h instead of -DSHAPE on command line

---
 configure.in | 33 ++++++++++++---------------------
 1 file changed, 12 insertions(+), 21 deletions(-)

diff --git a/configure.in b/configure.in
index 6e6e7d0..99889fa 100644
--- a/configure.in
+++ b/configure.in
@@ -178,32 +178,23 @@ fi
 Xext_lib=""
 
 dnl Check for XShape extension support and proper library files.
-SHAPE=""
 AC_MSG_CHECKING([whether to build support for the XShape extension])
 AC_ARG_ENABLE(
-  shape, [  --enable-shape          enable support of the XShape extension ([default=yes])])
+  shape, [  --enable-shape          enable support of the XShape extension ([default=yes])],
+  if test x$enableval = "xyes"; then
+    AC_MSG_RESULT([yes])
+    AC_CHECK_LIB(Xext, XShapeCombineShape,
+      AC_DEFINE(SHAPE, 1, "shaped window support")
+      LIBS="$LIBS -lXext")
+  else
+    AC_MSG_RESULT([no])
+  fi,
 
-: ${enableval="yes"}
-if test x$enableval = "xyes"; then
   AC_MSG_RESULT([yes])
   AC_CHECK_LIB(Xext, XShapeCombineShape,
-    AC_MSG_CHECKING([for X11/extensions/shape.h])
-    AC_TRY_LINK(
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/shape.h>
-, long foo = ShapeSet,
-      AC_MSG_RESULT([yes])
-      SHAPE="-DSHAPE"; Xext_lib="-lXext",
-      AC_MSG_RESULT([no])
-    )
-  )
-else
-  AC_MSG_RESULT([no])
-fi
-AC_SUBST(SHAPE)
-CXXFLAGS="$CXXFLAGS $SHAPE"
-LIBS="$LIBS $Xext_lib"
+    AC_DEFINE(SHAPE, 1, "shaped window support")
+    LIBS="$LIBS -lXext")
+)
 
 dnl Check for the Slit
 AC_MSG_CHECKING([whether to include the Slit])
-- 
cgit v0.11.2