[evolution-ews/gnome-3-8] Require --with-internal-lzx for libmspack fallback (cherry picked from commit e72c8854251dfedcf099fe



commit dda3fb578ea966cc2af005b9b1741124491a4342
Author: David Woodhouse <David Woodhouse intel com>
Date:   Tue May 28 21:33:26 2013 +0100

    Require --with-internal-lzx for libmspack fallback
    (cherry picked from commit e72c8854251dfedcf099fe39e702df302d340f7e)

 configure.ac |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8886385..e428ffe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -223,19 +223,15 @@ EVO_KRB5_SUPPORT
 dnl ****************************
 dnl Check for libmspack with OAB support
 dnl ****************************
-PKG_CHECK_MODULES(MSPACK, libmspack,
-                 [oldLIBS="$LIBS"
-                  oldCFLAGS="$CFLAGS"
-                  LIBS="$LIBS $MSPACK_LIBS"
-                  CFLAGS="$CFLAGS $MSPACK_CFLAGS"
-                  AC_CHECK_FUNC(mspack_create_oab_decompressor,
-                                [have_mspack=yes
-                                 AC_DEFINE(USE_MSPACK, [1],
-                                           [libmspack has OAB support])],
-                                [have_mspack=no])
-                  LIBS="$oldLIBS"
-                  CFLAGS="$oldCFLAGS"],
-                 [have_mspack=no])
+AC_ARG_WITH([internal-lzx],
+       AS_HELP_STRING([--with-internal-lzx],
+           [Use internal LZX decompressor instead of libmspack [default=no]]),
+           [have_mspack=no],
+           [PKG_CHECK_MODULES(MSPACK, libmspack >= 0.4,
+               [AC_DEFINE(USE_MSPACK, [1], [libmspack has OAB support])
+                have_mspack=yes],
+               [AC_ERROR([libmspack >= 0.4 not found.]
+[Make sure it is installed or run configure with --with-internal-lzx])])])
 AM_CONDITIONAL(HAVE_MSPACK, [test "$have_mspack" = "yes"])
 
 dnl ****************************
@@ -330,5 +326,6 @@ AC_OUTPUT
 AC_MSG_NOTICE([
        Kerberos 5      : $msg_krb5
        Strict building : $enable_strict
+       Use libmspack   : $have_mspack
 ])
 


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