diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-16 23:08:11 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-16 23:08:11 +0000 |
commit | 7a5f69431abc8dfc73c610358d633279cf932990 (patch) | |
tree | 9fb1bac71d90a53c22ad6f655aeb393bb9283287 /configure | |
parent | 8518f4d6e3b354d2981b2b69df17dc7c002c1ff0 (diff) |
Change AST_EXT_TOOL_CHECK to attempt to build against <package>_LIB, per recommendations from Russell.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98985 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 396 |
1 files changed, 195 insertions, 201 deletions
@@ -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 |