[asterisk-commits] pcadach: branch pcadach/chan_h323-live r43198 - /team/pcadach/chan_h323-live/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Sep 18 10:33:03 MST 2006


Author: pcadach
Date: Mon Sep 18 12:33:02 2006
New Revision: 43198

URL: http://svn.digium.com/view/asterisk?rev=43198&view=rev
Log:
Fix configuration process for pre-installed PWLib/OpenH323 (no version.h file, etc.)

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=43198&r1=43197&r2=43198&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/acinclude.m4 (original)
+++ team/pcadach/chan_h323-live/acinclude.m4 Mon Sep 18 12:33:02 2006
@@ -125,7 +125,9 @@
   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 "${OPENH323DIR:-unset}" != "unset"; then
+    AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
+  fi
   if test "${HAS_PWLIB:-unset}" != "unset" ; then
     PWLIBDIR="${OPENH323DIR}/../pwlib"
   else
@@ -153,36 +155,43 @@
   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 "${PWLIB_INCDIR:-unset}" = "unset"; then
-  PWLIB_INCDIR="${PWLIBDIR}/include"
-fi
-if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
-  PWLIB_LIBDIR="${PWLIBDIR}/lib"
-fi
-
-AC_SUBST([PWLIBDIR])
-AC_SUBST([PWLIB_INCDIR])
-AC_SUBST([PWLIB_LIBDIR])
+#if test "${HAS_PWLIB:-unset}" = "unset" ; then
+#  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
+#  exit
+#fi
+
+if test "${HAS_PWLIB:-unset}" != "unset" ; then
+  if test "${PWLIBDIR:-unset}" = "unset" ; then
+    if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
+      PWLIBDIR=`$PTLIB_CONFIG --prefix`
+    else
+      echo "Cannot find ptlib-config - please install and try again"
+      exit
+    fi
+  fi
+
+  if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
+    PWLIBDIR="/usr/share/pwlib"
+    PWLIB_INCDIR="/usr/include"
+    PWLIB_LIBDIR="/usr/lib"
+  fi
+  if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
+    PWLIBDIR="/usr/local/share/pwlib"
+    PWLIB_INCDIR="/usr/local/include"
+    PWLIB_LIBDIR="/usr/local/lib"
+  fi
+
+  if test "${PWLIB_INCDIR:-unset}" = "unset"; then
+    PWLIB_INCDIR="${PWLIBDIR}/include"
+  fi
+  if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
+    PWLIB_LIBDIR="${PWLIBDIR}/lib"
+  fi
+
+  AC_SUBST([PWLIBDIR])
+  AC_SUBST([PWLIB_INCDIR])
+  AC_SUBST([PWLIB_LIBDIR])
+fi
 ])
 
 
@@ -307,28 +316,30 @@
   fi
 fi
 
-if test "${OPENH323_INCDIR:-unset}" = "unset"; then
-  OPENH323_INCDIR="${OPENH323DIR}/include"
-fi
-if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
-  OPENH323_LIBDIR="${OPENH323DIR}/lib"
-fi
-
-AC_SUBST([OPENH323DIR])
-AC_SUBST([OPENH323_INCDIR])
-AC_SUBST([OPENH323_LIBDIR])
+if test "${HAS_OPENH323:-unset}" != "unset" ; then
+  if test "${OPENH323_INCDIR:-unset}" = "unset"; then
+    OPENH323_INCDIR="${OPENH323DIR}/include"
+  fi
+  if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
+    OPENH323_LIBDIR="${OPENH323DIR}/lib"
+  fi
+
+  AC_SUBST([OPENH323DIR])
+  AC_SUBST([OPENH323_INCDIR])
+  AC_SUBST([OPENH323_LIBDIR])
+fi
 ])
 
 
 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}"
+		$2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | cut -f2 -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=$3*10000+$4*100+$5
+		let $2_REQ=$4*10000+$5*100+$6
 
 		AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
 		if test ${$2_VER} -lt ${$2_REQ}; then

Modified: team/pcadach/chan_h323-live/configure
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configure?rev=43198&r1=43197&r2=43198&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configure (original)
+++ team/pcadach/chan_h323-live/configure Mon Sep 18 12:33:02 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 42637 .
+# From configure.ac Revision: 43038 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60.
 #
@@ -23972,7 +23972,8 @@
 
 fi
 if test "${HAS_PWLIB:-unset}" = "unset" ; then
-  as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
+  if test "${OPENH323DIR:-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 { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -23995,6 +23996,7 @@
   HAS_PWLIB=1
 fi
 
+  fi
   if test "${HAS_PWLIB:-unset}" != "unset" ; then
     PWLIBDIR="${OPENH323DIR}/../pwlib"
   else
@@ -24201,43 +24203,50 @@
   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
+#if test "${HAS_PWLIB:-unset}" = "unset" ; then
+#  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
+#  exit
+#fi
+
+if test "${HAS_PWLIB:-unset}" != "unset" ; then
+  if test "${PWLIBDIR:-unset}" = "unset" ; then
+    if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
+      PWLIBDIR=`$PTLIB_CONFIG --prefix`
+    else
+      echo "Cannot find ptlib-config - please install and try again"
+      exit
+    fi
   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 "${PWLIB_INCDIR:-unset}" = "unset"; then
-  PWLIB_INCDIR="${PWLIBDIR}/include"
-fi
-if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
-  PWLIB_LIBDIR="${PWLIBDIR}/lib"
-fi
-
-
-
-
+
+  if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
+    PWLIBDIR="/usr/share/pwlib"
+    PWLIB_INCDIR="/usr/include"
+    PWLIB_LIBDIR="/usr/lib"
+  fi
+  if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
+    PWLIBDIR="/usr/local/share/pwlib"
+    PWLIB_INCDIR="/usr/local/include"
+    PWLIB_LIBDIR="/usr/local/lib"
+  fi
+
+  if test "${PWLIB_INCDIR:-unset}" = "unset"; then
+    PWLIB_INCDIR="${PWLIBDIR}/include"
+  fi
+  if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
+    PWLIB_LIBDIR="${PWLIBDIR}/lib"
+  fi
+
+
+
+
+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}"
+		PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+		PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
+		PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
+		PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
 		let PWLIB_VER=${PWLIB_MAJOR_VERSION}*10000+${PWLIB_MINOR_VERSION}*100+${PWLIB_BUILD_NUMBER}
 		let PWLIB_REQ=1*10000+9*100+2
 
@@ -24638,23 +24647,25 @@
   fi
 fi
 
-if test "${OPENH323_INCDIR:-unset}" = "unset"; then
-  OPENH323_INCDIR="${OPENH323DIR}/include"
-fi
-if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
-  OPENH323_LIBDIR="${OPENH323DIR}/lib"
-fi
-
-
-
-
+if test "${HAS_OPENH323:-unset}" != "unset" ; then
+  if test "${OPENH323_INCDIR:-unset}" = "unset"; then
+    OPENH323_INCDIR="${OPENH323DIR}/include"
+  fi
+  if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
+    OPENH323_LIBDIR="${OPENH323DIR}/lib"
+  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}"
+		OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+		OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
+		OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
+		OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
 		let OPENH323_VER=${OPENH323_MAJOR_VERSION}*10000+${OPENH323_MINOR_VERSION}*100+${OPENH323_BUILD_NUMBER}
 		let OPENH323_REQ=1*10000+17*100+3
 

Modified: team/pcadach/chan_h323-live/configure.ac
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configure.ac?rev=43198&r1=43197&r2=43198&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configure.ac (original)
+++ team/pcadach/chan_h323-live/configure.ac Mon Sep 18 12:33:02 2006
@@ -686,7 +686,7 @@
 		PWLIBDIR="${PWLIB_DIR}"
 	fi
 	AST_CHECK_PWLIB()
-	AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [1], [9], [2])
+	AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2])
 		
 	if test "${HAS_PWLIB:-unset}" != "unset"; then
 		AST_CHECK_OPENH323_PLATFORM()
@@ -713,7 +713,7 @@
 		OPENH323DIR="${OPENH323_DIR}"
 	fi
 	AST_CHECK_OPENH323()
-	AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [1], [17], [3])
+	AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [openh323buildopts.h], [1], [17], [3])
 	AST_CHECK_OPENH323_BUILD()
 	PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
 	AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],



More information about the asterisk-commits mailing list