## Please see the COPYING and CONTRIBUTORS files for details.
##
-dnl checks whether dbopen needs -ldb to be added to libs
-dnl sets ac_cv_dbopen_libdb to either "yes" or "no"
-
-AC_DEFUN([SQUID_CHECK_DBOPEN_NEEDS_LIBDB],[
- AC_CACHE_CHECK(if dbopen needs -ldb,ac_cv_dbopen_libdb, [
- SQUID_STATE_SAVE(dbopen_libdb)
- LIBS="$LIBS -ldb"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_DB_185_H
-#include <db_185.h>
-#elif HAVE_DB_H
-#include <db.h>
-#endif]],
-[[dbopen("", 0, 0, DB_HASH, (void *)0L)]])],
- [ac_cv_dbopen_libdb="yes"],
- [ac_cv_dbopen_libdb="no"])
- SQUID_STATE_ROLLBACK(dbopen_libdb)
- ])
-])
-
-
dnl check whether regex works by actually compiling one
dnl sets squid_cv_regex_works to either yes or no
glib.h \
stdint.h \
inttypes.h \
- db.h \
- db_185.h \
wchar.h
)
;;
esac
-dnl Check for libdb
-dnl this is not fully functional if db.h is for a differend db version
-DBLIB=
-
-dnl check that dbopen is actually defined in the header
-dnl FIXME: in case of failure undef db-related includes etc.
-AC_CHECK_DECL(dbopen,,,[
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_DB_185_H
-#include <db_185.h>
-#elif HAVE_DB_H
-#include <db.h>
-#endif])
-
-dnl 1.85
-SQUID_CHECK_DBOPEN_NEEDS_LIBDB
-if test "x$ac_cv_dbopen_libdb" = "xyes"; then
- LIB_DB="-ldb"
-fi
-AC_SUBST(LIB_DB)
-
dnl System-specific library modifications
dnl
case "$host" in
ext_session_acl.cc
ext_session_acl_LDADD = \
$(COMPAT_LIB) \
- $(LIB_DB)
+ -ldb
EXTRA_DIST= ext_session_acl.8 required.m4
## Please see the COPYING and CONTRIBUTORS files for details.
##
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <db.h>]],[[DB_ENV *db_env = NULL; db_env_create(&db_env, 0);]])],[BUILD_HELPER="session"],[])
+AC_CHECK_HEADERS(db.h,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <db.h>]],[[
+ DB_ENV *db_env = nullptr;
+ db_env_create(&db_env, 0);
+ ]])],[
+ BUILD_HELPER="session"
+ ],[])
+])
ext_time_quota_acl.cc
ext_time_quota_acl_LDADD = \
$(COMPAT_LIB) \
- $(LIB_DB)
+ -ldb
EXTRA_DIST= ext_time_quota_acl.8 required.m4
## Please see the COPYING and CONTRIBUTORS files for details.
##
-AC_CHECK_HEADERS([db_185.h],[BUILD_HELPER="time_quota"])
-AC_EGREP_HEADER([dbopen],[/usr/include/db.h],[BUILD_HELPER="time_quota"])
+AC_CHECK_HEADERS(db_185.h,[BUILD_HELPER="time_quota"],[
+ AC_CHECK_HEADERS(db.h,[
+ AC_EGREP_HEADER([dbopen],[/usr/include/db.h],[BUILD_HELPER="time_quota"])
+ ])
+])