diff mbox

[1/3] Add crypto library to dependencies and configure script

Message ID 1406224439-24226-2-git-send-email-robking@cisco.com
State New
Headers show

Commit Message

Robbie King July 24, 2014, 5:53 p.m. UTC
Signed-off-by: Robbie King <robking@cisco.com>
---
 DEPENDENCIES | 8 ++++++++
 configure.ac | 9 +++++++++
 2 files changed, 17 insertions(+)
diff mbox

Patch

diff --git a/DEPENDENCIES b/DEPENDENCIES
index 4b7faef..d0e614e 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -16,3 +16,11 @@  Prerequisites for building the OpenDataPlane (ODP) API
 
    On CentOS/RedHat/Fedora systems:
    $ sudo yum install automake autoconf autoconf-archive libtool libtoolize
+
+3. crypto
+
+   On Debian/Ubuntu systems:
+   $ sudo apt-get install libssl-dev
+
+   On CentOS/RedHat/Fedora systems:
+   $ sudo yum install openssl-devel
diff --git a/configure.ac b/configure.ac
index 7320162..c895c7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,15 @@  AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
 AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS"
 
 ##########################################################################
+# Check for openssl availability
+##########################################################################
+
+AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
+             [AC_MSG_FAILURE([can't find openssl crypto lib])])
+AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [],
+             [AC_MSG_FAILURE([can't find openssl crypto headers])])
+
+##########################################################################
 # Default warning setup
 ##########################################################################
 ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes"