Bug 290726: Ship a nspr.pc file when doing make install. The patch is
authorwtc%google.com
Fri, 18 May 2012 22:26:17 +0000
changeset 4388 ace10674ab000a30941e544e6825b589874edfb7
parent 4387 56b84142d57989764c331dc59dcbd69b7f61da3a
child 4389 ded453ff48602b7e1cecb64bd5cf3db5aa91b7c7
push idunknown
push userunknown
push dateunknown
bugs290726
Bug 290726: Ship a nspr.pc file when doing make install. The patch is contributed by Mike Hommey <mh+mozilla@glandium.org>. r=wtc. Modified Files: configure configure.in config/Makefile.in Added Files: nspr.pc.in
config/Makefile.in
config/nspr.pc.in
configure
configure.in
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -15,17 +15,17 @@ include $(MOD_DEPTH)/config/autoconf.mk
 INTERNAL_TOOLS	= 1
 
 # For sanity's sake, we compile nsinstall without the wrapped system
 # headers, so that we can use it to set up the wrapped system headers.
 VISIBILITY_FLAGS =
 
 # autoconf.mk must be deleted last (from the top-level directory)
 # because it is included by every makefile.
-DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config
+DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config nspr.pc
 
 RELEASE_BINS	= nspr-config
 
 include $(topsrcdir)/config/config.mk
 
 CSRCS	= now.c
 
 # This version hasn't been ported for us; the one in mozilla/config has
@@ -113,8 +113,12 @@ endif
 
 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	$(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
 
 install:: nspr.m4
 	$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
 	$(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
+
+install:: nspr.pc
+	$(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig
+	$(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libdir)/pkgconfig
new file mode 100644
--- /dev/null
+++ b/config/nspr.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
+Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@
+Cflags: -I@includedir@
--- a/configure
+++ b/configure
@@ -6657,16 +6657,17 @@ fi
 
 MAKEFILES="
     Makefile
     config/Makefile
     config/autoconf.mk
     config/nsprincl.mk
     config/nsprincl.sh
     config/nspr-config
+    config/nspr.pc
     lib/Makefile
     lib/ds/Makefile
     lib/libc/Makefile
     lib/libc/include/Makefile
     lib/libc/src/Makefile
     lib/tests/Makefile
     pkg/Makefile
     pr/Makefile
--- a/configure.in
+++ b/configure.in
@@ -3294,16 +3294,17 @@ dnl Generate output files.
 dnl ========================================================
 MAKEFILES="
     Makefile
     config/Makefile
     config/autoconf.mk
     config/nsprincl.mk
     config/nsprincl.sh
     config/nspr-config
+    config/nspr.pc
     lib/Makefile
     lib/ds/Makefile
     lib/libc/Makefile
     lib/libc/include/Makefile
     lib/libc/src/Makefile
     lib/tests/Makefile
     pkg/Makefile
     pr/Makefile