--- rpm-4.3.3/python/Makefile.am.static	2005-08-25 17:14:21.000000000 +0400
+++ rpm-4.3.3/python/Makefile.am	2005-09-01 21:11:09.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
 
@@ -26,10 +26,10 @@
 	rpmfi-py.h rpmmi-py.h rpmrc-py.h rpmte-py.h rpmts-py.h
 
 mylibs= \
-	$(top_builddir)/lib/.libs/librpm.so \
-	$(top_builddir)/rpmdb/.libs/librpmdb.so \
-	$(top_builddir)/rpmio/.libs/librpmio.so \
-	$(top_builddir)/popt/.libs/libpopt.so \
+	$(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 =
@@ -43,11 +43,11 @@
 noinst_PROGRAMS = poptmodule.so
 
 rpmmodule_so_SOURCES =
-rpmmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,rpmmodule.so
+rpmmodule_so_LDFLAGS = -static-libgcc -Wl,-Bstatic -L/usr/lib/nptl $(mylibs) $(LIBS) -lbeecrypt -lelf -lselinux -ldl -shared -Wl,-soname,rpmmodule.so
 rpmmodule_so_LDADD =	@WITH_BEECRYPT_LIB@
 
 _rpmdb_so_SOURCES = _rpmdb.c
-_rpmdb_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,_rpmdb.so
+_rpmdb_so_LDFLAGS = -static-libgcc -Wl,-Bstatic -L/usr/lib/nptl $(mylibs) $(LIBS) -lbeecrypt -lelf -lselinux -ldl -shared -Wl,-soname,_rpmdb.so
 
 poptmodule_so_SOURCES = poptmodule.c
 poptmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,poptmodule.so
@@ -72,7 +72,7 @@
 # 	rpmrc-py.c rpmte-py.c rpmts-py.c
 # rpmmodule.c header-py.c
 splint_srcs = \
- 	rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
+	rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
 	rpmfi-py.c rpmmi-py.c rpmrc-py.c rpmte-py.c rpmts-py.c
 
 .PHONY:	lint
--- rpm-4.3.3/python/Makefile.in.static	2005-08-25 17:14:21.000000000 +0400
+++ rpm-4.3.3/python/Makefile.in	2005-09-01 21:17:19.000000000 +0400
@@ -327,7 +327,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
 EXTRA_DIST = system.h rpmdebug-py.c
 INCLUDES = -I. \
@@ -345,20 +345,20 @@
 	rpmfi-py.h rpmmi-py.h rpmrc-py.h rpmte-py.h rpmts-py.h
 
 mylibs = \
-	$(top_builddir)/lib/.libs/librpm.so \
-	$(top_builddir)/rpmdb/.libs/librpmdb.so \
-	$(top_builddir)/rpmio/.libs/librpmio.so \
-	$(top_builddir)/popt/.libs/libpopt.so \
+	$(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
 rpmdbdir = $(pylibdir)/site-packages/rpmdb
 rpmmodule_so_SOURCES = 
-rpmmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,rpmmodule.so
+rpmmodule_so_LDFLAGS = -static-libgcc -Wl,-Bstatic -L/usr/lib/nptl $(mylibs) $(LIBS) -lbeecrypt -lelf -lselinux -ldl -shared -Wl,-soname,rpmmodule.so
 rpmmodule_so_LDADD = @WITH_BEECRYPT_LIB@
 _rpmdb_so_SOURCES = _rpmdb.c
-_rpmdb_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,_rpmdb.so
+_rpmdb_so_LDFLAGS = -static-libgcc -Wl,-Bstatic -L/usr/lib/nptl $(mylibs) $(LIBS) -lbeecrypt -lelf -lselinux -ldl -shared -Wl,-soname,_rpmdb.so
 poptmodule_so_SOURCES = poptmodule.c
 poptmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,poptmodule.so
 noinst_LTLIBRARIES = librpmmodule.la
@@ -373,7 +373,7 @@
 # 	rpmrc-py.c rpmte-py.c rpmts-py.c
 # rpmmodule.c header-py.c
 splint_srcs = \
- 	rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
+	rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
 	rpmfi-py.c rpmmi-py.c rpmrc-py.c rpmte-py.c rpmts-py.c
 
 all: all-recursive
