summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Smith <whydoubt@yahoo.com>2010-03-12 18:55:09 -0600
committerDan Nicholson <dbn.lists@gmail.com>2010-04-19 20:21:57 -0700
commit3b693fd93fbddc24360ed345a832387834e0a1fc (patch)
tree0f8544fc9e285d776bc264a3d7d0ea5566fe6504
parent0a18cdb0ed2f4b747688f653d9947d174fae77ff (diff)
Use X_LIBS from pkg-config, instead of libdir, for locating libX11
Signed-off-by: Jeff Smith <whydoubt@yahoo.com> Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> (cherry picked from commit 8d86d395dcf6a5f192b6987485bb7aef49f1fefc)
-rw-r--r--configs/autoconf.in2
-rw-r--r--configure.ac4
-rw-r--r--progs/egl/Makefile6
-rw-r--r--progs/xdemos/Makefile4
4 files changed, 10 insertions, 6 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 30637877f3..f07035a098 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -24,6 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@
RADEON_LDFLAGS = @RADEON_LDFLAGS@
INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
+X_LIBS = @X_LIBS@
+X_CFLAGS = @X_CFLAGS@
# Assembler
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
diff --git a/configure.ac b/configure.ac
index 61487c3905..5f3d02d567 100644
--- a/configure.ac
+++ b/configure.ac
@@ -547,7 +547,9 @@ else
x11_pkgconfig=no
fi
dnl Use the autoconf macro if no pkg-config files
-if test "$x11_pkgconfig" = no; then
+if test "$x11_pkgconfig" = yes; then
+ PKG_CHECK_MODULES([X], [x11])
+else
AC_PATH_XTRA
fi
diff --git a/progs/egl/Makefile b/progs/egl/Makefile
index 25de6e1f70..5f51104fed 100644
--- a/progs/egl/Makefile
+++ b/progs/egl/Makefile
@@ -57,13 +57,13 @@ peglgears: peglgears.o $(HEADERS) $(LIB_DEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) -lm
xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
clean:
-rm -f *.o *~
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index d81caab4dd..038e21cf9a 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -9,9 +9,9 @@ INCDIR = $(TOP)/include
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Add X11 and pthread libs to satisfy GNU gold.
-APP_LIB_DEPS += -lX11 -lpthread
+APP_LIB_DEPS += $(X_LIBS) -lpthread
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(libdir) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
PROGS = \
corender \