--- rpm-4.4.1/python/Makefile.am.static	2005-08-26 19:58:09.000000000 +0400
+++ rpm-4.4.1/python/Makefile.am	2005-09-06 20:47:40.000000000 +0400
@@ -5,7 +5,7 @@
 LINT = splint
 
 pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
+pyincdir = /usr/include/python@WITH_PYTHON_VERSION@
 
 SUBDIRS = rpmdb rpm
 
@@ -29,33 +29,35 @@
 	spec-py.h
 
 mylibs= \
-	$(top_builddir)/lib/librpm.la \
-	$(top_builddir)/rpmdb/librpmdb.la \
-	$(top_builddir)/rpmio/librpmio.la \
-	$(top_builddir)/popt/libpopt.la \
-	$(top_builddir)/build/librpmbuild.la \
+	$(top_builddir)/build/.libs/librpmbuild.a \
+	$(top_builddir)/lib/.libs/librpm.a \
+	$(top_builddir)/rpmdb/.libs/librpmdb.a \
+	$(top_builddir)/rpmio/.libs/librpmio.a \
+	$(top_builddir)/popt/.libs/libpopt.a \
 	@WITH_SELINUX_LIB@ \
 	@WITH_LIBELF_LIB@
 
 LDADD =
 
 pythondir = $(pylibdir)/site-packages
-python_LTLIBRARIES = poptmodule.la
+python_LTLIBRARIES = poptmodule.so
 
 rpmdir = $(pylibdir)/site-packages/rpm
-rpm_LTLIBRARIES = _rpmmodule.la
+rpm_LTLIBRARIES = _rpmmodule.so
 
 rpmdbdir = $(pylibdir)/site-packages/rpmdb
-rpmdb_LTLIBRARIES = _rpmdb.la
+rpmdb_LTLIBRARIES = _rpmdb.so
 
-_rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
-_rpmmodule_la_LIBADD =  @WITH_BEECRYPT_LIB@
+_rpmmodule_la_LDFLAGS = -shared $(mylibs) -all-static -Wl,-Bstatic $(LIBS)
+_rpmmodule_la_LIBADD =  @WITH_BEECRYPT_LIB@  -lsqlite3 -lneon -lbz2 -lselinux -ldl
 
 _rpmdb_la_SOURCES = _rpmdb.c
-_rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
+_rpmdb_la_LDFLAGS = -shared $(mylibs) -all-static -Wl,-Bstatic $(LIBS)
+_rpmdb_la_LIBADD =  -lsqlite3 -lneon -lbz2 -lselinux -ldl
 
 poptmodule_la_SOURCES = poptmodule.c
-poptmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
+poptmodule_la_LDFLAGS = -shared $(mylibs) -all-static -Wl,-Bstatic $(LIBS)
+poptmodule_la_LIBADD =  -lsqlite3 -lneon -lbz2 -lselinux -ldl
 
 _rpmmodule_la_SOURCES = rpmmodule.c header-py.c \
 		       rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
--- rpm-4.4.1/python/Makefile.in.static	2005-08-26 19:58:09.000000000 +0400
+++ rpm-4.4.1/python/Makefile.in	2005-09-06 21:05:11.000000000 +0400
@@ -65,7 +65,7 @@
 rpmdbLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(python_LTLIBRARIES) $(rpm_LTLIBRARIES) \
 	$(rpmdb_LTLIBRARIES)
-_rpmdb_la_LIBADD =
+_rpmdb_la_LIBADD = -lsqlite3 -lneon -lbz2 -lselinux -ldl
 am__rpmdb_la_OBJECTS = _rpmdb.lo
 _rpmdb_la_OBJECTS = $(am__rpmdb_la_OBJECTS)
 _rpmmodule_la_DEPENDENCIES =
@@ -73,8 +73,11 @@
 	rpmds-py.lo rpmdb-py.lo rpmfd-py.lo rpmfts-py.lo rpmfi-py.lo \
 	rpmmi-py.lo rpmps-py.lo rpmrc-py.lo rpmte-py.lo rpmts-py.lo \
 	spec-py.lo
-_rpmmodule_la_OBJECTS = $(am__rpmmodule_la_OBJECTS)
-poptmodule_la_LIBADD =
+_rpmmodule_la_OBJECTS = rpmmodule.o header-py.o rpmal-py.o \
+	rpmds-py.o rpmdb-py.o rpmfd-py.o rpmfts-py.o rpmfi-py.o \
+	rpmmi-py.o rpmps-py.o rpmrc-py.o rpmte-py.o rpmts-py.o \
+	spec-py.o
+poptmodule_la_LIBADD = -lsqlite3 -lneon -lbz2 -lselinux -ldl
 am_poptmodule_la_OBJECTS = poptmodule.lo
 poptmodule_la_OBJECTS = $(am_poptmodule_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -338,7 +341,7 @@
 AUTOMAKE_OPTIONS = 1.4 foreign
 LINT = splint
 pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
+pyincdir = /usr/include/python@WITH_PYTHON_VERSION@
 SUBDIRS = rpmdb rpm
 EXTRA_DIST = system.h rpmdebug-py.c
 INCLUDES = -I. \
@@ -359,26 +362,26 @@
 	spec-py.h
 
 mylibs = \
-	$(top_builddir)/lib/librpm.la \
-	$(top_builddir)/rpmdb/librpmdb.la \
-	$(top_builddir)/rpmio/librpmio.la \
-	$(top_builddir)/popt/libpopt.la \
-	$(top_builddir)/build/librpmbuild.la \
+	$(top_builddir)/build/.libs/librpmbuild.a \
+	$(top_builddir)/lib/.libs/librpm.a \
+	$(top_builddir)/rpmdb/.libs/librpmdb.a \
+	$(top_builddir)/rpmio/.libs/librpmio.a \
+	$(top_builddir)/popt/.libs/libpopt.a \
 	@WITH_LIBELF_LIB@
 
 LDADD = 
 pythondir = $(pylibdir)/site-packages
-python_LTLIBRARIES = poptmodule.la
+python_LTLIBRARIES = poptmodule.so
 rpmdir = $(pylibdir)/site-packages/rpm
-rpm_LTLIBRARIES = _rpmmodule.la
+rpm_LTLIBRARIES = _rpmmodule.so
 rpmdbdir = $(pylibdir)/site-packages/rpmdb
-rpmdb_LTLIBRARIES = _rpmdb.la
-_rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
-_rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@
+rpmdb_LTLIBRARIES = _rpmdb.so
+_rpmmodule_la_LDFLAGS = -shared $(mylibs)  -all-static -Wl,-Bstatic  $(LIBS)
+_rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@ -lsqlite3 -lneon -lbz2 -lselinux -ldl
 _rpmdb_la_SOURCES = _rpmdb.c
-_rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
+_rpmdb_la_LDFLAGS = -shared $(mylibs)  -all-static -Wl,-Bstatic  $(LIBS)
 poptmodule_la_SOURCES = poptmodule.c
-poptmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
+poptmodule_la_LDFLAGS = -shared $(mylibs)  -all-static -Wl,-Bstatic  $(LIBS)
 _rpmmodule_la_SOURCES = rpmmodule.c header-py.c \
 		       rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
 		       rpmfi-py.c rpmmi-py.c rpmps-py.c rpmrc-py.c rpmte-py.c \
@@ -508,11 +511,11 @@
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
-_rpmdb.la: $(_rpmdb_la_OBJECTS) $(_rpmdb_la_DEPENDENCIES) 
+_rpmdb.so: $(_rpmdb_la_OBJECTS) $(_rpmdb_la_DEPENDENCIES) 
 	$(LINK) -rpath $(rpmdbdir) $(_rpmdb_la_LDFLAGS) $(_rpmdb_la_OBJECTS) $(_rpmdb_la_LIBADD) $(LIBS)
-_rpmmodule.la: $(_rpmmodule_la_OBJECTS) $(_rpmmodule_la_DEPENDENCIES) 
+_rpmmodule.so: $(_rpmmodule_la_OBJECTS) $(_rpmmodule_la_DEPENDENCIES) 
 	$(LINK) -rpath $(rpmdir) $(_rpmmodule_la_LDFLAGS) $(_rpmmodule_la_OBJECTS) $(_rpmmodule_la_LIBADD) $(LIBS)
-poptmodule.la: $(poptmodule_la_OBJECTS) $(poptmodule_la_DEPENDENCIES) 
+poptmodule.so: $(poptmodule_la_OBJECTS) $(poptmodule_la_DEPENDENCIES) 
 	$(LINK) -rpath $(pythondir) $(poptmodule_la_LDFLAGS) $(poptmodule_la_OBJECTS) $(poptmodule_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
