Index: configure.ac =================================================================== --- configure.ac (revision 173842) +++ configure.ac (working copy) @@ -1426,17 +1426,24 @@ PWLIBDIR="${PWLIB_DIR}" fi AST_CHECK_PWLIB() - AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2]) + AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2], [P[[WT]]LIB_VERSION]) if test "${HAS_PWLIB:-unset}" != "unset"; then AST_CHECK_PWLIB_PLATFORM() PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r" - AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB], - [Define if your system has the PWLib libraries.], - [#include "ptlib.h"], - [BOOL q = PTime::IsDaylightSavings();]) + if test "${HAVE_PWLIB_BOOL:-unset}" != "unset"; then + AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB], + [Define if your system has the PWLib libraries.], + [#include "ptlib.h"], + [BOOL q = PTime::IsDaylightSavings();]) + else + AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB], + [Define if your system has the PWLib libraries.], + [#include "ptlib.h"], + [PBoolean q = PTime::IsDaylightSavings();]) + fi fi fi Index: autoconf/ast_check_pwlib.m4 =================================================================== --- autoconf/ast_check_pwlib.m4 (revision 173842) +++ autoconf/ast_check_pwlib.m4 (working copy) @@ -103,13 +103,13 @@ else AC_CHECK_HEADER(/usr/local/include/ptlib.h, HAS_PWLIB=1, ) if test "${HAS_PWLIB:-unset}" != "unset" ; then - AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin) - if test "${PTLIB_CONFIG:-unset}" = "unset" ; then - AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/share/pwlib/make) - fi + AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin$PATH_SEPARATOR/usr/local/share/pwlib/make) PWLIB_INCDIR="/usr/local/include" - PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir` + PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null` if test "${PWLIB_LIBDIR:-unset}" = "unset"; then + PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null` + fi + if test "${PWLIB_LIBDIR:-unset}" = "unset"; then if test "x$LIB64" != "x"; then PWLIB_LIBDIR="/usr/local/lib64" else @@ -121,10 +121,13 @@ else AC_CHECK_HEADER(/usr/include/ptlib.h, HAS_PWLIB=1, ) if test "${HAS_PWLIB:-unset}" != "unset" ; then - AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make) + AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/bin$PATH_SEPARATOR/usr/share/pwlib/make) PWLIB_INCDIR="/usr/include" - PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir` + PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null` if test "${PWLIB_LIBDIR:-unset}" = "unset"; then + PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null` + fi + if test "${PWLIB_LIBDIR:-unset}" = "unset"; then if test "x$LIB64" != "x"; then PWLIB_LIBDIR="/usr/lib64" else @@ -188,13 +191,20 @@ ]) AC_DEFUN([AST_CHECK_PWLIB_VERSION], [ + if test "x$7" != "x"; then + VNAME="$7" + else + VNAME="$2_VERSION" + fi + if test "${HAS_$2:-unset}" != "unset"; then - $2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | sed -e 's/[[[:space:]]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'` + $2_VERSION=`grep "$VNAME" ${$2_INCDIR}/$3 | sed -e 's/[[[:space:]]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'` $2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.` $2_MINOR_VERSION=`echo ${$2_VERSION} | cut -f2 -d.` $2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.` let $2_VER=${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER} let $2_REQ=$4*10000+$5*100+$6 + AST_C_DEFINE_CHECK([$2_BOOL], [P_USE_STANDARD_CXX_BOOL], [$3]) AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323) if test ${$2_VER} -lt ${$2_REQ}; then