[gnome-session] Use pkg-config to check for X11 libraries
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] Use pkg-config to check for X11 libraries
- Date: Thu, 28 Feb 2013 17:45:28 +0000 (UTC)
commit f0063b9d876a946de3c944612e1bf4f26054f582
Author: Emilio Pozuelo Monfort <pochu27 gmail com>
Date: Wed Feb 27 11:35:25 2013 +0100
Use pkg-config to check for X11 libraries
As a side effect, we stop checking for pangox, which
gnome-session doesn't use and which is deprecated
upstream.
https://bugzilla.gnome.org/show_bug.cgi?id=694792
configure.ac | 39 +--------------------------------------
gnome-session/Makefile.am | 2 ++
tools/Makefile.am | 4 ++--
3 files changed, 5 insertions(+), 40 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f122bbf..d2ccb86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@ PKG_CHECK_MODULES(SESSION_PROPERTIES,
gtk+-3.0 >= $GTK3_REQUIRED
)
+PKG_CHECK_MODULES(X11, x11)
PKG_CHECK_MODULES(SM, sm)
PKG_CHECK_MODULES(ICE, ice)
PKG_CHECK_MODULES(XEXT, xext xau)
@@ -145,44 +146,6 @@ AC_SUBST(SYSTEMD_LIBS)
AM_CONDITIONAL(HAVE_SYSTEMD, [test "$enable_systemd" = "yes"], [Using systemd])
dnl ====================================================================
-dnl X development libraries check
-dnl ====================================================================
-
-# If Pango included the shared library dependencies from X11 in
-# the pkg-config output, then we use that (to avoid duplicates).
-# but if they were omitted to avoid binary compatibility problems
-# then we need to repeat the checks.
-
-if $PKG_CONFIG --exists pangoxft ; then
- PANGO_PACKAGES="pangox pangoxft"
-else
- PANGO_PACKAGES="pangox"
-fi
-
-x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
-case x_libs in
- *-lX11*) pango_omitted_x_deps=no ;;
- *) pango_omitted_x_deps=yes ;;
-esac
-
-if test $pango_omitted_x_deps = yes ; then
- AC_PATH_XTRA
-
- if test x$no_x = xyes ; then
- AC_MSG_ERROR([X development libraries not found])
- else
- X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
- fi
-fi
-
-AC_CHECK_LIB(Xau, XauFileName, [X_LIBS="$X_LIBS -lXau"],
- [AC_MSG_ERROR([
-*** Can't find the Xauth library. It is needed to compile gnome-session.])],
- $X_LIBS)
-
-AC_SUBST(X_LIBS)
-
-dnl ====================================================================
dnl Check for XSync extension
dnl ====================================================================
diff --git a/gnome-session/Makefile.am b/gnome-session/Makefile.am
index 0e3affa..cf28814 100644
--- a/gnome-session/Makefile.am
+++ b/gnome-session/Makefile.am
@@ -67,6 +67,7 @@ gnome_session_SOURCES = \
gnome_session_CPPFLAGS = \
$(AM_CPPFLAGS) \
+ $(X11_CFLAGS) \
$(SM_CFLAGS) \
$(ICE_CFLAGS) \
$(XEXT_CFLAGS) \
@@ -83,6 +84,7 @@ gnome_session_CPPFLAGS = \
gnome_session_LDADD = \
libgsmutil.la \
+ $(X11_LIBS) \
$(SM_LIBS) \
$(ICE_LIBS) \
$(XRENDER_LIBS) \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 488e778..ba8a6e8 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -50,7 +50,7 @@ gnome_session_check_accelerated_helper_CPPFLAGS = \
gnome_session_check_accelerated_helper_LDADD = \
$(GL_TEST_LIBS) \
- $(X_LIBS)
+ $(X11_LIBS)
gnome_session_check_accelerated_SOURCES = \
gnome-session-check-accelerated.c
@@ -62,7 +62,7 @@ gnome_session_check_accelerated_CPPFLAGS = \
gnome_session_check_accelerated_LDADD = \
$(GTK3_LIBS) \
- $(X_LIBS)
+ $(X11_LIBS)
if BUILD_SESSION_SELECTOR
gnome_session_selector_CPPFLAGS = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]