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