~ubuntu-branches/ubuntu/feisty/syslog-ng/feisty-security

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): SZALAY Attila
  • Date: 2005-06-09 20:10:54 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050609201054-gpuo1bz4xv33edld
Tags: 1.6.8-1
* New upstream version.
* Debian patch cleaned up. If something needed dropped out please tell me!
* Create /dev/xconsole if not exists. (Closes: #312690)
* Check the config file for syntax errors before reload. (Closes: #294888)
* Fixed a typo in syslog-ng.conf (Closes: #312114)
* Created a directory. Put debian specific patches into it.
* Added the new version of syslog-ng-annon patch. (Closes: #303808)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
 
4
AC_PREREQ(2.50)
4
5
 
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
8
9
fi
9
10
LIBOL_REQ_MAJOR=0
10
11
LIBOL_REQ_MINOR=3
11
 
LIBOL_REQ_PATCH=13
 
12
LIBOL_REQ_PATCH=16
12
13
 
13
14
AM_CONFIG_HEADER(src/config.h)
14
15
 
59
60
   [  --enable-spoof-source    enable spoof_source feature],,
60
61
   enable_spoof_source=no)
61
62
 
 
63
AC_ARG_ENABLE(full-static,
 
64
   [  --enable-full-static    Link everything in statically],,
 
65
   enable_full_static=no)
 
66
 
 
67
AC_ARG_ENABLE(full-dynamic,
 
68
   [  --enable-full-dynamic    Link everything in dynamically],,
 
69
   enable_full_dynamic=no)
 
70
 
62
71
sysconfdir="${sysconfdir}/syslog-ng"
63
72
 
64
73
AM_SANITY_CHECK
112
121
blb_cv_c_global_timezone=no)])
113
122
 
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])
116
125
fi
117
126
 
118
127
dnl Seek a type for UINT32
140
149
CPPFLAGS=$old_CPPFLAGS
141
150
 
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])
144
153
fi
145
154
 
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])
148
157
fi
149
158
 
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)])
152
161
 
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])
155
164
fi
156
165
 
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)
 
177
 
171
178
 
172
179
old_LIBS=$LIBS
173
180
 
201
208
 
202
209
if test "x$ac_cv_func_snprintf" = "xno" -o \
203
210
        "x$ac_cv_func_vsnprintf" = "xno"; then
204
 
        AC_LIBOBJ([snprintf])
205
 
fi
 
211
        AC_LIBOBJ(snprintf)
 
212
fi
 
213
 
 
214
if test "x$ac_cv_func_getopt_long" != "xyes"; then
 
215
        AC_LIBOBJ(getopt)
 
216
        AC_LIBOBJ(getopt1)
 
217
fi
 
218
 
 
219
if test "x$ac_cv_func_strcasecmp" != "xyes"; then
 
220
        AC_LIBOBJ(strcasecmp)
 
221
fi
 
222
 
 
223
 
 
224
if test "x$ac_cv_func_strptime" != "xyes"; then
 
225
        AC_LIBOBJ(strptime)
 
226
fi
 
227
 
206
228
 
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)
221
243
else
224
246
 
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)
230
252
else
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)
243
264
        else
 
265
                LIBWRAP_LIBS=""
244
266
                AC_MSG_RESULT(no)
245
267
                enable_tcp_wrapper=no
246
268
        fi
247
269
else
 
270
        LIBWRAP_LIBS=""
248
271
        AC_MSG_RESULT(no)
249
272
fi
250
273
 
256
279
                LIBNET_CONFIG=$with_libnet/libnet-config
257
280
        fi
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)
264
287
        else
 
288
                LIBNET_LIBS=
265
289
                AC_ERROR(libnet-config not found)
266
290
        fi
267
291
else
268
292
        AC_MSG_RESULT(no)
269
293
fi
270
294
 
 
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)
 
297
fi
 
298
 
 
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"
 
308
        AC_MSG_RESULT(HP-UX)
 
309
else
 
310
        LD_START_STATIC=""
 
311
        LD_END_STATIC=""
 
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])
 
315
fi
271
316
 
272
317
AC_MSG_CHECKING(libol version >= $LIBOL_REQ_MAJOR.$LIBOL_REQ_MINOR.$LIBOL_REQ_PATCH)
273
318
 
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])
277
322
        fi
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])
303
348
fi
304
349
AC_MSG_RESULT(ok)
305
350
 
306
351
if test "$enable_debug" = "yes" ; then
307
352
        CFLAGS="-W -Wno-unused -g -DYYDEBUG -Wall $LIBOL_CFLAGS -D_GNU_SOURCE"
308
353
        YFLAGS="-v -d"
309
 
        AC_DEFINE(WITH_DEBUG)
 
354
        AC_DEFINE(WITH_DEBUG, 1, [enable debugging code])
310
355
else
311
356
        CFLAGS="$CFLAGS -Wall $LIBOL_CFLAGS -D_GNU_SOURCE"
312
357
        YFLAGS="-d"
313
358
fi
314
359
 
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"
 
364
else
 
365
        LIBS="$LIBS $LIBOL_LIBS $LD_START_STATIC $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS   $LD_END_STATIC"
 
366
fi
 
367
 
316
368
AC_SUBST(YFLAGS)
317
 
dnl AC_SUBST(LIBOBJS)
318
369
 
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])
321
372
 
322
373
AC_OUTPUT(
323
374
        Makefile