[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
4.0.4: <db3/db.h> in rpmdb/db3.c, rpmdb/dbconfig.c
- From: Albert Chin <rpm-list thewrittenword com>
- To: rpm-list redhat com
- Subject: 4.0.4: <db3/db.h> in rpmdb/db3.c, rpmdb/dbconfig.c
- Date: Tue, 14 May 2002 07:30:12 -0500
Both rpmdb/db3.c and rpmdb/dbconfig.c have:
#include <db3/db.h>
I think the <db3> thin is relevant for RedHat. If installing the stock
Berkeley DB v4 or v3 libraries, it installs the headers to
$prefix/include. So, the above isn't appropriate for a "stock
installation". I see two solutions:
1. Use #include <db.h> and leave it up to the person doing the
build to:
CPPFLAGS="-I<path to db3 header>/db3" ./configure
2. Search for <db3/db.h> and <db.h> in the top-level configure
and set HAVE_DB3_DB_H or HAVE_DB_H. Then modify rpmdb/db3.c
and rpmdb/dbconfig.c appropriately.
A patch for solution #2 is below.
--
albert chin (china@thewrittenword.com)
-- snip snip
--- rpmdb/dbconfig.c.orig Sun May 12 14:48:43 2002
+++ rpmdb/dbconfig.c Tue May 14 07:24:50 2002
@@ -15,7 +15,11 @@
/*@=redef@*/
#endif
+#if HAVE_DB3_DB_H
#include <db3/db.h>
+#elif HAVE_DB_H
+#include <db.h>
+#endif
#include <rpmlib.h>
#include <rpmmacro.h>
--- rpmdb/db3.c.orig Sun May 12 14:48:40 2002
+++ rpmdb/db3.c Tue May 14 07:24:45 2002
@@ -23,7 +23,11 @@
/*@=redef@*/
#endif
+#if HAVE_DB3_DB_H
#include <db3/db.h>
+#elif HAVE_DB_H
+#include <db.h>
+#endif
#include <rpmlib.h>
#include <rpmmacro.h>
--- acconfig.h.orig Tue May 14 07:21:59 2002
+++ acconfig.h Tue May 14 07:22:08 2002
@@ -147,9 +147,6 @@
/* Use the Berkeley db1 retrofit to db2/db3 API? */
#undef USE_DB1
-/* Define if you have the <db3/db.h> header file. */
-#undef HAVE_DB3_DB_H
-
/* Build with dmalloc support? */
#undef DMALLOC
--- configure.in.orig Sun May 12 14:24:56 2002
+++ configure.in Tue May 14 07:28:44 2002
@@ -392,7 +392,7 @@
if test $withval = no ; then
dnl ------------------ without internal db
-AC_CHECK_HEADERS(db3/db.h)
+AC_CHECK_HEADERS(db3/db.h db.h)
dnl Check for Berkeley db3 API.
AC_CHECK_FUNC(db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"],
@@ -421,7 +421,8 @@
else
dnl ------------------ with internal db
- AC_DEFINE(HAVE_DB3_DB_H)
+ AC_DEFINE_UNQUOTED(HAVE_DB3_DB_H, 1,
+ [Define if you have the <db3/db.h> header file.])
WITH_DB_SUBDIR=db3
WITH_INTERNAL_DB=1
DBLIBSRCS="db3.c"
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]