ekiga r6160 - in trunk: . lib/gui



Author: sfre
Date: Thu Apr 10 08:07:45 2008
New Revision: 6160
URL: http://svn.gnome.org/viewvc/ekiga?rev=6160&view=rev

Log:
Use brand new pkg-config support from OPAL and PTLIB.


Modified:
   trunk/   (props changed)
   trunk/ChangeLog
   trunk/configure.ac
   trunk/lib/gui/xwindow.cpp
   trunk/lib/gui/xwindow.h

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Thu Apr 10 08:07:45 2008
@@ -517,61 +517,10 @@
 
 
 dnl ###########################################################################
-dnl PWLib Headers and Libraries
+dnl PTLib Headers and Libraries
 dnl ###########################################################################
-AC_ARG_WITH(ptlib-dir, [  --with-ptlib-dir=PFX			Location of PWLib], with_ptlib_dir="$withval", with_ptlib_dir="/usr")
-
-dnl Check for the includes presence
-AC_MSG_CHECKING(for PWLib includes in ${with_ptlib_dir}/include/)
-AC_MSG_RESULT()
-
-if test -f ${with_ptlib_dir}/include/ptlib/pprocess.h; then
-	PTLIB_CFLAGS="-I${with_ptlib_dir}/include/ptlib -I${with_ptlib_dir}/include/ptclib"
-	if test "x${with_ptlib_dir}" != "x/usr"; then
-		PTLIB_CFLAGS="${PTLIB_CFLAGS} -I${with_ptlib_dir}/include"
-	fi	
-else
-	AC_MSG_ERROR(You need the PWLib headers to compile Ekiga)
-fi
-
-dnl Checking for the library presence
-LDFLAGS_save="$LDFLAGS"
-AC_LANG(C++)
-LDFLAGS="$LDFLAGS -L${with_ptlib_dir}/${libname}/"
-AC_CHECK_LIB(pt, read, ptlib_libs="yes", ptlib_libs="no")
-LDFLAGS="${LDFLAGS_save}"
-
-if test "x${ptlib_libs}" != "xno"; then
-	if test "x${with_ptlib_dir}" != "x/usr"; then
-		PTLIB_LIBS="-L${with_ptlib_dir}/${libname}"
-	fi
-else
-	AC_MSG_ERROR(You need the PWLib library to compile Ekiga)
-fi
-
-dnl Checking for PWLib version
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PTLIB_CFLAGS"
-AC_MSG_CHECKING(for PWLib version);
-AC_EGREP_CPP(${PTLIB_REC_VERSION},
-	     [#include <ptbuildopts.h>
-	      PTLIB_VERSION 
-	     ],AC_MSG_RESULT(${PTLIB_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended PWLib version is ${PTLIB_REC_VERSION}))
-CPPFLAGS="$CPPFLAGS_save"
-
-AC_LANG(C)
-if test -f ${with_ptlib_dir}/make/ptlib-config; then
-    AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${with_ptlib_dir}/make/)
-else
-    if test -f ${with_ptlib_dir}/bin/ptlib-config; then
-        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${with_ptlib_dir}/bin/)
-    else
-        AC_MSG_ERROR([Sorry but ptlib-config can not be found, please check your installation]);
-    fi
-fi
-
-dnl Substitute
-PTLIB_CFLAGS="$ARCH_PTLIB_CFLAGS $PTLIB_CFLAGS `$PTLIB_CONFIG --ccflags`"
+PKG_CHECK_MODULES(PTLIB, ptlib >= ${PTLIB_REC_VERSION})
+PTLIB_CFLAGS="$ARCH_PTLIB_CFLAGS $PTLIB_CFLAGS"
 AC_SUBST(PTLIB_CFLAGS)
 AC_SUBST(PTLIB_LIBS)
                   
@@ -579,45 +528,7 @@
 dnl ###########################################################################
 dnl Opal Headers and Libraries
 dnl ###########################################################################
-AC_ARG_WITH(opal-dir, [  --with-opal-dir=PFX			Location of Opal], with_opal_dir="$withval", with_opal_dir="/usr")
-
-dnl Check for the includes presence
-AC_MSG_CHECKING(for Opal includes in ${with_opal_dir}/include)
-AC_MSG_RESULT()
-if test -f ${with_opal_dir}/include/opal/opal/call.h; then
-	OPAL_CFLAGS="-I${with_opal_dir}/include/opal"
-else
-	if test -f ${with_opal_dir}/include/opal/call.h; then
-	    OPAL_CFLAGS="-I${with_opal_dir}/include"
-	else
-    	    AC_MSG_ERROR(You need the Opal headers to compile Ekiga)
-	fi
-fi
-dnl Checking for the library presence
-LIBS_save="$LIBS"
-LIBS="${LIBS} -L${with_opal_dir}/${libname}/ -L${with_ptlib_dir}/${libname}/ -lpt"
-AC_CHECK_LIB(opal, main, opal_libs="yes", opal_libs="yes")
-opal_libs="yes"
-LIBS="${LIBS_save}"
-
-if test "x${opal_libs}" != "xno"; then
-	if test "x${with_opal_dir}" != "x/usr"; then
-		OPAL_LIBS="-L${with_opal_dir}/lib"
-	fi
-else
-	AC_MSG_ERROR(You need the Opal library to compile Ekiga)
-fi
-
-dnl Checking for Opal version
-CPPFLAGS="$CPPFLAGS $OPAL_CFLAGS"
-AC_MSG_CHECKING(for Opal version);
-AC_EGREP_CPP(${OPAL_REC_VERSION},
-	     [#include <opal/buildopts.h>
-	      OPAL_VERSION 
-	     ],AC_MSG_RESULT(${OPAL_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended OPAL version is ${OPAL_REC_VERSION}))
-CPPFLAGS="$CPPFLAGS_save"
-
-dnl Substitute
+PKG_CHECK_MODULES(OPAL, opal >= ${OPAL_REC_VERSION})
 OPAL_LIBS="$ARCH_OPAL_LIBS $OPAL_LIBS"
 AC_SUBST(OPAL_CFLAGS)
 AC_SUBST(OPAL_LIBS)
@@ -733,13 +644,6 @@
 echo "================ Final configuration ==================="
 echo "          Installing into prefix  :  $prefix"
 echo ""
-echo "                 OPAL Version is  :  $OPAL_REC_VERSION"
-echo "               OPAL Directory is  :  $with_opal_dir"
-echo "                PTLIB Version is  :  $PTLIB_REC_VERSION"
-echo "              PTLIB Directory is  :  $with_ptlib_dir"
-echo "                 ptlib-config is  :  $with_ptlib_dir/bin/ptlib-config"
-echo ""
-echo ""
 if test "x${gm_platform}" != "xmingw" ; then
 echo "                   GNOME support  :  $GNOME"
 echo "                   GConf support  :  $GCONF"

Modified: trunk/lib/gui/xwindow.cpp
==============================================================================
--- trunk/lib/gui/xwindow.cpp	(original)
+++ trunk/lib/gui/xwindow.cpp	Thu Apr 10 08:07:45 2008
@@ -38,7 +38,7 @@
 
 #include "xwindow.h"
 
-#include <object.h>
+#include <ptlib/object.h>
 
 extern "C" {
 #include <pixops.h>

Modified: trunk/lib/gui/xwindow.h
==============================================================================
--- trunk/lib/gui/xwindow.h	(original)
+++ trunk/lib/gui/xwindow.h	Thu Apr 10 08:07:45 2008
@@ -39,8 +39,8 @@
 #include <stdint.h>
 #include "config.h"
 
-#include <videoio.h>
-#include <vconvert.h>
+#include <ptlib/videoio.h>
+#include <ptlib/vconvert.h>
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]