@@ -417,6 +417,10 @@ AC_ARG_ENABLE(native,
417
417
418
418
AC_ARG_ENABLE ( afsnmp , [ --enable-afsnmp Enable afsnmp module (default: auto)] ,, enable_afsnmp="auto" )
419
419
420
+ AC_ARG_ENABLE ( stackdump ,
421
+ [ --disable-stackdump Disable stackdump support]
422
+ ,,enable_stackdump="auto" )
423
+
420
424
AC_ARG_ENABLE ( all-modules ,
421
425
[ --enable-all-modules Forcibly enable all modules. (default: auto)]
422
426
,,enable_all_modules="auto" )
@@ -1407,6 +1411,10 @@ dnl ***************************************************************************
1407
1411
1408
1412
PKG_CHECK_MODULES(LIBUNWIND, libunwind >= 1.6.2, enable_libunwind="yes", enable_libunwind="no")
1409
1413
1414
+ if test "$enable_stackdump" = "yes" && test "$enable_libunwind" = "no"; then
1415
+ AC_MSG_ERROR ( [ Could not find libunwind, and stackdump support was explicitly enabled.] )
1416
+ fi
1417
+
1410
1418
dnl ***************************************************************************
1411
1419
dnl libesmtp headers/libraries
1412
1420
dnl ***************************************************************************
@@ -2001,6 +2009,16 @@ if test "x$enable_kafka" = "xauto"; then
2001
2009
AC_MSG_RESULT ( [ $enable_kafka] )
2002
2010
fi
2003
2011
2012
+ if test "x$enable_stackdump" = "xauto"; then
2013
+ AC_MSG_CHECKING ( whether to enable stackdump support )
2014
+ if test "x$enable_libunwind" != "xno"; then
2015
+ enable_stackdump="yes"
2016
+ else
2017
+ enable_stackdump="no"
2018
+ fi
2019
+ AC_MSG_RESULT ( [ $enable_stackdump] )
2020
+ fi
2021
+
2004
2022
if test "x$enable_systemd" = "xauto"; then
2005
2023
if test "$ostype" = "Linux" -a "$have_libsystemd" = "yes"; then
2006
2024
enable_systemd=yes
@@ -2269,7 +2287,7 @@ AC_DEFINE_UNQUOTED(ENABLE_ENV_WRAPPER, `enable_value $enable_env_wrapper`, [Enab
2269
2287
AC_DEFINE_UNQUOTED ( ENABLE_SYSTEMD , `enable_value $enable_systemd` , [ Enable systemd support] )
2270
2288
AC_DEFINE_UNQUOTED ( ENABLE_KAFKA , `enable_value $enable_kafka` , [ Enable kafka support] )
2271
2289
AC_DEFINE_UNQUOTED ( ENABLE_CPP , `enable_value $enable_cpp` , [ Enable C++ support] )
2272
- AC_DEFINE_UNQUOTED ( ENABLE_LIBUNWIND , `enable_value $enable_libunwind ` , [ Enable stackdump using libunwind] )
2290
+ AC_DEFINE_UNQUOTED ( ENABLE_STACKDUMP , `enable_value $enable_stackdump ` , [ Enable stackdump using libunwind] )
2273
2291
AC_DEFINE_UNQUOTED ( SYSTEMD_JOURNAL_MODE , `journald_mode` , [ Systemd-journal support mode] )
2274
2292
AC_DEFINE_UNQUOTED ( HAVE_INOTIFY , `enable_value $ac_cv_func_inotify_init` , [ Have inotify] )
2275
2293
AC_DEFINE_UNQUOTED ( USE_CONST_IVYKIS_MOCK , `enable_value $IVYKIS_VERSION_UPDATED` , [ ivykis version is greater than $IVYKIS_UPDATED_VERSION] )
@@ -2439,7 +2457,7 @@ echo " systemd support : ${enable_systemd:=no} (unit dir: ${systemd
2439
2457
echo " systemd-journal support : ${with_systemd_journal:=no}"
2440
2458
echo " JSON support : $with_jsonc"
2441
2459
echo " perf support : ${enable_perf:=no}"
2442
- echo " unwind support : ${enable_libunwind :=no}"
2460
+ echo " stackdump support : ${enable_stackdump :=no}"
2443
2461
echo " Build options:"
2444
2462
echo " Generate manual pages : ${enable_manpages:=no}"
2445
2463
echo " Install manual pages : ${enable_manpages_install:=no}"
0 commit comments