From c66b9bd972e41ee66dbe56a29a74cf81cda02e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 16 Mar 2007 00:01:31 +0000 Subject: Collapse X_LIBS, X_PRE_LIBS, -lXext and -lX11 in a single X_LIBS variable when using non-pkg-config based discovery of X11 libraries; also check for xext together with x11 with pkg-config. This reduces the list of libraries to add to _LIBADD for video output plugins, and should solve the problems with -lXext being linked in with X disabled. CVS patchset: 8666 CVS date: 2007/03/16 00:01:31 --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4b85c3021..c44e62bfa 100644 --- a/configure.ac +++ b/configure.ac @@ -540,7 +540,7 @@ dnl Checks for X11 dnl --------------------------------------------- if test "x$with_x" != "xno"; then - PKG_CHECK_MODULES([X], [x11], , [ + PKG_CHECK_MODULES([X], [x11 xext], , [ AC_PATH_XTRA dnl ---------------------------------------------- @@ -550,9 +550,12 @@ if test "x$with_x" != "xno"; then if test "x$no_x" != "xyes"; then ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" - AC_CHECK_HEADERS([X11/extensions/XShm.h], [], + AC_CHECK_HEADERS([X11/extensions/XShm.h], , [AC_MSG_ERROR([XShm extension is required])]) + AC_CHECK_LIB([Xext], [main], , + [AC_MSG_ERROR([libXext is required])], [$X_LIBS]) CPPFLAGS="$ac_save_CPPFLAGS" + X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext" fi ]) else -- cgit v1.2.3