From: hno <> Date: Mon, 20 Mar 2006 10:46:17 +0000 (+0000) Subject: autoconf tests to see if squid_session can be built automatically X-Git-Tag: SQUID_3_0_PRE4~288 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b9f00e4d98ec4641704df73a80f38598174c13ef;p=thirdparty%2Fsquid.git autoconf tests to see if squid_session can be built automatically --- diff --git a/helpers/external_acl/session/config.test b/helpers/external_acl/session/config.test new file mode 100755 index 0000000000..77dbabe29a --- /dev/null +++ b/helpers/external_acl/session/config.test @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/db_185.h ]; then + exit 0 +fi +if [ -f /usr/include/db.h ]; then + exit 0 +fi +exit 1 diff --git a/helpers/external_acl/session/squid_session.c b/helpers/external_acl/session/squid_session.c index 730b126445..ac4f917ed9 100644 --- a/helpers/external_acl/session/squid_session.c +++ b/helpers/external_acl/session/squid_session.c @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -27,7 +31,13 @@ #include #include +#if defined(HAVE_DB_185_H) +#include +#elif defined(HAVE_DB_H) +#include +#else #include +#endif static int session_ttl = 3600; char *db_path = NULL;