Browse code

bb#9174 - Skip scanning bz2 files in unit tests if bz2 support is disabled

Shawn Webb authored on 2013/10/12 05:51:41
Showing 6 changed files
... ...
@@ -670,6 +670,8 @@ XML_LIBS
670 670
 XML_CPPFLAGS
671 671
 ENABLE_UNRAR_FALSE
672 672
 ENABLE_UNRAR_TRUE
673
+HAVE_LIBBZ2_FALSE
674
+HAVE_LIBBZ2_TRUE
673 675
 LIBBZ2_PREFIX
674 676
 LTLIBBZ2
675 677
 LIBBZ2
... ...
@@ -16979,6 +16981,15 @@ $as_echo "$as_me: WARNING: ****** bzip2 support disabled" >&2;}
16979 16979
     fi
16980 16980
 fi
16981 16981
 
16982
+ if test "x$HAVE_LIBBZ2" = "xyes"; then
16983
+  HAVE_LIBBZ2_TRUE=
16984
+  HAVE_LIBBZ2_FALSE='#'
16985
+else
16986
+  HAVE_LIBBZ2_TRUE='#'
16987
+  HAVE_LIBBZ2_FALSE=
16988
+fi
16989
+
16990
+
16982 16991
 # Check whether --enable-unrar was given.
16983 16992
 if test "${enable_unrar+set}" = set; then :
16984 16993
   enableval=$enable_unrar; want_unrar=$enableval
... ...
@@ -21291,6 +21302,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21291 21291
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
21292 21292
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21293 21293
 fi
21294
+if test -z "${HAVE_LIBBZ2_TRUE}" && test -z "${HAVE_LIBBZ2_FALSE}"; then
21295
+  as_fn_error $? "conditional \"HAVE_LIBBZ2\" was never defined.
21296
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
21297
+fi
21294 21298
 if test -z "${ENABLE_UNRAR_TRUE}" && test -z "${ENABLE_UNRAR_FALSE}"; then
21295 21299
   as_fn_error $? "conditional \"ENABLE_UNRAR\" was never defined.
21296 21300
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -23899,6 +23914,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
23899 23899
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
23900 23900
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
23901 23901
 fi
23902
+if test -z "${HAVE_LIBBZ2_TRUE}" && test -z "${HAVE_LIBBZ2_FALSE}"; then
23903
+  as_fn_error $? "conditional \"HAVE_LIBBZ2\" was never defined.
23904
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
23905
+fi
23902 23906
 if test -z "${ENABLE_UNRAR_TRUE}" && test -z "${ENABLE_UNRAR_FALSE}"; then
23903 23907
   as_fn_error $? "conditional \"ENABLE_UNRAR\" was never defined.
23904 23908
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -648,6 +648,8 @@ then
648 648
     fi
649 649
 fi
650 650
 
651
+AM_CONDITIONAL([HAVE_LIBBZ2], test "x$HAVE_LIBBZ2" = "xyes")
652
+
651 653
 AC_ARG_ENABLE([unrar],
652 654
 [  --disable-unrar	  do not build libclamunrar and libclamunrar_iface ],
653 655
 want_unrar=$enableval, want_unrar="yes")
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
1
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
... ...
@@ -36,6 +36,23 @@
36 36
 
37 37
 
38 38
 VPATH = @srcdir@
39
+am__make_dryrun = \
40
+  { \
41
+    am__dry=no; \
42
+    case $$MAKEFLAGS in \
43
+      *\\[\ \	]*) \
44
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
45
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
46
+      *) \
47
+        for am__flg in $$MAKEFLAGS; do \
48
+          case $$am__flg in \
49
+            *=*|--*) ;; \
50
+            *n*) am__dry=yes; break;; \
51
+          esac; \
52
+        done;; \
53
+    esac; \
54
+    test $$am__dry = yes; \
55
+  }
39 56
 pkgdatadir = $(datadir)/@PACKAGE@
40 57
 pkgincludedir = $(includedir)/@PACKAGE@
41 58
 pkglibdir = $(libdir)/@PACKAGE@
... ...
@@ -159,23 +176,23 @@ am_libclamav_la_OBJECTS = libclamav_la-matcher-ac.lo \
159 159
 	libclamav_la-Ppmd7.lo libclamav_la-Ppmd7Dec.lo \
160 160
 	libclamav_la-Xz.lo libclamav_la-XzCrc64.lo \
161 161
 	libclamav_la-XzDec.lo libclamav_la-XzIn.lo \
162
-	libclamav_la-Delta.lo \
163
-	libclamav_la-BraIA64.lo libclamav_la-CpuArch.lo \
164
-	libclamav_la-7zCrcOpt.lo libclamav_la-explode.lo \
165
-	libclamav_la-textnorm.lo libclamav_la-dlp.lo \
166
-	libclamav_la-js-norm.lo libclamav_la-uniq.lo \
167
-	libclamav_la-version.lo libclamav_la-mpool.lo \
168
-	libclamav_la-filtering.lo libclamav_la-fmap.lo \
169
-	libclamav_la-perflogging.lo libclamav_la-sha256.lo \
170
-	libclamav_la-sha1.lo libclamav_la-bytecode.lo \
171
-	libclamav_la-bytecode_vm.lo libclamav_la-cpio.lo \
172
-	libclamav_la-macho.lo libclamav_la-ishield.lo \
173
-	libclamav_la-bytecode_api.lo libclamav_la-bytecode_api_decl.lo \
174
-	libclamav_la-cache.lo libclamav_la-bytecode_detect.lo \
175
-	libclamav_la-events.lo libclamav_la-adc.lo libclamav_la-dmg.lo \
176
-	libclamav_la-xar.lo libclamav_la-xz_iface.lo \
177
-	libclamav_la-sf_base64decode.lo libclamav_la-hfsplus.lo \
178
-	libclamav_la-swf.lo libclamav_la-jpeg.lo libclamav_la-png.lo \
162
+	libclamav_la-Delta.lo libclamav_la-BraIA64.lo \
163
+	libclamav_la-CpuArch.lo libclamav_la-7zCrcOpt.lo \
164
+	libclamav_la-explode.lo libclamav_la-textnorm.lo \
165
+	libclamav_la-dlp.lo libclamav_la-js-norm.lo \
166
+	libclamav_la-uniq.lo libclamav_la-version.lo \
167
+	libclamav_la-mpool.lo libclamav_la-filtering.lo \
168
+	libclamav_la-fmap.lo libclamav_la-perflogging.lo \
169
+	libclamav_la-sha256.lo libclamav_la-sha1.lo \
170
+	libclamav_la-bytecode.lo libclamav_la-bytecode_vm.lo \
171
+	libclamav_la-cpio.lo libclamav_la-macho.lo \
172
+	libclamav_la-ishield.lo libclamav_la-bytecode_api.lo \
173
+	libclamav_la-bytecode_api_decl.lo libclamav_la-cache.lo \
174
+	libclamav_la-bytecode_detect.lo libclamav_la-events.lo \
175
+	libclamav_la-adc.lo libclamav_la-dmg.lo libclamav_la-xar.lo \
176
+	libclamav_la-xz_iface.lo libclamav_la-sf_base64decode.lo \
177
+	libclamav_la-hfsplus.lo libclamav_la-swf.lo \
178
+	libclamav_la-jpeg.lo libclamav_la-png.lo \
179 179
 	libclamav_la-iso9660.lo libclamav_la-arc4.lo \
180 180
 	libclamav_la-rijndael.lo libclamav_la-crtmgr.lo \
181 181
 	libclamav_la-asn1.lo libclamav_la-fp_add.lo \
... ...
@@ -351,6 +368,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
351 351
 	install-pdf-recursive install-ps-recursive install-recursive \
352 352
 	installcheck-recursive installdirs-recursive pdf-recursive \
353 353
 	ps-recursive uninstall-recursive
354
+am__can_run_installinfo = \
355
+  case $$AM_UPDATE_INFO_DIR in \
356
+    n|no|NO) false;; \
357
+    *) (install-info --version) >/dev/null 2>&1;; \
358
+  esac
354 359
 HEADERS = $(include_HEADERS)
355 360
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
356 361
   distclean-recursive maintainer-clean-recursive
... ...
@@ -684,16 +706,16 @@ libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \
684 684
 	7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/CpuArch.h 7z/Lzma2Dec.c \
685 685
 	7z/Lzma2Dec.h 7z/LzmaDec.c 7z/LzmaDec.h 7z/Ppmd.h 7z/Ppmd7.c \
686 686
 	7z/Ppmd7.h 7z/Ppmd7Dec.c 7z/Types.h 7z/Xz.c 7z/Xz.h \
687
-	7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c  \
688
-	7z/Sha256.h 7z/Delta.c 7z/Delta.h 7z/Alloc.h 7z/BraIA64.c \
689
-	7z/CpuArch.c 7z/CpuArch.h 7z/7zCrcOpt.c 7z/RotateDefs.h \
690
-	explode.c explode.h textnorm.c textnorm.h dlp.c dlp.h \
691
-	jsparse/js-norm.c jsparse/js-norm.h jsparse/lexglobal.h \
692
-	jsparse/textbuf.h uniq.c uniq.h version.c version.h mpool.c \
693
-	mpool.h filtering.h filtering.c fmap.c fmap.h perflogging.c \
694
-	perflogging.h default.h sha256.c sha256.h sha1.c sha1.h \
695
-	bytecode.c bytecode.h bytecode_vm.c bytecode_priv.h clambc.h \
696
-	cpio.c cpio.h macho.c macho.h ishield.c ishield.h type_desc.h \
687
+	7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c 7z/Sha256.h \
688
+	7z/Delta.c 7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c \
689
+	7z/CpuArch.h 7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h \
690
+	textnorm.c textnorm.h dlp.c dlp.h jsparse/js-norm.c \
691
+	jsparse/js-norm.h jsparse/lexglobal.h jsparse/textbuf.h uniq.c \
692
+	uniq.h version.c version.h mpool.c mpool.h filtering.h \
693
+	filtering.c fmap.c fmap.h perflogging.c perflogging.h \
694
+	default.h sha256.c sha256.h sha1.c sha1.h bytecode.c \
695
+	bytecode.h bytecode_vm.c bytecode_priv.h clambc.h cpio.c \
696
+	cpio.h macho.c macho.h ishield.c ishield.h type_desc.h \
697 697
 	bcfeatures.h bytecode_api.c bytecode_api_decl.c bytecode_api.h \
698 698
 	bytecode_api_impl.h bytecode_hooks.h cache.c cache.h \
699 699
 	bytecode_detect.c bytecode_detect.h builtin_bytecodes.h \
... ...
@@ -808,7 +830,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
808 808
 $(am__aclocal_m4_deps):
809 809
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
810 810
 	@$(NORMAL_INSTALL)
811
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
812 811
 	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
813 812
 	list2=; for p in $$list; do \
814 813
 	  if test -f $$p; then \
... ...
@@ -816,6 +837,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
816 816
 	  else :; fi; \
817 817
 	done; \
818 818
 	test -z "$$list2" || { \
819
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
820
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
819 821
 	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
820 822
 	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
821 823
 	}
... ...
@@ -2775,8 +2798,11 @@ clean-libtool:
2775 2775
 	-rm -rf .libs _libs
2776 2776
 install-includeHEADERS: $(include_HEADERS)
2777 2777
 	@$(NORMAL_INSTALL)
2778
-	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
2779 2778
 	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
2779
+	if test -n "$$list"; then \
2780
+	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
2781
+	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
2782
+	fi; \
2780 2783
 	for p in $$list; do \
2781 2784
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
2782 2785
 	  echo "$$d$$p"; \
... ...
@@ -2959,13 +2985,10 @@ distdir: $(DISTFILES)
2959 2959
 	done
2960 2960
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
2961 2961
 	  if test "$$subdir" = .; then :; else \
2962
-	    test -d "$(distdir)/$$subdir" \
2963
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
2964
-	    || exit 1; \
2965
-	  fi; \
2966
-	done
2967
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
2968
-	  if test "$$subdir" = .; then :; else \
2962
+	    $(am__make_dryrun) \
2963
+	      || test -d "$(distdir)/$$subdir" \
2964
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
2965
+	      || exit 1; \
2969 2966
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
2970 2967
 	    $(am__relativize); \
2971 2968
 	    new_distdir=$$reldir; \
... ...
@@ -1,14 +1,18 @@
1
-FILES = clam-v2.rar clam-v3.rar clam.cab clam.exe.bz2 clam.exe clam.zip \
1
+FILES = clam-v2.rar clam-v3.rar clam.cab clam.exe clam.zip \
2 2
 	clam.arj clam.exe.rtf clam.exe.szdd clam.tar.gz clam.chm clam.sis \
3 3
 	clam-aspack.exe clam-pespin.exe clam-upx.exe clam-fsg.exe clam-mew.exe\
4 4
 	clam-nsis.exe clam-petite.exe clam-upack.exe clam-wwpack.exe clam.pdf\
5 5
 	clam.mail clam.ppt clam.tnef clam.ea05.exe clam.ea06.exe clam.d64.zip\
6 6
 	clam.exe.mbox.base64 clam.exe.mbox.uu clam.exe.binhex clam.ole.doc \
7
-	clam.impl.zip clam.exe.html clam.bz2.zip clam.bin-be.cpio clam.bin-le.cpio \
7
+	clam.impl.zip clam.exe.html clam.bin-be.cpio clam.bin-le.cpio \
8 8
 	clam.newc.cpio clam.odc.cpio clam-yc.exe clam_IScab_int.exe \
9 9
 	clam_IScab_ext.exe clam_ISmsi_int.exe clam_ISmsi_ext.exe clam.7z \
10 10
 	clam_cache_emax.tgz clam.iso clamjol.iso
11 11
 
12
+if HAVE_LIBBZ2
13
+FILES += clam.exe.bz2 clam.bz2.zip
14
+endif
15
+
12 16
 SPLIT_DIR=$(top_srcdir)/test/.split
13 17
 
14 18
 all: $(FILES)
... ...
@@ -51,6 +51,7 @@ POST_UNINSTALL = :
51 51
 build_triplet = @build@
52 52
 host_triplet = @host@
53 53
 target_triplet = @target@
54
+@HAVE_LIBBZ2_TRUE@am__append_1 = clam.exe.bz2 clam.bz2.zip
54 55
 subdir = test
55 56
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
56 57
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
... ...
@@ -252,17 +253,18 @@ target_vendor = @target_vendor@
252 252
 top_build_prefix = @top_build_prefix@
253 253
 top_builddir = @top_builddir@
254 254
 top_srcdir = @top_srcdir@
255
-FILES = clam-v2.rar clam-v3.rar clam.cab clam.exe.bz2 clam.exe clam.zip \
256
-	clam.arj clam.exe.rtf clam.exe.szdd clam.tar.gz clam.chm clam.sis \
257
-	clam-aspack.exe clam-pespin.exe clam-upx.exe clam-fsg.exe clam-mew.exe\
258
-	clam-nsis.exe clam-petite.exe clam-upack.exe clam-wwpack.exe clam.pdf\
259
-	clam.mail clam.ppt clam.tnef clam.ea05.exe clam.ea06.exe clam.d64.zip\
260
-	clam.exe.mbox.base64 clam.exe.mbox.uu clam.exe.binhex clam.ole.doc \
261
-	clam.impl.zip clam.exe.html clam.bz2.zip clam.bin-be.cpio clam.bin-le.cpio \
262
-	clam.newc.cpio clam.odc.cpio clam-yc.exe clam_IScab_int.exe \
263
-	clam_IScab_ext.exe clam_ISmsi_int.exe clam_ISmsi_ext.exe clam.7z \
264
-	clam_cache_emax.tgz clam.iso clamjol.iso
265
-
255
+FILES = clam-v2.rar clam-v3.rar clam.cab clam.exe clam.zip clam.arj \
256
+	clam.exe.rtf clam.exe.szdd clam.tar.gz clam.chm clam.sis \
257
+	clam-aspack.exe clam-pespin.exe clam-upx.exe clam-fsg.exe \
258
+	clam-mew.exe clam-nsis.exe clam-petite.exe clam-upack.exe \
259
+	clam-wwpack.exe clam.pdf clam.mail clam.ppt clam.tnef \
260
+	clam.ea05.exe clam.ea06.exe clam.d64.zip clam.exe.mbox.base64 \
261
+	clam.exe.mbox.uu clam.exe.binhex clam.ole.doc clam.impl.zip \
262
+	clam.exe.html clam.bin-be.cpio clam.bin-le.cpio clam.newc.cpio \
263
+	clam.odc.cpio clam-yc.exe clam_IScab_int.exe \
264
+	clam_IScab_ext.exe clam_ISmsi_int.exe clam_ISmsi_ext.exe \
265
+	clam.7z clam_cache_emax.tgz clam.iso clamjol.iso \
266
+	$(am__append_1)
266 267
 SPLIT_DIR = $(top_srcdir)/test/.split
267 268
 EXTRA_DIST = .split
268 269
 all: all-am
... ...
@@ -354,7 +354,12 @@ END_TEST
354 354
 
355 355
 static char **testfiles = NULL;
356 356
 static unsigned testfiles_n = 0;
357
+
358
+#if HAVE_LIBBZ2
357 359
 static const int expected_testfiles = 48;
360
+#else
361
+static const int expected_testfiles = 46;
362
+#endif
358 363
 
359 364
 static void init_testfiles(void)
360 365
 {