]> git.lyx.org Git - lyx.git/blobdiff - configure.ac
- y - (-y) is pretty close to 0
[lyx.git] / configure.ac
index a0f114b98feffc0719f8696efc85740b1f450732..865ee9413e34174c5b4c21b981c185b06c9435cf 100644 (file)
@@ -78,7 +78,7 @@ LYX_CXX_STL_MODERN_STREAMS
 
 ### and now some special lyx flags.
 AC_ARG_ENABLE(assertions,
-  [  --enable-assertions     add runtime sanity checks in the program],,
+  AC_HELP_STRING([--enable-assertions],[add runtime sanity checks in the program]),,
   [if test $lyx_devel_version = yes -o $lyx_prerelease = yes ; then
        enable_assertions=yes;
     else
@@ -246,6 +246,26 @@ LYX_CHECK_DECL(vsnprintf, stdio.h)
 LYX_CHECK_DECL(istreambuf_iterator, iterator)
 LYX_CHECK_DECL(mkstemp,[unistd.h stdlib.h])
 
+AC_ARG_ENABLE(compression-support, AC_HELP_STRING([--enable-compression-support],[Support for compressed files.]),[
+    case "${enableval}" in
+       yes) use_compression=true ;;
+       no) use_compression=false ;;
+       *) AC_MSG_ERROR(bad value ${enableval} for --enable-compression-support) ;;
+    esac
+],[use_compression=true])
+if test $use_compression=true ; then
+       AC_CHECK_HEADERS(zlib.h, use_compression=true, use_compression=false)
+       AC_CHECK_LIB(z, gzopen,[use_compression=true;LIBS="$LIBS -lz"], use_compression=false)
+       if test $use_compression = true ; then
+               AC_DEFINE(USE_COMRESSION, 1, [Define as 1 if you want to supprot compressed files.])
+               lyx_flags="$lyx_flags compression"
+       fi
+fi
+AM_CONDITIONAL(USE_COMPRESSION, test x$use_compression = xtrue)
+AC_MSG_CHECKING([whether to support compressed files])
+AC_MSG_RESULT($use_compression)
+
+
 dnl This is a slight hack: the tests generated by autoconf 2.52 do not
 dnl work correctly because of some conflict with stdlib.h with g++ 2.96
 dnl We aim to remove this eventually, since we should test as much as