summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac1
-rw-r--r--lib/backend/dbconfig.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index d9bfc673c..d2074fae4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -175,7 +175,7 @@ dist_bin_SCRIPTS = scripts/gendiff
bin_PROGRAMS += rpmqpack
rpmqpack_SOURCES = rpmqpack.c
-rpmqpack_LDADD = lib/librpm.la
+rpmqpack_LDADD = lib/librpm.la @WITH_DB_LIB@
rpmconfig_DATA = rpmrc
rpmrc: $(top_srcdir)/rpmrc.in
diff --git a/configure.ac b/configure.ac
index c5b797e5a..8e902f191 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,6 +359,7 @@ yes )
],[
AC_MSG_ERROR([missing required header db.h])
])
+ AC_DEFINE(WITH_EXTERNAL_DB, 1, [Use external db?])
;;
* ) # Fall back to internal db if available
if [ test -x db/dist/configure ]; then
diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c
index fe7c01e81..446be13f9 100644
--- a/lib/backend/dbconfig.c
+++ b/lib/backend/dbconfig.c
@@ -71,8 +71,10 @@ static const struct poptOption rdbOptions[] = {
NULL, NULL },
{ "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0,
NULL, NULL },
+#ifndef WITH_EXTERNAL_DB
{ "nofsync", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOFSYNC,
NULL, NULL },
+#endif
POPT_TABLEEND
};