diff --git a/acinclude.m4 b/acinclude.m4 index 66e1ef7481e77e5b9db8cbaafb5416bfa4101806..9b84af614297e0e5a549eef75d00354c72dbed65 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -210,9 +210,9 @@ fi # Check for a package using $2-config. Similar to AST_EXT_LIB_CHECK, # but use $2-config to determine cflags and libraries to use. -# $3 and $4 can be used to replace --cflags and --libs in the request +# $3 and $4 can be used to replace --cflags and --libs in the request -# AST_EXT_TOOL_CHECK([package], [tool name], [--cflags], [--libs]) +# AST_EXT_TOOL_CHECK([package], [tool name], [--cflags], [--libs], [includes], [expression]) AC_DEFUN([AST_EXT_TOOL_CHECK], [ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then @@ -223,8 +223,27 @@ AC_DEFUN([AST_EXT_TOOL_CHECK], $1_INCLUDE=$(${CONFIG_$1} $A) if test x"$4" = x ; then A=--libs ; else A="$4" ; fi $1_LIB=$(${CONFIG_$1} $A) - PBX_$1=1 - AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.]) + if test x"$5" != x ; then + saved_cppflags="${CPPFLAGS}" + if test "x${$1_DIR}" != "x"; then + $1_INCLUDE="-I${$1_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}" + + AC_COMPILE_IFELSE( + [ AC_LANG_PROGRAM( [ $5 ], + [ $6; ] + )], + [ PBX_$1=1 + AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.]) + ], + [] + ) + CPPFLAGS="${saved_cppflags}" + else + PBX_$1=1 + AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.]) + fi fi fi ]) diff --git a/configure b/configure index 62c1b2ec8b9c9dd3bc428c1e5f8b40fb6d7864b1..e8ae1606d4cf3f3e4f5b7f452300b551238af153 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 98952 . +# From configure.ac Revision: 98971 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for asterisk 1.4. # @@ -957,7 +957,7 @@ GC_CFLAGS GC_LDFLAGS AST_DECLARATION_AFTER_STATEMENT GSM_INTERNAL -NETSNMP_CONFIG +CONFIG_NETSNMP PG_CONFIG PTLIB_CONFIG PWLIBDIR @@ -34792,146 +34792,28 @@ _ACEOF fi -NETSNMP_CONFIG=No -if test "${USE_NETSNMP}" != "no"; then - if test "x${NETSNMP_DIR}" != "x"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_NETSNMP_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $NETSNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_NETSNMP_CONFIG="$NETSNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in ${NETSNMP_DIR}/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_NETSNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -NETSNMP_CONFIG=$ac_cv_path_NETSNMP_CONFIG -if test -n "$NETSNMP_CONFIG"; then - { echo "$as_me:$LINENO: result: $NETSNMP_CONFIG" >&5 -echo "${ECHO_T}$NETSNMP_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_NETSNMP_CONFIG"; then - ac_pt_NETSNMP_CONFIG=$NETSNMP_CONFIG - # Extract the first word of "net-snmp-config", so it can be a program name with args. -set dummy net-snmp-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_NETSNMP_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_NETSNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_NETSNMP_CONFIG="$ac_pt_NETSNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in ${NETSNMP_DIR}/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_NETSNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_NETSNMP_CONFIG=$ac_cv_path_ac_pt_NETSNMP_CONFIG -if test -n "$ac_pt_NETSNMP_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_NETSNMP_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_NETSNMP_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - if test "x$ac_pt_NETSNMP_CONFIG" = x; then - NETSNMP_CONFIG="No" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - NETSNMP_CONFIG=$ac_pt_NETSNMP_CONFIG - fi -else - NETSNMP_CONFIG="$ac_cv_path_NETSNMP_CONFIG" -fi - - if test x"${NETSNMP_CONFIG}" = xNo; then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** net-snmp-config was not found in the path you specified:" >&5 -echo "$as_me: *** net-snmp-config was not found in the path you specified:" >&6;} - { echo "$as_me:$LINENO: *** ${NETSNMP_DIR}/bin" >&5 -echo "$as_me: *** ${NETSNMP_DIR}/bin" >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation, or run configure" >&5 -echo "$as_me: *** Either correct the installation, or run configure" >&6;} - { echo "$as_me:$LINENO: *** including --without-netsnmp" >&5 -echo "$as_me: *** including --without-netsnmp" >&6;} - exit 1 - fi - else - if test -n "$ac_tool_prefix"; then + if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then + PBX_NETSNMP=0 + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args. set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_NETSNMP_CONFIG+set}" = set; then +if test "${ac_cv_prog_CONFIG_NETSNMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $NETSNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_NETSNMP_CONFIG="$NETSNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$CONFIG_NETSNMP"; then + ac_cv_prog_CONFIG_NETSNMP="$CONFIG_NETSNMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_NETSNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_CONFIG_NETSNMP="${ac_tool_prefix}net-snmp-config" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -34939,13 +34821,12 @@ done done IFS=$as_save_IFS - ;; -esac fi -NETSNMP_CONFIG=$ac_cv_path_NETSNMP_CONFIG -if test -n "$NETSNMP_CONFIG"; then - { echo "$as_me:$LINENO: result: $NETSNMP_CONFIG" >&5 -echo "${ECHO_T}$NETSNMP_CONFIG" >&6; } +fi +CONFIG_NETSNMP=$ac_cv_prog_CONFIG_NETSNMP +if test -n "$CONFIG_NETSNMP"; then + { echo "$as_me:$LINENO: result: $CONFIG_NETSNMP" >&5 +echo "${ECHO_T}$CONFIG_NETSNMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } @@ -34953,28 +34834,26 @@ fi fi -if test -z "$ac_cv_path_NETSNMP_CONFIG"; then - ac_pt_NETSNMP_CONFIG=$NETSNMP_CONFIG +if test -z "$ac_cv_prog_CONFIG_NETSNMP"; then + ac_ct_CONFIG_NETSNMP=$CONFIG_NETSNMP # Extract the first word of "net-snmp-config", so it can be a program name with args. set dummy net-snmp-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_NETSNMP_CONFIG+set}" = set; then +if test "${ac_cv_prog_ac_ct_CONFIG_NETSNMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $ac_pt_NETSNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_NETSNMP_CONFIG="$ac_pt_NETSNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_CONFIG_NETSNMP"; then + ac_cv_prog_ac_ct_CONFIG_NETSNMP="$ac_ct_CONFIG_NETSNMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_NETSNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_CONFIG_NETSNMP="net-snmp-config" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -34982,20 +34861,19 @@ done done IFS=$as_save_IFS - ;; -esac fi -ac_pt_NETSNMP_CONFIG=$ac_cv_path_ac_pt_NETSNMP_CONFIG -if test -n "$ac_pt_NETSNMP_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_NETSNMP_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_NETSNMP_CONFIG" >&6; } +fi +ac_ct_CONFIG_NETSNMP=$ac_cv_prog_ac_ct_CONFIG_NETSNMP +if test -n "$ac_ct_CONFIG_NETSNMP"; then + { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_NETSNMP" >&5 +echo "${ECHO_T}$ac_ct_CONFIG_NETSNMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi - if test "x$ac_pt_NETSNMP_CONFIG" = x; then - NETSNMP_CONFIG="No" + if test "x$ac_ct_CONFIG_NETSNMP" = x; then + CONFIG_NETSNMP="No" else case $cross_compiling:$ac_tool_warned in yes:) @@ -35007,54 +34885,52 @@ whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - NETSNMP_CONFIG=$ac_pt_NETSNMP_CONFIG + CONFIG_NETSNMP=$ac_ct_CONFIG_NETSNMP fi else - NETSNMP_CONFIG="$ac_cv_path_NETSNMP_CONFIG" + CONFIG_NETSNMP="$ac_cv_prog_CONFIG_NETSNMP" fi - fi -fi -if test x"${NETSNMP_CONFIG}" != xNo; then - NETSNMP_libs=`${NETSNMP_CONFIG} --agent-libs` + if test ! "x${CONFIG_NETSNMP}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A) + if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi + NETSNMP_LIB=$(${CONFIG_NETSNMP} $A) + if test x"#include <net-snmp/net-snmp-config.h> +#include <net-snmp/net-snmp-includes.h> +#include <net-snmp/agent/net-snmp-agent-includes.h>" != x ; then + saved_cppflags="${CPPFLAGS}" + if test "x${NETSNMP_DIR}" != "x"; then + NETSNMP_INCLUDE="-I${NETSNMP_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}" - { echo "$as_me:$LINENO: checking for snmp_register_callback in -lnetsnmp" >&5 -echo $ECHO_N "checking for snmp_register_callback in -lnetsnmp... $ECHO_C" >&6; } -if test "${ac_cv_lib_netsnmp_snmp_register_callback+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnetsnmp ${NETSNMP_LIBS} $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char snmp_register_callback (); + #include <net-snmp/net-snmp-config.h> +#include <net-snmp/net-snmp-includes.h> +#include <net-snmp/agent/net-snmp-agent-includes.h> int main () { -return snmp_register_callback (); + int callback = snmp_register_callback(0, 0, NULL, NULL); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -35063,35 +34939,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_netsnmp_snmp_register_callback=yes + } && test -s conftest.$ac_objext; then + PBX_NETSNMP=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NETSNMP 1 +_ACEOF + + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_netsnmp_snmp_register_callback=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_netsnmp_snmp_register_callback" >&5 -echo "${ECHO_T}$ac_cv_lib_netsnmp_snmp_register_callback" >&6; } -if test $ac_cv_lib_netsnmp_snmp_register_callback = yes; then -cat >>confdefs.h <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="${saved_cppflags}" + else + PBX_NETSNMP=1 + +cat >>confdefs.h <<\_ACEOF #define HAVE_NETSNMP 1 _ACEOF -fi + fi + fi + fi - if test "${ac_cv_lib_netsnmp_snmp_register_callback}" = "yes"; then - NETSNMP_LIB="${NETSNMP_libs}" - PBX_NETSNMP=1 - fi -fi if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then @@ -46976,12 +46852,71 @@ fi SDL_INCLUDE=$(${CONFIG_SDL} $A) if test x"" = x ; then A=--libs ; else A="" ; fi SDL_LIB=$(${CONFIG_SDL} $A) - PBX_SDL=1 + if test x"" != x ; then + saved_cppflags="${CPPFLAGS}" + if test "x${SDL_DIR}" != "x"; then + SDL_INCLUDE="-I${SDL_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}" + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + ; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + PBX_SDL=1 cat >>confdefs.h <<\_ACEOF #define HAVE_SDL 1 _ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="${saved_cppflags}" + else + PBX_SDL=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SDL 1 +_ACEOF + + fi fi fi @@ -48278,12 +48213,71 @@ fi GTK_INCLUDE=$(${CONFIG_GTK} $A) if test x"--libs gthread" = x ; then A=--libs ; else A="--libs gthread" ; fi GTK_LIB=$(${CONFIG_GTK} $A) - PBX_GTK=1 + if test x"" != x ; then + saved_cppflags="${CPPFLAGS}" + if test "x${GTK_DIR}" != "x"; then + GTK_INCLUDE="-I${GTK_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${GTK_INCLUDE}" + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + ; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + PBX_GTK=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GTK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="${saved_cppflags}" + else + PBX_GTK=1 cat >>confdefs.h <<\_ACEOF #define HAVE_GTK 1 _ACEOF + fi fi fi @@ -49683,7 +49677,7 @@ GC_CFLAGS!$GC_CFLAGS$ac_delim GC_LDFLAGS!$GC_LDFLAGS$ac_delim AST_DECLARATION_AFTER_STATEMENT!$AST_DECLARATION_AFTER_STATEMENT$ac_delim GSM_INTERNAL!$GSM_INTERNAL$ac_delim -NETSNMP_CONFIG!$NETSNMP_CONFIG$ac_delim +CONFIG_NETSNMP!$CONFIG_NETSNMP$ac_delim PG_CONFIG!$PG_CONFIG$ac_delim PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim PWLIBDIR!$PWLIBDIR$ac_delim diff --git a/configure.ac b/configure.ac index bcc3bbb839ae57048c5fd522ead9b8faac40d562..944dd075871f3dd17d6b6500574071f2c3ce9ab3 100644 --- a/configure.ac +++ b/configure.ac @@ -828,32 +828,11 @@ AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h]) AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h]) -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_TOOL_CHECK([NETSNMP], [net-snmp], , [--agent-libs], +[#include <net-snmp/net-snmp-config.h> +#include <net-snmp/net-snmp-includes.h> +#include <net-snmp/agent/net-snmp-agent-includes.h>], +[int callback = snmp_register_callback(0, 0, NULL, NULL)]) AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h]) diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index cae42a2e33ca25f6d7884aa1b77f1a204cfa6366..3e9217689e2ae1b53c071d2dde1d8fa08ad495fe 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -499,7 +499,7 @@ /* Define to 1 if you have the <netinet/in.h> header file. */ #undef HAVE_NETINET_IN_H -/* Define to indicate the Net-SNMP library */ +/* Define if your system has the NETSNMP libraries. */ #undef HAVE_NETSNMP /* Define this to indicate the ${NEWT_DESCRIP} library */