Merged revisions 72898 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72898 | antoine.pitrou | 2009-05-24 22:23:57 +0200 (dim., 24 mai 2009) | 6 lines

  Issue #3585: Add pkg-config support.

  It creates a python-2.7.pc file and a python.pc symlink in the
  $(LIBDIR)/pkgconfig directory. Patch by Clinton Roy.
........
diff --git a/Makefile.pre.in b/Makefile.pre.in
index ef93703..25eb727 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -812,6 +812,8 @@
 	(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE))
 	-rm -f $(DESTDIR)$(BINDIR)/python3-config
 	(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
+	-rm -f $(DESTDIR)$(LIBPC)/python3.pc
+	(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
 
 # Install the manual page
 maninstall:
@@ -956,8 +958,12 @@
 # Install the library and miscellaneous stuff needed for extending/embedding
 # This goes into $(exec_prefix)
 LIBPL=		$(LIBP)/config
+
+# pkgconfig directory
+LIBPC=		$(LIBDIR)/pkgconfig
+
 libainstall:	all
-	@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
+	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
 	do \
 		if test ! -d $(DESTDIR)$$i; then \
 			echo "Creating directory $$i"; \
@@ -984,6 +990,7 @@
 	$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
 	$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
 	$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
+	$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
 	$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
 	$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
 	# Substitution happens here, as the completely-expanded BINDIR