Since net-snmp-5.X support was added in 2.2.5, change the default
of WITH_SNMP from net-snmp4 to net-snmp. However, if there is net-snmp4 installed, we still use net-snmp4 for backward compatibility.
This commit is contained in:
parent
fd403c96c4
commit
a16682c228
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110289
9 changed files with 108 additions and 9 deletions
|
@ -110,8 +110,23 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
|
|||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_SNMP)
|
||||
.if !defined(WITH_SNMP_VER) && defined(WITH_SNMP)
|
||||
.if exists(${LOCALBASE}/lib/libsnmp.so.6)
|
||||
WITH_SNMP_VER= 5
|
||||
.elif exists(${LOCALBASE}/lib/libsnmp.so.4)
|
||||
WITH_SNMP_VER= 4
|
||||
.else
|
||||
WITH_SNMP_VER= 5
|
||||
.endif
|
||||
.endif
|
||||
.if defined(WITH_SNMP_VER)
|
||||
.if ${WITH_SNMP_VER} == 4
|
||||
LIB_DEPENDS+= snmp.4:${PORTSDIR}/net-mgmt/net-snmp4
|
||||
.elif ${WITH_SNMP_VER} == 5
|
||||
LIB_DEPENDS+= netsnmp.6:${PORTSDIR}/net-mgmt/net-snmp
|
||||
.else
|
||||
BROKEN= "WITH_SNMP_VER must be 4 or 5"
|
||||
.endif
|
||||
CONFIGURE_ARGS+=--with-snmp=${LOCALBASE}
|
||||
.else
|
||||
CONFIGURE_ARGS+=--with-snmp=no
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: aclocal.m4
|
||||
diff -u aclocal.m4.orig aclocal.m4
|
||||
--- aclocal.m4.orig Sat May 29 03:08:14 2004
|
||||
+++ aclocal.m4 Sat May 29 04:57:43 2004
|
||||
+++ aclocal.m4 Sat May 29 07:10:54 2004
|
||||
@@ -505,7 +505,7 @@
|
||||
BDB_LIBADD=""
|
||||
fi
|
||||
|
@ -20,6 +20,15 @@ diff -u aclocal.m4.orig aclocal.m4
|
|||
dblib="no")
|
||||
|
||||
CPPFLAGS=$cmu_save_CPPFLAGS
|
||||
@@ -1806,7 +1806,7 @@
|
||||
|
||||
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
|
||||
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
|
||||
- LIB_UCDSNMP=$SNMP_LIBS
|
||||
+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
|
||||
AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
|
||||
AC_SUBST(LIB_UCDSNMP)
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -1834,7 +1834,7 @@
|
||||
LIB_UCDSNMP=""
|
||||
if test "$with_snmp" != no; then
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: configure
|
||||
diff -u configure.orig configure
|
||||
--- configure.orig Sat May 29 03:08:17 2004
|
||||
+++ configure Sat May 29 04:38:20 2004
|
||||
+++ configure Sat May 29 06:43:27 2004
|
||||
@@ -6551,7 +6551,7 @@
|
||||
BDB_LIBADD=""
|
||||
fi
|
||||
|
@ -33,6 +33,15 @@ diff -u configure.orig configure
|
|||
PERL_CCCDLFLAGS="$cccdlflags"
|
||||
|
||||
fi
|
||||
@@ -14020,7 +14021,7 @@
|
||||
|
||||
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
|
||||
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
|
||||
- LIB_UCDSNMP=$SNMP_LIBS
|
||||
+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_NETSNMP 1
|
||||
@@ -14251,7 +14252,7 @@
|
||||
#define HAVE_UCDSNMP 1
|
||||
_ACEOF
|
||||
|
|
|
@ -110,8 +110,23 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
|
|||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_SNMP)
|
||||
.if !defined(WITH_SNMP_VER) && defined(WITH_SNMP)
|
||||
.if exists(${LOCALBASE}/lib/libsnmp.so.6)
|
||||
WITH_SNMP_VER= 5
|
||||
.elif exists(${LOCALBASE}/lib/libsnmp.so.4)
|
||||
WITH_SNMP_VER= 4
|
||||
.else
|
||||
WITH_SNMP_VER= 5
|
||||
.endif
|
||||
.endif
|
||||
.if defined(WITH_SNMP_VER)
|
||||
.if ${WITH_SNMP_VER} == 4
|
||||
LIB_DEPENDS+= snmp.4:${PORTSDIR}/net-mgmt/net-snmp4
|
||||
.elif ${WITH_SNMP_VER} == 5
|
||||
LIB_DEPENDS+= netsnmp.6:${PORTSDIR}/net-mgmt/net-snmp
|
||||
.else
|
||||
BROKEN= "WITH_SNMP_VER must be 4 or 5"
|
||||
.endif
|
||||
CONFIGURE_ARGS+=--with-snmp=${LOCALBASE}
|
||||
.else
|
||||
CONFIGURE_ARGS+=--with-snmp=no
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: aclocal.m4
|
||||
diff -u aclocal.m4.orig aclocal.m4
|
||||
--- aclocal.m4.orig Sat May 29 03:08:14 2004
|
||||
+++ aclocal.m4 Sat May 29 04:57:43 2004
|
||||
+++ aclocal.m4 Sat May 29 07:10:54 2004
|
||||
@@ -505,7 +505,7 @@
|
||||
BDB_LIBADD=""
|
||||
fi
|
||||
|
@ -20,6 +20,15 @@ diff -u aclocal.m4.orig aclocal.m4
|
|||
dblib="no")
|
||||
|
||||
CPPFLAGS=$cmu_save_CPPFLAGS
|
||||
@@ -1806,7 +1806,7 @@
|
||||
|
||||
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
|
||||
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
|
||||
- LIB_UCDSNMP=$SNMP_LIBS
|
||||
+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
|
||||
AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
|
||||
AC_SUBST(LIB_UCDSNMP)
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -1834,7 +1834,7 @@
|
||||
LIB_UCDSNMP=""
|
||||
if test "$with_snmp" != no; then
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: configure
|
||||
diff -u configure.orig configure
|
||||
--- configure.orig Sat May 29 03:08:17 2004
|
||||
+++ configure Sat May 29 04:38:20 2004
|
||||
+++ configure Sat May 29 06:43:27 2004
|
||||
@@ -6551,7 +6551,7 @@
|
||||
BDB_LIBADD=""
|
||||
fi
|
||||
|
@ -33,6 +33,15 @@ diff -u configure.orig configure
|
|||
PERL_CCCDLFLAGS="$cccdlflags"
|
||||
|
||||
fi
|
||||
@@ -14020,7 +14021,7 @@
|
||||
|
||||
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
|
||||
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
|
||||
- LIB_UCDSNMP=$SNMP_LIBS
|
||||
+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_NETSNMP 1
|
||||
@@ -14251,7 +14252,7 @@
|
||||
#define HAVE_UCDSNMP 1
|
||||
_ACEOF
|
||||
|
|
|
@ -110,8 +110,23 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
|
|||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_SNMP)
|
||||
.if !defined(WITH_SNMP_VER) && defined(WITH_SNMP)
|
||||
.if exists(${LOCALBASE}/lib/libsnmp.so.6)
|
||||
WITH_SNMP_VER= 5
|
||||
.elif exists(${LOCALBASE}/lib/libsnmp.so.4)
|
||||
WITH_SNMP_VER= 4
|
||||
.else
|
||||
WITH_SNMP_VER= 5
|
||||
.endif
|
||||
.endif
|
||||
.if defined(WITH_SNMP_VER)
|
||||
.if ${WITH_SNMP_VER} == 4
|
||||
LIB_DEPENDS+= snmp.4:${PORTSDIR}/net-mgmt/net-snmp4
|
||||
.elif ${WITH_SNMP_VER} == 5
|
||||
LIB_DEPENDS+= netsnmp.6:${PORTSDIR}/net-mgmt/net-snmp
|
||||
.else
|
||||
BROKEN= "WITH_SNMP_VER must be 4 or 5"
|
||||
.endif
|
||||
CONFIGURE_ARGS+=--with-snmp=${LOCALBASE}
|
||||
.else
|
||||
CONFIGURE_ARGS+=--with-snmp=no
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: aclocal.m4
|
||||
diff -u aclocal.m4.orig aclocal.m4
|
||||
--- aclocal.m4.orig Sat May 29 03:08:14 2004
|
||||
+++ aclocal.m4 Sat May 29 04:57:43 2004
|
||||
+++ aclocal.m4 Sat May 29 07:10:54 2004
|
||||
@@ -505,7 +505,7 @@
|
||||
BDB_LIBADD=""
|
||||
fi
|
||||
|
@ -20,6 +20,15 @@ diff -u aclocal.m4.orig aclocal.m4
|
|||
dblib="no")
|
||||
|
||||
CPPFLAGS=$cmu_save_CPPFLAGS
|
||||
@@ -1806,7 +1806,7 @@
|
||||
|
||||
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
|
||||
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
|
||||
- LIB_UCDSNMP=$SNMP_LIBS
|
||||
+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
|
||||
AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
|
||||
AC_SUBST(LIB_UCDSNMP)
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -1834,7 +1834,7 @@
|
||||
LIB_UCDSNMP=""
|
||||
if test "$with_snmp" != no; then
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: configure
|
||||
diff -u configure.orig configure
|
||||
--- configure.orig Sat May 29 03:08:17 2004
|
||||
+++ configure Sat May 29 04:38:20 2004
|
||||
+++ configure Sat May 29 06:43:27 2004
|
||||
@@ -6551,7 +6551,7 @@
|
||||
BDB_LIBADD=""
|
||||
fi
|
||||
|
@ -33,6 +33,15 @@ diff -u configure.orig configure
|
|||
PERL_CCCDLFLAGS="$cccdlflags"
|
||||
|
||||
fi
|
||||
@@ -14020,7 +14021,7 @@
|
||||
|
||||
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
|
||||
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
|
||||
- LIB_UCDSNMP=$SNMP_LIBS
|
||||
+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_NETSNMP 1
|
||||
@@ -14251,7 +14252,7 @@
|
||||
#define HAVE_UCDSNMP 1
|
||||
_ACEOF
|
||||
|
|
Loading…
Reference in a new issue