summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac359
1 files changed, 336 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 14fb086c..e636070c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,9 +2,9 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[2.0.6],[rsyslog@lists.adiscon.com.])
+AC_INIT([rsyslog],[3.20.5],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
-AC_CONFIG_SRCDIR([syslogd.c])
+AC_CONFIG_SRCDIR([ChangeLog])
AC_CONFIG_HEADERS([config.h])
AC_GNU_SOURCE
@@ -19,18 +19,25 @@ AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_CANONICAL_HOST
+PKG_PROG_PKG_CONFIG
+
case "${host}" in
*-*-linux*)
- # This feature indicates if klogd functionality
- # should be integrated. If it is switched off, klogd
- # is still compiled, but it is an empty shell.
- AC_DEFINE([FEATURE_KLOGD], [1], [Description])
+ os_type="linux"
;;
*-*-*darwin*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
- AC_DEFINE([BSD], [1], [Description])
+ AC_DEFINE([OS_BSD], [1], [Indicator for a BSD OS])
+ os_type="bsd"
+ ;;
+ *-*-kfreebsd*)
+ # kernel is FreeBSD, but userspace is glibc - i.e. like linux
+ # do not DEFINE OS_BSD
+ os_type="bsd"
;;
esac
+AC_DEFINE_UNQUOTED([HOSTENV], "$host", [the host environment, can be queried via a system variable])
+
# Checks for libraries.
save_LIBS=$LIBS
LIBS=
@@ -48,7 +55,7 @@ AC_SUBST(dl_libs)
AC_HEADER_RESOLV
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h locale.h netdb.h netinet/in.h paths.h stddef.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h utmp.h])
+AC_CHECK_HEADERS([arpa/inet.h libgen.h fcntl.h locale.h netdb.h netinet/in.h paths.h stddef.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/stat.h syslog.h unistd.h utmp.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -83,9 +90,24 @@ AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRERROR_R
AC_FUNC_VPRINTF
-AC_FUNC_WAIT3
-AC_CHECK_FUNCS([alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r])
+AC_CHECK_FUNCS([flock basename alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r])
+# Check for MAXHOSTNAMELEN
+AC_MSG_CHECKING(for MAXHOSTNAMELEN)
+AC_TRY_COMPILE([
+ #include <sys/param.h>
+ ], [
+ return MAXHOSTNAMELEN;
+ ]
+ ,
+ AC_MSG_RESULT(yes)
+ ,
+ # note: we use 1024 here, which should be far more than needed by any system. If that's too low, we simply
+ # life with the need to change it. Most of the code doesn't need it anyways, but there are a few places
+ # where it actually is needed and it makes no sense to change them.
+ AC_DEFINE(MAXHOSTNAMELEN, 1024, [Define with a value if your <sys/param.h> does not define MAXHOSTNAMELEN])
+ AC_MSG_RESULT(no; defined as 64)
+)
# Large file support
AC_ARG_ENABLE(largefile,
@@ -111,6 +133,7 @@ AC_ARG_ENABLE(regexp,
esac],
[enable_regexp=yes]
)
+AM_CONDITIONAL(ENABLE_REGEXP, test x$enable_regexp = xyes)
if test "$enable_regexp" = "yes"; then
AC_DEFINE(FEATURE_REGEXP, 1, [Regular expressions support enabled.])
fi
@@ -168,6 +191,10 @@ AC_ARG_ENABLE(pthreads,
[enable_pthreads=yes]
)
+if test "x$enable_pthreads" = "xno"; then
+ AC_MSG_ERROR(rsyslog v3 does no longer support single threading mode -- use a previous version for that);
+fi
+
if test "x$enable_pthreads" != "xno"; then
AC_CHECK_HEADERS(
[pthread.h],
@@ -190,19 +217,19 @@ if test "x$enable_pthreads" != "xno"; then
)
fi
-# klogd
-AC_ARG_ENABLE(klogd,
- [AS_HELP_STRING([--enable-klogd],[Integrated klogd functionality @<:@default=yes@:>@])],
+# klog
+AC_ARG_ENABLE(klog,
+ [AS_HELP_STRING([--enable-klog],[Integrated klog functionality @<:@default=yes@:>@])],
[case "${enableval}" in
- yes) enable_klogd="yes" ;;
- no) enable_klogd="no" ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-klogd) ;;
+ yes) enable_klog="yes" ;;
+ no) enable_klog="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-klog) ;;
esac],
- [enable_klogd="yes"]
+ [enable_klog="yes"]
)
-if test "$enable_klogd" = "yes"; then
- AC_DEFINE(FEATURE_KLOGD, 1, [klogd functionality is integrated.])
-fi
+AM_CONDITIONAL(ENABLE_IMKLOG, test x$enable_klog = xyes)
+AM_CONDITIONAL(ENABLE_IMKLOG_BSD, test x$os_type = xbsd)
+AM_CONDITIONAL(ENABLE_IMKLOG_LINUX, test x$os_type = xlinux)
#
# SYSLOG_UNIXAF
@@ -234,6 +261,7 @@ AC_ARG_ENABLE(inet,
esac],
[enable_inet="yes"]
)
+AM_CONDITIONAL(ENABLE_INET, test x$enable_inet = xyes)
if test "$enable_inet" = "yes"; then
AC_DEFINE(SYSLOG_INET, 1, [network support is integrated.])
fi
@@ -269,10 +297,41 @@ AC_ARG_ENABLE(debug,
esac],
[enable_debug="no"]
)
+if test "$enable_debug" = "yes"; then
+ AC_DEFINE(DEBUG, 1, [Defined if debug mode is enabled (its easier to check).])
+fi
if test "$enable_debug" = "no"; then
AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
fi
+# runtime instrumentation
+AC_ARG_ENABLE(rtinst,
+ [AS_HELP_STRING([--enable-rtinst],[Enable runtime instrumentation mode @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_rtinst="yes" ;;
+ no) enable_rtinst="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtinst) ;;
+ esac],
+ [enable_rtinst="no"]
+)
+if test "$enable_rtinst" = "yes"; then
+ AC_DEFINE(RTINST, 1, [Defined if runtime instrumentation mode is enabled.])
+fi
+
+# valgrind
+AC_ARG_ENABLE(valgrind,
+ [AS_HELP_STRING([--enable-valgrind],[Enable valgrind support settings @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_valgrind="yes" ;;
+ no) enable_valgrind="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
+ esac],
+ [enable_valgrind="no"]
+)
+if test "$enable_valgrind" = "yes"; then
+ AC_DEFINE(VALGRIND, 1, [Defined if valgrind support settings are to be enabled (e.g. prevents dlclose()).])
+fi
+
# MySQL support
@@ -312,6 +371,7 @@ AM_CONDITIONAL(ENABLE_MYSQL, test x$enable_mysql = xyes)
AC_SUBST(mysql_cflags)
AC_SUBST(mysql_libs)
+
# PostgreSQL support
AC_ARG_ENABLE(pgsql,
[AS_HELP_STRING([--enable-pgsql],[Enable PostgreSQL database support @<:@default=no@:>@])],
@@ -335,7 +395,7 @@ if test "x$enable_pgsql" = "xyes"; then
[pq],
[PQconnectdb],
[pgsql_cflags="-I`pg_config --includedir`"
- pgsql_libs="`pg_config --libdir` -lpq"
+ pgsql_libs="-L`pg_config --libdir` -lpq"
],
[AC_MSG_FAILURE([PgSQL library is missing])],
[-L`pg_config --libdir`]
@@ -346,21 +406,274 @@ AC_SUBST(pgsql_cflags)
AC_SUBST(pgsql_libs)
+# libdbi support
+AC_ARG_ENABLE(libdbi,
+ [AS_HELP_STRING([--enable-libdbi],[Enable libdbi database support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_libdbi="yes" ;;
+ no) enable_libdbi="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdbi) ;;
+ esac],
+ [enable_libdbi=no]
+)
+if test "x$enable_libdbi" = "xyes"; then
+ AC_CHECK_HEADERS(
+ [dbi/dbi.h],,
+ [AC_MSG_FAILURE([libdbi is missing])]
+ )
+ AC_CHECK_LIB(
+ [dbi],
+ [dbi_initialize],
+ [libdbi_cflags=""
+ libdbi_libs="-ldbi"
+ ],
+ [AC_MSG_FAILURE([libdbi library is missing])]
+ )
+ AC_CHECK_LIB(
+ [dbi],
+ [dbi_initialize_r],
+ [AC_DEFINE([HAVE_DBI_R], [1], [Define to 1 if libdbi supports the new plugin-safe interface])]
+ )
+fi
+AM_CONDITIONAL(ENABLE_OMLIBDBI, test x$enable_libdbi = xyes)
+AC_SUBST(libdbi_cflags)
+AC_SUBST(libdbi_libs)
+
+
+# SNMP support
+AC_ARG_ENABLE(snmp,
+ [AS_HELP_STRING([--enable-snmp],[Enable SNMP support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_snmp="yes" ;;
+ no) enable_snmp="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-snmp) ;;
+ esac],
+ [enable_snmp=no]
+)
+if test "x$enable_snmp" = "xyes"; then
+ AC_CHECK_HEADERS(
+ [net-snmp/net-snmp-config.h],,
+ [AC_MSG_FAILURE([Net-SNMP is missing])]
+ )
+ AC_CHECK_LIB(
+ [netsnmp],
+ [snmp_timeout],
+ [snmp_cflags=""
+ snmp_libs="-lnetsnmp"
+ ],
+ [AC_MSG_FAILURE([Net-SNMP library is missing])]
+ )
+fi
+AM_CONDITIONAL(ENABLE_SNMP, test x$enable_snmp = xyes)
+AC_SUBST(snmp_cflags)
+AC_SUBST(snmp_libs)
+
+
+# GNUtls support
+AC_ARG_ENABLE(gnutls,
+ [AS_HELP_STRING([--enable-gnutls],[Enable GNU TLS support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_gnutls="yes" ;;
+ no) enable_gnutls="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gnutls) ;;
+ esac],
+ [enable_gnutls=no]
+)
+if test "x$enable_gnutls" = "xyes"; then
+ AC_CHECK_HEADERS(
+ [gnutls/gnutls.h],,
+ [AC_MSG_FAILURE([GNUTls is missing])]
+ )
+ AC_CHECK_PROG(
+ [HAVE_GNUTLS_CONFIG],
+ [libgnutls-config],
+ [yes],,,
+ )
+ if test "x${HAVE_GNUTLS_CONFIG}" != "xyes"; then
+ AC_MSG_FAILURE([libgnutls-config not found in PATH])
+ fi
+ AC_CHECK_LIB(
+ [gnutls],
+ [gnutls_check_version],
+ [gnutls_cflags=`libgnutls-config --cflags`
+ gnutls_libs=`libgnutls-config --libs`
+ ],
+ [AC_MSG_FAILURE([GNU TLS library is missing])],
+ [`libgnutls-config --libs`]
+ )
+fi
+AM_CONDITIONAL(ENABLE_GNUTLS, test x$enable_gnutls = xyes)
+AC_SUBST(gnutls_cflags)
+AC_SUBST(gnutls_libs)
+
+
+# support for building the rsyslogd runtime
+AC_ARG_ENABLE(rsyslogrt,
+ [AS_HELP_STRING([--enable-rsyslogrt],[Build rsyslogrt @<:@default=yes@:>@])],
+ [case "${enableval}" in
+ yes) enable_rsyslogrt="yes" ;;
+ no) enable_rsyslogrt="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-rsyslogrt) ;;
+ esac],
+ [enable_rsyslogrt=yes]
+)
+if test "x$enable_rsyslogrt" = "xyes"; then
+ rsrt_cflags="-I\$(top_srcdir)/runtime -I\$(top_srcdir)"
+ rsrt_libs="\$(top_builddir)/runtime/librsyslog.la"
+fi
+AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes)
+AC_SUBST(rsrt_cflags)
+AC_SUBST(rsrt_libs)
+
+
+# support for NOT building rsyslogd (useful for source-based packaging systems)
+AC_ARG_ENABLE(rsyslogd,
+ [AS_HELP_STRING([--enable-rsyslogd],[Build rsyslogd @<:@default=yes@:>@])],
+ [case "${enableval}" in
+ yes) enable_rsyslogd="yes" ;;
+ no) enable_rsyslogd="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-rsyslogd) ;;
+ esac],
+ [enable_rsyslogd=yes]
+)
+AM_CONDITIONAL(ENABLE_RSYSLOGD, test x$enable_rsyslogd = xyes)
+
+
+# Mail support (so far we do not need a library, but we need to turn this on and off)
+AC_ARG_ENABLE(mail,
+ [AS_HELP_STRING([--enable-mail],[Enable mail support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_mail="yes" ;;
+ no) enable_mail="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-mail) ;;
+ esac],
+ [enable_mail=no]
+)
+AM_CONDITIONAL(ENABLE_MAIL, test x$enable_mail = xyes)
+
+
+# RELP support
+AC_ARG_ENABLE(relp,
+ [AS_HELP_STRING([--enable-relp],[Enable RELP support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_relp="yes" ;;
+ no) enable_relp="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-relp) ;;
+ esac],
+ [enable_relp=no]
+)
+if test "x$enable_relp" = "xyes"; then
+ PKG_CHECK_MODULES(RELP, relp >= 0.1.1)
+fi
+AM_CONDITIONAL(ENABLE_RELP, test x$enable_relp = xyes)
+AC_SUBST(RELP_CFLAGS)
+AC_SUBST(RELP_LIBS)
+
+# RFC 3195 support
+AC_ARG_ENABLE(rfc3195,
+ [AS_HELP_STRING([--enable-rfc3195],[Enable RFC3195 support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_rfc3195="yes" ;;
+ no) enable_rfc3195="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-rfc3195) ;;
+ esac],
+ [enable_rfc3195=no]
+)
+if test "x$enable_rfc3195" = "xyes"; then
+ PKG_CHECK_MODULES(LIBLOGGING, liblogging >= 0.7.1)
+fi
+AM_CONDITIONAL(ENABLE_RFC3195, test x$enable_rfc3195 = xyes)
+AC_SUBST(LIBLOGGING_CFLAGS)
+AC_SUBST(LIBLOGGING_LIBS)
+
+
+# settings for the template input module; copy and modify this code
+# if you intend to add your own module. Be sure to replace imtemplate
+# by the actual name of your module.
+AC_ARG_ENABLE(imfile,
+ [AS_HELP_STRING([--enable-imfile],[file input module enabled @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_imfile="yes" ;;
+ no) enable_imfile="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-imfile) ;;
+ esac],
+ [enable_imfile=no]
+)
+#
+# you may want to do some library checks here - see snmp, mysql, pgsql modules
+# for samples
+#
+AM_CONDITIONAL(ENABLE_IMFILE, test x$enable_imfile = xyes)
+
+AM_CONDITIONAL(ENABLE_IMTEMPLATE, test x$enable_imtemplate = xyes)
+# end of copy template - be sure to serach for imtemplate to find everything!
+# settings for the template input module; copy and modify this code
+# if you intend to add your own module. Be sure to replace imtemplate
+# by the actual name of your module.
+AC_ARG_ENABLE(imtemplate,
+ [AS_HELP_STRING([--enable-imtemplate],[Compiles imtemplate template module @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_imtemplate="yes" ;;
+ no) enable_imtemplate="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-imtemplate) ;;
+ esac],
+ [enable_imtemplate=no]
+)
+#
+# you may want to do some library checks here - see snmp, mysql, pgsql modules
+# for samples
+#
+AM_CONDITIONAL(ENABLE_IMTEMPLATE, test x$enable_imtemplate = xyes)
+# end of copy template - be sure to serach for imtemplate to find everything!
+
-AC_CONFIG_FILES([Makefile doc/Makefile plugins/omgssapi/Makefile plugins/ommysql/Makefile plugins/ompgsql/Makefile])
+AC_CONFIG_FILES([Makefile \
+ runtime/Makefile \
+ tools/Makefile \
+ tests/Makefile \
+ doc/Makefile \
+ plugins/imudp/Makefile \
+ plugins/imtcp/Makefile \
+ plugins/im3195/Makefile \
+ plugins/imgssapi/Makefile \
+ plugins/imuxsock/Makefile \
+ plugins/immark/Makefile \
+ plugins/imklog/Makefile \
+ plugins/imtemplate/Makefile \
+ plugins/imfile/Makefile \
+ plugins/imrelp/Makefile \
+ plugins/omtesting/Makefile \
+ plugins/omgssapi/Makefile \
+ plugins/ommysql/Makefile \
+ plugins/ompgsql/Makefile \
+ plugins/omrelp/Makefile \
+ plugins/omlibdbi/Makefile \
+ plugins/ommail/Makefile \
+ plugins/omsnmp/Makefile])
AC_OUTPUT
echo "****************************************************"
echo "rsyslog will be compiled with the following settings:"
echo
echo "Multithreading support enabled: $enable_pthreads"
-echo "Klogd functionality enabled: $enable_klogd"
+echo "Klog functionality enabled: $enable_klog ($os_type)"
echo "Regular expressions support enabled: $enable_regexp"
echo "Zlib compression support enabled: $enable_zlib"
echo "MySql support enabled: $enable_mysql"
+echo "libdbi support enabled: $enable_libdbi"
echo "PostgreSQL support enabled: $enable_pgsql"
+echo "SNMP support enabled: $enable_snmp"
+echo "Mail support enabled: $enable_mail"
+echo "RELP support enabled: $enable_relp"
+echo "file input module enabled: $enable_imfile"
+echo "input template module will be compiled: $enable_imtemplate"
echo "Large file support enabled: $enable_largefile"
echo "Networking support enabled: $enable_inet"
+echo "GnuTLS network stream driver enabled: $enable_gnutls"
echo "Enable GSSAPI Kerberos 5 support: $want_gssapi_krb5"
echo "Debug mode enabled: $enable_debug"
+echo "Runtime Instrumentation enabled: $enable_rtinst"
+echo "valgrind support settings enabled: $enable_valgrind"
+echo "rsyslog runtime will be built: $enable_rsyslogrt"
+echo "rsyslogd will be built: $enable_rsyslogd"