Fix for non-ssl builds
authorAlex Kirhenshtein <alk@netxms.org>
Fri, 27 Sep 2013 07:41:07 +0000 (07:41 +0000)
committerAlex Kirhenshtein <alk@netxms.org>
Fri, 27 Sep 2013 07:41:07 +0000 (07:41 +0000)
configure.ac
src/agent/subagents/portCheck/Makefile.am

index fd72d23..6d66a6e 100644 (file)
@@ -2125,6 +2125,7 @@ AM_CONDITIONAL([USE_INTERNAL_LIBTRE], [test "x$HAVE_LIBTRE" = "xno"])
 AM_CONDITIONAL([USE_INTERNAL_ZLIB], [test "$NEED_ZLIB/$HAVE_ZLIB" = "yes/no"])
 AM_CONDITIONAL([STATIC_BUILD], [test "x$STATIC_BUILD" = "xyes"])
 AM_CONDITIONAL([ALL_STATIC], [test "x$ALL_STATIC" = "xyes"])
+AM_CONDITIONAL([USE_ENCRYPTION], [test "x${ac_cv_lib_crypto_RSA_new}" = "xyes"])
 
 
 #--------------------------------------------------------------------
index 68074e7..552df52 100644 (file)
@@ -3,12 +3,16 @@ SUBAGENT = portcheck
 pkglib_LTLIBRARIES = portcheck.la
 portcheck_la_SOURCES = custom.cpp http.cpp main.cpp net.cpp pop3.cpp smtp.cpp ssh.cpp telnet.cpp
 portcheck_la_CPPFLAGS=-I@top_srcdir@/include
-portcheck_la_LDFLAGS = -module -avoid-version -lssl -lcrypto
+portcheck_la_LDFLAGS = -module -avoid-version
 portcheck_la_LIBADD = ../../../libnetxms/libnetxms.la
 if USE_INTERNAL_LIBTRE
 portcheck_la_LIBADD += @top_srcdir@/src/libtre/libnxtre.la
 endif
 
+if USE_ENCRYPTION
+portcheck_la_LDFLAGS += -lssl
+endif
+
 EXTRA_DIST = main.h net.h portcheck.vcproj
 
 if !STATIC_BUILD