]> git.ipfire.org Git - thirdparty/lldpd.git/blame - configure.ac
build: fix inclusion of editline/readline.h
[thirdparty/lldpd.git] / configure.ac
CommitLineData
43c02e7b
VB
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
d38eae28
VB
4#######################
5### Base configuration
6
7# Configure autoconf
f3609abd 8AC_PREREQ([2.69])
4593c0dc 9
4593c0dc 10AC_INIT([lldpd],
a888bea6 11 [m4_esyscmd_s([./get-version])],
fae9dd45 12 [https://github.com/lldpd/lldpd/issues],
493b0d42 13 [lldpd],
9b50cef9 14 [https://lldpd.github.io/])
4593c0dc 15
4b292b55 16AC_CONFIG_SRCDIR([src/log.c])
bc6cf978 17AC_CONFIG_HEADERS([config.h])
95493844
VB
18AC_CONFIG_FILES([Makefile
19 src/Makefile
20 src/compat/Makefile
21 src/daemon/Makefile
adb13d98 22 src/lib/Makefile
95493844 23 src/client/Makefile
adb13d98 24 tests/Makefile
95493844 25 osx/Makefile])
2acc1418 26AC_CONFIG_MACRO_DIR([m4])
fa71a00c 27AC_SUBST([CONFIGURE_ARGS], [$ac_configure_args])
43c02e7b 28
d38eae28 29# Configure automake
4a0791a4 30AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror tar-ustar])
33aa26d0 31AM_MAINTAINER_MODE
44cd2bed 32m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
d38eae28 33
0339b9a2
VB
34# Automake 1.12...
35m4_pattern_allow([AM_PROG_AR])
36AM_PROG_AR
37
d38eae28 38# Configure libtool
d38eae28 39LT_INIT
f571f2db 40gl_LD_VERSION_SCRIPT
d38eae28
VB
41
42#######################
43### Checks
44
43c02e7b
VB
45# Checks for programs.
46AC_PROG_CC
f3609abd 47AC_PROG_CC_C99
630cc035
VB
48if test x"$ac_cv_prog_cc_c99" = x"no"; then
49 AC_MSG_FAILURE([*** C99 support is mandatory])
50fi
e47df85e 51AC_PROG_CPP
d38eae28 52AM_PROG_CC_C_O
206db033 53LT_INIT
fe80711e 54AC_PROG_LN_S
7ba4a183 55AC_PROG_EGREP
140e34f0 56AC_PROG_AWK
e47df85e 57AC_PROG_SED
2acc1418 58
9dee8dec
VB
59# Check for pkg-config
60m4_ifndef([PKG_CHECK_MODULES], [
61 AC_MSG_ERROR([PKG_CHECK_MODULES not found. Please install pkg-config and re-run autogen.sh])])
62
4b292b55
VB
63# Doxygen
64DX_HTML_FEATURE(ON)
65DX_DOT_FEATURE(OFF)
66DX_CHM_FEATURE(OFF)
67DX_CHI_FEATURE(OFF)
68DX_MAN_FEATURE(OFF)
69DX_RTF_FEATURE(OFF)
70DX_XML_FEATURE(OFF)
71DX_PDF_FEATURE(ON)
72DX_PS_FEATURE(OFF)
73DX_INIT_DOXYGEN([lldpd], [doxygen.cfg], [doxygen])
74
45e89c8c 75# Check some compiler flags
f42b8214 76AX_CFLAGS_GCC_OPTION([-Wunknown-warning-option], [LLDP_CFLAGS])
8d92800b
VB
77AX_CFLAGS_GCC_OPTION([-fdiagnostics-show-option], [LLDP_CFLAGS])
78AX_CFLAGS_GCC_OPTION([-fdiagnostics-color=auto], [LLDP_CFLAGS])
0221be2f
VB
79AX_CFLAGS_GCC_OPTION([-fno-omit-frame-pointer], [LLDP_CFLAGS])
80AX_CFLAGS_GCC_OPTION([-funsigned-char], [LLDP_CFLAGS])
8d92800b
VB
81AX_CFLAGS_GCC_OPTION([-pipe], [LLDP_CFLAGS])
82AX_CFLAGS_GCC_OPTION([-Wall], [LLDP_CFLAGS])
83AX_CFLAGS_GCC_OPTION([-W], [LLDP_CFLAGS])
84AX_CFLAGS_GCC_OPTION([-Wextra], [LLDP_CFLAGS])
85AX_CFLAGS_GCC_OPTION([-Wformat], [LLDP_CFLAGS])
86AX_CFLAGS_GCC_OPTION([-Wformat-security], [LLDP_CFLAGS])
d0058aa6 87AX_CFLAGS_GCC_OPTION([-Wimplicit-fallthrough], [LLDP_CFLAGS])
8d92800b 88AX_CFLAGS_GCC_OPTION([-Wfatal-errors], [LLDP_CFLAGS])
09f0af1d
ALG
89AX_CFLAGS_GCC_OPTION([-Wheader-guard], [LLDP_CFLAGS])
90AX_CFLAGS_GCC_OPTION([-Wdocumentation], [LLDP_CFLAGS])
8d92800b 91AX_CFLAGS_GCC_OPTION([-Winline], [LLDP_CFLAGS])
dff59172 92AX_CFLAGS_GCC_OPTION([-Wpointer-arith], [LLDP_CFLAGS])
f540397c 93AX_CFLAGS_GCC_OPTION([-Wmissing-prototypes], [LLDP_CFLAGS])
9b68a67f 94AX_CFLAGS_GCC_OPTION([-Wno-cast-align], [LLDP_CFLAGS]) dnl clang is bad at this
8d92800b
VB
95AX_CFLAGS_GCC_OPTION([-Wno-unused-parameter], [LLDP_CFLAGS])
96AX_CFLAGS_GCC_OPTION([-Wno-missing-field-initializers], [LLDP_CFLAGS])
97AX_CFLAGS_GCC_OPTION([-Wno-sign-compare], [LLDP_CFLAGS]) dnl Should be fixed later
98AX_LDFLAGS_OPTION([-Wl,-z,relro], [LLDP_LDFLAGS])
99AX_LDFLAGS_OPTION([-Wl,-z,now], [LLDP_LDFLAGS])
19a5c9b6 100
bdc8f796
VB
101AC_C_TYPEOF
102
56663327
VB
103# Hardening
104AC_ARG_ENABLE([hardening],
105 [AS_HELP_STRING([--enable-hardening],
d2a01934 106 [Enable compiler and linker options to frustrate memory corruption exploits @<:@default=yes@:>@])],
56663327
VB
107 [hardening="$enableval"],
108 [hardening="yes"])
a8add742
VB
109AC_ARG_ENABLE([pie],
110 [AS_HELP_STRING([--enable-pie],
111 [Enable PIE (position independant executable) @<:@default=no@:>@])],
112 [pie="$enableval"],
113 [pie="no"])
56663327
VB
114
115if test x"$hardening" != x"no"; then
116 AX_CFLAGS_GCC_OPTION([-fstack-protector], [LLDP_CFLAGS])
117 AX_CFLAGS_GCC_OPTION([-fstack-protector-all], [LLDP_CFLAGS])
118 AX_CFLAGS_GCC_OPTION([-fstack-protector-strong], [LLDP_CFLAGS])
38625a92 119 AX_CFLAGS_GCC_OPTION([-fstack-protector-strong], [LLDP_CFLAGS])
adbb26bc 120 AX_CFLAGS_GCC_OPTION([-fstack-clash-protection], [LLDP_CFLAGS])
56663327 121 AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2], [LLDP_CPPFLAGS])
a8add742
VB
122fi
123if test x"$pie" = x"yes"; then
56663327 124 AX_CFLAGS_GCC_OPTION([-fPIE], [LLDP_CFLAGS])
f42b8214
VB
125 AX_LDFLAGS_OPTION([-fPIE -pie], [LLDP_BIN_LDFLAGS],
126 [AX_LDFLAGS_OPTION([-fPIE -Wl,-pie], [LLDP_BIN_LDFLAGS])])
56663327
VB
127fi
128
33fd6231
VB
129# Sanitizers
130AC_ARG_ENABLE([sanitizers],
28d521e2 131 AS_HELP_STRING([--enable-sanitizers],
33fd6231
VB
132 [Enable code instrumentation with selected sanitizers @<:@default=no@:>@]),
133 [
134case "$enableval" in
135 no) sanitizers= ;;
2315d097 136 yes) sanitizers="-fsanitize=address,undefined" ;;
33fd6231
VB
137 *) sanitizers="-fsanitize=$enableval" ;;
138esac
dc37bc8d
VB
139if test x"$sanitizers" != x; then
140 LLDP_CFLAGS="$LLDP_CFLAGS $sanitizers"
141 LLDP_LDFLAGS="$LLDP_LDFLAGS $sanitizers"
142 AC_DEFINE([HAVE_ADDRESS_SANITIZER], 1, [Define if have both address and leak sanitizer])
2e472cca
VB
143elif test x"$hardening" != x"no"; then
144 AX_LDFLAGS_OPTION([-fsanitize=safe-stack], [LLDP_BIN_LDFLAGS])
145 if test x"$ax_cv_ld_check_flag__fsanitize_safe_stack" != x"no"; then
146 AX_CFLAGS_GCC_OPTION([-fsanitize=safe-stack], [LLDP_CFLAGS])
147 fi
dc37bc8d 148fi
33fd6231
VB
149 ])
150
0fa28337 151# Fuzzer
14d35a08 152AC_ARG_ENABLE([fuzzer],
153 AS_HELP_STRING([--enable-fuzzer],
154 [Enable fuzzing @<:@default=no@:>@]),
155 [
156case "$enableval" in
157 no) fuzzer= ;;
158 yes) fuzzer="-fsanitize=fuzzer" ;;
159 *) fuzzer="$enableval" ;;
160esac
161if test x"$fuzzer" != x; then
0fa28337 162 AC_SUBST([FUZZ_DECODE_ENGINE], ["$fuzzer"])
261f3af4 163 AX_CFLAGS_GCC_OPTION([-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION], [LLDP_CFLAGS])
14d35a08 164fi
165 ])
166
28d521e2
VB
167# Code coverage
168AC_ARG_ENABLE([gcov],
169 AS_HELP_STRING([--enable-gcov],
170 [Enable coverage instrumentation @<:@default=no@:>@]),
171 [gcov="$enableval"],
172 [gcov="no"])
173if test x"$gcov" != x"no"; then
174 LLDP_CFLAGS="$LLDP_CFLAGS --coverage"
175 LLDP_LDFLAGS="$LLDP_LDFLAGS --coverage"
176fi
177
e12c2365
VB
178# OS
179lldp_CHECK_OS
3dc1eb8c 180lldp_CFLAGS_OS
24b8d79f 181
8e4b9031
VB
182AC_CACHE_SAVE
183
d38eae28
VB
184# Checks for header files.
185AC_HEADER_RESOLV
396cfdfe 186AC_CHECK_HEADERS([valgrind/valgrind.h])
c3e340b6 187lldp_CHECK_STDINT
43c02e7b 188
8e4b9031
VB
189AC_CACHE_SAVE
190
43c02e7b 191# Checks for typedefs, structures, and compiler characteristics.
6bb9c4e0 192lldp_CHECK___PROGNAME
dd1d33cf 193lldp_CHECK_ALIGNOF
43c02e7b
VB
194
195# Checks for library functions.
4b292b55 196AC_CONFIG_LIBOBJ_DIR([src/compat])
d38eae28
VB
197AC_FUNC_MALLOC
198AC_FUNC_REALLOC
45bf0bd0 199AC_FUNC_FORK
47bbc5f3
VB
200
201# Some functions can be in libbsd
ff3dcc4a
VB
202AC_ARG_WITH([libbsd],
203 AS_HELP_STRING(
204 [--with-libbsd],
205 [Use libbsd @<:@default=auto@:>@]),
206 [],
207 [with_libbsd=auto])
208if test x"$with_libbsd" != x"no"; then
209 PKG_CHECK_MODULES([libbsd], [libbsd-overlay], [
210 _save_CFLAGS="$CFLAGS"
211 _save_LIBS="$LIBS"
212 CFLAGS="$CFLAGS $libbsd_CFLAGS"
213 LIBS="$LIBS $libbsd_LIBS"
214 AC_MSG_CHECKING([if libbsd can be linked correctly])
206db033 215 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
ff3dcc4a
VB
216 @%:@include <sys/time.h>
217 @%:@include <sys/types.h>
206db033 218 ]], [[]])],[
ff3dcc4a
VB
219 AC_MSG_RESULT(yes)
220 LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"
221 LLDP_LDFLAGS="$LLDP_LDFLAGS $libbsd_LIBS"
222 with_libbsd=yes
223 ],[
224 AC_MSG_RESULT(no)
225 CFLAGS="$_save_CFLAGS"
226 LIBS="$_save_LIBS"
227 if test x"$with_libbsd" = x"yes"; then
228 AC_MSG_FAILURE([*** no libbsd support found])
229 fi
230 with_libbsd=no
231 ])
232 ], [
233 if test x"$with_libbsd" = x"yes"; then
234 AC_MSG_FAILURE([*** no libbsd support found])
235 fi
236 with_libbsd=no
237 ])
238fi
e01aeb55 239
47bbc5f3 240# setproctitle may have an _init function
1e0d651f
VB
241AC_REPLACE_FUNCS([setproctitle])
242AC_CHECK_FUNCS([setproctitle_init])
554d650d
VB
243# Other functions
244AC_REPLACE_FUNCS([strlcpy
245 strnlen
246 strndup
8a378b16 247 strtonum
af828c47 248 getline
554d650d
VB
249 asprintf
250 vsyslog
251 daemon])
252# Optional functions
8dab5698 253AC_CHECK_FUNCS([setresuid setresgid])
e66b7f34 254
d0a03372
VB
255# Check for res_init. On OSX, res_init is a symbol in libsystem_info
256# and a macro in resolv.h. We need to ensure we test with resolv.h.
257m4_pushdef([AC_LANG_CALL(C)], [
258 AC_LANG_PROGRAM([$1
259@%:@include <resolv.h>], [return $2 ();])])
260AC_SEARCH_LIBS([res_init], resolv bind,
261 AC_DEFINE([HAVE_RES_INIT], 1,
262 [Define to indicate that res_init() exists]))
263m4_popdef([AC_LANG_CALL(C)])
e66b7f34 264
8e4b9031
VB
265AC_CACHE_SAVE
266
d38eae28 267## Unit tests wich check
a8dd1894 268PKG_CHECK_MODULES([check], [check >= 0.9.4], [have_check=yes], [have_check=no])
43c02e7b 269
13181ede 270# Third-party libraries
c461e5da 271lldp_CHECK_LIBEVENT
3a7923cb 272lldp_CHECK_LIBCAP
e5c94652 273
135ff0f7
VB
274# Compatibility with pkg.m4 < 0.27
275m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR],
276 [AC_ARG_WITH([pkgconfigdir],
277 [AS_HELP_STRING([--with-pkgconfigdir],
278 [install directory for *.pc pkg-config file])],
279 [],[with_pkgconfigdir='$(libdir)/pkgconfig'])
280 AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])])
281
d38eae28
VB
282#######################
283### Options
43c02e7b 284
35f6f4fb
VB
285# Readline
286AC_ARG_WITH([readline],
287 AS_HELP_STRING(
288 [--with-readline],
fa9b12c5 289 [Enable the use of readline-like library @<:@default=auto@:>@]),
35f6f4fb 290 [],
fa9b12c5 291 [with_readline=auto])
35f6f4fb 292if test x"$with_readline" != x"no"; then
23509dc0 293 AX_LIB_READLINE_LLDPD
fa9b12c5 294 if test x"$with_readline" != x"check" -a x"$with_readline" != x"auto"; then
35f6f4fb
VB
295 if test x"$ax_cv_lib_readline" = x"no"; then
296 AC_MSG_FAILURE([*** no readline support found])
297 fi
298 fi
299else
300 ax_cv_lib_readline="no"
301fi
302
d38eae28
VB
303# SNMP
304AC_ARG_WITH([snmp],
305 AS_HELP_STRING(
306 [--with-snmp],
fa9b12c5
VB
307 [Enable the use of SNMP @<:@default=no@:>@]),
308 [],
309 [with_snmp=no])
310lldp_CHECK_SNMP
315587ef 311
8beb9a73 312# XML
1480ce74 313AC_ARG_WITH([xml],
00e40dba 314 AS_HELP_STRING(
1480ce74 315 [--with-xml],
dd8c9fe3 316 [Enable XML output via libxml2 @<:@default=auto@:>@]),
fa9b12c5 317 [],
dd8c9fe3 318 [with_xml=auto])
fa9b12c5 319lldp_CHECK_XML2
1480ce74 320
06987a24 321# JSON (built-in)
20edc61c 322lldp_ARG_ENABLE([json0], [use of pre-0.9.2 JSON/json-c format], [no])
8b7150e4 323
00e40dba
VB
324# Seccomp
325AC_ARG_WITH([seccomp],
326 AS_HELP_STRING(
327 [--with-seccomp],
5472ac18 328 [Enable seccomp support (with libseccomp, experimental) @<:@default=no@:>@]),
00e40dba
VB
329 [],
330 [with_seccomp=no])
331lldp_CHECK_SECCOMP
332
c3f85560 333# OS X launchd support
4dfe31fd
VB
334lldp_ARG_WITH([launchddaemonsdir], [Directory for launchd configuration file (OSX)],
335 [/Library/LaunchDaemons])
336AC_SUBST([launchddaemonsdir], [$with_launchddaemonsdir])
337AM_CONDITIONAL(HAVE_LAUNCHDDAEMONSDIR,
338 [test -n "$with_launchddaemonsdir" -a "x$with_launchddaemonsdir" != xno ])
9d1524b7
VB
339
340# Systemd
341lldp_ARG_WITH([systemdsystemunitdir], [Directory for systemd service files],
29760896 342 [$($PKG_CONFIG --variable=systemdsystemunitdir systemd 2> /dev/null)])
4dfe31fd
VB
343AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
344AM_CONDITIONAL(HAVE_SYSTEMDSYSTEMUNITDIR,
345 [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
c3f85560 346
a9f77488
VB
347# sysusers
348lldp_ARG_WITH([sysusersdir], [Directory for sysusers files],
349 [$($PKG_CONFIG --variable=sysusersdir systemd 2> /dev/null)])
350AC_SUBST([sysusersdir], [$with_sysusersdir])
351AM_CONDITIONAL(HAVE_SYSUSERSDIR,
352 [test -n "$with_sysusersdir" -a "x$with_sysusersdir" != xno ])
353
cd7ee899
VB
354# AppArmor
355lldp_ARG_WITH([apparmordir], [Directory for AppArmor profiles (Linux)],
356 [no])
357AC_SUBST([apparmordir], [$with_apparmordir])
358AM_CONDITIONAL(HAVE_APPARMORDIR,
2b70dd95 359 [test -n "$with_apparmordir" -a "x$with_apparmordir" != xno ])
cd7ee899 360
bdfe4193
VB
361# Systemtap/DTrace
362lldp_SYSTEMTAP
363
d38eae28 364# Privsep settings
71a7dbb3 365lldp_ARG_ENABLE([privsep], [Privilege separation], [yes])
d38eae28
VB
366lldp_ARG_WITH([privsep-user], [Which user to use for privilege separation], [_lldpd])
367lldp_ARG_WITH([privsep-group], [Which group to use for privilege separation], [_lldpd])
9a4ed64a
VB
368
369# Directories
370dnl On autoconf 2.69 and before, runstatedir is not configurable, let be able to use it anyway
371if test "x$runstatedir" = x; then
372 AC_SUBST([runstatedir], ['${localstatedir}/run'])
373fi
374lldp_ARG_WITH([privsep-chroot], [Which directory to use to chroot lldpd], [${runstatedir}/lldpd])
3a3a3623 375lldp_ARG_WITH([lldpd-ctl-socket], [Path to socket for communication with lldpd], [${runstatedir}/lldpd.socket])
5133ce2f 376lldp_ARG_WITH([lldpd-pid-file], [Path to lldpd PID file], [${runstatedir}/lldpd.pid])
89840df0 377
568a0d73 378# Netlink
48292d82
VB
379lldp_ARG_WITH_UNQUOTED([netlink-max-receive-bufsize], [Netlink maximum receive buffer size], [1024*1024])
380lldp_ARG_WITH_UNQUOTED([netlink-receive-bufsize], [Netlink initial receive buffer size], [0])
568a0d73
VB
381lldp_ARG_WITH_UNQUOTED([netlink-send-bufsize], [Netlink send buffer size], [0])
382
d38eae28
VB
383# CDP/FDP/EDP/SONMP
384lldp_ARG_ENABLE([cdp], [Cisco Discovery Protocol], [yes])
385lldp_ARG_ENABLE([fdp], [Foundry Discovery Protocol], [yes])
386lldp_ARG_ENABLE([edp], [Extreme Discovery Protocol], [yes])
387lldp_ARG_ENABLE([sonmp], [SynOptics Network Management Protocol], [yes])
a1347cd8 388
d38eae28
VB
389# LLDPMED/Dot1/Dot3
390lldp_ARG_ENABLE([lldpmed], [LLDP-MED extension], [yes])
391lldp_ARG_ENABLE([dot1], [Dot1 extension (VLAN stuff)], [yes])
392lldp_ARG_ENABLE([dot3], [Dot3 extension (PHY stuff)], [yes])
fb1b78bb 393lldp_ARG_ENABLE([custom], [Custom TLV support], [yes])
a1347cd8 394
184bd199 395# Oldies
2472bfda 396MIN_LINUX_KERNEL_VERSION=2.6.39
d9fdc886 397lldp_ARG_ENABLE([oldies], [compatibility with Linux kernel older than 2.6.39], [no])
2472bfda
VB
398if test x"$os" = x"Linux"; then
399 if test x"$enable_oldies" = x"no"; then
400 AC_DEFINE_UNQUOTED(MIN_LINUX_KERNEL_VERSION, "[$MIN_LINUX_KERNEL_VERSION]", [Minimal Linux kernel version required])
401 else
402 AC_DEFINE(MIN_LINUX_KERNEL_VERSION, "2.6.11", [Minimal kernel version required])
403 fi
404fi
184bd199 405
57231d32
VB
406AX_BUILD_DATE_EPOCH(BUILD_DATE, "%FT%TZ", [BUILD_DATE="(unknown)"])
407AC_DEFINE_UNQUOTED(BUILD_DATE, "[$BUILD_DATE]", [Build date and time])
69d92462
OO
408
409dnl per reproducible-builds.org check SOURCE_DATE_EPOCH
410dnl
411if test -z "${SOURCE_DATE_EPOCH+set}" ; then
efa6a7a3
VB
412AC_DEFINE_UNQUOTED(LLDP_CC, "[$CC $LLDP_CFLAGS $LLDP_CPPFLAGS $CFLAGS $CPPFLAGS]", [C compiler command])
413AC_DEFINE_UNQUOTED(LLDP_LD, "[$LD $LLDP_LDFLAGS $LLDP_BIN_LDFLAGS $LDFLAGS $LIBS]", [Linker compiler command])
69d92462
OO
414else
415AC_DEFINE_UNQUOTED(LLDP_CC, "[C compiler command is not available for reproducible builds]", [C compiler command])
416AC_DEFINE_UNQUOTED(LLDP_LD, "[Linker compiler command is not available for reproducible builds]", [Linker compiler command])
417fi
efa6a7a3 418
d38eae28
VB
419#######################
420# Output results
8d92800b
VB
421AC_SUBST([LLDP_CFLAGS])
422AC_SUBST([LLDP_CPPFLAGS])
423AC_SUBST([LLDP_LDFLAGS])
f42b8214 424AC_SUBST([LLDP_BIN_LDFLAGS])
0fa28337 425AM_CONDITIONAL([ENABLE_FUZZ_DECODE], [test x"$fuzzer" != x])
d38eae28
VB
426AM_CONDITIONAL([HAVE_CHECK], [test x"$have_check" = x"yes"])
427AM_CONDITIONAL([USE_SNMP], [test x"$with_snmp" = x"yes"])
1480ce74 428AM_CONDITIONAL([USE_XML], [test x"$with_xml" = x"yes"])
00e40dba 429AM_CONDITIONAL([USE_SECCOMP], [test x"$with_seccomp" = x"yes"])
e320a274
VB
430dnl If old default of AR_FLAGS is otherwise being used (because of older automake),
431dnl replace it with one without 'u'
432if test "x$AR_FLAGS" = "xcru" ; then
433 AR_FLAGS="cr"
434fi
43c02e7b 435AC_OUTPUT
d38eae28 436
4c1a8c61 437if test x"$LIBEVENT_EMBEDDED" = x; then
e5c94652
VB
438 libevent=system
439else
440 libevent=embedded
441fi
442
d38eae28
VB
443cat <<EOF
444
445------------------ Summary ------------------
446 $PACKAGE_NAME version $PACKAGE_VERSION
91e0280a 447 OS.............: $os
d38eae28 448 Prefix.........: $prefix
8d92800b 449 C Compiler.....: $CC $LLDP_CFLAGS $LLDP_CPPFLAGS $CFLAGS $CPPFLAGS
f42b8214 450 Linker.........: $LD $LLDP_LDFLAGS $LLDP_BIN_LDFLAGS $LDFLAGS $LIBS
e5c94652 451 Libevent.......: $libevent
35f6f4fb 452 Readline.......: ${ax_cv_lib_readline}
457d06aa 453
d38eae28
VB
454 Optional features:
455 SNMP support...: ${with_snmp-no}
456 CDP............: $enable_cdp
457 FDP............: $enable_fdp
458 EDP............: $enable_edp
459 SONMP..........: $enable_sonmp
460 LLDPMED........: $enable_lldpmed
461 DOT1...........: $enable_dot1
462 DOT3...........: $enable_dot3
fb1b78bb 463 CUSTOM.........: $enable_custom
1480ce74 464 XML output.....: ${with_xml-no}
184bd199 465 Oldies support.: $enable_oldies
00e40dba 466 seccomp........: ${with_seccomp-no}
ff3dcc4a 467 libbsd.........: ${with_libbsd-no}
457d06aa 468
71a7dbb3
VB
469 Privilege separation:
470 Enabled........: $enable_privsep
08841844
VB
471 User/group.....: ${with_privsep_user}/${with_privsep_group}
472 Chroot.........: ${with_privsep_chroot}
4262ca0c
VB
473
474 Instrumentation (for devs only):
475 Sanitizers.....: ${sanitizers:-none}
476 Coverage.......: ${gcov}
457d06aa
VB
477------------- Compiler version --------------
478$($CC --version || true)
479-------------- Linker version ---------------
480$($LD --version || true)
d38eae28
VB
481---------------------------------------------
482
483Check the above options and compile with:
484 ${MAKE-make}
485
486EOF