INN commit: trunk (11 files)
INN Commit
rra at isc.org
Wed Mar 18 20:31:16 UTC 2015
Date: Wednesday, March 18, 2015 @ 13:31:16
Author: iulius
Revision: 9795
Do not build with SASL, OpenSSL or zlib support if the related headers are not found
Also check for kerberosv5/com_err.h as an alternative for com_err.h.
Modified:
trunk/configure.ac
trunk/frontends/ovdb_init.c
trunk/frontends/ovdb_monitor.c
trunk/frontends/ovdb_server.c
trunk/frontends/ovdb_stat.c
trunk/innfeed/imap_connection.c
trunk/nnrpd/nnrpd.h
trunk/nnrpd/sasl.c
trunk/nnrpd/tls.h
trunk/storage/ovdb/ovdb-private.h
trunk/storage/ovdb/ovdb.c
-----------------------------+
configure.ac | 91 +++++++++++++++++++++++++++++++++++++-----
frontends/ovdb_init.c | 6 +-
frontends/ovdb_monitor.c | 6 +-
frontends/ovdb_server.c | 6 +-
frontends/ovdb_stat.c | 6 +-
innfeed/imap_connection.c | 3 +
nnrpd/nnrpd.h | 3 +
nnrpd/sasl.c | 2
nnrpd/tls.h | 3 +
storage/ovdb/ovdb-private.h | 7 ++-
storage/ovdb/ovdb.c | 9 ++--
11 files changed, 114 insertions(+), 28 deletions(-)
Modified: configure.ac
===================================================================
--- configure.ac 2015-03-17 20:49:15 UTC (rev 9794)
+++ configure.ac 2015-03-18 20:31:16 UTC (rev 9795)
@@ -330,17 +330,18 @@
INN_LIB_SASL_OPTIONAL
dnl If Kerberos is found, define KRB5_AUTH to auth_krb5 so as to build
-dnl that program. In case neither et/com_err.h nor com_err.h can be found
-dnl and --with-krb5 is not given, do not define KRB5_AUTH and clear the
-dnl other variables set for Kerberos support.
+dnl that program. In case neither et/com_err.h nor kerberosv5/com_err.h
+dnl nor com_err.h can be found and --with-krb5 is not given, do not define
+dnl KRB5_AUTH and clear the other variables set for Kerberos support.
AS_IF([test x"$inn_use_KRB5" = xtrue],
[AC_CHECK_HEADERS([et/com_err.h], [KRB5_AUTH=auth_krb5],
- [AC_CHECK_HEADERS([com_err.h], [KRB5_AUTH=auth_krb5],
- [AS_IF([test x"$with_krb5" = x],
- [KRB5_CPPFLAGS=
- KRB5_LDFLAGS=
- KRB5_LIBS=],
- [AC_MSG_ERROR([cannot find usable com_err header])])])])])
+ [AC_CHECK_HEADERS([kerberosv5/com_err.h], [KRB5_AUTH=auth_krb5],
+ [AC_CHECK_HEADERS([com_err.h], [KRB5_AUTH=auth_krb5],
+ [AS_IF([test x"$with_krb5" = x],
+ [KRB5_CPPFLAGS=
+ KRB5_LDFLAGS=
+ KRB5_LIBS=],
+ [AC_MSG_ERROR([cannot find usable com_err header])])])])])])
AC_SUBST([KRB5_AUTH])
dnl If Berkeley DB is found, check the presence of its header.
@@ -383,6 +384,78 @@
AC_SUBST([DBM_LIBS])])
AC_SUBST([DBM_CPPFLAGS])
+dnl If zlib support is found, check the presence of its header.
+AS_IF([test x"$inn_use_ZLIB" = xtrue],
+ [inn_ZLIB_incroot=
+ inn_ZLIB_header_found=
+ AS_IF([test x"$inn_ZLIB_includedir" != x],
+ [inn_ZLIB_incroot="$inn_ZLIB_includedir"],
+ [AS_IF([test x"$inn_ZLIB_root" != x],
+ [inn_ZLIB_incroot="${inn_ZLIB_root}/include"])])
+ AS_IF([test x"$inn_ZLIB_incroot" = x],
+ [AC_CHECK_HEADERS([zlib.h],
+ [inn_ZLIB_header_found=yes],
+ [inn_ZLIB_header_found=no])],
+ [AS_IF([test -f "${inn_ZLIB_incroot}/zlib.h"],
+ [inn_ZLIB_header_found=yes
+ AC_DEFINE([HAVE_ZLIB_H], [1],
+ [Define if you have the <zlib.h> header file.])],
+ [inn_ZLIB_header_found=no])])
+ AS_IF([test x"${inn_ZLIB_header_found}" = xyes], [],
+ [AS_IF([test x"$with_zlib" = x],
+ [ZLIB_CPPFLAGS=
+ ZLIB_LDFLAGS=
+ ZLIB_LIBS=],
+ [AC_MSG_ERROR([cannot find usable zlib header])])])])
+
+dnl If OpenSSL support is found, check the presence of its header.
+AS_IF([test x"$inn_use_OPENSSL" = xtrue],
+ [inn_OPENSSL_incroot=
+ inn_OPENSSL_header_found=
+ AS_IF([test x"$inn_OPENSSL_includedir" != x],
+ [inn_OPENSSL_incroot="$inn_OPENSSL_includedir"],
+ [AS_IF([test x"$inn_OPENSSL_root" != x],
+ [inn_OPENSSL_incroot="${inn_OPENSSL_root}/include"])])
+ AS_IF([test x"$inn_OPENSSL_incroot" = x],
+ [AC_CHECK_HEADERS([openssl/ssl.h],
+ [inn_OPENSSL_header_found=yes],
+ [inn_OPENSSL_header_found=no])],
+ [AS_IF([test -f "${inn_OPENSSL_incroot}/openssl/ssl.h"],
+ [inn_OPENSSL_header_found=yes
+ AC_DEFINE([HAVE_OPENSSL_SSL_H], [1],
+ [Define if you have the <openssl/ssl.h> header file.])],
+ [inn_OPENSSL_header_found=no])])
+ AS_IF([test x"${inn_OPENSSL_header_found}" = xyes], [],
+ [AS_IF([test x"$with_openssl" = x],
+ [OPENSSL_CPPFLAGS=
+ OPENSSL_LDFLAGS=
+ OPENSSL_LIBS=],
+ [AC_MSG_ERROR([cannot find usable OpenSSL header])])])])
+
+dnl If SASL support is found, check the presence of its header.
+AS_IF([test x"$inn_use_SASL" = xtrue],
+ [inn_SASL_incroot=
+ inn_SASL_header_found=
+ AS_IF([test x"$inn_SASL_includedir" != x],
+ [inn_SASL_incroot="$inn_SASL_includedir"],
+ [AS_IF([test x"$inn_SASL_root" != x],
+ [inn_SASL_incroot="${inn_SASL_root}/include"])])
+ AS_IF([test x"$inn_SASL_incroot" = x],
+ [AC_CHECK_HEADERS([sasl/sasl.h],
+ [inn_SASL_header_found=yes],
+ [inn_SASL_header_found=no])],
+ [AS_IF([test -f "${inn_SASL_incroot}/sasl/sasl.h"],
+ [inn_SASL_header_found=yes
+ AC_DEFINE([HAVE_SASL_SASL_H], [1],
+ [Define if you have the <sasl/sasl.h> header file.])],
+ [inn_SASL_header_found=no])])
+ AS_IF([test x"${inn_SASL_header_found}" = xyes], [],
+ [AS_IF([test x"$with_sasl" = x],
+ [SASL_CPPFLAGS=
+ SASL_LDFLAGS=
+ SASL_LIBS=],
+ [AC_MSG_ERROR([cannot find usable Cyrus SASL header])])])])
+
dnl If configuring with large file support, determine the right flags to
dnl use based on the platform.
if test x"$inn_enable_largefiles" = xyes ; then
Modified: frontends/ovdb_init.c
===================================================================
--- frontends/ovdb_init.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ frontends/ovdb_init.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -17,14 +17,14 @@
#include "../storage/ovdb/ovdb.h"
#include "../storage/ovdb/ovdb-private.h"
-#ifndef HAVE_DB_H
+#ifndef HAVE_BDB
int main(int argc UNUSED, char **argv UNUSED)
{
die("Berkeley DB support not compiled");
}
-#else /* HAVE_DB_H */
+#else /* HAVE_BDB */
static int open_db(DB **db, const char *name, int type)
{
@@ -440,5 +440,5 @@
exit(0);
}
-#endif /* HAVE_DB_H */
+#endif /* HAVE_BDB */
Modified: frontends/ovdb_monitor.c
===================================================================
--- frontends/ovdb_monitor.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ frontends/ovdb_monitor.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -22,14 +22,14 @@
#include "../storage/ovdb/ovdb.h"
#include "../storage/ovdb/ovdb-private.h"
-#ifndef HAVE_DB_H
+#ifndef HAVE_BDB
int main(int argc UNUSED, char **argv UNUSED)
{
exit(0);
}
-#else /* HAVE_DB_H */
+#else /* HAVE_BDB */
static int signalled = 0;
static void sigfunc(int sig UNUSED)
@@ -275,5 +275,5 @@
return 1;
}
-#endif /* HAVE_DB_H */
+#endif /* HAVE_BDB */
Modified: frontends/ovdb_server.c
===================================================================
--- frontends/ovdb_server.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ frontends/ovdb_server.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -37,7 +37,7 @@
#include "../storage/ovdb/ovdb.h"
#include "../storage/ovdb/ovdb-private.h"
-#ifndef HAVE_DB_H
+#ifndef HAVE_BDB
int
main(int argc UNUSED, char **argv UNUSED)
@@ -45,7 +45,7 @@
die("Berkeley DB support not compiled");
}
-#else /* HAVE_DB_H */
+#else /* HAVE_BDB */
#define SELECT_TIMEOUT 15
@@ -747,4 +747,4 @@
}
-#endif /* HAVE_DB_H */
+#endif /* HAVE_BDB */
Modified: frontends/ovdb_stat.c
===================================================================
--- frontends/ovdb_stat.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ frontends/ovdb_stat.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -21,14 +21,14 @@
#include "../storage/ovdb/ovdb-private.h"
-#ifndef HAVE_DB_H
+#ifndef HAVE_BDB
int main(int argc UNUSED, char **argv UNUSED)
{
die("Berkeley DB support not compiled");
}
-#else /* HAVE_DB_H */
+#else /* HAVE_BDB */
static int signalled = 0;
static void sigfunc(int signum UNUSED)
@@ -897,5 +897,5 @@
return 0;
}
-#endif /* HAVE_DB_H */
+#endif /* HAVE_BDB */
Modified: innfeed/imap_connection.c
===================================================================
--- innfeed/imap_connection.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ innfeed/imap_connection.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -45,6 +45,9 @@
#include "article.h"
#include "configfile.h"
+#ifndef HAVE_SASL_SASL_H
+# undef HAVE_SASL
+#endif
#ifdef HAVE_SASL
# include <sasl/sasl.h>
# include <sasl/saslplug.h>
Modified: nnrpd/nnrpd.h
===================================================================
--- nnrpd/nnrpd.h 2015-03-17 20:49:15 UTC (rev 9794)
+++ nnrpd/nnrpd.h 2015-03-18 20:31:16 UTC (rev 9795)
@@ -26,6 +26,9 @@
#include "inn/vector.h"
#include "inn/timer.h"
+#ifndef HAVE_SASL_SASL_H
+# undef HAVE_SASL
+#endif
#ifdef HAVE_SASL
#include <sasl/sasl.h>
#include <sasl/saslutil.h>
Modified: nnrpd/sasl.c
===================================================================
--- nnrpd/sasl.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ nnrpd/sasl.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -20,8 +20,6 @@
#endif /* HAVE_OPENSSL */
#ifdef HAVE_SASL
-
-#include <sasl/sasl.h>
sasl_conn_t *sasl_conn = NULL;
int sasl_ssf = 0;
int sasl_maxout = NNTP_MAXLEN_COMMAND;
Modified: nnrpd/tls.h
===================================================================
--- nnrpd/tls.h 2015-03-17 20:49:15 UTC (rev 9794)
+++ nnrpd/tls.h 2015-03-18 20:31:16 UTC (rev 9795)
@@ -14,6 +14,9 @@
** by Chris Newman <chris.newman at innosoft.com> (1999/06)
*/
+#ifndef HAVE_OPENSSL_SSL_H
+# undef HAVE_OPENSSL
+#endif
#ifdef HAVE_OPENSSL
#ifndef TLS_H
Modified: storage/ovdb/ovdb-private.h
===================================================================
--- storage/ovdb/ovdb-private.h 2015-03-17 20:49:15 UTC (rev 9794)
+++ storage/ovdb/ovdb-private.h 2015-03-18 20:31:16 UTC (rev 9795)
@@ -1,4 +1,7 @@
-#ifdef HAVE_DB_H
+#ifndef HAVE_DB_H
+# undef HAVE_BDB
+#endif
+#ifdef HAVE_BDB
#include <db.h>
@@ -190,4 +193,4 @@
#define TRYAGAIN DB_LOCK_DEADLOCK
-#endif /* HAVE_DB_H */
+#endif /* HAVE_BDB */
Modified: storage/ovdb/ovdb.c
===================================================================
--- storage/ovdb/ovdb.c 2015-03-17 20:49:15 UTC (rev 9794)
+++ storage/ovdb/ovdb.c 2015-03-18 20:31:16 UTC (rev 9795)
@@ -82,6 +82,9 @@
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
+#ifndef HAVE_ZLIB_H
+# undef HAVE_ZLIB
+#endif
#ifdef HAVE_ZLIB
# include <zlib.h>
# define MAX_UNZIP_SZ 100000
@@ -111,7 +114,7 @@
# include "portable/socket-unix.h"
#endif
-#ifndef HAVE_DB_H
+#ifndef HAVE_BDB
/* Provide stub functions if we don't have db */
@@ -155,7 +158,7 @@
void ovdb_close(void) { }
-#else /* HAVE_DB_H */
+#else /* HAVE_BDB */
#define EXPIREGROUP_TXN_SIZE 100
#define DELETE_TXN_SIZE 500
@@ -3061,4 +3064,4 @@
ovdb_releaselock();
}
-#endif /* HAVE_DB_H */
+#endif /* HAVE_BDB */
More information about the inn-committers
mailing list