[GnomeMeeting-devel-list] Win32 cross-compilation : gnomemeeting



Hi,

the following simplifies gnomemeeting's configure.in :
- it removes some tests which don't work in a cross-compilation setting
- it uses pkgconfig to detect and use pwlib + opal with the right options

Snark

diff -ur ../gnomemeeting/configure.in gnomemeeting/configure.in
--- ../gnomemeeting/configure.in	2005-12-04 18:27:46.000000000 +0100
+++ gnomemeeting/configure.in	2005-12-04 21:20:05.000000000 +0100
@@ -202,79 +202,10 @@
 AC_ARG_WITH(pwlib-dir, [  --with-pwlib-dir=PFX   Location of PWLib], with_pwlib_dir="$withval", with_pwlib_dir="/usr")
 
 dnl Check for the includes presence
-AC_MSG_CHECKING(for PWLib includes in ${with_pwlib_dir}/include/)
+AC_MSG_CHECKING(for PWLib)
 AC_MSG_RESULT()
 
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${with_pwlib_dir}/include/ptlib"
-AC_CHECK_FILE(${with_pwlib_dir}/include/ptlib/pprocess.h, pwlib_includes="yes", pwlib_includes="no")
-if test "x${pwlib_includes}" != "xno" ; then
-	PWLIB_CFLAGS="-I${with_pwlib_dir}/include/ptlib -I${with_pwlib_dir}/include/ptclib"
-	if test "x${with_pwlib_dir}" != "x/usr"; then
-		PWLIB_CFLAGS="${PWLIB_CFLAGS} -I${with_pwlib_dir}/include"
-	fi	
-fi
-CPPFLAGS="$CPPFLAGS_save"
-
-if test "x${pwlib_includes}" = "xno" ; then
-	AC_MSG_ERROR(You need the PWLib headers to compile GnomeMeeting)
-fi
-
-dnl Checking for the library presence
-LIBS_save="$LIBS"
-LIBS="${LIBS} -L${with_pwlib_dir}/${libname}/"
-AC_CHECK_LIB(pt, main, pwlib_libs="yes", pwlib_libs="no")
-LIBS="${LIBS_save}"
-
-if test "x${pwlib_libs}" != "xno"; then
-	if test "x${with_pwlib_dir}" != "x/usr"; then
-		PWLIB_LIBS="-L${with_pwlib_dir}/${libname}"
-	fi
-else
-	AC_MSG_ERROR(You need the PWLib library to compile GnomeMeeting)
-fi
-
-dnl Checking for PWLib version
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PWLIB_CFLAGS"
-AC_MSG_CHECKING(for PWLib version);
-AC_EGREP_CPP(${PWLIB_REC_VERSION},
-	     [#include <ptbuildopts.h>
-	      PWLIB_VERSION 
-	     ],AC_MSG_RESULT(${PWLIB_REC_VERSION}), AC_MSG_ERROR(Sorry but the recommended PWLib version is ${PWLIB_REC_VERSION}))
-CPPFLAGS="$CPPFLAGS_save"
-
-dnl Checking for OpenLDAP support in PWLIB
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PWLIB_CFLAGS"
-AC_MSG_CHECKING(for OpenLDAP support in PWLIB);
-AC_EGREP_CPP(1,
-	     [#include <ptbuildopts.h>
-	      P_LDAP
-	     ],AC_MSG_RESULT(yes), [ AC_MSG_RESULT(no);
-	AC_MSG_ERROR(Sorry but the PWLib version you are using doesn't support LDAP)])
-CPPFLAGS="$CPPFLAGS_save"
-
-dnl Checking for ENUM support in PWLIB
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PWLIB_CFLAGS"
-AC_MSG_CHECKING(for ENUM support in PWLIB);
-AC_EGREP_CPP(1,
-	     [#include <ptbuildopts.h>
-	      P_DNS
-	     ],AC_MSG_RESULT(yes), [ AC_MSG_RESULT(no);
-	AC_MSG_ERROR(Sorry but the PWLib version you are using doesn't support ENUM)])
-CPPFLAGS="$CPPFLAGS_save"
-
-dnl Check for ptlib-config
-AC_CHECK_FILE(${with_pwlib_dir}/bin/ptlib-config, HAS_PTLIB_CONFIG=1)
-if test "x${HAS_PTLIB_CONFIG}" != "x1" ; then
-        AC_MSG_ERROR([Sorry but ptlib-config can not be found, please check your installation]);
-else
-        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${with_pwlib_dir}/bin/)
-fi
-ARCH_OPAL_CFLAGS="$ARCH_OPAL_CFLAGS `$PTLIB_CONFIG --ccflags`"
-                  
+PKG_CHECK_MODULES(PWLIB, pwlib)                  
 
 dnl ###########################################################################
 dnl Opal Headers and Libraries
@@ -282,54 +213,9 @@
 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_CHECKING(for Opal)
 AC_MSG_RESULT()
-
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${with_opal_dir}/include/opal"
-AC_CHECK_FILE(${with_opal_dir}/include/opal/opal/call.h, opal_includes="yes", opal_includes="no")
-if test "x${opal_includes}" != "xno" ; then
-	OPAL_CFLAGS="-I${with_opal_dir}/include/opal"
-fi
-CPPFLAGS="$CPPFLAGS_save"
-
-if test "x${opal_includes}" = "xno" ; then
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${with_opal_dir}/include"
-AC_CHECK_FILE(${with_opal_dir}/include/opal/call.h, opal_includes="yes", opal_includes="no")
-if test "x${opal_includes}" != "xno" ; then
-	OPAL_CFLAGS="-I${with_opal_dir}/include"
-fi
-CPPFLAGS="$CPPFLAGS_save"
-fi
-
-if test "x${opal_includes}" = "xno" ; then
-	AC_MSG_ERROR(You need the Opal headers to compile GnomeMeeting)
-fi
-
-dnl Checking for the library presence
-LIBS_save="$LIBS"
-LIBS="${LIBS} -L${with_opal_dir}/${libname}/ -L${with_pwlib_dir}/${libname}/ -lpt"
-AC_CHECK_LIB(opal, main, 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 GnomeMeeting)
-fi
-
-dnl Checking for Opal version
-CPPFLAGS_save="$CPPFLAGS"
-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"
+PKG_CHECK_MODULES(OPAL, opal)
 
 
 dnl ###########################################################################
@@ -379,34 +265,11 @@
 AC_ARG_WITH(ldap-dir, [  --with-ldap-dir=PFX   Location of LDAP], with_ldap_dir="$withval", with_ldap_dir="/usr")
 
 dnl Check for the includes presence
-AC_MSG_CHECKING(for LDAP includes in ${with_ldap_dir}/include/)
+AC_MSG_CHECKING(for LDAP)
 AC_MSG_RESULT()
 
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${with_ldap_dir}/include"
-AC_CHECK_FILE(${with_ldap_dir}/include/ldap.h, ldap_includes="yes", ldap_includes="no")
-CPPFLAGS="$CPPFLAGS_save"
-	
-if test "x${ldap_includes}" != "xno" ; then
-	LDAP_CFLAGS="-I${with_ldap_dir}/include"
-else
-	AC_MSG_ERROR(You need the LDAP headers to compile GnomeMeeting)
-fi
-
-dnl Checking for the library presence
-LIBS_save="$LIBS"
-LIBS="${LIBS} -L${with_ldap_dir}/${libname}/ -llber"
-AC_CHECK_LIB(ldap, main, ldap_libs="yes", ldap_libs="no")
-LIBS="${LIBS_save}"
-
-if test "x${ldap_libs}" != "xno"; then
-	LDAP_LIBS="-llber -lldap"
-	if test "x${with_ldap_dir}" != "x/usr"; then
-		LDAP_LIBS="-L${with_ldap_dir}/${libname} $LDAP_LIBS"
-	fi
-else
-	AC_MSG_ERROR(You need the LDAP library to compile GnomeMeeting)
-fi
+LDAP_CFLAGS="-I${with_ldap_dir}/include"
+LDAP_LIBS="-llber -lldap"
 
 dnl Checking for libresolv
 if test ${gm_platform} = "linux" ; then



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