Requirements:
 * >=automake-1.9
 * >=libpcap-0.8
 * flex and bison
 * pkg-config
 * libwandio 4.0.0 (https://github.com/LibtraceTeam/wandio)

Optional:
 * DAG libraries (both 2.4 and 2.5 versions are supported)
 * libyaml (required for traceanon)
 * libcrypto (required for CryptoPAN anonymisation in traceanon)
 * libncurses (required for tracetop)
 * libwandder (required for ETSI LI decoding --
        https://github.com/wanduow/libwandder)

----------------------------------

Installing libtrace:

./bootstrap.sh (only if you've cloned the source from GitHub)
./configure
make
make install

The above series of commands will install libtrace into /usr/local/lib. If
you wish to install to a non-standard location, append the
--prefix=DIR option to the ./configure command. ./configure also takes
a number of other options - run ./configure --help to view a comprehensive
list.

You may need to add the library location (e.g. /usr/local/lib) to your
/etc/ld.so.conf and run 'ldconfig' as root.

Installing with DPDK support:

1. Install DPDK libraries on your system (ideally via your system's package manager).

2. Install libtrace as described above, except change the ./configure command to
   include a `--with-dpdk` argument, e.g.
   
      ./configure --with-dpdk

3. Note that older versions of DPDK may require you to set the RTE_SDK and RTE_TARGET
   environment variables before ./configure is able to detect that DPDK is available
   on your system. Modern packaged versions of DPDK should not have this issue.

----------------------------------

FreeBSD Notes
-------------

Installing with DPDK support:

1. Install DPDK libraries on your system (DPDK version will differ depending
   on which version of FreeBSD you are running):

  sudo pkg install dpdk20.11 gmake

2. Compile and install libtrace using gmake:

   ./bootstrap.sh
   ./configure --with-dpdk LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/lib
       MAKE="gmake"
   gmake
   sudo gmake install

----------------------------------

Installation FAQ:

Q. When running ./configure, it stops with this error (or something very similar):

    ./configure: line 21506: syntax error near unexpected token `DPDK,'
    ./configure: line 21506: `                        PKG_CHECK_MODULES(DPDK, libdpdk >= 18, pkgconf_dpdk_found="yes",'

A. You need to install `pkg-config` before running ./configure.


Q. I've installed libpcap but I'm still getting the following error:
"libpcap0.8 or greater is required to compile libtrace. If you have installed
it in a non-standard location please use LDFLAGS to specify the location of
the library"?

A. You need to install the development version of the pcap library.
For example, Ubuntu/Debian users will need to install the libpcap0.8-dev
package in addition to the libpcap0.8 package.


Q. What operating systems do you support?

A. Linux, FreeBSD, Mac OS X and OpenBSD. Windows is not supported.

----------------------------------
Using libtrace:

The best source of information on how to use libtrace and the tools that come
with it is the libtrace wiki: https://github.com/wanduow/libtrace/wiki


