move #define SHAPE to config.h instead of -DSHAPE on command line

This commit is contained in:
Mark Tiefenbruck 2007-12-28 12:55:51 -08:00
parent 8e96ffb74b
commit e90c3678d9

View file

@ -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])