diff --git a/configure.ac b/configure.ac index 4158fdec30..c8371f304e 100755 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ build_clippy="true" dnl case 1: external clippy if test -n "$with_clippy" -a "$with_clippy" != "no" -a "$with_clippy" != "yes"; then - if test "$enable_clippy_only" == "yes"; then + if test "$enable_clippy_only" = "yes"; then AC_MSG_ERROR([--enable-clippy-only does not make sense with --with-clippy]) fi @@ -2113,6 +2113,19 @@ if test x"${enable_backtrace}" != x"no" ; then AC_DEFINE([HAVE_LIBUNWIND], [1], [libunwind]) backtrace_ok=yes ], [ + true + ]) + + if test "$backtrace_ok" = "no"; then + AC_CHECK_HEADER([unwind.h], [ + AC_SEARCH_LIBS([unw_getcontext], [unwind], [ + AC_DEFINE([HAVE_LIBUNWIND], [1], [libunwind]) + backtrace_ok=yes + ]) + ]) + fi + + if test "$backtrace_ok" = "no"; then case "$host_os" in sunos* | solaris2*) AC_CHECK_FUNCS([printstack], [ @@ -2129,7 +2142,7 @@ if test x"${enable_backtrace}" != x"no" ; then ],, [-lm]) ]) fi - ]) + fi if test x"${enable_backtrace}" = x"yes" -a x"${backtrace_ok}" = x"no"; then dnl user explicitly requested backtrace but we failed to find support diff --git a/lib/gitversion.pl b/lib/gitversion.pl index 2718046d0b..dd25c8976a 100644 --- a/lib/gitversion.pl +++ b/lib/gitversion.pl @@ -6,7 +6,7 @@ chdir $dir || die "$dir: $!\n"; my $gitdesc = `git describe --always --first-parent --tags --dirty --match 'frr-*' || echo -- \"0-gUNKNOWN\"`; chomp $gitdesc; -my $gitsuffix = ($gitdesc =~ /([0-9a-fA-F]{7}(-dirty)?)$/) ? "-g$1" : "-gUNKNOWN"; +my $gitsuffix = ($gitdesc =~ /-g([0-9a-fA-F]+(-dirty)?)$/) ? "-g$1" : "-gUNKNOWN"; printf STDERR "git suffix: %s\n", $gitsuffix; printf "#define GIT_SUFFIX \"%s\"\n", $gitsuffix; diff --git a/m4/ax_python.m4 b/m4/ax_python.m4 index 66338511a3..69809184ee 100644 --- a/m4/ax_python.m4 +++ b/m4/ax_python.m4 @@ -186,7 +186,7 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_MSG_RESULT([yes]) PYTHON_CFLAGS="`\"$pycfg\" --includes`" - if test x"${py_ver}" == x"3.8" || test x"{py_ver}" == x"3.9"; then + if test x"${py_ver}" = x"3.8" || test x"{py_ver}" = x"3.9"; then PYTHON_LIBS="`\"$pycfg\" --ldflags --embed`" else PYTHON_LIBS="`\"$pycfg\" --ldflags`"