[ekiga] Check that ptlib has been compiled with exceptions so boost's signals2 actually works



commit aabf103dcf7f0e61ed1903bc4f37f1dd549fb2ef
Author: Julien Puydt <jpuydt free fr>
Date:   Sat Sep 14 18:05:53 2013 +0200

    Check that ptlib has been compiled with exceptions so boost's signals2 actually works

 configure.ac |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 44b734a..fb561a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -730,6 +730,25 @@ if test "x$PTLIB_VIDEO" != "xyes"; then
   AC_MSG_ERROR([You need ptlib video support to compile ekiga])
 fi
 
+# check ptlib has been compiled with exceptions, which are mandatory
+# for boost's signals2
+AC_MSG_CHECKING([for exceptions in ptlib])
+CPPFLAGS_save="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PTLIB_CFLAGS"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[try { } catch(...) { }]])],
+                 [
+                   AC_MSG_RESULT([yes])
+                   ptlib_exceptions=yes
+                 ],
+                 [
+                   AC_MSG_RESULT([no])
+                   ptlib_exceptions=no
+                 ])
+CPPFLAGS="$CPPFLAGS_save"
+if test "x$ptlib_exceptions" = "xno"; then
+   AC_MSG_ERROR([Sorry, but you must recompile PTLIB with --enable-exceptions])
+fi
+
 SUFFIX=
 AC_ARG_ENABLE([opal-debug],
               [AS_HELP_STRING([--enable-opal-debug],[link to debug versions of opal and ptlib (opal_d and 
ptlib_d) (default is disabled)])],


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