Add an option to disable ndbm, from Stefan Metzmacher <metze@samba.org>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15362 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
93
cf/db.m4
93
cf/db.m4
@@ -8,6 +8,11 @@ AC_ARG_ENABLE(berkeley-db,
|
|||||||
[if you don't want berkeley db]),[
|
[if you don't want berkeley db]),[
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(ndbm-db,
|
||||||
|
AS_HELP_STRING([--disable-ndbm-db],
|
||||||
|
[if you don't want ndbm db]),[
|
||||||
|
])
|
||||||
|
|
||||||
have_ndbm=no
|
have_ndbm=no
|
||||||
db_type=unknown
|
db_type=unknown
|
||||||
|
|
||||||
@@ -95,65 +100,67 @@ dnl test for ndbm compatability
|
|||||||
|
|
||||||
fi # berkeley db
|
fi # berkeley db
|
||||||
|
|
||||||
if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then
|
if test "$enable_ndbm_db" != "no"; then
|
||||||
|
|
||||||
AC_CHECK_HEADERS([ \
|
if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then
|
||||||
dbm.h \
|
|
||||||
ndbm.h \
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [
|
|
||||||
#include <stdio.h>
|
|
||||||
#if defined(HAVE_NDBM_H)
|
|
||||||
#include <ndbm.h>
|
|
||||||
#elif defined(HAVE_DBM_H)
|
|
||||||
#include <dbm.h>
|
|
||||||
#endif
|
|
||||||
DBM *dbm;
|
|
||||||
],[NULL])
|
|
||||||
|
|
||||||
if test "$ac_cv_func_dbm_firstkey" = "yes"; then
|
|
||||||
if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
|
|
||||||
LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
|
|
||||||
else
|
|
||||||
LIB_NDBM=""
|
|
||||||
fi
|
|
||||||
AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
|
|
||||||
have_ndbm=yes
|
|
||||||
if test "$db_type" = "unknown"; then
|
|
||||||
db_type=ndbm
|
|
||||||
DBLIB="$LIB_NDBM"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
|
|
||||||
$as_unset ac_cv_func_dbm_firstkey
|
|
||||||
$as_unset ac_cv_funclib_dbm_firstkey
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([ \
|
AC_CHECK_HEADERS([ \
|
||||||
gdbm/ndbm.h \
|
dbm.h \
|
||||||
|
ndbm.h \
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [
|
AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <gdbm/ndbm.h>
|
#if defined(HAVE_NDBM_H)
|
||||||
|
#include <ndbm.h>
|
||||||
|
#elif defined(HAVE_DBM_H)
|
||||||
|
#include <dbm.h>
|
||||||
|
#endif
|
||||||
DBM *dbm;
|
DBM *dbm;
|
||||||
],[NULL])
|
],[NULL])
|
||||||
|
|
||||||
if test "$ac_cv_func_dbm_firstkey" = "yes"; then
|
if test "$ac_cv_func_dbm_firstkey" = "yes"; then
|
||||||
if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
|
if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
|
||||||
LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
|
LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
|
||||||
else
|
else
|
||||||
LIB_NDBM=""
|
LIB_NDBM=""
|
||||||
fi
|
fi
|
||||||
AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
|
AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
|
||||||
have_ndbm=yes
|
have_ndbm=yes
|
||||||
if test "$db_type" = "unknown"; then
|
if test "$db_type" = "unknown"; then
|
||||||
db_type=ndbm
|
db_type=ndbm
|
||||||
DBLIB="$LIB_NDBM"
|
DBLIB="$LIB_NDBM"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
|
$as_unset ac_cv_func_dbm_firstkey
|
||||||
|
$as_unset ac_cv_funclib_dbm_firstkey
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([ \
|
||||||
|
gdbm/ndbm.h \
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <gdbm/ndbm.h>
|
||||||
|
DBM *dbm;
|
||||||
|
],[NULL])
|
||||||
|
|
||||||
|
if test "$ac_cv_func_dbm_firstkey" = "yes"; then
|
||||||
|
if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
|
||||||
|
LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
|
||||||
|
else
|
||||||
|
LIB_NDBM=""
|
||||||
|
fi
|
||||||
|
AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
|
||||||
|
have_ndbm=yes
|
||||||
|
if test "$db_type" = "unknown"; then
|
||||||
|
db_type=ndbm
|
||||||
|
DBLIB="$LIB_NDBM"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi #enable_ndbm_db
|
||||||
|
|
||||||
fi # unknown
|
fi # unknown
|
||||||
|
|
||||||
if test "$have_ndbm" = "yes"; then
|
if test "$have_ndbm" = "yes"; then
|
||||||
|
Reference in New Issue
Block a user