diff -Naur rpm-old/Makefile.in rpm-new/Makefile.in
--- rpm-old/Makefile.in	2002-02-14 18:58:07.000000000 -0500
+++ rpm-new/Makefile.in	2003-03-17 20:06:45.000000000 -0500
@@ -195,7 +195,7 @@
 	rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
 
 
-SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_DB_SUBDIR@ popt beecrypt rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
+SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_DB_SUBDIR@  beecrypt rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
 
 INCLUDES = \
 	-I$(top_srcdir)/build \
@@ -203,12 +203,11 @@
 	-I$(top_srcdir)/rpmdb \
 	-I$(top_srcdir)/rpmio \
 	-I$(top_srcdir)/beecrypt \
-	-I$(top_srcdir)/popt \
 	@WITH_ZLIB_INCLUDE@ \
 	@INCPATH@
 
 
-LIBS = -lrt -lpthread
+LIBS = -lpthread -lintl -lpopt
 
 myLDFLAGS = @LDFLAGS_STATIC@
 
@@ -220,9 +219,8 @@
 	$(top_builddir)/lib/librpm.la \
 	$(top_builddir)/rpmdb/librpmdb.la \
 	$(top_builddir)/rpmio/librpmio.la \
-	$(top_builddir)/popt/libpopt.la \
 	@WITH_ZLIB_LIB@ \
-	@INTLLIBS@ @LIBMISC@
+	 @LIBMISC@
 
 
 rpmbindir = `echo $(bindir) | sed -e s,usr/bin,bin,`
@@ -231,7 +229,7 @@
 bin_PROGRAMS = rpm2cpio
 bin_SCRIPTS = gendiff
 
-pkglibdir = @RPMCONFIGDIR@
+pkglibdir = ${prefix}/lib/rpm
 pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq
 pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros
 pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
@@ -276,7 +274,7 @@
 
 CVSTAG = r$(subst .,-,$(VERSION))
 
-pkgsrcdir = $(prefix)/src/$(RPMCANONVENDOR)
+pkgsrcdir = $(prefix)/share/rpm/$(RPMCANONVENDOR)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
@@ -293,32 +291,25 @@
 LDFLAGS = @LDFLAGS@
 rpm2cpio_OBJECTS =  rpm2cpio.$(OBJEXT)
 rpm2cpio_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 rpmb_OBJECTS =  build.$(OBJEXT)
 rpmb_DEPENDENCIES =  rpmb.o $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 rpmd_OBJECTS = 
 rpmd_DEPENDENCIES =  rpmd.o $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 rpmi_OBJECTS = 
 rpmi_DEPENDENCIES =  rpmi.o $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 rpmk_OBJECTS = 
 rpmk_DEPENDENCIES =  rpmk.o $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 rpmq_OBJECTS = 
 rpmq_DEPENDENCIES =  rpmq.o $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 rpm_OBJECTS = 
 rpm_DEPENDENCIES =  rpm.o $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la
 SCRIPTS =  $(bin_SCRIPTS) $(pkglib_SCRIPTS)
 
 CFLAGS = @CFLAGS@
@@ -946,7 +937,6 @@
 	solaris*|linux*) \
 	   chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ;; \
 	esac
-	@$(mkinstalldirs) $(DESTDIR)/var/tmp
 
 .PHONY:	setperms
 setperms:
diff -Naur rpm-old/beecrypt/configure rpm-new/beecrypt/configure
--- rpm-old/beecrypt/configure	2002-02-13 18:03:22.000000000 -0500
+++ rpm-new/beecrypt/configure	2003-03-17 06:48:38.000000000 -0500
@@ -3714,7 +3714,7 @@
     # FIXME: Relying on posixy $() will cause problems for
     #        cross-compilation, but unfortunately the echo tests do not
     #        yet detect zsh echo's removal of \ escapes.
-    archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
+    archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $tmp_verstring'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
diff -Naur rpm-old/beecrypt/ltmain.sh rpm-new/beecrypt/ltmain.sh
--- rpm-old/beecrypt/ltmain.sh	2002-02-13 18:03:20.000000000 -0500
+++ rpm-new/beecrypt/ltmain.sh	2003-03-17 06:49:46.000000000 -0500
@@ -2858,6 +2858,11 @@
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 	  eval cmds=\"$archive_expsym_cmds\"
 	else
+      if test "x$verstring" = "x0.0"; then
+        tmp_verstring=
+      else
+        tmp_verstring="$verstring"
+      fi
 	  eval cmds=\"$archive_cmds\"
 	fi
 	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
diff -Naur rpm-old/build/Makefile.in rpm-new/build/Makefile.in
--- rpm-old/build/Makefile.in	2002-02-14 18:58:40.000000000 -0500
+++ rpm-new/build/Makefile.in	2003-03-17 06:55:25.000000000 -0500
@@ -211,7 +211,7 @@
 	parseFiles.c parsePreamble.c parsePrep.c parseReqs.c parseScript.c \
 	parseSpec.c poptBT.c reqprov.c spec.c
 
-librpmbuild_la_LDFLAGS = -release @VERSION@
+librpmbuild_la_LDFLAGS = -version-info 4:0:4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES = 
diff -Naur rpm-old/configure rpm-new/configure
--- rpm-old/configure	2002-02-13 18:03:27.000000000 -0500
+++ rpm-new/configure	2003-03-17 07:12:13.000000000 -0500
@@ -4379,7 +4379,7 @@
     # FIXME: Relying on posixy $() will cause problems for
     #        cross-compilation, but unfortunately the echo tests do not
     #        yet detect zsh echo's removal of \ escapes.
-    archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
+    archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $tmp_verstring'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
@@ -13349,7 +13349,7 @@
 
 
 
-subdirs="popt beecrypt zlib $WITH_DB_SUBDIR"
+subdirs=" beecrypt zlib $WITH_DB_SUBDIR"
 
 
 trap '' 1 2 15
@@ -13925,7 +13925,7 @@
     esac
   done
 
-  for ac_config_dir in popt beecrypt zlib $WITH_DB_SUBDIR; do
+  for ac_config_dir in beecrypt zlib $WITH_DB_SUBDIR; do
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
diff -Naur rpm-old/lib/Makefile.in rpm-new/lib/Makefile.in
--- rpm-old/lib/Makefile.in	2002-02-14 18:58:39.000000000 -0500
+++ rpm-new/lib/Makefile.in	2003-03-17 06:55:21.000000000 -0500
@@ -231,7 +231,7 @@
 	signature.c stringbuf.c tagName.c tagtable.c transaction.c \
 	verify.c
 
-librpm_la_LDFLAGS = -release @VERSION@
+librpm_la_LDFLAGS = -version-info 4:0:4
 
 BUILT_SOURCES = tagtable.c getdate.c
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff -Naur rpm-old/lib/rpmrc.c rpm-new/lib/rpmrc.c
--- rpm-old/lib/rpmrc.c	2002-01-26 10:45:45.000000000 -0500
+++ rpm-new/lib/rpmrc.c	2003-03-17 04:20:49.000000000 -0500
@@ -960,6 +960,13 @@
 	    strcpy(un.machine, __power_pc() ? "ppc" : "rs6000");
 	    sprintf(un.sysname,"aix%s.%s", un.version, un.release);
 	}
+	else if(!strcmp(un.sysname, "Darwin")) {
+#ifdef __ppc__
+	  strcpy(un.machine, "ppc");
+#else ifdef __i386__
+	  strcpy(un.machine, "i386");
+#endif
+	}
 	else if (!strcmp(un.sysname, "SunOS")) {
 	    if (!strncmp(un.release,"4", 1)) /* SunOS 4.x */ {
 		int fd;
diff -Naur rpm-old/lib/signature.c rpm-new/lib/signature.c
--- rpm-old/lib/signature.c	2002-02-02 15:55:49.000000000 -0500
+++ rpm-new/lib/signature.c	2003-03-17 04:18:38.000000000 -0500
@@ -23,6 +23,8 @@
 #include "signature.h"
 #include "debug.h"
 
+extern char **environ;
+
 /*@access Header@*/		/* XXX compared with NULL */
 /*@access FD_t@*/		/* XXX compared with NULL */
 
diff -Naur rpm-old/ltmain.sh rpm-new/ltmain.sh
--- rpm-old/ltmain.sh	2002-02-13 18:03:22.000000000 -0500
+++ rpm-new/ltmain.sh	2003-03-17 07:12:40.000000000 -0500
@@ -2858,6 +2858,11 @@
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 	  eval cmds=\"$archive_expsym_cmds\"
 	else
+      if test "x$verstring" = "x0.0"; then
+        tmp_verstring=
+      else
+        tmp_verstring="$verstring"
+      fi
 	  eval cmds=\"$archive_cmds\"
 	fi
 	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
diff -Naur rpm-old/macros.in rpm-new/macros.in
--- rpm-old/macros.in	2002-02-13 18:22:51.000000000 -0500
+++ rpm-new/macros.in	2003-03-17 06:34:25.000000000 -0500
@@ -163,7 +163,7 @@
 %_tmppath		%{_var}/tmp
 
 #	Path to top of build area.
-%_topdir		%{_usrsrc}/redhat
+%_topdir		%{_usr}/share/rpm/%{_vendor}
 
 #	The path to the unzip executable (legacy, use %{__unzip} instead).
 %_unzipbin		%{__unzip}
diff -Naur rpm-old/python/rpmmodule.c rpm-new/python/rpmmodule.c
--- rpm-old/python/rpmmodule.c	2002-02-03 18:59:57.000000000 -0500
+++ rpm-new/python/rpmmodule.c	2003-03-17 04:50:54.000000000 -0500
@@ -2,7 +2,7 @@
  * \file python/rpmmodule.c
  */
 
-#include <alloca.h>
+#include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <time.h>
diff -Naur rpm-old/rpm.spec.in rpm-new/rpm.spec.in
--- rpm-old/rpm.spec.in	2002-02-13 18:19:22.000000000 -0500
+++ rpm-new/rpm.spec.in	2003-03-17 06:36:34.000000000 -0500
@@ -415,13 +415,13 @@
 
 %files build
 %defattr(-,root,root)
-%dir %{__prefix}/src/@RPMCANONVENDOR@
-%dir %{__prefix}/src/@RPMCANONVENDOR@/BUILD
-%dir %{__prefix}/src/@RPMCANONVENDOR@/SPECS
-%dir %{__prefix}/src/@RPMCANONVENDOR@/SOURCES
-%dir %{__prefix}/src/@RPMCANONVENDOR@/SRPMS
-%dir %{__prefix}/src/@RPMCANONVENDOR@/RPMS
-%{__prefix}/src/@RPMCANONVENDOR@/RPMS/*
+%dir %{__prefix}/share/rpm/@RPMCANONVENDOR@
+%dir %{__prefix}/share/rpm/@RPMCANONVENDOR@/BUILD
+%dir %{__prefix}/share/rpm/@RPMCANONVENDOR@/SPECS
+%dir %{__prefix}/share/rpm/@RPMCANONVENDOR@/SOURCES
+%dir %{__prefix}/share/rpm/@RPMCANONVENDOR@/SRPMS
+%dir %{__prefix}/share/rpm/@RPMCANONVENDOR@/RPMS
+%{__prefix}/share/rpm/@RPMCANONVENDOR@/RPMS/*
 %rpmattr	%{__prefix}/bin/rpmbuild
 %rpmattr	%{__prefix}/lib/rpm/brp-*
 %rpmattr	%{__prefix}/lib/rpm/check-prereqs
diff -Naur rpm-old/rpm2cpio.c rpm-new/rpm2cpio.c
--- rpm-old/rpm2cpio.c	2001-06-17 16:43:29.000000000 -0400
+++ rpm-new/rpm2cpio.c	2003-03-17 04:19:38.000000000 -0500
@@ -5,6 +5,8 @@
 #include "rpmlib.h"
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char **argv)
 {
     FD_t fdi, fdo;
diff -Naur rpm-old/rpmdb/Makefile.in rpm-new/rpmdb/Makefile.in
--- rpm-old/rpmdb/Makefile.in	2002-02-14 18:58:38.000000000 -0500
+++ rpm-new/rpmdb/Makefile.in	2003-03-17 06:54:56.000000000 -0500
@@ -219,7 +219,7 @@
 librpmdb_la_SOURCES = $(DBLIBSRCS) \
 	dbconfig.c fprint.c poptDB.c rpmhash.c rpmdb.c
 
-librpmdb_la_LDFLAGS = -release @VERSION@ @libdb3@
+librpmdb_la_LDFLAGS = -version-info 4:0:4 @libdb3@
 librpmdb_la_LIBADD = $(DBLIBOBJS) $(DB3LOBJS)
 librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) .created
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff -Naur rpm-old/rpmdb/db3.c rpm-new/rpmdb/db3.c
--- rpm-old/rpmdb/db3.c	2002-01-20 12:09:56.000000000 -0500
+++ rpm-new/rpmdb/db3.c	2003-03-17 22:33:28.000000000 -0500
@@ -23,7 +23,7 @@
 /*@=redef@*/
 #endif
 
-#include <db3/db.h>
+#include <db4/db.h>
 
 #include <rpmlib.h>
 #include <rpmmacro.h>
diff -Naur rpm-old/rpmdb/dbconfig.c rpm-new/rpmdb/dbconfig.c
--- rpm-old/rpmdb/dbconfig.c	2002-01-20 11:48:23.000000000 -0500
+++ rpm-new/rpmdb/dbconfig.c	2003-03-17 22:33:00.000000000 -0500
@@ -15,7 +15,7 @@
 /*@=redef@*/
 #endif
 
-#include <db3/db.h>
+#include <db4/db.h>
 
 #include <rpmlib.h>
 #include <rpmmacro.h>
diff -Naur rpm-old/rpmio/Makefile.in rpm-new/rpmio/Makefile.in
--- rpm-old/rpmio/Makefile.in	2002-02-14 18:58:37.000000000 -0500
+++ rpm-new/rpmio/Makefile.in	2003-03-17 06:55:10.000000000 -0500
@@ -209,7 +209,7 @@
 
 noinst_HEADERS = rpmio_internal.h rpmpgp.h
 
-LIBS = @LIBS@ @WITH_ZLIB_LIB@ -lrt -lpthread
+LIBS = @LIBS@ @WITH_ZLIB_LIB@ -lpthread
 
 BEECRYPTLOBJS = $(shell cat $(top_builddir)/beecrypt/listobjs)
 
@@ -217,7 +217,7 @@
 librpmio_la_SOURCES = digest.c macro.c rpmio.c rpmlog.c rpmmalloc.c \
 	rpmpgp.c rpmrpc.c strcasecmp.c stubs.c url.c ugid.c
 
-librpmio_la_LDFLAGS = -release @VERSION@
+librpmio_la_LDFLAGS = -version-info 4:0:4
 librpmio_la_LIBADD = $(BEECRYPTLOBJS)
 librpmio_la_DEPENDENCIES = .created
 
diff -Naur rpm-old/rpmio/rpmio.c rpm-new/rpmio/rpmio.c
--- rpm-old/rpmio/rpmio.c	2002-02-13 17:55:23.000000000 -0500
+++ rpm-new/rpmio/rpmio.c	2003-03-17 04:20:18.000000000 -0500
@@ -521,7 +521,7 @@
 FDIO_t fdio = /*@-compmempass@*/ &fdio_s /*@=compmempass@*/ ;
 
 /*@-redef@*/	/* see lib/falloc.c */
-FDIO_t fadio;	/* XXX usually NULL, filled in when linked with rpm */
+extern FDIO_t fadio;	/* XXX usually NULL, filled in when linked with rpm */
 /*@=redef@*/
 
 int fdWritable(FD_t fd, int secs)
diff -Naur rpm-old/rpmio/rpmio.h rpm-new/rpmio/rpmio.h
--- rpm-old/rpmio/rpmio.h	2002-01-21 08:45:02.000000000 -0500
+++ rpm-new/rpmio/rpmio.h	2003-03-17 04:20:24.000000000 -0500
@@ -10,7 +10,7 @@
 #include <sys/stat.h>
 #include <dirent.h>
 /*@-noparams@*/
-#include <glob.h>
+#include "glob.h"
 /*@=noparams@*/
 #include <stdio.h>
 #include <stdlib.h>
diff -Naur rpm-old/rpmqv.c rpm-new/rpmqv.c
--- rpm-old/rpmqv.c	2002-02-03 17:32:48.000000000 -0500
+++ rpm-new/rpmqv.c	2003-03-17 04:20:43.000000000 -0500
@@ -281,6 +281,8 @@
 
 }
 
+const char *program_name;
+
 int main(int argc, const char ** argv)
 {
     enum modes bigMode = MODE_UNKNOWN;
diff -Naur rpm-old/system.h rpm-new/system.h
--- rpm-old/system.h	2002-01-20 16:41:42.000000000 -0500
+++ rpm-new/system.h	2003-03-17 04:21:09.000000000 -0500
@@ -333,7 +333,7 @@
     else __progname = pn;		\
   }
 #endif
-const char *__progname;
+extern const char *__progname;
 
 #if HAVE_NETDB_H
 #include <netdb.h>
diff -Naur rpm-old/tools/Makefile.in rpm-new/tools/Makefile.in
--- rpm-old/tools/Makefile.in	2002-02-14 18:58:42.000000000 -0500
+++ rpm-new/tools/Makefile.in	2003-03-17 23:11:14.000000000 -0500
@@ -194,7 +194,6 @@
 	-I$(top_srcdir)/lib \
 	-I$(top_srcdir)/rpmdb \
 	-I$(top_srcdir)/rpmio \
-	-I$(top_srcdir)/popt \
 	@WITH_ZLIB_INCLUDE@ \
 	@INCPATH@ \
 	-I$(top_srcdir)/misc
@@ -212,12 +211,10 @@
 	$(top_builddir)/lib/librpm.la \
 	$(top_builddir)/rpmdb/librpmdb.la \
 	$(top_builddir)/rpmio/librpmio.la \
-	$(top_builddir)/popt/libpopt.la \
-	@WITH_ZLIB_LIB@ \
-	@INTLLIBS@
+	@WITH_ZLIB_LIB@
 
 
-LIBS = 
+LIBS = -lpopt
 #LDFLAGS = $(myLDFLAGS)
 LDADD = $(myLDADD)
 
@@ -225,7 +222,7 @@
 	dump dumpdb rpmarchive rpmheader rpmlead rpmsignature
 
 
-pkgbindir = @RPMCONFIGDIR@
+pkgbindir = ${prefix}/lib/rpm
 pkgbin_PROGRAMS = javadeps
 
 rpmsort_SOURCES = rpmsort.c
@@ -248,61 +245,52 @@
 rpminject_OBJECTS =  rpminject.$(OBJEXT)
 rpminject_LDADD = $(LDADD)
 rpminject_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 rpminject_LDFLAGS = 
 rpmsort_OBJECTS =  rpmsort.$(OBJEXT)
 rpmsort_LDADD = $(LDADD)
 rpmsort_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 dump_SOURCES = dump.c
 dump_OBJECTS =  dump.$(OBJEXT)
 dump_LDADD = $(LDADD)
 dump_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 dump_LDFLAGS = 
 dumpdb_SOURCES = dumpdb.c
 dumpdb_OBJECTS =  dumpdb.$(OBJEXT)
 dumpdb_LDADD = $(LDADD)
 dumpdb_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 dumpdb_LDFLAGS = 
 rpmarchive_SOURCES = rpmarchive.c
 rpmarchive_OBJECTS =  rpmarchive.$(OBJEXT)
 rpmarchive_LDADD = $(LDADD)
 rpmarchive_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 rpmarchive_LDFLAGS = 
 rpmheader_SOURCES = rpmheader.c
 rpmheader_OBJECTS =  rpmheader.$(OBJEXT)
 rpmheader_LDADD = $(LDADD)
 rpmheader_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 rpmheader_LDFLAGS = 
 rpmlead_SOURCES = rpmlead.c
 rpmlead_OBJECTS =  rpmlead.$(OBJEXT)
 rpmlead_LDADD = $(LDADD)
 rpmlead_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 rpmlead_LDFLAGS = 
 rpmsignature_SOURCES = rpmsignature.c
 rpmsignature_OBJECTS =  rpmsignature.$(OBJEXT)
 rpmsignature_LDADD = $(LDADD)
 rpmsignature_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 rpmsignature_LDFLAGS = 
 javadeps_OBJECTS =  javadeps.$(OBJEXT)
 javadeps_LDADD = $(LDADD)
 javadeps_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la \
-$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la $(top_builddir)/rpmdb/librpmdb.la 
 javadeps_LDFLAGS = 
 CFLAGS = @CFLAGS@
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
diff -Naur rpm-old/tools/dump.c rpm-new/tools/dump.c
--- rpm-old/tools/dump.c	2001-06-17 16:38:10.000000000 -0400
+++ rpm-new/tools/dump.c	2003-03-17 04:17:33.000000000 -0500
@@ -4,6 +4,8 @@
 #include "header_internal.h"
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char ** argv)
 {
     Header h;
diff -Naur rpm-old/tools/dumpdb.c rpm-new/tools/dumpdb.c
--- rpm-old/tools/dumpdb.c	2001-06-17 16:47:35.000000000 -0400
+++ rpm-new/tools/dumpdb.c	2003-03-17 04:17:40.000000000 -0500
@@ -4,6 +4,8 @@
 #include "header_internal.h"
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char ** argv)
 {
     unsigned int dspBlockNum = 0;		/* default to all */
diff -Naur rpm-old/tools/rpmarchive.c rpm-new/tools/rpmarchive.c
--- rpm-old/tools/rpmarchive.c	2001-06-17 16:39:50.000000000 -0400
+++ rpm-new/tools/rpmarchive.c	2003-03-17 04:19:47.000000000 -0500
@@ -8,6 +8,8 @@
 
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char **argv)
 {
     FD_t fdi, fdo;
diff -Naur rpm-old/tools/rpmheader.c rpm-new/tools/rpmheader.c
--- rpm-old/tools/rpmheader.c	2001-06-17 16:40:16.000000000 -0400
+++ rpm-new/tools/rpmheader.c	2003-03-17 04:19:54.000000000 -0500
@@ -7,6 +7,8 @@
 #include "signature.h"
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char **argv)
 {
     FD_t fdi, fdo;
diff -Naur rpm-old/tools/rpmlead.c rpm-new/tools/rpmlead.c
--- rpm-old/tools/rpmlead.c	2001-06-17 16:40:32.000000000 -0400
+++ rpm-new/tools/rpmlead.c	2003-03-17 04:20:34.000000000 -0500
@@ -6,6 +6,8 @@
 #include "rpmlead.h"
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char **argv)
 {
     FD_t fdi, fdo;
diff -Naur rpm-old/tools/rpmsignature.c rpm-new/tools/rpmsignature.c
--- rpm-old/tools/rpmsignature.c	2001-06-17 16:40:44.000000000 -0400
+++ rpm-new/tools/rpmsignature.c	2003-03-17 04:20:55.000000000 -0500
@@ -6,6 +6,8 @@
 #include "signature.h"
 #include "debug.h"
 
+const char *program_name;
+
 int main(int argc, char **argv)
 {
     FD_t fdi, fdo;
