Bug 6630

Summary: xcb-demo Makefile.am needs updating for split library world
Product: XCB Reporter: Bart Massey <x>
Component: DemosAssignee: Josh Triplett <josh>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch for xcb-demo/Makefile.am to include new library dependencies
diff and .pc.in files

Description Bart Massey 2006-04-17 18:01:08 UTC
Some of the XCB demos don't link against enough libraries now that they've been
split out.  Here's a patch to xcb-demo/Makefile.am .  See also Bug 6629 for a
harder variant of this problem.

--- Makefile.am.dist    2006-04-16 23:20:35.000000000 -0700
+++ Makefile.am 2006-04-17 00:55:24.000000000 -0700
@@ -18,10 +18,11 @@
 xcb_test_LDADD = $(LDADD) $(XCBAUX_LIBS) -lpthread
 xcb_test_SOURCES = main.c reply_formats.c

+dpms_LDADD = $(LDADD) -lXCBdpms
 dpms_SOURCES = dpms.c

-rendertest_LDADD = $(XCBAUX_LIBS)
+rendertest_LDADD = $(LDADD) $(XCBAUX_LIBS) -lXCBrender
 rendertest_SOURCES = rendertest.c

-xcbrandr_LDADD = $(XCBAUX_LIBS)
+xcbrandr_LDADD = $(LDADD) $(XCBAUX_LIBS) -lXCBrandr
 xcbrandr_SOURCES = xcbrandr.c
Comment 1 Bart Massey 2006-04-17 18:10:56 UTC
Created attachment 5341 [details] [review]
Patch for xcb-demo/Makefile.am to include new library dependencies

Sorry about pasting it in the earlier comment.	Bugzilla always confuses me.
Comment 2 Vincent Torri 2006-04-17 18:26:01 UTC
as you said in bug #6629, there will be a problem for each program based on XCB
and that will use a splitted extension.

I don't think that adding -l flags is the best way, as the name and the path of
the lib can change in future release (maybe). I think it is better to get that
name during the configure script. That's why I prefer providing a .pc file for
each splitted lib.
Comment 3 Bart Massey 2006-04-18 16:18:47 UTC
My patch is a workaround until Josh finishes generating proper pkgconfigs for
everything.  I needed to be able to build the demos in the meantime.
Comment 4 Vincent Torri 2006-04-23 17:41:48 UTC
i was fed up with that thing. So i've attached an archive below. There is the
diff of the current repository (configure.ac, toplevel Makefile.am, and the
vpath stuff. This one should not be here, but I was lazy and I didn't removed it
:), and all the needed .pc.in

I've made all the changes in the xcb-utils and xcb-demos dirs. It compiles fine
and seems to work, too.

Before this patch (or a part) goes into the repository, could you please look at
the .pc.in files. No need to add an xcb requirement, for example ?
Comment 5 Vincent Torri 2006-04-23 17:43:05 UTC
Created attachment 5427 [details]
diff and .pc.in files
Comment 6 Josh Triplett 2006-04-28 07:38:35 UTC
Fixed by git commit 661eb7d56a3cd2ee1277558f66500e8d76793055 (which adds
pkg-config files) and git commit d94a7cdfb5f856e31009ae9769128634f6b714b0 (which
uses the new pkg-config files in xcb-demo).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.