Re: pkg-config

Aaron VanDevender <[email protected]>
Newsgroups gmane.lisp.guile.user,gmane.lisp.guile.sources
Message-ID <[email protected]>
On Fri, 2006-06-09 at 15:42 -0400, Andy Wingo wrote:
> Hi,
> 
> On Fri, 2006-06-09 at 11:05 -0500, Aaron VanDevender wrote:
> > Are there any plans to add pkg-config support to guile?
> 
> IIRC the replacement should have all of the variables that guile-config
> has, and no one has done that yet. But you should :-)

Ok, how's this? 

Index: Makefile.am
===================================================================
RCS file: /sources/guile/guile/guile-core/Makefile.am,v
retrieving revision 1.47
diff -u -r1.47 Makefile.am
--- Makefile.am	17 Apr 2006 00:18:11 -0000	1.47
+++ Makefile.am	10 Jun 2006 05:48:35 -0000
@@ -28,9 +28,21 @@
 
 include_HEADERS = libguile.h
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = guile.pc
+
+guile.pc: guile.pc.in
+	sed -e 's,@prefix\@,$(prefix),g' \
+	    -e 's,@libdir\@,$(libdir),g' \
+	    -e 's,@GUILE_CFLAGS\@,$(GUILE_CFLAGS),g' \
+	    -e 's,@GUILE_LIBS\@,$(GUILE_LIBS),g' \
+	    -e 's,@GUILE_VERSION\@,$(GUILE_VERSION),g' $< > $@
+
+CLEANFILES = guile.pc
+
 # automake sometimes forgets to distribute acconfig.h,
 # apparently depending on the phase of the moon.
-EXTRA_DIST = HACKING GUILE-VERSION ANON-CVS SNAPSHOTS BUGS
+EXTRA_DIST = HACKING GUILE-VERSION ANON-CVS SNAPSHOTS BUGS guile.pc.in
 
 TESTS = check-guile
 
Index: guile.pc.in
===================================================================
RCS file: guile.pc.in
diff -N guile.pc.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ guile.pc.in	10 Jun 2006 05:48:35 -0000
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include
+
+Name: guile
+Description: GUILE (GNU's Ubiquitous Intelligent Language for Extension) is a library implementation of the Scheme programming language, written in C.
+Version: @GUILE_VERSION@
+Libs: -L${libdir} -lguile @GUILE_LIBS@
+Cflags: -I${includedir} @GUILE_CFLAGS@


-- 

[email protected]
Plead the First.


_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.