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
This commit is contained in:
Russell Bryant
2007-07-09 21:31:30 +00:00
parent e4142b6218
commit 1f96da91d4
2 changed files with 49 additions and 33 deletions

80
configure vendored
View File

@@ -11849,11 +11849,13 @@ _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 <stdio.h> #include <sys/types.h> /* for off_t */
#include <stdio.h>
int int
main () 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; return 0;
} }
@@ -11893,11 +11895,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#define _LARGEFILE_SOURCE 1 #define _LARGEFILE_SOURCE 1
#include <stdio.h> #include <sys/types.h> /* for off_t */
#include <stdio.h>
int int
main () 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; return 0;
} }
@@ -24201,9 +24205,9 @@ if test "${USE_PRI}" != "no"; then
pbxlibdir="-L${PRI_DIR}" pbxlibdir="-L${PRI_DIR}"
fi fi
fi fi
{ echo "$as_me:$LINENO: checking for pri_call in -lpri" >&5 { echo "$as_me:$LINENO: checking for pri_keypad_facility in -lpri" >&5
echo $ECHO_N "checking for pri_call in -lpri... $ECHO_C" >&6; } echo $ECHO_N "checking for pri_keypad_facility in -lpri... $ECHO_C" >&6; }
if test "${ac_cv_lib_pri_pri_call+set}" = set; then if test "${ac_cv_lib_pri_pri_keypad_facility+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_check_lib_save_LIBS=$LIBS
@@ -24221,11 +24225,11 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
char pri_call (); char pri_keypad_facility ();
int int
main () main ()
{ {
return pri_call (); return pri_keypad_facility ();
; ;
return 0; return 0;
} }
@@ -24248,21 +24252,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest$ac_exeext && } && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then $as_test_x conftest$ac_exeext; then
ac_cv_lib_pri_pri_call=yes ac_cv_lib_pri_pri_keypad_facility=yes
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_pri_pri_call=no ac_cv_lib_pri_pri_keypad_facility=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS LIBS=$ac_check_lib_save_LIBS
fi fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_pri_pri_call" >&5 { echo "$as_me:$LINENO: result: $ac_cv_lib_pri_pri_keypad_facility" >&5
echo "${ECHO_T}$ac_cv_lib_pri_pri_call" >&6; } echo "${ECHO_T}$ac_cv_lib_pri_pri_keypad_facility" >&6; }
if test $ac_cv_lib_pri_pri_call = yes; then if test $ac_cv_lib_pri_pri_keypad_facility = yes; then
AST_PRI_FOUND=yes AST_PRI_FOUND=yes
else else
AST_PRI_FOUND=no AST_PRI_FOUND=no
@@ -25715,6 +25719,12 @@ if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
OPENH323_INCDIR= OPENH323_INCDIR=
OPENH323_LIBDIR= 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 if test "${OPENH323DIR:-unset}" != "unset" ; then
as_ac_Header=`echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh` 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 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 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_header_compiler=yes ac_header_compiler=yes
@@ -25792,7 +25802,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && { (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 test ! -s conftest.err
}; then }; then
ac_header_preproc=yes ac_header_preproc=yes
@@ -25808,7 +25818,7 @@ rm -f conftest.err conftest.$ac_ext
echo "${ECHO_T}$ac_header_preproc" >&6; } echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header? # 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: ) yes:no: )
{ echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 { 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;} 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 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_header_compiler=yes ac_header_compiler=yes
@@ -25927,7 +25937,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && { (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 test ! -s conftest.err
}; then }; then
ac_header_preproc=yes ac_header_preproc=yes
@@ -25943,7 +25953,7 @@ rm -f conftest.err conftest.$ac_ext
echo "${ECHO_T}$ac_header_preproc" >&6; } echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header? # 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: ) yes:no: )
{ echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/../openh323/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 { 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;} 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 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_header_compiler=yes ac_header_compiler=yes
@@ -26062,7 +26072,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && { (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 test ! -s conftest.err
}; then }; then
ac_header_preproc=yes ac_header_preproc=yes
@@ -26078,7 +26088,7 @@ rm -f conftest.err conftest.$ac_ext
echo "${ECHO_T}$ac_header_preproc" >&6; } echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header? # 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: ) yes:no: )
{ echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/include/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 { 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;} 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 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_header_compiler=yes ac_header_compiler=yes
@@ -26198,7 +26208,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && { (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 test ! -s conftest.err
}; then }; then
ac_header_preproc=yes ac_header_preproc=yes
@@ -26214,7 +26224,7 @@ rm -f conftest.err conftest.$ac_ext
echo "${ECHO_T}$ac_header_preproc" >&6; } echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header? # 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: ) yes:no: )
{ echo "$as_me:$LINENO: WARNING: ${HOME}/openh323/include/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 { 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;} 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 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_header_compiler=yes ac_header_compiler=yes
@@ -26332,7 +26342,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && { (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 test ! -s conftest.err
}; then }; then
ac_header_preproc=yes ac_header_preproc=yes
@@ -26348,7 +26358,7 @@ rm -f conftest.err conftest.$ac_ext
echo "${ECHO_T}$ac_header_preproc" >&6; } echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header? # 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: ) 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:$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;} 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 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { (exit $ac_status); } && {
test -z "$ac_c_werror_flag" || test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
ac_header_compiler=yes ac_header_compiler=yes
@@ -26471,7 +26481,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && { (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 test ! -s conftest.err
}; then }; then
ac_header_preproc=yes ac_header_preproc=yes
@@ -26487,7 +26497,7 @@ rm -f conftest.err conftest.$ac_ext
echo "${ECHO_T}$ac_header_preproc" >&6; } echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header? # 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: ) yes:no: )
{ echo "$as_me:$LINENO: WARNING: /usr/include/openh323/h323.h: accepted by the compiler, rejected by the preprocessor!" >&5 { 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;} 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 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 if test "${HAS_OPENH323:-unset}" != "unset"; then

View File

@@ -786,7 +786,7 @@ fi
AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h]) 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 "${USE_PWLIB}" != "no"; then
if test -n "${PWLIB_DIR}"; then if test -n "${PWLIB_DIR}"; then