diff --git a/configure.in b/configure.in index 95d63fdcd..da807d54a 100644 --- a/configure.in +++ b/configure.in @@ -79,6 +79,8 @@ AC_PROG_INSTALL AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc) AM_PROG_LEX +PKG_PROG_PKG_CONFIG + # All our source files for function replacements are in lib/ AC_CONFIG_LIBOBJ_DIR(lib) @@ -305,7 +307,7 @@ AC_ARG_WITH(xdp, AS_HELP_STRING(--with-xdp, include XDP capture support), if test "$want_xdp" != no; then AC_CHECK_LIB(elf, elf_begin, elffound=1, elffound=0) - if test "$elffound" == 1; then + if test "$elffound" = 1; then # check for libbpf AC_CHECK_LIB(bpf, xsk_socket__create, bpffound=1, bpffound=0, -lelf) @@ -518,7 +520,23 @@ AC_CHECK_DECL([PACKET_FANOUT], [[#include ]]) # If we use DPDK we might be able to use libnuma -AC_CHECK_LIB(numa, numa_node_to_cpus, have_numa=1, have_numa=0) +AC_ARG_WITH(numa, + AS_HELP_STRING(--without-numa,disable NUMA support), +[ + if test "$withval" = no + then + want_numa=no + else + want_numa=yes + fi +],[ + # Default to building with NUMA + want_numa=yes +]) + +if test "$want_numa" != no; then + AC_CHECK_LIB(numa, numa_node_to_cpus, have_numa=1, have_numa=0) +fi # Need libwandder for ETSI live decoding AC_CHECK_LIB(wandder, init_wandder_decoder, have_wandder=1, have_wandder=0) @@ -900,6 +918,8 @@ if (test "$use_llvm" != "no"); then fi fi +PKG_CHECK_MODULES(ncurses,ncurses,have_ncurses=yes,have_ncurses=no) + AC_ARG_WITH([ncurses], AC_HELP_STRING([--with-ncurses], [build tracetop (requires ncurses)])) diff --git a/tools/tracetop/Makefile.am b/tools/tracetop/Makefile.am index 2ebbc3a78..a2eb27978 100644 --- a/tools/tracetop/Makefile.am +++ b/tools/tracetop/Makefile.am @@ -6,6 +6,6 @@ bin_PROGRAMS = tracetop include ../Makefile.tools tracetop_SOURCES = tracetop.cc -tracetop_LDADD = -lncurses +tracetop_LDADD = @ncurses_LIBS@ tracetop_CPPFLAGS = -fno-strict-aliasing $(AM_CFLAGS) endif