X-Git-Url: https://git.distorted.org.uk/~mdw/xtoys/blobdiff_plain/bce8c6eed8bd2fb91fc505a26483e449aefac819..4be8cb2b59106a6c55a235f713cc4ac2ba655df8:/configure.ac diff --git a/configure.ac b/configure.ac index e338570..ce290ec 100644 --- a/configure.ac +++ b/configure.ac @@ -13,12 +13,12 @@ dnl X tools is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. -dnl +dnl dnl X tools is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. -dnl +dnl dnl You should have received a copy of the GNU General Public License dnl along with X tools; if not, write to the Free Software Foundation, dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -31,6 +31,7 @@ AC_INIT([xtoys], AUTO_VERSION, [mdw@distorted.org.uk]) AC_CONFIG_SRCDIR([xscsize.c]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([foreign]) +mdw_SILENT_RULES dnl-------------------------------------------------------------------------- dnl C programming environment. @@ -39,6 +40,22 @@ AC_PROG_CC AX_CFLAGS_WARN_ALL AC_PATH_XTRA +mdw_LIBS=$LIBS LIBS= mdw_have_xrandr_p=nil +AC_SEARCH_LIBS([XRRGetScreenInfo], [Xrandr], [mdw_have_xrandr_p=t]) +case $mdw_have_xrandr_p in + t) + AC_CHECK_HEADERS([X11/extensions/Xrandr.h], [], [mdw_have_xrandr_p=nil]) + ;; +esac +case $mdw_have_xrandr_p in + t) + XRANDR_LIBS=$LIBS + AC_DEFINE([HAVE_XRANDR], [1], [Define if libXrandr is installed.]) + ;; +esac +LIBS=$mdw_LIBS +AC_SUBST([XRANDR_LIBS]) + PKG_CHECK_MODULES([mLib], [mLib >= 2.0.4]) CFLAGS="$CFLAGS $mLib_CFLAGS" LIBS="$LIBS $mLib_LIBS"