]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure.ac: prevent empty if block (llc check)
authorJason Ish <jason.ish@oisf.net>
Wed, 28 Aug 2019 18:01:14 +0000 (12:01 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 29 Aug 2019 09:14:07 +0000 (11:14 +0200)
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

configure.ac

index ef153e23e1f2109448f34c40956c50a29a90caed..b087c4e04206c17916d28f00b69673326cb250fc 100644 (file)
                              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])])
           ])