trace-cmd: Only add udis86 CFLAGS and LDFLAGS if it is found

As we need to update both LDFLAGS and CFLAGS, move the test to see if
udisc86 is installed to a variable, and then set NO_UDIS86 if it is not
found. This way we do not need to test if it exists twice, nor have
LDFLAGS set unconditionally.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204277
Link: http://lore.kernel.org/linux-trace-devel/20190724190758.4e18498f@gandalf.local.home

Reported-by: howaboutsynergy@pm.me
Tested-by: Patrick McLean <patrick.mclean@sony.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed