diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-16 19:41:25 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-16 19:41:25 +0000 |
commit | 3cb040355aaee0d12430ce7de048e71e42fb161a (patch) | |
tree | 37ac0383f2644034eac661227a4c030abd738ecf /configure.ac | |
parent | 1abc40d55dabc2cd2baceaac249235202d7fa4d8 (diff) |
Partially revert r93898, because it broke the way netsnmp was being detected.
rizzo, do you want to discuss so we can rethink this, or do you have another way?
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98971 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 4d656c0ad..bcc3bbb83 100644 --- a/configure.ac +++ b/configure.ac @@ -828,8 +828,32 @@ AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h]) AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h]) -# XXX do we need to check for snmp_register_callback ? -AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp], , [--agent-libs]) +NETSNMP_CONFIG=No +if test "${USE_NETSNMP}" != "no"; then + if test "x${NETSNMP_DIR}" != "x"; then + AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No, [${NETSNMP_DIR}/bin]) + if test x"${NETSNMP_CONFIG}" = xNo; then + AC_MSG_NOTICE([***]) + AC_MSG_NOTICE([*** net-snmp-config was not found in the path you specified:]) + AC_MSG_NOTICE([*** ${NETSNMP_DIR}/bin]) + AC_MSG_NOTICE([*** Either correct the installation, or run configure]) + AC_MSG_NOTICE([*** including --without-netsnmp]) + exit 1 + fi + else + AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No) + fi +fi +if test x"${NETSNMP_CONFIG}" != xNo; then + NETSNMP_libs=`${NETSNMP_CONFIG} --agent-libs` + + AC_CHECK_LIB([netsnmp], [snmp_register_callback], AC_DEFINE_UNQUOTED([HAVE_NETSNMP], 1, + [Define to indicate the Net-SNMP library]), [], ${NETSNMP_LIBS}) + if test "${ac_cv_lib_netsnmp_snmp_register_callback}" = "yes"; then + NETSNMP_LIB="${NETSNMP_libs}" + PBX_NETSNMP=1 + fi +fi AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h]) |