[sword-svn] r3044 - in trunk: . src/mgr src/modules/common
chrislit at crosswire.org
chrislit at crosswire.org
Sun Mar 2 00:42:20 MST 2014
Author: chrislit
Date: 2014-03-02 00:42:20 -0700 (Sun, 02 Mar 2014)
New Revision: 3044
Modified:
trunk/configure.ac
trunk/src/mgr/swmgr.cpp
trunk/src/modules/common/Makefile.am
Log:
fixes to fixes, consistency fixes, other autotools changes for BZIP2/XZ support
made library recognize BZIP2 & XZ CompressTypes in .confs for Bibles, commentaries, & LD modules
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2014-03-02 00:26:10 UTC (rev 3043)
+++ trunk/configure.ac 2014-03-02 07:42:20 UTC (rev 3044)
@@ -360,6 +360,7 @@
# ---------------------------------------------------------------------
AC_SUBST(with_zlib)
AC_SUBST(with_bzip2)
+AC_SUBST(with_xz)
AC_SUBST(with_icu)
AC_SUBST(with_icusword)
AC_SUBST(with_conf)
@@ -390,8 +391,8 @@
# ---------------------------------------------------------------------
AM_CONDITIONAL(HAVE_LIBZ, test x$with_zlib = xyes)
-AM_CONDITIONAL(HAVE_LIBXZ, test x$with_xz = xyes)
-AM_CONDITIONAL(HAVE_LIBBZ2, test x$with_bzip2 = xyes)
+AM_CONDITIONAL(HAVE_BZIP2, test x$with_bzip2 = xyes)
+AM_CONDITIONAL(HAVE_XZ, test x$with_xz = xyes)
AM_CONDITIONAL(HAVE_ICU, test x$with_icu = xyes)
AM_CONDITIONAL(HAVE_ICUSWORD, test x$with_icusword = xyes)
AM_CONDITIONAL(HAVE_VSNPRINTF, test x$have_vsnprintf = xyes)
Modified: trunk/src/mgr/swmgr.cpp
===================================================================
--- trunk/src/mgr/swmgr.cpp 2014-03-02 00:26:10 UTC (rev 3043)
+++ trunk/src/mgr/swmgr.cpp 2014-03-02 07:42:20 UTC (rev 3044)
@@ -948,31 +948,29 @@
blockType = BOOKBLOCKS;
misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (SWBuf)"LZSS";
-
- if (false) {}
#ifndef EXCLUDEZLIB
- else
if (!stricmp(misc1.c_str(), "ZIP"))
compress = new ZipCompress();
+ else
#endif
#ifndef EXCLUDEBZIP2
+ if (!stricmp(misc1.c_str(), "BZIP2"))
+ compress = new Bzip2Compress();
else
- if (!stricmp(misc1.c_str(), "BZIP2_UNSUPPORTED"))
- compress = new Bzip2Compress();
#endif
#ifndef EXCLUDEXZ
+ if (!stricmp(misc1.c_str(), "XZ"))
+ compress = new XzCompress();
else
- if (!stricmp(misc1.c_str(), "XZ_UNSUPPORTED"))
- compress = new XzCompress();
#endif
- else
if (!stricmp(misc1.c_str(), "LZSS"))
compress = new LZSSCompress();
if (compress) {
if (!stricmp(driver, "zText"))
newmod = new zText(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str(), versification);
- else newmod = new zCom(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str(), versification);
+ else
+ newmod = new zCom(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str(), versification);
}
}
@@ -1036,6 +1034,16 @@
compress = new ZipCompress();
else
#endif
+#ifndef EXCLUDEBZIP2
+ if (!stricmp(misc1.c_str(), "BZIP2"))
+ compress = new Bzip2Compress();
+ else
+#endif
+#ifndef EXCLUDEXZ
+ if (!stricmp(misc1.c_str(), "XZ"))
+ compress = new XzCompress();
+ else
+#endif
if (!stricmp(misc1.c_str(), "LZSS"))
compress = new LZSSCompress();
Modified: trunk/src/modules/common/Makefile.am
===================================================================
--- trunk/src/modules/common/Makefile.am 2014-03-02 00:26:10 UTC (rev 3043)
+++ trunk/src/modules/common/Makefile.am 2014-03-02 07:42:20 UTC (rev 3044)
@@ -5,17 +5,18 @@
libsword_la_SOURCES += $(commondir)/swcomprs.cpp
libsword_la_SOURCES += $(commondir)/lzsscomprs.cpp
-SWZLIB =
if HAVE_LIBZ
-SWZLIB += $(commondir)/zipcomprs.cpp
+libsword_la_SOURCES += $(commondir)/zipcomprs.cpp
endif
-if HAVE_LIBXZ
-SWZLIB += $(commondir)/xzcomprs.cpp
+
+if HAVE_BZIP2
+libsword_la_SOURCES += $(commondir)/bz2comprs.cpp
endif
-if HAVE_LIBBZ2
-SWZLIB += $(commondir)/bz2comprs.cpp
+
+if HAVE_XZ
+libsword_la_SOURCES += $(commondir)/xzcomprs.cpp
endif
-libsword_la_SOURCES += $(SWZLIB)
+
libsword_la_SOURCES += $(commondir)/rawverse.cpp
libsword_la_SOURCES += $(commondir)/rawverse4.cpp
libsword_la_SOURCES += $(commondir)/swcipher.cpp
@@ -23,4 +24,3 @@
libsword_la_SOURCES += $(commondir)/zstr.cpp
libsword_la_SOURCES += $(commondir)/entriesblk.cpp
libsword_la_SOURCES += $(commondir)/sapphire.cpp
-
More information about the sword-cvs
mailing list