Second attempt to make DB selection saner.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:
Nicolas Williams
2011-03-24 02:58:00 -05:00
committed by Love Hornquist Astrand
parent 6a836fc939
commit 9cbe3298d7
2 changed files with 23 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ AS_IF([test "x$with_berkeley_db" != xno],
dnl db_create is used by db3 and db4 and db5 dnl db_create is used by db3 and db4 and db5
AC_FIND_FUNC_NO_LIBS(db_create_HACK, [$dbheader] db5 db4 db3 db, [ AC_FIND_FUNC_NO_LIBS(db_create, [$dbheader] db5 db4 db3 db, [
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_DBHEADER #ifdef HAVE_DBHEADER
#include <$dbheader/db.h> #include <$dbheader/db.h>
@@ -69,7 +69,7 @@ dnl db_create is used by db3 and db4 and db5
DBLIB="" DBLIB=""
fi fi
AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4/5 library]) AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4/5 library])
else fi
dnl dbopen is used by db1/db2 dnl dbopen is used by db1/db2
@@ -93,7 +93,6 @@ dnl dbopen is used by db1/db2
fi fi
AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library]) AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library])
fi fi
fi
dnl test for ndbm compatability dnl test for ndbm compatability

View File

@@ -16,11 +16,15 @@ lib_LTLIBRARIES = libotp.la
libotp_la_LDFLAGS = -version-info 1:5:1 libotp_la_LDFLAGS = -version-info 1:5:1
libotp_la_LIBADD = $(LIB_hcrypto) $(LIB_roken) $(LIB_NDBM) libotp_la_LIBADD = $(LIB_hcrypto) $(LIB_roken) $(LIB_NDBM)
if HAVE_DB1
ndbm_wrap = ndbm_wrap.c ndbm_wrap.h
else
if HAVE_DB3 if HAVE_DB3
ndbm_wrap = ndbm_wrap.c ndbm_wrap.h ndbm_wrap = ndbm_wrap.c ndbm_wrap.h
else else
ndbm_wrap = ndbm_wrap =
endif endif
endif
dist_libotp_la_SOURCES = \ dist_libotp_la_SOURCES = \
otp.c \ otp.c \