Index: Makefile.pre.in =================================================================== --- Makefile.pre.in (revision 65796) +++ Makefile.pre.in (working copy) @@ -755,6 +755,8 @@ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) -rm -f $(DESTDIR)$(BINDIR)/python-config (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) + -rm -f $(DESTDIR)$(LIBPC)/python.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc) # Install the interpreter with $(VERSION) affixed # This goes into $(exec_prefix) @@ -928,8 +930,12 @@ # Install the library and miscellaneous stuff needed for extending/embedding # This goes into $(exec_prefix) LIBPL= $(LIBP)/config + +# pkgconfig diretory +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"; \ @@ -956,6 +962,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-$(VERSION).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 Index: configure.in =================================================================== --- configure.in (revision 65796) +++ configure.in (working copy) @@ -3693,7 +3693,7 @@ AC_MSG_RESULT(done) # generate output files -AC_CONFIG_FILES(Makefile.pre Modules/Setup.config) +AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python-${VERSION}.pc:Misc/python.pc.in) AC_OUTPUT echo "creating Modules/Setup" Index: Misc/python.pc.in =================================================================== --- Misc/python.pc.in (revision 0) +++ Misc/python.pc.in (revision 0) @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Python +Description: Python library +Requires: +Version: @VERSION@ +Libs: -L${libdir} -lpython@VERSION@ +Cflags: -I${includedir}/python@VERSION@ +