[build system] cleanup --enable-snmp by removing ucd-snmp cruft

2006-01-31 Paul Jakma <paul.jakma@sun.com>

	* configure.ac: Cleanup the hideous {net,ucd}-snmp section
	  by removing ucd-snmp. Hence fixing detection where
	  net-snmp is installed in /usr/local (Boris Kovalenko reported
	  the problem).
This commit is contained in:
paul 2006-01-31 10:09:27 +00:00
parent 7a38333957
commit b1fc9acbbe
2 changed files with 31 additions and 89 deletions

View file

@ -1,3 +1,10 @@
2006-01-31 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Cleanup the hideous {net,ucd}-snmp section
by removing ucd-snmp. Hence fixing detection where
net-snmp is installed in /usr/local (Boris Kovalenko reported
the problem).
2006-01-19 Paul Jakma <paul.jakma@sun.com> 2006-01-19 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Bump to 0.99.3 * configure.ac: Bump to 0.99.3

View file

@ -5,7 +5,7 @@
## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org> ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st> ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
## ##
## $Id: configure.ac,v 1.117 2006/01/19 20:26:17 paul Exp $ ## $Id: configure.ac,v 1.118 2006/01/31 10:09:27 paul Exp $
AC_PREREQ(2.53) AC_PREREQ(2.53)
AC_INIT(Quagga, 0.99.3, [http://bugzilla.quagga.net]) AC_INIT(Quagga, 0.99.3, [http://bugzilla.quagga.net])
@ -992,100 +992,35 @@ AC_CHECK_LIB(c, regexec,
AC_SUBST(LIB_REGEX) AC_SUBST(LIB_REGEX)
dnl ------------------ dnl ------------------
dnl check SNMP library dnl check Net-SNMP library
dnl ------------------ dnl ------------------
if test "${enable_snmp}" = "yes";then if test "${enable_snmp}" = "yes"; then
dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes) LIBS="${LIBS} -lcrypto"
if test "${HAVE_SNMP}" = ""; then AC_CHECK_LIB(netsnmp, asn_parse_int,
old_libs="${LIBS}" [AC_DEFINE(HAVE_NETSNMP,,Net SNMP)
LIBS="-L/usr/lib" AC_DEFINE(HAVE_SNMP,,SNMP)
unset ac_cv_lib_snmp_asn_parse_int LIBS="${LIBS} -lnetsnmp"],
AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, ) [AC_MSG_ERROR([--enable-snmp given, but cannot find support for SNMP])])
if test "${NEED_CRYPTO}" = ""; then
AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ]) for ac_snmp in /usr/include \
else /usr/local/include \
AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto") /dev/null; do
fi test -f "${ac_snmp}/net-snmp/library/asn1.h" && break
LIBS="${old_libs}"
fi
if test "${HAVE_SNMP}" = ""; then
old_libs="${LIBS}"
LIBS="-L/usr/lib"
unset ac_cv_lib_snmp_asn_parse_int
AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
if test "${HAVE_SNMP}" = ""; then
unset ac_cv_lib_snmp_asn_parse_int
AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
if test "${NEED_CRYPTO}" = "yes"; then
AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
fi
fi
LIBS="${old_libs}"
fi
if test "${HAVE_SNMP}" = ""; then
old_libs="${LIBS}"
LIBS="-L/usr/local/lib"
unset ac_cv_lib_snmp_asn_parse_int
AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
if test "${HAVE_SNMP}" = ""; then
unset ac_cv_lib_snmp_asn_parse_int
AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
if test "${NEED_CRYPTO}" = "yes"; then
AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
fi
fi
LIBS="${old_libs}"
fi
if test "${HAVE_SNMP}" = "yes"; then
for ac_snmp in /usr/include/net-snmp/library/asn1.h /usr/include/ucd-snmp/asn1.h /usr/local/include/ucd-snmp/asn1.h /dev/null
do
test -f "${ac_snmp}" && break
done done
case ${ac_snmp} in case ${ac_snmp} in
/usr/include/net-snmp/*) /dev/null)
AC_DEFINE(HAVE_SNMP,,SNMP) AC_MSG_ERROR([--enable-snmp given, but can not find header])
AC_DEFINE(HAVE_NETSNMP,,SNMP) ;;
AC_DEFINE(UCD_COMPATIBLE,,SNMP) *)
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/include/net-snmp -I/usr/include/net-snmp/library" SNMP_INCLUDES="-I${ac_snmp}/net-snmp"
if test "${HAVE_NETSNMP}" = "yes"; then SNMP_INCLUDES="${SNMP_INCLUDES} -I${ac_snmp}/net-snmp/library"
LIBS="${LIBS} -lnetsnmp" ;;
else
LIBS="${LIBS} -lsnmp"
fi
;;
/usr/include/ucd-snmp/*)
AC_DEFINE(HAVE_SNMP,,SNMP)
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/include/ucd-snmp"
LIBS="${LIBS} -lsnmp"
;;
/usr/local/include/ucd-snmp/*)
AC_DEFINE(HAVE_SNMP,,SNMP)
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/local/include/ucd-snmp"
LIBS="${LIBS} -L/usr/local/lib -lsnmp"
;;
/usr/local/include/net-snmp/*)
AC_DEFINE(HAVE_SNMP,,SNMP)
AC_DEFINE(HAVE_NET_SNMP,,SNMP)
AC_DEFINE(UCD_COMPATIBLE,,SNMP)
SNMP_INCLUDES="${SNMP_INCLUDES} -I/usr/local/include/net-snmp"
LIBS="${LIBS} -L/usr/local/lib -lnetsnmp"
;;
esac esac
if test "${NEED_CRYPTO}" = "yes"; then
LIBS="${LIBS} -lcrypto" AC_SUBST(SNMP_INCLUDES)
fi
fi
fi fi
if test "${enable_snmp}" = "yes" -a "${HAVE_SNMP}" != "yes"; then
AC_MSG_ERROR([--enable-snmp given, but cannot find support for SNMP])
fi
AC_SUBST(SNMP_INCLUDES)
dnl ---------------------------- dnl ----------------------------
dnl check sa_len of sockaddr dnl check sa_len of sockaddr
dnl ---------------------------- dnl ----------------------------