Change AST_EXT_TOOL_CHECK to attempt to build against <package>_LIB, per recommendations from Russell.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2008-01-16 23:08:11 +00:00
parent bba20a8360
commit f2d31ec0c8
4 changed files with 227 additions and 235 deletions

View File

@@ -212,7 +212,7 @@ fi
# but use $2-config to determine cflags and libraries to use. # 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], AC_DEFUN([AST_EXT_TOOL_CHECK],
[ [
if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then 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) $1_INCLUDE=$(${CONFIG_$1} $A)
if test x"$4" = x ; then A=--libs ; else A="$4" ; fi if test x"$4" = x ; then A=--libs ; else A="$4" ; fi
$1_LIB=$(${CONFIG_$1} $A) $1_LIB=$(${CONFIG_$1} $A)
PBX_$1=1 if test x"$5" != x ; then
AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.]) 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
fi fi
]) ])

402
configure vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.ac Revision: 98952 . # From configure.ac Revision: 98971 .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for asterisk 1.4. # Generated by GNU Autoconf 2.61 for asterisk 1.4.
# #
@@ -957,7 +957,7 @@ GC_CFLAGS
GC_LDFLAGS GC_LDFLAGS
AST_DECLARATION_AFTER_STATEMENT AST_DECLARATION_AFTER_STATEMENT
GSM_INTERNAL GSM_INTERNAL
NETSNMP_CONFIG CONFIG_NETSNMP
PG_CONFIG PG_CONFIG
PTLIB_CONFIG PTLIB_CONFIG
PWLIBDIR PWLIBDIR
@@ -34792,30 +34792,28 @@ _ACEOF
fi fi
NETSNMP_CONFIG=No
if test "${USE_NETSNMP}" != "no"; then if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then
if test "x${NETSNMP_DIR}" != "x"; then PBX_NETSNMP=0
if test -n "$ac_tool_prefix"; 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. # 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 set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5 { echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 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 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
case $NETSNMP_CONFIG in if test -n "$CONFIG_NETSNMP"; then
[\\/]* | ?:[\\/]*) ac_cv_prog_CONFIG_NETSNMP="$CONFIG_NETSNMP" # Let the user override the test.
ac_cv_path_NETSNMP_CONFIG="$NETSNMP_CONFIG" # Let the user override the test with a path. else
;; as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
*) for as_dir in $PATH
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in ${NETSNMP_DIR}/bin
do do
IFS=$as_save_IFS IFS=$as_save_IFS
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do 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 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 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2 break 2
fi fi
@@ -34823,13 +34821,12 @@ done
done done
IFS=$as_save_IFS IFS=$as_save_IFS
;;
esac
fi fi
NETSNMP_CONFIG=$ac_cv_path_NETSNMP_CONFIG fi
if test -n "$NETSNMP_CONFIG"; then CONFIG_NETSNMP=$ac_cv_prog_CONFIG_NETSNMP
{ echo "$as_me:$LINENO: result: $NETSNMP_CONFIG" >&5 if test -n "$CONFIG_NETSNMP"; then
echo "${ECHO_T}$NETSNMP_CONFIG" >&6; } { echo "$as_me:$LINENO: result: $CONFIG_NETSNMP" >&5
echo "${ECHO_T}$CONFIG_NETSNMP" >&6; }
else else
{ echo "$as_me:$LINENO: result: no" >&5 { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; } echo "${ECHO_T}no" >&6; }
@@ -34837,28 +34834,26 @@ fi
fi fi
if test -z "$ac_cv_path_NETSNMP_CONFIG"; then if test -z "$ac_cv_prog_CONFIG_NETSNMP"; then
ac_pt_NETSNMP_CONFIG=$NETSNMP_CONFIG ac_ct_CONFIG_NETSNMP=$CONFIG_NETSNMP
# Extract the first word of "net-snmp-config", so it can be a program name with args. # 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 set dummy net-snmp-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5 { echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 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 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
case $ac_pt_NETSNMP_CONFIG in 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.
ac_cv_path_ac_pt_NETSNMP_CONFIG="$ac_pt_NETSNMP_CONFIG" # Let the user override the test with a path. else
;; as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
*) for as_dir in $PATH
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in ${NETSNMP_DIR}/bin
do do
IFS=$as_save_IFS IFS=$as_save_IFS
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do 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 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 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2 break 2
fi fi
@@ -34866,20 +34861,19 @@ done
done done
IFS=$as_save_IFS IFS=$as_save_IFS
;;
esac
fi fi
ac_pt_NETSNMP_CONFIG=$ac_cv_path_ac_pt_NETSNMP_CONFIG fi
if test -n "$ac_pt_NETSNMP_CONFIG"; then ac_ct_CONFIG_NETSNMP=$ac_cv_prog_ac_ct_CONFIG_NETSNMP
{ echo "$as_me:$LINENO: result: $ac_pt_NETSNMP_CONFIG" >&5 if test -n "$ac_ct_CONFIG_NETSNMP"; then
echo "${ECHO_T}$ac_pt_NETSNMP_CONFIG" >&6; } { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_NETSNMP" >&5
echo "${ECHO_T}$ac_ct_CONFIG_NETSNMP" >&6; }
else else
{ echo "$as_me:$LINENO: result: no" >&5 { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; } echo "${ECHO_T}no" >&6; }
fi fi
if test "x$ac_pt_NETSNMP_CONFIG" = x; then if test "x$ac_ct_CONFIG_NETSNMP" = x; then
NETSNMP_CONFIG="No" CONFIG_NETSNMP="No"
else else
case $cross_compiling:$ac_tool_warned in case $cross_compiling:$ac_tool_warned in
yes:) yes:)
@@ -34891,170 +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;} configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;; ac_tool_warned=yes ;;
esac esac
NETSNMP_CONFIG=$ac_pt_NETSNMP_CONFIG CONFIG_NETSNMP=$ac_ct_CONFIG_NETSNMP
fi fi
else else
NETSNMP_CONFIG="$ac_cv_path_NETSNMP_CONFIG" CONFIG_NETSNMP="$ac_cv_prog_CONFIG_NETSNMP"
fi fi
if test x"${NETSNMP_CONFIG}" = xNo; then if test ! "x${CONFIG_NETSNMP}" = xNo; then
{ echo "$as_me:$LINENO: ***" >&5 if test x"" = x ; then A=--cflags ; else A="" ; fi
echo "$as_me: ***" >&6;} NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
{ echo "$as_me:$LINENO: *** net-snmp-config was not found in the path you specified:" >&5 if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi
echo "$as_me: *** net-snmp-config was not found in the path you specified:" >&6;} NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)
{ echo "$as_me:$LINENO: *** ${NETSNMP_DIR}/bin" >&5 if test x"#include <net-snmp/net-snmp-config.h>
echo "$as_me: *** ${NETSNMP_DIR}/bin" >&6;} #include <net-snmp/net-snmp-includes.h>
{ echo "$as_me:$LINENO: *** Either correct the installation, or run configure" >&5 #include <net-snmp/agent/net-snmp-agent-includes.h>" != x ; then
echo "$as_me: *** Either correct the installation, or run configure" >&6;} saved_cppflags="${CPPFLAGS}"
{ echo "$as_me:$LINENO: *** including --without-netsnmp" >&5 if test "x${NETSNMP_DIR}" != "x"; then
echo "$as_me: *** including --without-netsnmp" >&6;} NETSNMP_INCLUDE="-I${NETSNMP_DIR}/include"
exit 1 fi
fi CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
else
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 $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"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;; cat >conftest.$ac_ext <<_ACEOF
esac /* confdefs.h. */
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 $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"
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
fi
fi
if test x"${NETSNMP_CONFIG}" != xNo; then
NETSNMP_libs=`${NETSNMP_CONFIG} --agent-libs`
{ 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. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <net-snmp/net-snmp-config.h>
/* Override any GCC internal prototype to avoid an error. #include <net-snmp/net-snmp-includes.h>
Use char because int might match the return type of a GCC #include <net-snmp/agent/net-snmp-agent-includes.h>
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char snmp_register_callback ();
int int
main () main ()
{ {
return snmp_register_callback (); int callback = snmp_register_callback(0, 0, NULL, NULL);
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext rm -f conftest.$ac_objext
if { (ac_try="$ac_link" if { (ac_try="$ac_compile"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;; *) ac_try_echo=$ac_try;;
esac esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1 (eval "$ac_compile") 2>conftest.er1
ac_status=$? ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1 rm -f conftest.er1
@@ -35063,35 +34939,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_c_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest$ac_exeext && } && test -s conftest.$ac_objext; then
$as_test_x conftest$ac_exeext; then PBX_NETSNMP=1
ac_cv_lib_netsnmp_snmp_register_callback=yes
cat >>confdefs.h <<\_ACEOF
#define HAVE_NETSNMP 1
_ACEOF
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_netsnmp_snmp_register_callback=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
conftest$ac_exeext conftest.$ac_ext CPPFLAGS="${saved_cppflags}"
LIBS=$ac_check_lib_save_LIBS else
fi PBX_NETSNMP=1
{ 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 cat >>confdefs.h <<\_ACEOF
#define HAVE_NETSNMP 1 #define HAVE_NETSNMP 1
_ACEOF _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 if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then
@@ -46976,12 +46852,71 @@ fi
SDL_INCLUDE=$(${CONFIG_SDL} $A) SDL_INCLUDE=$(${CONFIG_SDL} $A)
if test x"" = x ; then A=--libs ; else A="" ; fi if test x"" = x ; then A=--libs ; else A="" ; fi
SDL_LIB=$(${CONFIG_SDL} $A) 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 cat >>confdefs.h <<\_ACEOF
#define HAVE_SDL 1 #define HAVE_SDL 1
_ACEOF _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
fi fi
@@ -48278,12 +48213,71 @@ fi
GTK_INCLUDE=$(${CONFIG_GTK} $A) GTK_INCLUDE=$(${CONFIG_GTK} $A)
if test x"--libs gthread" = x ; then A=--libs ; else A="--libs gthread" ; fi if test x"--libs gthread" = x ; then A=--libs ; else A="--libs gthread" ; fi
GTK_LIB=$(${CONFIG_GTK} $A) 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 cat >>confdefs.h <<\_ACEOF
#define HAVE_GTK 1 #define HAVE_GTK 1
_ACEOF _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
fi fi
@@ -49683,7 +49677,7 @@ GC_CFLAGS!$GC_CFLAGS$ac_delim
GC_LDFLAGS!$GC_LDFLAGS$ac_delim GC_LDFLAGS!$GC_LDFLAGS$ac_delim
AST_DECLARATION_AFTER_STATEMENT!$AST_DECLARATION_AFTER_STATEMENT$ac_delim AST_DECLARATION_AFTER_STATEMENT!$AST_DECLARATION_AFTER_STATEMENT$ac_delim
GSM_INTERNAL!$GSM_INTERNAL$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 PG_CONFIG!$PG_CONFIG$ac_delim
PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim
PWLIBDIR!$PWLIBDIR$ac_delim PWLIBDIR!$PWLIBDIR$ac_delim

View File

@@ -828,32 +828,11 @@ AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h]) AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
NETSNMP_CONFIG=No AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp], , [--agent-libs],
if test "${USE_NETSNMP}" != "no"; then [#include <net-snmp/net-snmp-config.h>
if test "x${NETSNMP_DIR}" != "x"; then #include <net-snmp/net-snmp-includes.h>
AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No, [${NETSNMP_DIR}/bin]) #include <net-snmp/agent/net-snmp-agent-includes.h>],
if test x"${NETSNMP_CONFIG}" = xNo; then [int callback = snmp_register_callback(0, 0, NULL, NULL)])
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]) AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])

View File

@@ -499,7 +499,7 @@
/* Define to 1 if you have the <netinet/in.h> header file. */ /* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H #undef HAVE_NETINET_IN_H
/* Define to indicate the Net-SNMP library */ /* Define if your system has the NETSNMP libraries. */
#undef HAVE_NETSNMP #undef HAVE_NETSNMP
/* Define this to indicate the ${NEWT_DESCRIP} library */ /* Define this to indicate the ${NEWT_DESCRIP} library */