[svn-commits] pcadach: branch pcadach/chan_h323-live r40032 - /team/pcadach/chan_h323-live/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Aug 16 09:15:56 MST 2006


Author: pcadach
Date: Wed Aug 16 11:15:56 2006
New Revision: 40032

URL: http://svn.digium.com/view/asterisk?rev=40032&view=rev
Log:
Better autoconf detection of OpenH323

Modified:
    team/pcadach/chan_h323-live/acinclude.m4
    team/pcadach/chan_h323-live/configure
    team/pcadach/chan_h323-live/configure.ac

Modified: team/pcadach/chan_h323-live/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/acinclude.m4?rev=40032&r1=40031&r2=40032&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/acinclude.m4 (original)
+++ team/pcadach/chan_h323-live/acinclude.m4 Wed Aug 16 11:15:56 2006
@@ -98,3 +98,234 @@
 fi
 AC_SUBST([GNU_MAKE])
 ])
+
+
+AC_DEFUN(
+[AST_CHECK_PWLIB], [
+if test "${PWLIBDIR:-unset}" != "unset" ; then
+  AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PWLIB=1, )
+fi
+if test "${HAS_PWLIB:-unset}" = "unset" ; then
+  AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
+  if test "${HAS_PWLIB:-unset}" != "unset" ; then
+    PWLIBDIR="${OPENH323DIR}/../pwlib"
+  else
+    AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PWLIB=1, )
+    if test "${HAS_PWLIB:-unset}" != "unset" ; then
+      PWLIBDIR="${HOME}/pwlib"
+    else
+      AC_CHECK_FILE(/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)
+      else
+        AC_CHECK_FILE(/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/)
+        fi
+      fi
+    fi
+  fi
+fi
+
+if test "${HAS_PWLIB:-unset}" = "unset" ; then
+  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
+  exit
+fi
+
+if test "${PWLIBDIR:-unset}" = "unset" ; then
+  if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
+    echo "Cannot find ptlib-config - please install and try again"
+    exit
+  fi
+  PWLIBDIR=`$PTLIB_CONFIG --prefix`
+fi
+
+if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
+  PWLIBDIR="/usr/share/pwlib/"
+fi
+if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
+  PWLIBDIR="/usr/local/share/pwlib/"
+fi
+
+AC_SUBST([PWLIBDIR])
+])
+
+
+AC_DEFUN(
+[AST_CHECK_OPENH323_PLATFORM], [
+PWLIB_OSTYPE=
+case "$target_os" in
+  linux*)          PWLIB_OSTYPE=linux ;
+  		;;
+  freebsd* )       PWLIB_OSTYPE=FreeBSD ;
+  		;;
+  openbsd* )       PWLIB_OSTYPE=OpenBSD ;
+				   ENDLDLIBS="-lossaudio" ;
+		;;
+  netbsd* )        PWLIB_OSTYPE=NetBSD ;
+				   ENDLDLIBS="-lossaudio" ;
+		;;
+  solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
+		;;
+  darwin* )	       PWLIB_OSTYPE=Darwin ;
+		;;
+  beos*)           PWLIB_OSTYPE=beos ;
+                   STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
+		;;
+  cygwin*)         PWLIB_OSTYPE=cygwin ;
+		;;
+  mingw*)	       PWLIB_OSTYPE=mingw ;
+		           STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
+		           ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
+		;;
+  * )		       PWLIB_OSTYPE="$target_os" ;
+		           AC_MSG_WARN("OS $target_os not recognized - proceed with caution!") ;
+		;;
+esac
+
+PWLIB_MACHTYPE=
+case "$target_cpu" in
+   x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
+                   ;;
+
+   x86_64)	   PWLIB_MACHTYPE=x86_64 ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
+		   P_64BIT=1 ;
+		   ;;
+
+   sparc )         PWLIB_MACHTYPE=sparc ;
+		   ;;
+
+   powerpc )       PWLIB_MACHTYPE=ppc ;
+		   ;;
+
+   ppc )           PWLIB_MACHTYPE=ppc ;
+		   ;;
+
+   powerpc64 )     PWLIB_MACHTYPE=ppc64 ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   ppc64 )         PWLIB_MACHTYPE=ppc64 ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   ia64)	   PWLIB_MACHTYPE=ia64 ;
+		   P_64BIT=1 ;
+	  	   ;;
+
+   s390x)	   PWLIB_MACHTYPE=s390x ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   s390)	   PWLIB_MACHTYPE=s390 ;
+		   ;;
+
+   * )		   PWLIB_MACHTYPE=$target_cpu ;
+		   AC_MSG_WARN("CPU $target_cpu not recognized - proceed with caution!") ;;
+esac
+
+PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
+
+AC_SUBST([PWLIB_PLATFORM])
+])
+
+
+AC_DEFUN(
+[AST_CHECK_OPENH323], [
+if test "${OPENH323DIR:-unset}" != "unset" ; then
+  AC_CHECK_FILE(${OPENH323DIR}/version.h, HAS_OPENH323=1, )
+fi
+if test "${HAS_OPENH323:-unset}" = "unset" ; then
+  AC_CHECK_FILE(${PWLIBDIR}/../openh323/version.h, HAS_OPENH323=1, )
+  if test "${HAS_OPENH323:-unset}" != "unset" ; then
+    OPENH323DIR="${OPENH323DIR}/../openh323"
+  else
+    AC_CHECK_FILE(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
+    if test "${HAS_OPENH323:-unset}" != "unset" ; then
+      OPENH323DIR="${HOME}/openh323"
+    else
+      AC_CHECK_FILE(/usr/local/include/h323.h, HAS_OPENH323=1, )
+    fi
+  fi
+fi
+AC_SUBST([OPENH323DIR])
+])
+
+
+AC_DEFUN(
+[AST_CHECK_PWLIB_VERSION], [
+	if test "${HAS_$2:-unset}" != "unset"; then
+		$2_MAJOR_VERSION=`cat ${$2DIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
+		$2_MINOR_VERSION=`cat ${$2DIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
+		$2_BUILD_NUMBER=`cat ${$2DIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
+		$2_VERSION="${$2_MAJOR_VERSION}.${$2_MINOR_VERSION}.${$2_BUILD_NUMBER}"
+
+		AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
+		if test ${$2_MAJOR_VERSION} -lt $3; then
+			unset HAS_$2
+		elif test ${$2_MAJOR_VERSION} -gt $3; then
+			/bin/true
+		elif test ${$2_MINOR_VERSION} -lt $4; then
+			unset HAS_$2
+		elif test ${$2_MINOR_VERSION} -gt $4; then
+			/bin/true
+		elif test ${$2_BUILD_NUMBER} -lt $5; then
+			unset HAS_$2
+		elif test ${$2_BUILD_NUMBER} -gt $5; then
+			/bin/true
+		fi
+		if test "${HAS_$2:-unset}" = "unset"; then
+			AC_MSG_RESULT(no)
+		else
+			AC_MSG_RESULT(yes)
+		fi
+	fi
+])
+
+
+AC_DEFUN(
+[AST_CHECK_PWLIB_BUILD], [
+	if test "${HAS_$2:-unset}" != "unset"; then
+	   AC_MSG_CHECKING($1 installation validity)
+
+	   saved_cppflags="${CPPFLAGS}"
+	   saved_libs="${LIBS}"
+	   LIBS="${LIBS} -L${$2DIR}/lib -l${PLATFORM_$2} $7"
+	   CPPFLAGS="${CPPFLAGS} -I${$2DIR}/include $6"
+
+	   AC_LANG_PUSH([C++])
+
+	   AC_LINK_IFELSE(
+		[AC_LANG_PROGRAM([$4],[$5])],
+		[	AC_MSG_RESULT(yes) 
+			ac_cv_lib_$2="yes" 
+		],
+		[	AC_MSG_RESULT(no) 
+			ac_cv_lib_$2="no" 
+		]
+		)
+
+	   AC_LANG_POP([C++])
+
+	   LIBS="${saved_libs}"
+	   CPPFLAGS="${saved_cppflags}"
+
+	   if test "${ac_cv_lib_$2}" = "yes"; then
+	      $2_LIB="-l${PLATFORM_$2}"
+	      if test "${$2DIR}" != ""; then
+	         $2_LIB="-L${$2DIR}/lib -l${PLATFORM_$2}"
+	         $2_INCLUDE="-I${$2DIR}/include"
+	      fi
+	   	  PBX_$2=1
+	   	  AC_DEFINE([HAVE_$2], 1, [$3])
+	   fi
+	fi
+])

Modified: team/pcadach/chan_h323-live/configure
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configure?rev=40032&r1=40031&r2=40032&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configure (original)
+++ team/pcadach/chan_h323-live/configure Wed Aug 16 11:15:56 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 39730 .
+# From configure.ac Revision: 39802 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -313,7 +313,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PBX_PLATFORM PBX_CPU PBX_VENDOR PBX_OS UNAME ac_pt_UNAME PBX_OSREV OSISWIN32 PBX_OSTYPE CC ac_ct_CC CXX ac_ct_CXX RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXXFLAGS CPP CXXCPP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP FIND COMPRESS BASENAME DIRNAME LN DOT AST_DEVMODE ALSA_LIB ALSA_INCLUDE PBX_ALSA CURSES_LIB CURSES_INCLUDE PBX_CURSES GSM_LIB GSM_INCLUDE PBX_GSM IKSEMEL_LIB IKSEMEL_INCLUDE PBX_IKSEMEL IMAP_TK_LIB IMAP_TK_INCLUDE PBX_IMAP_TK KDE_LIB KDE_INCLUDE PBX_KDE NBS_LIB NBS_INCLUDE PBX_NBS NCURSES_LIB NCURSES_INCLUDE PBX_NCURSES NETSNMP_LIB NETSNMP_INCLUDE PBX_NETSNMP NEWT_LIB NEWT_INCLUDE PBX_NEWT UNIXODBC_LIB UNIXODBC_INCLUDE PBX_UNIXODBC OGG_LIB OGG_INCLUDE PBX_OGG OSPTK_LIB OSPTK_INCLUDE PBX_OSPTK OSS_LIB OSS_INCLUDE PBX_OSS POPT_LIB POPT_INCLUDE PBX_POPT PGSQL_LIB PGSQL_INCLUDE PBX_PGSQL PRI_LIB PRI_INCLUDE PBX_PRI PWLIB_LIB PWLIB_INCLUDE PBX_PWLIB OPENH323_LIB OPENH323_INCLUDE PBX_OPENH323 QT_LIB QT_INCLUDE PBX_QT RADIUS_LIB RADIUS_INCLUDE PBX_RADIUS SPEEX_LIB SPEEX_INCLUDE PBX_SPEEX SQLITE_LIB SQLITE_INCLUDE PBX_SQLITE OPENSSL_LIB OPENSSL_INCLUDE PBX_OPENSSL FREETDS_LIB FREETDS_INCLUDE PBX_FREETDS TERMCAP_LIB TERMCAP_INCLUDE PBX_TERMCAP TINFO_LIB TINFO_INCLUDE PBX_TINFO TONEZONE_LIB TONEZONE_INCLUDE PBX_TONEZONE VORBIS_LIB VORBIS_INCLUDE PBX_VORBIS VPB_LIB VPB_INCLUDE PBX_VPB ZLIB_LIB ZLIB_INCLUDE PBX_ZLIB ZAPTEL_LIB ZAPTEL_INCLUDE PBX_ZAPTEL ALLOCA EGREP LIBOBJS POW_LIB KDEINIT ac_pt_KDEINIT KDEDIR NETSNMP_CONFIG ac_pt_NETSNMP_CONFIG PG_CONFIG ac_pt_PG_CONFIG QTMOC ac_pt_QTMOC EDITLINE_LIB PBX_H323 PBX_IXJUSER GTKCONFIG ac_ct_GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIB CURL ac_pt_CURL PBX_CURL CURLLIB LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PBX_PLATFORM PBX_CPU PBX_VENDOR PBX_OS UNAME ac_pt_UNAME PBX_OSREV OSISWIN32 PBX_OSTYPE CC ac_ct_CC CXX ac_ct_CXX RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXXFLAGS CPP CXXCPP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP FIND COMPRESS BASENAME DIRNAME LN DOT AST_DEVMODE ALSA_LIB ALSA_INCLUDE PBX_ALSA CURSES_LIB CURSES_INCLUDE PBX_CURSES GSM_LIB GSM_INCLUDE PBX_GSM IKSEMEL_LIB IKSEMEL_INCLUDE PBX_IKSEMEL IMAP_TK_LIB IMAP_TK_INCLUDE PBX_IMAP_TK KDE_LIB KDE_INCLUDE PBX_KDE NBS_LIB NBS_INCLUDE PBX_NBS NCURSES_LIB NCURSES_INCLUDE PBX_NCURSES NETSNMP_LIB NETSNMP_INCLUDE PBX_NETSNMP NEWT_LIB NEWT_INCLUDE PBX_NEWT UNIXODBC_LIB UNIXODBC_INCLUDE PBX_UNIXODBC OGG_LIB OGG_INCLUDE PBX_OGG OSPTK_LIB OSPTK_INCLUDE PBX_OSPTK OSS_LIB OSS_INCLUDE PBX_OSS POPT_LIB POPT_INCLUDE PBX_POPT PGSQL_LIB PGSQL_INCLUDE PBX_PGSQL PRI_LIB PRI_INCLUDE PBX_PRI PWLIB_LIB PWLIB_INCLUDE PBX_PWLIB OPENH323_LIB OPENH323_INCLUDE PBX_OPENH323 QT_LIB QT_INCLUDE PBX_QT RADIUS_LIB RADIUS_INCLUDE PBX_RADIUS SPEEX_LIB SPEEX_INCLUDE PBX_SPEEX SQLITE_LIB SQLITE_INCLUDE PBX_SQLITE OPENSSL_LIB OPENSSL_INCLUDE PBX_OPENSSL FREETDS_LIB FREETDS_INCLUDE PBX_FREETDS TERMCAP_LIB TERMCAP_INCLUDE PBX_TERMCAP TINFO_LIB TINFO_INCLUDE PBX_TINFO TONEZONE_LIB TONEZONE_INCLUDE PBX_TONEZONE VORBIS_LIB VORBIS_INCLUDE PBX_VORBIS VPB_LIB VPB_INCLUDE PBX_VPB ZLIB_LIB ZLIB_INCLUDE PBX_ZLIB ZAPTEL_LIB ZAPTEL_INCLUDE PBX_ZAPTEL ALLOCA EGREP LIBOBJS POW_LIB KDEINIT ac_pt_KDEINIT KDEDIR NETSNMP_CONFIG ac_pt_NETSNMP_CONFIG PG_CONFIG ac_pt_PG_CONFIG PTLIB_CONFIG PWLIBDIR PWLIB_PLATFORM OPENH323DIR QTMOC ac_pt_QTMOC EDITLINE_LIB PBX_H323 PBX_IXJUSER GTKCONFIG ac_ct_GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIB CURL ac_pt_CURL PBX_CURL CURLLIB LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -19085,46 +19085,383 @@
 fi
 
 
-#Library name like pt_linux_x86_r, not ptlib_linux-gnu_i386-pc-linux-gnu_r
-PWLIB_OSTYPE=${OSTYPE}
-PWLIB_MACHTYPE=${MACHTYPE}
-case $PWLIB_OSTYPE in
-   linux-gnu*)
-      PWLIB_OSTYPE="linux";;
+if test "${USE_PWLIB}" != "no"; then
+	if test ! -z "${PWLIB_DIR}"; then
+		PWLIBDIR="${PWLIB_DIR}"
+	fi
+
+if test "${PWLIBDIR:-unset}" != "unset" ; then
+  as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/version.h" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${PWLIBDIR}/version.h" >&5
+echo $ECHO_N "checking for ${PWLIBDIR}/version.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${PWLIBDIR}/version.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  HAS_PWLIB=1
+fi
+
+fi
+if test "${HAS_PWLIB:-unset}" = "unset" ; then
+  as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${OPENH323DIR}/../pwlib/version.h" >&5
+echo $ECHO_N "checking for ${OPENH323DIR}/../pwlib/version.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${OPENH323DIR}/../pwlib/version.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  HAS_PWLIB=1
+fi
+
+  if test "${HAS_PWLIB:-unset}" != "unset" ; then
+    PWLIBDIR="${OPENH323DIR}/../pwlib"
+  else
+    as_ac_File=`echo "ac_cv_file_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${HOME}/pwlib/include/ptlib.h" >&5
+echo $ECHO_N "checking for ${HOME}/pwlib/include/ptlib.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${HOME}/pwlib/include/ptlib.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  HAS_PWLIB=1
+fi
+
+    if test "${HAS_PWLIB:-unset}" != "unset" ; then
+      PWLIBDIR="${HOME}/pwlib"
+    else
+      echo "$as_me:$LINENO: checking for /usr/local/include/ptlib.h" >&5
+echo $ECHO_N "checking for /usr/local/include/ptlib.h... $ECHO_C" >&6
+if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/include/ptlib.h"; then
+  ac_cv_file__usr_local_include_ptlib_h=yes
+else
+  ac_cv_file__usr_local_include_ptlib_h=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_ptlib_h" >&5
+echo "${ECHO_T}$ac_cv_file__usr_local_include_ptlib_h" >&6
+if test $ac_cv_file__usr_local_include_ptlib_h = yes; then
+  HAS_PWLIB=1
+fi
+
+      if test "${HAS_PWLIB:-unset}" != "unset" ; then
+        # Extract the first word of "ptlib-config", so it can be a program name with args.
+set dummy ptlib-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_PTLIB_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PTLIB_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/local/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PTLIB_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
+
+  ;;
 esac
-case $PWLIB_MACHTYPE in
-   i386-pc-linux*)
-      PWLIB_MACHTYPE="x86";;
+fi
+PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
+
+if test -n "$PTLIB_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5
+echo "${ECHO_T}$PTLIB_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+      else
+        echo "$as_me:$LINENO: checking for /usr/include/ptlib.h" >&5
+echo $ECHO_N "checking for /usr/include/ptlib.h... $ECHO_C" >&6
+if test "${ac_cv_file__usr_include_ptlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/include/ptlib.h"; then
+  ac_cv_file__usr_include_ptlib_h=yes
+else
+  ac_cv_file__usr_include_ptlib_h=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_ptlib_h" >&5
+echo "${ECHO_T}$ac_cv_file__usr_include_ptlib_h" >&6
+if test $ac_cv_file__usr_include_ptlib_h = yes; then
+  HAS_PWLIB=1
+fi
+
+        if test "${HAS_PWLIB:-unset}" != "unset" ; then
+          # Extract the first word of "ptlib-config", so it can be a program name with args.
+set dummy ptlib-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_PTLIB_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PTLIB_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/share/pwlib/make/
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PTLIB_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
+
+  ;;
 esac
-PLATFORM_PTLIB="pt_${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}_r"
-if test "${USE_PWLIB}" != "no"; then
-   echo "$as_me:$LINENO: checking checking for existence of pwlib" >&5
-echo $ECHO_N "checking checking for existence of pwlib... $ECHO_C" >&6
-
-   saved_cppflags="${CPPFLAGS}"
-   saved_libs="${LIBS}"
-   if test "x${PWLIB_DIR}" = "x" -a "x${PWLIBDIR}" != "x"; then
-      PWLIB_DIR="${PWLIBDIR}"
-   fi
-   LIBS="${LIBS} -L${PWLIB_DIR}/lib -l${PLATFORM_PTLIB}"
-   CPPFLAGS="${CPPFLAGS} -I${PWLIB_DIR}/include"
-
-   ac_ext=cc
+fi
+PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
+
+if test -n "$PTLIB_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5
+echo "${ECHO_T}$PTLIB_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+        fi
+      fi
+    fi
+  fi
+fi
+
+if test "${HAS_PWLIB:-unset}" = "unset" ; then
+  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
+  exit
+fi
+
+if test "${PWLIBDIR:-unset}" = "unset" ; then
+  if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
+    echo "Cannot find ptlib-config - please install and try again"
+    exit
+  fi
+  PWLIBDIR=`$PTLIB_CONFIG --prefix`
+fi
+
+if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
+  PWLIBDIR="/usr/share/pwlib/"
+fi
+if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
+  PWLIBDIR="/usr/local/share/pwlib/"
+fi
+
+
+
+
+	if test "${HAS_PWLIB:-unset}" != "unset"; then
+		PWLIB_MAJOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
+		PWLIB_MINOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
+		PWLIB_BUILD_NUMBER=`cat ${PWLIBDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
+		PWLIB_VERSION="${PWLIB_MAJOR_VERSION}.${PWLIB_MINOR_VERSION}.${PWLIB_BUILD_NUMBER}"
+
+		echo "$as_me:$LINENO: checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323" >&5
+echo $ECHO_N "checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323... $ECHO_C" >&6
+		if test ${PWLIB_MAJOR_VERSION} -lt 1; then
+			unset HAS_PWLIB
+		elif test ${PWLIB_MAJOR_VERSION} -gt 1; then
+			/bin/true
+		elif test ${PWLIB_MINOR_VERSION} -lt 10; then
+			unset HAS_PWLIB
+		elif test ${PWLIB_MINOR_VERSION} -gt 10; then
+			/bin/true
+		elif test ${PWLIB_BUILD_NUMBER} -lt 0; then
+			unset HAS_PWLIB
+		elif test ${PWLIB_BUILD_NUMBER} -gt 0; then
+			/bin/true
+		fi
+		if test "${HAS_PWLIB:-unset}" = "unset"; then
+			echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+		else
+			echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+		fi
+	fi
+
+
+	if test "${HAS_PWLIB:-unset}" != "unset"; then
+
+PWLIB_OSTYPE=
+case "$target_os" in
+  linux*)          PWLIB_OSTYPE=linux ;
+  		;;
+  freebsd* )       PWLIB_OSTYPE=FreeBSD ;
+  		;;
+  openbsd* )       PWLIB_OSTYPE=OpenBSD ;
+				   ENDLDLIBS="-lossaudio" ;
+		;;
+  netbsd* )        PWLIB_OSTYPE=NetBSD ;
+				   ENDLDLIBS="-lossaudio" ;
+		;;
+  solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
+		;;
+  darwin* )	       PWLIB_OSTYPE=Darwin ;
+		;;
+  beos*)           PWLIB_OSTYPE=beos ;
+                   STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
+		;;
+  cygwin*)         PWLIB_OSTYPE=cygwin ;
+		;;
+  mingw*)	       PWLIB_OSTYPE=mingw ;
+		           STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
+		           ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
+		;;
+  * )		       PWLIB_OSTYPE="$target_os" ;
+		           { echo "$as_me:$LINENO: WARNING: \"OS $target_os not recognized - proceed with caution!\"" >&5
+echo "$as_me: WARNING: \"OS $target_os not recognized - proceed with caution!\"" >&2;} ;
+		;;
+esac
+
+PWLIB_MACHTYPE=
+case "$target_cpu" in
+   x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
+                   ;;
+
+   x86_64)	   PWLIB_MACHTYPE=x86_64 ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
+		   P_64BIT=1 ;
+		   ;;
+
+   sparc )         PWLIB_MACHTYPE=sparc ;
+		   ;;
+
+   powerpc )       PWLIB_MACHTYPE=ppc ;
+		   ;;
+
+   ppc )           PWLIB_MACHTYPE=ppc ;
+		   ;;
+
+   powerpc64 )     PWLIB_MACHTYPE=ppc64 ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   ppc64 )         PWLIB_MACHTYPE=ppc64 ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   ia64)	   PWLIB_MACHTYPE=ia64 ;
+		   P_64BIT=1 ;
+	  	   ;;
+
+   s390x)	   PWLIB_MACHTYPE=s390x ;
+		   P_64BIT=1 ;
+                   LIB64=1 ;
+		   ;;
+
+   s390)	   PWLIB_MACHTYPE=s390 ;
+		   ;;
+
+   * )		   PWLIB_MACHTYPE=$target_cpu ;
+		   { echo "$as_me:$LINENO: WARNING: \"CPU $target_cpu not recognized - proceed with caution!\"" >&5
+echo "$as_me: WARNING: \"CPU $target_cpu not recognized - proceed with caution!\"" >&2;} ;;
+esac
+
+PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
+
+
+
+
+		PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
+
+
+	if test "${HAS_PWLIB:-unset}" != "unset"; then
+	   echo "$as_me:$LINENO: checking PWLib installation validity" >&5
+echo $ECHO_N "checking PWLib installation validity... $ECHO_C" >&6
+
+	   saved_cppflags="${CPPFLAGS}"
+	   saved_libs="${LIBS}"
+	   LIBS="${LIBS} -L${PWLIBDIR}/lib -l${PLATFORM_PWLIB} "
+	   CPPFLAGS="${CPPFLAGS} -I${PWLIBDIR}/include "
+
+	   ac_ext=cc
 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
 
 
-   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.  */
 #include "ptlib.h"
-	#include "ptlib/ptime.h"
 int
 main ()
 {
@@ -19132,7 +19469,6 @@
   ;
   return 0;
 }
-
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -19157,7 +19493,7 @@
   (exit $ac_status); }; }; then
   	echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-		ac_cv_lib_pwlib="yes"
+			ac_cv_lib_PWLIB="yes"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -19165,78 +19501,218 @@
 
 	echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
-		ac_cv_lib_pwlib="no"
+			ac_cv_lib_PWLIB="no"
 
 
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
-   ac_ext=c
+	   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
 
 
-   LIBS="${saved_libs}"
-   CPPFLAGS="${saved_cppflags}"
-
-   if test "${ac_cv_lib_pwlib}" = "yes"; then
-      PWLIB_LIB="-l${PLATFORM_PTLIB}"
-      if test "${PWLIB_DIR}" != ""; then
-         PWLIB_LIB="-L${PWLIB_DIR}/lib -l${PLATFORM_PTLIB}"
-         PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
-      fi
-   	PBX_PWLIB=1
+	   LIBS="${saved_libs}"
+	   CPPFLAGS="${saved_cppflags}"
+
+	   if test "${ac_cv_lib_PWLIB}" = "yes"; then
+	      PWLIB_LIB="-l${PLATFORM_PWLIB}"
+	      if test "${PWLIBDIR}" != ""; then
+	         PWLIB_LIB="-L${PWLIBDIR}/lib -l${PLATFORM_PWLIB}"
+	         PWLIB_INCLUDE="-I${PWLIBDIR}/include"
+	      fi
+	   	  PBX_PWLIB=1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_PWLIB 1
 _ACEOF
 
-   elif test ! -z "${PWLIB_MANDATORY}"; then
-      { echo "$as_me:$LINENO: ***" >&5
+	   fi
+	fi
+
+	fi
+fi
+
+if test "${USE_PWLIB}" != "no" -a "x${ac_cv_lib_PWLIB}" != "xyes" -a ! -z "${PWLIB_MANDATORY}"; then
+   { echo "$as_me:$LINENO: ***" >&5
 echo "$as_me: ***" >&6;}
-      { echo "$as_me:$LINENO: *** The PWLIB installation on this system appears to be broken." >&5
+   { echo "$as_me:$LINENO: *** The PWLIB installation on this system appears to be broken." >&5
 echo "$as_me: *** The PWLIB installation on this system appears to be broken." >&6;}
-      { echo "$as_me:$LINENO: *** Either correct the installation" >&5
+   { echo "$as_me:$LINENO: *** Either correct the installation" >&5
 echo "$as_me: *** Either correct the installation" >&or run configure;}
-      { echo "$as_me:$LINENO: *** including --without-pwlib" >&5
+   { echo "$as_me:$LINENO: *** including --without-pwlib" >&5
 echo "$as_me: *** including --without-pwlib" >&6;}
-      exit 1
-   fi
+   exit 1
 fi
 
 if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
-   PLATFORM_OPENH323="h323_${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}_r"
-   echo "$as_me:$LINENO: checking checking for existence of openh323" >&5
-echo $ECHO_N "checking checking for existence of openh323... $ECHO_C" >&6
-
-   saved_cppflags="${CPPFLAGS}"
-   saved_libs="${LIBS}"
-   if test "x${OPENH323_DIR}" = "x" -a "x${OPENH323DIR}" != "x"; then
-      OPENH323_DIR="${OPENH323DIR}"
-   fi
-   LIBS="${LIBS} -L${OPENH323_DIR}/lib -l${PLATFORM_OPENH323} ${PWLIB_LIB}"
-   CPPFLAGS="${CPPFLAGS} -I${OPENH323_DIR}/include ${PWLIB_INCLUDE}"
-
-   ac_ext=cc
+	if test ! -z "${OPENH323_DIR}"; then
+		OPENH323DIR="${OPENH323_DIR}"
+	fi
+	PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_r"
+
+
+if test "${OPENH323DIR:-unset}" != "unset" ; then
+  as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/version.h" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${OPENH323DIR}/version.h" >&5
+echo $ECHO_N "checking for ${OPENH323DIR}/version.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${OPENH323DIR}/version.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  HAS_OPENH323=1
+fi
+
+fi
+if test "${HAS_OPENH323:-unset}" = "unset" ; then
+  as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${PWLIBDIR}/../openh323/version.h" >&5
+echo $ECHO_N "checking for ${PWLIBDIR}/../openh323/version.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${PWLIBDIR}/../openh323/version.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  HAS_OPENH323=1
+fi
+
+  if test "${HAS_OPENH323:-unset}" != "unset" ; then
+    OPENH323DIR="${OPENH323DIR}/../openh323"
+  else
+    as_ac_File=`echo "ac_cv_file_${HOME}/openh323/include/h323.h" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${HOME}/openh323/include/h323.h" >&5
+echo $ECHO_N "checking for ${HOME}/openh323/include/h323.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${HOME}/openh323/include/h323.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  HAS_OPENH323=1
+fi
+
+    if test "${HAS_OPENH323:-unset}" != "unset" ; then
+      OPENH323DIR="${HOME}/openh323"
+    else
+      echo "$as_me:$LINENO: checking for /usr/local/include/h323.h" >&5
+echo $ECHO_N "checking for /usr/local/include/h323.h... $ECHO_C" >&6
+if test "${ac_cv_file__usr_local_include_h323_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/include/h323.h"; then
+  ac_cv_file__usr_local_include_h323_h=yes
+else
+  ac_cv_file__usr_local_include_h323_h=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_h323_h" >&5
+echo "${ECHO_T}$ac_cv_file__usr_local_include_h323_h" >&6
+if test $ac_cv_file__usr_local_include_h323_h = yes; then
+  HAS_OPENH323=1
+fi
+
+    fi
+  fi
+fi
+
+
+
+	if test "${HAS_OPENH323:-unset}" != "unset"; then
+		OPENH323_MAJOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
+		OPENH323_MINOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
+		OPENH323_BUILD_NUMBER=`cat ${OPENH323DIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
+		OPENH323_VERSION="${OPENH323_MAJOR_VERSION}.${OPENH323_MINOR_VERSION}.${OPENH323_BUILD_NUMBER}"
+
+		echo "$as_me:$LINENO: checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323" >&5
+echo $ECHO_N "checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323... $ECHO_C" >&6
+		if test ${OPENH323_MAJOR_VERSION} -lt 1; then
+			unset HAS_OPENH323
+		elif test ${OPENH323_MAJOR_VERSION} -gt 1; then
+			/bin/true
+		elif test ${OPENH323_MINOR_VERSION} -lt 18; then
+			unset HAS_OPENH323
+		elif test ${OPENH323_MINOR_VERSION} -gt 18; then
+			/bin/true
+		elif test ${OPENH323_BUILD_NUMBER} -lt 0; then
+			unset HAS_OPENH323
+		elif test ${OPENH323_BUILD_NUMBER} -gt 0; then
+			/bin/true
+		fi
+		if test "${HAS_OPENH323:-unset}" = "unset"; then
+			echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+		else
+			echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+		fi
+	fi
+
+
+	if test "${HAS_OPENH323:-unset}" != "unset"; then
+	   echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5
+echo $ECHO_N "checking OpenH323 installation validity... $ECHO_C" >&6
+
+	   saved_cppflags="${CPPFLAGS}"
+	   saved_libs="${LIBS}"
+	   LIBS="${LIBS} -L${OPENH323DIR}/lib -l${PLATFORM_OPENH323} ${PWLIB_LIB}"
+	   CPPFLAGS="${CPPFLAGS} -I${OPENH323DIR}/include ${PWLIB_INCLUDE}"
+
+	   ac_ext=cc
 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
 
 
-   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.  */
 #include "ptlib.h"
-	#include "h323.h"
-	#include "h323ep.h"
+		#include "h323.h"
+		#include "h323ep.h"
 int
 main ()
 {
@@ -19244,7 +19720,6 @@
   ;
   return 0;
 }
-
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -19269,7 +19744,7 @@
   (exit $ac_status); }; }; then
   	echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-		ac_cv_lib_openh323="yes"
+			ac_cv_lib_OPENH323="yes"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -19277,47 +19752,51 @@
 
 	echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
-		ac_cv_lib_openh323="no"
+			ac_cv_lib_OPENH323="no"
 
 
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
-   ac_ext=c
+	   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
 
 
-   LIBS="${saved_libs}"
-   CPPFLAGS="${saved_cppflags}"
-
-   if test "${ac_cv_lib_openh323}" = "yes"; then
-      OPENH323_LIB="-l${PLATFORM_OPENH323}"
-      if test "${OPENH323_DIR}" != ""; then
-         OPENH323_LIB="-L${OPENH323_DIR}/lib -l${PLATFORM_OPENH323}"
-         OPENH323_INCLUDE="-I${OPENH323_DIR}/include"
-      fi
-   	PBX_OPENH323=1
+	   LIBS="${saved_libs}"
+	   CPPFLAGS="${saved_cppflags}"
+
+	   if test "${ac_cv_lib_OPENH323}" = "yes"; then
+	      OPENH323_LIB="-l${PLATFORM_OPENH323}"
+	      if test "${OPENH323DIR}" != ""; then
+	         OPENH323_LIB="-L${OPENH323DIR}/lib -l${PLATFORM_OPENH323}"
+	         OPENH323_INCLUDE="-I${OPENH323DIR}/include"
+	      fi
+	   	  PBX_OPENH323=1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_OPENH323 1
 _ACEOF
 
-   elif test ! -z "${OPENH323_MANDATORY}"; then
-      { echo "$as_me:$LINENO: ***" >&5
+	   fi
+	fi
+
+fi
+if test "${USE_OPENH323}" != "no" -a "x${ac_cv_lib_OPENH323}" != "xyes" -a ! -z "${OPENH323_MANDATORY}"; then
+   { echo "$as_me:$LINENO: ***" >&5
 echo "$as_me: ***" >&6;}
-      { echo "$as_me:$LINENO: *** The OpenH323 installation on this system appears to be broken." >&5
-echo "$as_me: *** The OpenH323 installation on this system appears to be broken." >&6;}
-      { echo "$as_me:$LINENO: *** Either correct the installation" >&5
+   { echo "$as_me:$LINENO: *** The PWLIB installation on this system appears to be broken." >&5
+echo "$as_me: *** The PWLIB installation on this system appears to be broken." >&6;}
+   { echo "$as_me:$LINENO: *** Either correct the installation" >&5
 echo "$as_me: *** Either correct the installation" >&or run configure;}
-      { echo "$as_me:$LINENO: *** including --without-openh323" >&5
-echo "$as_me: *** including --without-openh323" >&6;}
-      exit 1
-   fi
-fi
+   { echo "$as_me:$LINENO: *** including --without-pwlib" >&5
+echo "$as_me: *** including --without-pwlib" >&6;}
+   exit 1
+fi
+
 
 ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -25180,6 +25659,10 @@
 s, at ac_pt_NETSNMP_CONFIG@,$ac_pt_NETSNMP_CONFIG,;t t
 s, at PG_CONFIG@,$PG_CONFIG,;t t
 s, at ac_pt_PG_CONFIG@,$ac_pt_PG_CONFIG,;t t
+s, at PTLIB_CONFIG@,$PTLIB_CONFIG,;t t
+s, at PWLIBDIR@,$PWLIBDIR,;t t
+s, at PWLIB_PLATFORM@,$PWLIB_PLATFORM,;t t
+s, at OPENH323DIR@,$OPENH323DIR,;t t
 s, at QTMOC@,$QTMOC,;t t
 s, at ac_pt_QTMOC@,$ac_pt_QTMOC,;t t
 s, at EDITLINE_LIB@,$EDITLINE_LIB,;t t

Modified: team/pcadach/chan_h323-live/configure.ac
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configure.ac?rev=40032&r1=40031&r2=40032&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configure.ac (original)
+++ team/pcadach/chan_h323-live/configure.ac Wed Aug 16 11:15:56 2006
@@ -600,119 +600,57 @@
 
 AST_EXT_LIB_CHECK([PRI], [pri], [pri_call], [libpri.h])
 
-#Library name like pt_linux_x86_r, not ptlib_linux-gnu_i386-pc-linux-gnu_r
-PWLIB_OSTYPE=${OSTYPE}
-PWLIB_MACHTYPE=${MACHTYPE}
-case $PWLIB_OSTYPE in
-   linux-gnu*)
-      PWLIB_OSTYPE="linux";;
-esac
-case $PWLIB_MACHTYPE in
-   i386-pc-linux*)
-      PWLIB_MACHTYPE="x86";;
-esac
-PLATFORM_PTLIB="pt_${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}_r"
 if test "${USE_PWLIB}" != "no"; then
-   AC_MSG_CHECKING(checking for existence of pwlib)
-	
-   saved_cppflags="${CPPFLAGS}"
-   saved_libs="${LIBS}"
-   if test "x${PWLIB_DIR}" = "x" -a "x${PWLIBDIR}" != "x"; then
-      PWLIB_DIR="${PWLIBDIR}"
-   fi
-   LIBS="${LIBS} -L${PWLIB_DIR}/lib -l${PLATFORM_PTLIB}"
-   CPPFLAGS="${CPPFLAGS} -I${PWLIB_DIR}/include"
-
-   AC_LANG_PUSH([C++])
-
-   AC_LINK_IFELSE(
-	[
-	AC_LANG_PROGRAM(
-	[#include "ptlib.h"
-	#include "ptlib/ptime.h"],
-	[BOOL q = PTime::IsDaylightSavings();])
-	],
-	[	AC_MSG_RESULT(yes) 
-		ac_cv_lib_pwlib="yes" 
-	],
-	[	AC_MSG_RESULT(no) 
-		ac_cv_lib_pwlib="no" 
-	]
-	)
-
-   AC_LANG_POP([C++])
-
-   LIBS="${saved_libs}"
-   CPPFLAGS="${saved_cppflags}"
-
-   if test "${ac_cv_lib_pwlib}" = "yes"; then
-      PWLIB_LIB="-l${PLATFORM_PTLIB}"
-      if test "${PWLIB_DIR}" != ""; then
-         PWLIB_LIB="-L${PWLIB_DIR}/lib -l${PLATFORM_PTLIB}"
-         PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
-      fi
-   	PBX_PWLIB=1
-   	AC_DEFINE([HAVE_PWLIB], 1, [Define if your system has the pwlib libraries.])
-   elif test ! -z "${PWLIB_MANDATORY}"; then
-      AC_MSG_NOTICE(***)
-      AC_MSG_NOTICE(*** The PWLIB installation on this system appears to be broken.)
-      AC_MSG_NOTICE(*** Either correct the installation, or run configure)
-      AC_MSG_NOTICE(*** including --without-pwlib)
-      exit 1
-   fi
+	if test ! -z "${PWLIB_DIR}"; then
+		PWLIBDIR="${PWLIB_DIR}"
+	fi
+	AST_CHECK_PWLIB()
+	AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [1], [10], [0])
+		

[... 98 lines stripped ...]


More information about the svn-commits mailing list