From: Jason Ish Date: Wed, 28 Aug 2019 18:01:14 +0000 (-0600) Subject: configure.ac: prevent empty if block (llc check) X-Git-Tag: suricata-5.0.0-rc1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d14fe372b4cc92443dd4a51e7c55425fd5ef99a8;p=thirdparty%2Fsuricata.git configure.ac: prevent empty if block (llc check) As AC_SUBST doesn't expand to anything in the shell script, this will generate a bad script on older versions of autoconf. Change the logic to eliminate the possibility of an empty if or else block. Redmine issue: https://redmine.openinfosecfoundation.org/issues/3124 --- diff --git a/configure.ac b/configure.ac index ef153e23e1..b087c4e042 100644 --- a/configure.ac +++ b/configure.ac @@ -462,9 +462,10 @@ printf("llc-%s.%s llc-%s llc", v[[1]], v[[2]], v[[1]]) }') AC_CHECK_PROGS([LLC], [$llc_candidates], "no") - AS_IF([test "$LLC" != "no"], - [AC_SUBST(LLC)], - [AC_MSG_ERROR([unable to find any of $llc_candidates needed to build ebpf files])]) + if test "$LLC" = "no"; then + AC_MSG_ERROR([unable to find any of $llc_candidates needed to build ebpf files]) + fi + AC_SUBST(LLC) ], [AC_MSG_ERROR([clang needed to build ebpf files])]) ])