diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-02-22 16:46:51 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-02-22 16:46:51 +0100 |
commit | 9949ad7be13b64eeeb111198499973134b96fa17 (patch) | |
tree | e5b0dbb5bbb2b0535af15aad3fcbcd4c7197cc15 | |
parent | 453500ae971b3bba1f16262a6bb73807d19774b2 (diff) |
Apply Gentoo patch to make Xinerama optional (probably requires autoreconf)
-rw-r--r-- | configure.in | 24 | ||||
-rw-r--r-- | src/Makefile.am | 1 |
2 files changed, 19 insertions, 6 deletions
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"]) diff --git a/src/Makefile.am b/src/Makefile.am index d4a347f..1dbc0f0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,6 @@ # A list of all the files in the current directory which can be regenerated MAINTAINERCLEANFILES = Makefile.in -LDFLAGS = -L/usr/X11R6/lib -L/usr/local/lib -lz -lpng INCLUDES = -I/usr/X11R6/include $(X_CFLAGS) \ -I$(prefix)/include -I$(includedir) \ -I. -I$(top_srcdir)/src \ |