From 1f96da91d409e00eb6ab95cd8671cc957b9f5d2d Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 9 Jul 2007 21:31:30 +0000 Subject: [PATCH] Update the configure script to check for a required function that is not present in the 1.2 version of libpri. This will prevent the configure script from thinking that it has compatible libpri support for Asterisk 1.4, when it actually does not because the installed version is from 1.2. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74211 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- configure | 80 +++++++++++++++++++++++++++++++--------------------- configure.ac | 2 +- 2 files changed, 49 insertions(+), 33 deletions(-) diff --git a/configure b/configure index bce46ac048..f627c1bdf5 100755 --- a/configure +++ b/configure @@ -11849,11 +11849,13 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include /* for off_t */ + #include int main () { -return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } @@ -11893,11 +11895,13 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 -#include +#include /* for off_t */ + #include int main () { -return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } @@ -24201,9 +24205,9 @@ if test "${USE_PRI}" != "no"; then pbxlibdir="-L${PRI_DIR}" fi fi - { echo "$as_me:$LINENO: checking for pri_call in -lpri" >&5 -echo $ECHO_N "checking for pri_call in -lpri... $ECHO_C" >&6; } -if test "${ac_cv_lib_pri_pri_call+set}" = set; then + { echo "$as_me:$LINENO: checking for pri_keypad_facility in -lpri" >&5 +echo $ECHO_N "checking for pri_keypad_facility in -lpri... $ECHO_C" >&6; } +if test "${ac_cv_lib_pri_pri_keypad_facility+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24221,11 +24225,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char pri_call (); +char pri_keypad_facility (); int main () { -return pri_call (); +return pri_keypad_facility (); ; return 0; } @@ -24248,21 +24252,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_pri_pri_call=yes + ac_cv_lib_pri_pri_keypad_facility=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pri_pri_call=no + ac_cv_lib_pri_pri_keypad_facility=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_pri_pri_call" >&5 -echo "${ECHO_T}$ac_cv_lib_pri_pri_call" >&6; } -if test $ac_cv_lib_pri_pri_call = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pri_pri_keypad_facility" >&5 +echo "${ECHO_T}$ac_cv_lib_pri_pri_keypad_facility" >&6; } +if test $ac_cv_lib_pri_pri_keypad_facility = yes; then AST_PRI_FOUND=yes else AST_PRI_FOUND=no @@ -25715,6 +25719,12 @@ if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then OPENH323_INCDIR= OPENH323_LIBDIR= +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test "${OPENH323DIR:-unset}" != "unset" ; then as_ac_Header=`echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -25753,7 +25763,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -25792,7 +25802,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -25808,7 +25818,7 @@ rm -f conftest.err conftest.$ac_ext echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: ${OPENH323DIR}/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -25888,7 +25898,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -25927,7 +25937,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -25943,7 +25953,7 @@ rm -f conftest.err conftest.$ac_ext echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/../openh323/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: ${PWLIBDIR}/../openh323/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -26023,7 +26033,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -26062,7 +26072,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -26078,7 +26088,7 @@ rm -f conftest.err conftest.$ac_ext echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/include/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: ${OPENH323DIR}/include/h323.h: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -26159,7 +26169,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -26198,7 +26208,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -26214,7 +26224,7 @@ rm -f conftest.err conftest.$ac_ext echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: ${HOME}/openh323/include/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: ${HOME}/openh323/include/h323.h: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -26293,7 +26303,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -26332,7 +26342,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -26348,7 +26358,7 @@ rm -f conftest.err conftest.$ac_ext echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: /usr/local/include/openh323/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: /usr/local/include/openh323/h323.h: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -26432,7 +26442,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -26471,7 +26481,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -26487,7 +26497,7 @@ rm -f conftest.err conftest.$ac_ext echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: /usr/include/openh323/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: /usr/include/openh323/h323.h: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -26557,6 +26567,12 @@ if test "${HAS_OPENH323:-unset}" != "unset" ; then fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test "${HAS_OPENH323:-unset}" != "unset"; then diff --git a/configure.ac b/configure.ac index f619a853e1..4f3882ec6b 100644 --- a/configure.ac +++ b/configure.ac @@ -786,7 +786,7 @@ fi AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h]) -AST_EXT_LIB_CHECK([PRI], [pri], [pri_call], [libpri.h]) +AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h]) if test "${USE_PWLIB}" != "no"; then if test -n "${PWLIB_DIR}"; then