1
dnl $Id: configure.in,v 1.72.4.7 2004/05/14 14:43:11 bazsi Exp $
1
dnl $Id: configure.in,v 1.72.4.20 2005/05/26 08:33:54 bazsi Exp $
2
2
dnl Process this file with autoconf to produce a configure script.
3
3
AC_INIT(src/affile.c)
5
AM_INIT_AUTOMAKE(syslog-ng, "1.6.4")
6
AM_INIT_AUTOMAKE(syslog-ng, "1.6.8")
6
7
if test -n "$SNAPSHOT_VERSION"; then
7
8
VERSION=$VERSION+$SNAPSHOT_VERSION
13
14
AM_CONFIG_HEADER(src/config.h)
59
60
[ --enable-spoof-source enable spoof_source feature],,
60
61
enable_spoof_source=no)
63
AC_ARG_ENABLE(full-static,
64
[ --enable-full-static Link everything in statically],,
65
enable_full_static=no)
67
AC_ARG_ENABLE(full-dynamic,
68
[ --enable-full-dynamic Link everything in dynamically],,
69
enable_full_dynamic=no)
62
71
sysconfdir="${sysconfdir}/syslog-ng"
112
121
blb_cv_c_global_timezone=no)])
114
123
if test "x$blb_cv_c_modern_utmp" = "xyes"; then
115
AC_DEFINE(HAVE_MODERN_UTMP)
124
AC_DEFINE(HAVE_MODERN_UTMP, 1, [new style UTMP is defined on the system])
118
127
dnl Seek a type for UINT32
140
149
CPPFLAGS=$old_CPPFLAGS
142
151
if test "x$blb_cv_c_o_largefile" = "xyes"; then
143
AC_DEFINE(HAVE_O_LARGEFILE, 1)
152
AC_DEFINE(HAVE_O_LARGEFILE, 1, [O_LARGEFILE is present])
146
155
if test "x$blb_cv_c_global_timezone" = "xyes"; then
147
AC_DEFINE(HAVE_GLOBAL_TIMEZONE, 1)
156
AC_DEFINE(HAVE_GLOBAL_TIMEZONE, 1, [have a global timezone variable])
150
159
AC_CACHE_CHECK(for res_init in <resolv.h>, blb_cv_c_res_init,
151
160
[AC_EGREP_HEADER(res_init, resolv.h, blb_cv_c_res_init=yes)])
153
162
if test "x$blb_cv_c_res_init" = "xyes"; then
154
AC_DEFINE(HAVE_RES_INIT)
163
AC_DEFINE(HAVE_RES_INIT, 1, [have a res_init() function])
157
166
dnl Checks for library functions.
164
173
AC_CHECK_LIB(socket, socket)
165
174
AC_CHECK_LIB(nsl, gethostbyname)
166
175
AC_CHECK_FUNCS(select snprintf vsnprintf strerror inet_aton strncpy getutent)
167
AC_CHECK_FUNC(getopt_long,,[AC_LIBOBJ([getopt])
168
AC_LIBOBJ([getopt1])])
169
AC_CHECK_FUNC(strcasecmp,,[AC_LIBOBJ([strcasecmp])])
170
AC_CHECK_FUNC(strptime,,[AC_LIBOBJ([strptime])])
176
AC_CHECK_FUNCS(getopt_long strcasecmp strptime)
202
209
if test "x$ac_cv_func_snprintf" = "xno" -o \
203
210
"x$ac_cv_func_vsnprintf" = "xno"; then
204
AC_LIBOBJ([snprintf])
214
if test "x$ac_cv_func_getopt_long" != "xyes"; then
219
if test "x$ac_cv_func_strcasecmp" != "xyes"; then
220
AC_LIBOBJ(strcasecmp)
224
if test "x$ac_cv_func_strptime" != "xyes"; then
207
229
if test "x$ac_cv_lib_door_door_create" = "xyes"; then
208
230
AC_CHECK_HEADERS(pthread.h)
215
237
"x$enable_sun_streams" != "xno" -a \
216
238
"x$blb_cv_c_i_conslog" != "xno" -o \
217
239
"x$enable_sun_streams" = "xyes"; then
218
AC_DEFINE(HAVE_SUN_STREAMS)
240
AC_DEFINE(HAVE_SUN_STREAMS, 1, [have STREAMS support])
219
241
enable_sun_streams=yes
220
242
AC_MSG_RESULT(yes)
225
247
AC_MSG_CHECKING(whether to enable Sun door support)
226
248
if test "x$enable_sun_streams" = "xyes" -a "x$ac_cv_header_door_h" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes" -a "x$enable_sun_door" != "xno" -o "x$enable_sun_door" = "xyes"; then
227
AC_DEFINE(HAVE_SUN_DOOR)
249
AC_DEFINE(HAVE_SUN_DOOR, 1, [have Solaris Streams support])
228
250
enable_sun_door=yes
229
251
AC_MSG_RESULT(yes)
236
258
AC_MSG_CHECKING(whether to enable TCP wrapper support)
237
259
if test "x$enable_tcp_wrapper" = "xyes"; then
238
260
if test "x$ac_cv_header_tcpd_h" = "xyes" -a "x$blb_cv_c_lwrap" != "x"; then
239
LIBS="$LIBS $LIBWRAP_LIBS"
240
AC_DEFINE(ENABLE_TCP_WRAPPER)
261
AC_DEFINE(ENABLE_TCP_WRAPPER, 1, [have TCP wrapper lib])
241
262
enable_tcp_wrapper=yes
242
263
AC_MSG_RESULT(yes)
244
266
AC_MSG_RESULT(no)
245
267
enable_tcp_wrapper=no
248
271
AC_MSG_RESULT(no)
256
279
LIBNET_CONFIG=$with_libnet/libnet-config
258
281
if test -x $LIBNET_CONFIG; then
259
AC_DEFINE(ENABLE_SPOOF_SOURCE)
282
AC_DEFINE(ENABLE_SPOOF_SOURCE, 1, [enable spoof source support])
260
283
CFLAGS="$CFLAGS `$LIBNET_CONFIG --cflags`"
261
284
CPPFLAGS="$CPPFLAGS `$LIBNET_CONFIG --defines`"
262
LIBS="$LIBS `$LIBNET_CONFIG --libs`"
285
LIBNET_LIBS="`$LIBNET_CONFIG --libs`"
263
286
AC_MSG_RESULT(yes)
265
289
AC_ERROR(libnet-config not found)
268
292
AC_MSG_RESULT(no)
295
if test "$enable_full_static" = "yes" -a "$enable_full_dynamic" = "yes"; then
296
AC_ERROR(You cannot use --enable-full-static and --enable-full-dynamic at the same time)
299
AC_MSG_CHECKING(how to enable static linking for certain libraries)
300
ldversion=`ld -V 2>&1 | head -1 `
301
if echo $ldversion | egrep "GNU|Solaris" > /dev/null; then
302
LD_START_STATIC="-Wl,-Bstatic"
303
LD_END_STATIC="-Wl,-Bdynamic"
304
AC_MSG_RESULT(GNU or Solaris)
305
elif echo $ldversion | egrep "HP" > /dev/null; then
306
LD_START_STATIC="-Wl,-a,archive"
307
LD_END_STATIC="-Wl,-a,shared_archive"
312
enable_full_dynamic="yes"
313
enable_full_static="no"
314
AC_MSG_RESULT([no clues, linking everything dynamically, please send appropriate ld arguments to syslog-ng@lists.balabit.hu])
272
317
AC_MSG_CHECKING(libol version >= $LIBOL_REQ_MAJOR.$LIBOL_REQ_MINOR.$LIBOL_REQ_PATCH)
274
319
if test "$with_libol" = ""; then
275
if test ! -x `which libol-config` ; then
320
if test ! -x "`which libol-config`" ; then
276
321
AC_ERROR([libol-config not found, either install libol or supply its location with --with-libol])
278
323
LIBOL_VERSION=`libol-config --version`
299
344
"$LIBOL_MINOR" != "$LIBOL_REQ_MINOR" -o \
300
345
"$LIBOL_PATCH" -lt "$LIBOL_REQ_PATCH"; then
301
346
AC_MSG_RESULT(no)
302
AC_MSG_ERROR(Required libol version not found)
347
AC_MSG_ERROR([Required libol version not found, make sure that your libol version is in the $LIBOL_REQ_MAJOR.$LIBOL_REQ_MINOR.x branch])
304
349
AC_MSG_RESULT(ok)
306
351
if test "$enable_debug" = "yes" ; then
307
352
CFLAGS="-W -Wno-unused -g -DYYDEBUG -Wall $LIBOL_CFLAGS -D_GNU_SOURCE"
309
AC_DEFINE(WITH_DEBUG)
354
AC_DEFINE(WITH_DEBUG, 1, [enable debugging code])
311
356
CFLAGS="$CFLAGS -Wall $LIBOL_CFLAGS -D_GNU_SOURCE"
315
LIBS="$LIBS $LEXLIB $LIBOL_LIBS"
360
if test "$enable_full_static" = "yes"; then
361
LIBS="-static $LIBS $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS $LIBOL_LIBS"
362
elif test "$enable_full_dynamic" = "yes"; then
363
LIBS="$LIBS $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS $LIBOL_LIBS"
365
LIBS="$LIBS $LIBOL_LIBS $LD_START_STATIC $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS $LD_END_STATIC"
317
dnl AC_SUBST(LIBOBJS)
319
370
AC_SUBST(MAKE_CLASS)
320
AC_DEFINE_UNQUOTED(PATH_SYSCONFDIR, "`eval echo $sysconfdir`")
371
AC_DEFINE_UNQUOTED(PATH_SYSCONFDIR, "`eval echo $sysconfdir`", [configuration file directory])