AC_INIT
AC_CONFIG_HEADERS([include/X11_extras_config.h])
AC_PATH_XTRA
# If there's some oddball X11 include path, we need it to check there for
# Xinerama headers.
if test -n "$x_includes"; then
CPPFLAGS="$CPPFLAGS -I $x_includes"
fi
AC_MSG_CHECKING([whether to build Xinerama])
AC_ARG_WITH(xinerama,
AS_HELP_STRING([--without-xinerama], [do not build Xinerama support]),
want_xinerama=no,
want_xinerama=yes)
AC_MSG_RESULT([$want_xinerama])
if test "$want_xinerama" = yes; then
AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [have_xinerama=yes])
if test "$have_xinerama" = yes; then
EXTRA_LIBRARIES="extra-libraries: Xinerama Xext"
else
EXTRA_LIBRARIES=""
echo "WARNING: Xinerama headers not found. Building without Xinerama support"
fi
else
EXTRA_LIBRARIES=""
echo "WARNING: Building without Xinerama support per user request"
fi
AC_SUBST([EXTRA_LIBRARIES])
AC_CONFIG_FILES([X11-extras.buildinfo])
AC_OUTPUT