@@ -9,12 +9,13 @@ Prerequisites for building the OpenDataPlane (ODP) API
automake
autoconf
libtool
+ pkg-config
On Debian/Ubuntu systems:
- $ sudo apt-get install automake autoconf libtool
+ $ sudo apt-get install automake autoconf libtool pkg-config
On CentOS/RedHat/Fedora systems:
- $ sudo yum install automake autoconf libtool
+ $ sudo yum install automake autoconf libtool pkgconfig
3. Required libraries
@@ -199,11 +200,11 @@ Prerequisites for building the OpenDataPlane (ODP) API
4.0 Packages needed to build API tests
- Cunit test framework version 2.1-3 is required
- Cunit prvodes a framework to run the API test suite that proves conformance to the
+ CUnit test framework version 2.1-3 is required
+ CUnit prvodes a framework to run the API test suite that proves conformance to the
ODP API. The home page http://cunit.sourceforge.net/doc/introduction.html
-4.1 Native Cunit install
+4.1 Native CUnit install
# Debian/Ubuntu
$ apt-get install libcunit1-dev
@@ -232,20 +233,27 @@ Prerequisites for building the OpenDataPlane (ODP) API
# reboot, before trying to run e.g. 'make distcheck'.
sudo ldconfig
-4.3 Cross compile of Cunit
+4.3 Cross compile of CUnit
$ git svn clone http://svn.code.sf.net/p/cunit/code/trunk cunit-code
$ cd cunit-code
$ ./bootstrap
$ ./configure --host=arm-linux-gnueabihf --prefix=/home/${USER}/src/install-cunit
-4.4 Using Cunit with ODP
- $ Add the configuration option to the regular configuration options
- # Use the default path ...
- ./configure --enable-cunit
+4.4 Using CUnit with ODP
- # ... OR the user defined path.
- ./configure --with-cunit-path=/home/<my_cunit_path>
+ Configure will automatically look for CUnit if validation testsuite is
+ enabled. By default it uses pkg-config to locate CUnit. Usually no
+ additional configuration will be required. Few corner cases:
+
+ # Systemwide CUnit if configure errors out with 'missing Version' message
+ ./configure CUNIT_CFLAGS="-I/usr/include" CUNIT_LIBS="-lcunit"
+
+ # User directory installation
+ ./configure PKG_CONFIG_PATH=/home/<my_cunit_path>/lib/pkgconfig
+
+ # ... OR directly specifying flags
+ ./configure CUNIT_CFLAGS="-I/home/<my_cunit_path>/include" CUNIT_LIBS="/home/<my_cunit_path>/lib -lcunit"
5.0 Documentation Images & Doxygen