[gromit] build: Use pkgconfig to determine X11 CFLAGS and LIBS



commit e7df7215cca7febd9ad24f4e1f13dc0801cd9b12
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Dec 21 22:18:27 2011 +0530

    build: Use pkgconfig to determine X11 CFLAGS and LIBS

 Makefile.am  |    4 ++--
 configure.ac |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 03bba0f..0e86ba3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,8 +7,8 @@ cursors = \
 	cursors/erase_cursor_mask.xbm
 
 gromit_SOURCES = gromit.c $(cursors)
-gromit_CFLAGS = -g $(GTK_CFLAGS)
-gromit_LDADD = $(GTK_LIBS) -lX11 -lm
+gromit_CFLAGS = -g $(GTK_CFLAGS) $(X11_CFLAGS)
+gromit_LDADD = $(GTK_LIBS) $(X11_LIBS) -lm
 
 EXTRA_DIST = \
 	AUTHORS                 \
diff --git a/configure.ac b/configure.ac
index 7a0a068..e085647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,4 +11,8 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0)
 AC_SUBST(GTK_LIBS)
 AC_SUBST(GTK_CFLAGS)
 
+PKG_CHECK_MODULES(X11, x11)
+AC_SUBST(X11_CFLAGS)
+AC_SUBST(X11_LIBS)
+
 AC_OUTPUT([ Makefile ])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]