Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMichael Veksler <Mihails.Vekslers@zabbix.com>2021-02-09 19:31:25 +0300
committerMichael Veksler <Mihails.Vekslers@zabbix.com>2021-02-09 19:31:25 +0300
commitfe391e8689c523d3c7ea6b173d25aa5dba3a6902 (patch)
tree37b1930c4040620192e03b4b4c103da5be976433 /m4
parent2567107305ef90a3953998dfa46dc45c68c6b754 (diff)
........S. [ZBXNEXT-6427] fixed compilation the server problem with recompiled net-snmp library
Diffstat (limited to 'm4')
-rw-r--r--m4/netsnmp.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/netsnmp.m4 b/m4/netsnmp.m4
index 35fe82a41d8..9c9f2e72b3d 100644
--- a/m4/netsnmp.m4
+++ b/m4/netsnmp.m4
@@ -43,6 +43,9 @@ AC_HELP_STRING([--with-net-snmp@<:@=ARG@:>@],
if test "x$_libnetsnmp_config" = "xno"; then
AC_PATH_PROG([_libnetsnmp_config], [net-snmp-config], [])
+ want_static_netsnmp="no"
+ else
+ want_static_netsnmp="yes"
fi
if test -d "$_libnetsnmp_config"; then
@@ -131,6 +134,17 @@ AC_HELP_STRING([--with-net-snmp@<:@=ARG@:>@],
;;
esac
done
+ elif test "x$want_static_netsnmp" = "xyes"; then
+ _libsnmp_dir_lib="`$_libnetsnmp_config --libdir | cut -b3-`"
+
+ test [ "x$static_linking_support" = "xno" -o -z "$static_linking_support" ] -a -z "$_libsnmp_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
+
+ if test "x$static_linking_support" = "xno" -o -z "$static_linking_support"; then
+ test -f $_libsnmp_dir_lib/libnetsnmp.a || AC_MSG_ERROR(["libnetsnmp.a static library was not found in $_libsnmp_dir_lib"])
+ SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s|-lnetsnmp|$_libsnmp_dir_lib/libnetsnmp.a|g"`
+ else
+ SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s/-lnetsnmp/${static_linking_support}static -lnetsnmp ${static_linking_support}dynamic/g"`
+ fi
fi
_save_netsnmp_cflags="$CFLAGS"