2
# Process this file with autoconf to produce a configure script.
5
AC_INIT([rsyslog],[1.19.10],[rsyslog@lists.adiscon.com.])
7
AC_CONFIG_SRCDIR([syslogd.c])
8
AC_CONFIG_HEADER([config.h])
10
# Checks for programs.
13
if test "$GCC" = "yes"
14
then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
22
# This feature indicates if klogd functionality
23
# should be integrated. If it is switched off, klogd
24
# is still compiled, but it is an empty shell.
25
AC_DEFINE([FEATURE_KLOGD], [1], [Description])
27
*-*-*darwin*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
28
AC_DEFINE([BSD], [1], [Description])
32
# Checks for libraries.
33
AC_CHECK_LIB(rt,clock_gettime,,,)
34
AC_CHECK_LIB(dl,dlopen,,,)
36
# Checks for header files.
40
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])
42
# Checks for typedefs, structures, and compiler characteristics.
59
# include <sys/socket.h>
62
AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,[$sa_includes])
64
# Checks for library functions.
67
AC_PROG_GCC_TRADITIONAL
70
AC_FUNC_SELECT_ARGTYPES
75
AC_CHECK_FUNCS([alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strerror_r strndup strnlen strrchr strstr strtol strtoul uname ttyname_r])
79
AC_ARG_ENABLE(largefile,
80
[AS_HELP_STRING([--enable-largefile],[Enable large file support @<:@default=yes@:>@])],
81
[case "${enableval}" in
82
yes) enable_largefile="yes" ;;
83
no) enable_largefile="no" ;;
84
*) AC_MSG_ERROR(bad value ${enableval} for --enable-largefile) ;;
86
[enable_largefile="yes"]
88
if test "$enable_largefile" = "no"; then
89
AC_DEFINE(NOLARGEFILE, 1, [Defined when large file support is disabled.])
94
[AS_HELP_STRING([--enable-regexp],[Enable regular expressions support @<:@default=yes@:>@])],
95
[case "${enableval}" in
96
yes) enable_regexp="yes" ;;
97
no) enable_regexp="no" ;;
98
*) AC_MSG_ERROR(bad value ${enableval} for --enable-regexp) ;;
102
if test "$enable_regexp" = "yes"; then
103
AC_DEFINE(FEATURE_REGEXP, 1, [Regular expressions support enabled.])
108
[AS_HELP_STRING([--enable-zlib],[Enable zlib compression support @<:@default=yes@:>@])],
109
[case "${enableval}" in
110
yes) enable_zlib="yes" ;;
111
no) enable_zlib="no" ;;
112
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zlib) ;;
116
if test "$enable_zlib" = "yes"; then
117
AC_CHECK_HEADER(zlib.h, [zlib_header="yes"], [zlib_header="no" enable_zlib="false"])
118
if test "$zlib_header" = "yes"; then
119
AC_CHECK_LIB(z, deflate,
120
[AC_DEFINE(USE_NETZIP, 1, [Define if you want to enable zlib support])
122
AC_SUBST(zlib_libs)], enable_zlib="false")
126
# multithreading via pthreads
127
AC_ARG_ENABLE(pthreads,
128
[AS_HELP_STRING([--enable-pthreads],[Enable multithreading via pthreads @<:@default=yes@:>@])],
129
[case "${enableval}" in
130
yes) enable_pthreads="yes" ;;
131
no) enable_pthreads="no" ;;
132
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pthreads) ;;
134
[enable_pthreads=yes]
137
if test "x$enable_pthreads" != "xno"; then
145
AC_DEFINE([USE_PTHREADS], [1], [Multithreading support enabled.])
146
pthreads_libs="-lpthread"
147
AC_SUBST(pthreads_libs)
149
[AC_MSG_FAILURE([pthread is missing])],
153
[AC_MSG_FAILURE([pthread is missing])]
159
[AS_HELP_STRING([--enable-klogd],[Integrated klogd functionality @<:@default=yes@:>@])],
160
[case "${enableval}" in
161
yes) enable_klogd="yes" ;;
162
no) enable_klogd="no" ;;
163
*) AC_MSG_ERROR(bad value ${enableval} for --enable-klogd) ;;
167
if test "$enable_klogd" = "yes"; then
168
AC_DEFINE(FEATURE_KLOGD, 1, [klogd functionality is integrated.])
174
AC_MSG_CHECKING(for SYSLOG_UNIXAF support)
175
AC_ARG_ENABLE([unix],
176
[AS_HELP_STRING([--disable-unix], [Disable support for unix])],
178
if test "x${enableval}" = "xyes"; then
180
AC_DEFINE([SYSLOG_UNIXAF], [1], [Description])
188
AC_DEFINE([SYSLOG_UNIXAF], [1], [Description])
193
[AS_HELP_STRING([--enable-inet],[Enable networking support @<:@default=yes@:>@])],
194
[case "${enableval}" in
195
yes) enable_inet="yes" ;;
196
no) enable_inet="no" ;;
197
*) AC_MSG_ERROR(bad value ${enableval} for --enable-inet) ;;
201
if test "$enable_inet" = "yes"; then
202
AC_DEFINE(SYSLOG_INET, 1, [network support is integrated.])
206
# The following define determines whether the package adheres to the
207
# file system standard.
209
AC_MSG_CHECKING(for FSSTND support)
210
AC_ARG_ENABLE([fsstnd],
211
[AS_HELP_STRING([--disable-fsstnd], [Disable support for FSSTND])],
213
if test "x${enableval}" = "xyes"; then
215
AC_DEFINE([FSSTND], [1], [Description])
223
AC_DEFINE([FSSTND], [1], [Description])
228
[AS_HELP_STRING([--enable-debug],[Enable debug mode @<:@default=no@:>@])],
229
[case "${enableval}" in
230
yes) enable_debug="yes" ;;
231
no) enable_debug="no" ;;
232
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
236
if test "$enable_debug" = "no"; then
237
AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
244
[AS_HELP_STRING([--enable-mysql],[Enable MySql database support @<:@default=no@:>@])],
245
[case "${enableval}" in
246
yes) enable_mysql="yes" ;;
247
no) enable_mysql="no" ;;
248
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mysql) ;;
252
if test "x$enable_mysql" = "xyes"; then
255
[AC_MSG_FAILURE([MySQL is missing])]
262
if test "x${HAVE_MYSQL_CONFIG}" != "xyes"; then
263
AC_MSG_FAILURE([mysql_config not found in PATH])
268
[mysql_cflags=`mysql_config --cflags`
269
mysql_libs=`mysql_config --libs`
271
[AC_MSG_FAILURE([MySQL library is missing])],
272
[`mysql_config --libs`]
275
AM_CONDITIONAL(ENABLE_MYSQL, test x$enable_mysql = xyes)
276
AC_SUBST(mysql_cflags)
282
AC_CONFIG_FILES([Makefile doc/Makefile plugins/ommysql/Makefile])
285
echo "****************************************************"
286
echo "rsyslog will be compiled with the following settings:"
288
echo "Multithreading support enabled: $enable_pthreads"
289
echo "Klogd functionality enabled: $enable_klogd"
290
echo "Regular expressions support enabled: $enable_regexp"
291
echo "Zlib compression support enabled: $enable_zlib"
292
echo "MySql support enabled: $enable_mysql"
293
echo "Large file support enabled: $enable_largefile"
294
echo "Networking support enabled: $enable_inet"
295
echo "Debug mode enabled: $enable_debug"