From 9949ad7be13b64eeeb111198499973134b96fa17 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Feb 2010 16:46:51 +0100 Subject: Apply Gentoo patch to make Xinerama optional (probably requires autoreconf) --- configure.in | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 3af172b..4837b08 100644 --- a/configure.in +++ b/configure.in @@ -40,11 +40,25 @@ AC_SUBST(GIBLIB_LIBS) AC_SUBST(GIBLIB_CFLAGS) dnl Check for Xinerama -LIBS="-L/usr/X11R6/lib $LIBS -lm -ljpeg" -AC_CHECK_LIB(Xext,XMissingExtension) -AC_CHECK_LIB(Xinerama,XineramaQueryScreens) -AC_SUBST(HAVE_XINERAMA) -AC_SUBST(XINERAMA_LIBS) +AC_ARG_ENABLE(xinerama, + AC_HELP_STRING([--disable-xinerama],[disable Xinerama multi screen support]), + [ + if test x"$enableval" = xyes; then + with_xinerama="yes" + else + with_xinerama="no" + fi + ], + [with_xinerama="detect"] +) +if test x"$with_xinerama" != xno; then + AC_CHECK_LIB(Xext,XMissingExtension,[ + AC_CHECK_LIB(Xinerama,XineramaQueryScreens,[ + AC_DEFINE(HAVE_LIBXINERAMA, [], [Enable Xinerama support]) + LIBS="$LIBS -lXext -lXinerama" + ]) + ]) +fi AC_CHECK_LIB(jpeg, jpeg_destroy_decompress) dnl AC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"]) -- cgit v1.2.3