]> git.openfabrics.org - ~adrianc/mstflint.git/commitdiff
added --enable-cs configure flag to enable checksum calculation feature in mstflint...
authorAdrian Chiris <adrianc@mellanox.com>
Wed, 13 Jan 2016 17:31:53 +0000 (19:31 +0200)
committerAdrian Chiris <adrianc@mellanox.com>
Wed, 13 Jan 2016 17:31:53 +0000 (19:31 +0200)
Makefile.am
configure.ac
flint/Makefile.am
mlxfwops/lib/Makefile.am

index 42449746f002d44bf5b0ebd734f029bc1ff145a1..33d48f37fba25cdd2466a044e486a3967dfd7fb4 100644 (file)
@@ -30,7 +30,7 @@
 # SOFTWARE.
 #--
 
-SUBDIRS = mft_utils tools_layouts mtcr_ul reg_access cmdif dev_mgt tools_res_mgmt mflash mlxconfig mlxfwops cmdparser flint small_utils mstdump 
+SUBDIRS = mft_utils $(TOOLS_CRYPTO) tools_layouts mtcr_ul reg_access cmdif dev_mgt tools_res_mgmt mflash mlxconfig mlxfwops cmdparser flint small_utils mstdump
 
 man_MANS = man/mstflint.1
 
index 46114c74199706d50f4f2c760b958c63e6251ff7..94c19da74a316ec78387ea36c461b38605e23e97 100644 (file)
@@ -21,6 +21,8 @@ AC_CONFIG_HEADERS( config.h )
 dnl Checks for headers
 AC_CHECK_HEADER(termios.h,[CXXFLAGS="${CXXFLAGS} -DHAVE_TERMIOS_H"])
 
+TOOLS_CRYPTO=""
+
 AC_MSG_CHECKING(--enable-dc argument)
 AC_ARG_ENABLE(dc,
                    [  --disable-dc            Disable mstflint "dc" command. Eliminates zlib dependency],
@@ -47,6 +49,19 @@ fi
 
 AM_CONDITIONAL(ENABLE_INBAND, [test  "x$enable_inband" = "xyes"])
 
+AC_MSG_CHECKING(--enable-cs argument)
+AC_ARG_ENABLE(cs,
+            [  --enable-cs          Enable mstflint "checksum" command, dependant of openssl library],
+            [enable_cs="yes"],
+            [enable_cs="no"])
+AC_MSG_RESULT($enable_cs)
+if test "x$enable_cs" = "xyes"; then
+  AC_CHECK_HEADER(openssl/md5.h,,AC_MSG_ERROR([cannot find openssl/md5.h . remove --enable-openssl to remove this dependaency or install openssl]))
+  TOOLS_CRYPTO="tools_crypto"
+fi
+AC_SUBST(TOOLS_CRYPTO)
+AM_CONDITIONAL(ENABLE_OPENSSL, [test  "x$enable_cs" = "xyes"])
+
 AC_ARG_ENABLE([static_libstdcpp],
     AS_HELP_STRING([--enable-static-libstdcpp], [Enable link static to libstdc++]))
 
@@ -66,7 +81,10 @@ CXXFLAGS="$CXXFLAGS -Werror -DMST_UL"
 
 AC_CONFIG_FILES( mstflint.spec )
 
+AS_IF([test "x$enable_cs" = "xyes"], [
+        AC_CONFIG_FILES(tools_crypto/Makefile)
+    ])
+
 AC_OUTPUT( Makefile mft_utils/Makefile mtcr_ul/Makefile dev_mgt/Makefile tools_layouts/Makefile reg_access/Makefile cmdif/Makefile tools_res_mgmt/Makefile \
                mlxconfig/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile flint/Makefile \
                small_utils/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile  mstdump/mstdump_dbs/Makefile )
-
index f0015151502a59736f74c79c05f0a1c6963a1a74..0041d10d0f6341c167a18cb043898d8d94471ce2 100755 (executable)
@@ -66,6 +66,11 @@ else
 mstflint_CXXFLAGS += -DNO_ZLIB
 endif
 
+if ENABLE_OPENSSL
+mstflint_LDADD += $(top_srcdir)/tools_crypto/libtools_crypto.a -lcrypto
+else
+endif
+
 #get mst device examples and tool name from makefile
 mstflint_CXXFLAGS+= -DFLINT_NAME=\"mstflint\" -DFLINT_DISPLAY_NAME=\"MstFlint\"
 mstflint_CXXFLAGS += -DMST_DEV_EXAMPLE1=\"03:00.0\" -DMST_DEV_EXAMPLE2=\"mlx4_0\" -DMST_DEV_EXAMPLE3=\"03:00.0\" -DMST_DEV_EXAMPLE4=\"04:00.0\"
index 2f91b6ac8bc7f1eb6fe881fa183361696f4e752c..8cf9e153e0dff74779ca8d26a73127676735bc5c 100755 (executable)
@@ -45,7 +45,12 @@ INCLUDES = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_lib
 
 MLXFWOPS_VERSION = 1
 
-AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DNO_MFA_SUPPORT -DNO_OPEN_SSL
+AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DNO_MFA_SUPPORT
+
+if ENABLE_OPENSSL
+else
+AM_CXXFLAGS += -DNO_OPEN_SSL
+endif
 
 noinst_LIBRARIES = libmlxfwops.a