Browse code

improve check for bzip2 test for attribute((packed)) only on GNUC compilers, because Sun's cc ignores it move iconv check after zlib/bzip2 checks use ../ to avoid problems with spaces in directory names

git-svn: trunk@3671

Török Edvin authored on 2008/02/25 20:29:06
Showing 7 changed files
... ...
@@ -1,3 +1,11 @@
1
+Mon Feb 25 12:25:03 EET 2008 (edwin)
2
+------------------------------------
3
+  * configure, configure.in:
4
+	* improve check for bzip2
5
+	* test for attribute((packed)) only on GNUC compilers, because Sun's cc ignores it
6
+	* move iconv check after zlib/bzip2 checks
7
+  * libclamav, libclamunrar_iface/Makefile*: use ../ to avoid problems with spaces in directory names
8
+
1 9
 Fri Feb 22 11:38:41 CET 2008 (tk)
2 10
 ---------------------------------
3 11
   * libclamav/scanners.c: avoid calling cli_scanscript() for HTML files
... ...
@@ -1526,7 +1526,6 @@ Optional Packages:
1526 1526
   --with-pic              try to use only PIC/non-PIC objects [default=use
1527 1527
                           both]
1528 1528
   --with-fpu-words-bigendian=(yes/no/auto)    specify FPU endianess (default=auto)
1529
-  --with-iconv supports iconv() (default=auto)
1530 1529
   --with-zlib=DIR	  path to directory containing zlib library (default=
1531 1530
 			  /usr/local or /usr if not found in /usr/local)
1532 1531
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
... ...
@@ -1536,6 +1535,7 @@ Optional Packages:
1536 1536
   --with-sendmail-version=VERSION    specify version of Sendmail (default=auto find)
1537 1537
   --with-libgmp-prefix[=DIR]  search for libgmp in DIR/include and DIR/lib
1538 1538
   --without-libgmp-prefix     don't search for libgmp in includedir and libdir
1539
+  --with-iconv supports iconv() (default=auto)
1539 1540
   --with-user=uid	  name of the clamav user (default=clamav)
1540 1541
   --with-group=gid	  name of the clamav group (default=clamav)
1541 1542
   --with-dbdir=path	  path to virus database directory
... ...
@@ -12377,156 +12377,6 @@ fi
12377 12377
 
12378 12378
 
12379 12379
 
12380
-# Check whether --with-iconv was given.
12381
-if test "${with_iconv+set}" = set; then
12382
-  withval=$with_iconv;
12383
- case "$withval" in
12384
-	 yes|no) wiconv="$withval";;
12385
-	 *) { { echo "$as_me:$LINENO: error: --with-iconv does not take an argument" >&5
12386
-echo "$as_me: error: --with-iconv does not take an argument" >&2;}
12387
-   { (exit 1); exit 1; }; };;
12388
- esac
12389
-else
12390
-   wiconv=auto
12391
-fi
12392
-
12393
-if test "X$wiconv" != "Xno"; then
12394
-	{ echo "$as_me:$LINENO: checking for libiconv_open in -liconv" >&5
12395
-echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6; }
12396
-if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
12397
-  echo $ECHO_N "(cached) $ECHO_C" >&6
12398
-else
12399
-  ac_check_lib_save_LIBS=$LIBS
12400
-LIBS="-liconv  $LIBS"
12401
-cat >conftest.$ac_ext <<_ACEOF
12402
-/* confdefs.h.  */
12403
-_ACEOF
12404
-cat confdefs.h >>conftest.$ac_ext
12405
-cat >>conftest.$ac_ext <<_ACEOF
12406
-/* end confdefs.h.  */
12407
-
12408
-/* Override any GCC internal prototype to avoid an error.
12409
-   Use char because int might match the return type of a GCC
12410
-   builtin and then its argument prototype would still apply.  */
12411
-#ifdef __cplusplus
12412
-extern "C"
12413
-#endif
12414
-char libiconv_open ();
12415
-int
12416
-main ()
12417
-{
12418
-return libiconv_open ();
12419
-  ;
12420
-  return 0;
12421
-}
12422
-_ACEOF
12423
-rm -f conftest.$ac_objext conftest$ac_exeext
12424
-if { (ac_try="$ac_link"
12425
-case "(($ac_try" in
12426
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12427
-  *) ac_try_echo=$ac_try;;
12428
-esac
12429
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12430
-  (eval "$ac_link") 2>conftest.er1
12431
-  ac_status=$?
12432
-  grep -v '^ *+' conftest.er1 >conftest.err
12433
-  rm -f conftest.er1
12434
-  cat conftest.err >&5
12435
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436
-  (exit $ac_status); } && {
12437
-	 test -z "$ac_c_werror_flag" ||
12438
-	 test ! -s conftest.err
12439
-       } && test -s conftest$ac_exeext &&
12440
-       $as_test_x conftest$ac_exeext; then
12441
-  ac_cv_lib_iconv_libiconv_open=yes
12442
-else
12443
-  echo "$as_me: failed program was:" >&5
12444
-sed 's/^/| /' conftest.$ac_ext >&5
12445
-
12446
-	ac_cv_lib_iconv_libiconv_open=no
12447
-fi
12448
-
12449
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12450
-      conftest$ac_exeext conftest.$ac_ext
12451
-LIBS=$ac_check_lib_save_LIBS
12452
-fi
12453
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv_open" >&5
12454
-echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6; }
12455
-if test $ac_cv_lib_iconv_libiconv_open = yes; then
12456
-  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv"
12457
-fi
12458
-
12459
-	{ echo "$as_me:$LINENO: checking for iconv" >&5
12460
-echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
12461
-	save_LIBS="$LIBS"
12462
-	LIBS="$LIBCLAMAV_LIBS"
12463
-	cat >conftest.$ac_ext <<_ACEOF
12464
-/* confdefs.h.  */
12465
-_ACEOF
12466
-cat confdefs.h >>conftest.$ac_ext
12467
-cat >>conftest.$ac_ext <<_ACEOF
12468
-/* end confdefs.h.  */
12469
-
12470
-		     #include <iconv.h>
12471
-
12472
-int
12473
-main ()
12474
-{
12475
-
12476
-	char** xin,**xout;
12477
-	unsigned il,ol;
12478
-	int rc;
12479
-	iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
12480
-	rc = iconv(iconv_struct,xin,&il,xout,&ol);
12481
-	iconv_close(iconv_struct);
12482
-
12483
-  ;
12484
-  return 0;
12485
-}
12486
-_ACEOF
12487
-rm -f conftest.$ac_objext conftest$ac_exeext
12488
-if { (ac_try="$ac_link"
12489
-case "(($ac_try" in
12490
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12491
-  *) ac_try_echo=$ac_try;;
12492
-esac
12493
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12494
-  (eval "$ac_link") 2>conftest.er1
12495
-  ac_status=$?
12496
-  grep -v '^ *+' conftest.er1 >conftest.err
12497
-  rm -f conftest.er1
12498
-  cat conftest.err >&5
12499
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500
-  (exit $ac_status); } && {
12501
-	 test -z "$ac_c_werror_flag" ||
12502
-	 test ! -s conftest.err
12503
-       } && test -s conftest$ac_exeext &&
12504
-       $as_test_x conftest$ac_exeext; then
12505
-
12506
-   { echo "$as_me:$LINENO: result: yes" >&5
12507
-echo "${ECHO_T}yes" >&6; }
12508
-
12509
-cat >>confdefs.h <<\_ACEOF
12510
-#define HAVE_ICONV 1
12511
-_ACEOF
12512
-
12513
-
12514
-else
12515
-  echo "$as_me: failed program was:" >&5
12516
-sed 's/^/| /' conftest.$ac_ext >&5
12517
-
12518
-
12519
-	{ echo "$as_me:$LINENO: result: no" >&5
12520
-echo "${ECHO_T}no" >&6; }
12521
-
12522
-fi
12523
-
12524
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12525
-      conftest$ac_exeext conftest.$ac_ext
12526
-	LIBS="$save_LIBS"
12527
-fi
12528
-
12529
-
12530 12380
 
12531 12381
 
12532 12382
 
... ...
@@ -14240,13 +14090,15 @@ echo "${ECHO_T}$ac_cv_libbz2_libs" >&6; }
14240 14240
 
14241 14241
 
14242 14242
 
14243
+    save_LDFLAGS="$LDFLAGS"
14244
+    LDFLAGS="$LIBS -L$LIBBZ2_PREFIX/lib";
14243 14245
     { echo "$as_me:$LINENO: checking for bzReadOpen in -lbz2" >&5
14244 14246
 echo $ECHO_N "checking for bzReadOpen in -lbz2... $ECHO_C" >&6; }
14245 14247
 if test "${ac_cv_lib_bz2_bzReadOpen+set}" = set; then
14246 14248
   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 14249
 else
14248 14250
   ac_check_lib_save_LIBS=$LIBS
14249
-LIBS="-lbz2 -L$LIBBZ2_PREFIX/lib $LIBS"
14251
+LIBS="-lbz2  $LIBS"
14250 14252
 cat >conftest.$ac_ext <<_ACEOF
14251 14253
 /* confdefs.h.  */
14252 14254
 _ACEOF
... ...
@@ -14307,8 +14159,10 @@ cat >>confdefs.h <<\_ACEOF
14307 14307
 #define NOBZ2PREFIX 1
14308 14308
 _ACEOF
14309 14309
 
14310
+
14310 14311
 fi
14311 14312
 
14313
+    LDFLAGS="$save_LDFLAGS"
14312 14314
     if test "$HAVE_LIBBZ2" = "yes"; then
14313 14315
 	if test "${ac_cv_header_bzlib_h+set}" = set; then
14314 14316
   { echo "$as_me:$LINENO: checking for bzlib.h" >&5
... ...
@@ -15490,6 +15344,156 @@ echo "$as_me: WARNING: ****** GNU MP 2 or newer NOT FOUND - digital signature su
15490 15490
     fi
15491 15491
 fi
15492 15492
 
15493
+
15494
+# Check whether --with-iconv was given.
15495
+if test "${with_iconv+set}" = set; then
15496
+  withval=$with_iconv;
15497
+ case "$withval" in
15498
+	 yes|no) wiconv="$withval";;
15499
+	 *) { { echo "$as_me:$LINENO: error: --with-iconv does not take an argument" >&5
15500
+echo "$as_me: error: --with-iconv does not take an argument" >&2;}
15501
+   { (exit 1); exit 1; }; };;
15502
+ esac
15503
+else
15504
+   wiconv=auto
15505
+fi
15506
+
15507
+if test "X$wiconv" != "Xno"; then
15508
+	{ echo "$as_me:$LINENO: checking for libiconv_open in -liconv" >&5
15509
+echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6; }
15510
+if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
15511
+  echo $ECHO_N "(cached) $ECHO_C" >&6
15512
+else
15513
+  ac_check_lib_save_LIBS=$LIBS
15514
+LIBS="-liconv  $LIBS"
15515
+cat >conftest.$ac_ext <<_ACEOF
15516
+/* confdefs.h.  */
15517
+_ACEOF
15518
+cat confdefs.h >>conftest.$ac_ext
15519
+cat >>conftest.$ac_ext <<_ACEOF
15520
+/* end confdefs.h.  */
15521
+
15522
+/* Override any GCC internal prototype to avoid an error.
15523
+   Use char because int might match the return type of a GCC
15524
+   builtin and then its argument prototype would still apply.  */
15525
+#ifdef __cplusplus
15526
+extern "C"
15527
+#endif
15528
+char libiconv_open ();
15529
+int
15530
+main ()
15531
+{
15532
+return libiconv_open ();
15533
+  ;
15534
+  return 0;
15535
+}
15536
+_ACEOF
15537
+rm -f conftest.$ac_objext conftest$ac_exeext
15538
+if { (ac_try="$ac_link"
15539
+case "(($ac_try" in
15540
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15541
+  *) ac_try_echo=$ac_try;;
15542
+esac
15543
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15544
+  (eval "$ac_link") 2>conftest.er1
15545
+  ac_status=$?
15546
+  grep -v '^ *+' conftest.er1 >conftest.err
15547
+  rm -f conftest.er1
15548
+  cat conftest.err >&5
15549
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15550
+  (exit $ac_status); } && {
15551
+	 test -z "$ac_c_werror_flag" ||
15552
+	 test ! -s conftest.err
15553
+       } && test -s conftest$ac_exeext &&
15554
+       $as_test_x conftest$ac_exeext; then
15555
+  ac_cv_lib_iconv_libiconv_open=yes
15556
+else
15557
+  echo "$as_me: failed program was:" >&5
15558
+sed 's/^/| /' conftest.$ac_ext >&5
15559
+
15560
+	ac_cv_lib_iconv_libiconv_open=no
15561
+fi
15562
+
15563
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15564
+      conftest$ac_exeext conftest.$ac_ext
15565
+LIBS=$ac_check_lib_save_LIBS
15566
+fi
15567
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv_open" >&5
15568
+echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6; }
15569
+if test $ac_cv_lib_iconv_libiconv_open = yes; then
15570
+  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv"
15571
+fi
15572
+
15573
+	{ echo "$as_me:$LINENO: checking for iconv" >&5
15574
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
15575
+	save_LIBS="$LIBS"
15576
+	LIBS="$LIBCLAMAV_LIBS"
15577
+	cat >conftest.$ac_ext <<_ACEOF
15578
+/* confdefs.h.  */
15579
+_ACEOF
15580
+cat confdefs.h >>conftest.$ac_ext
15581
+cat >>conftest.$ac_ext <<_ACEOF
15582
+/* end confdefs.h.  */
15583
+
15584
+		     #include <iconv.h>
15585
+
15586
+int
15587
+main ()
15588
+{
15589
+
15590
+	char** xin,**xout;
15591
+	unsigned il,ol;
15592
+	int rc;
15593
+	iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
15594
+	rc = iconv(iconv_struct,xin,&il,xout,&ol);
15595
+	iconv_close(iconv_struct);
15596
+
15597
+  ;
15598
+  return 0;
15599
+}
15600
+_ACEOF
15601
+rm -f conftest.$ac_objext conftest$ac_exeext
15602
+if { (ac_try="$ac_link"
15603
+case "(($ac_try" in
15604
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15605
+  *) ac_try_echo=$ac_try;;
15606
+esac
15607
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15608
+  (eval "$ac_link") 2>conftest.er1
15609
+  ac_status=$?
15610
+  grep -v '^ *+' conftest.er1 >conftest.err
15611
+  rm -f conftest.er1
15612
+  cat conftest.err >&5
15613
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15614
+  (exit $ac_status); } && {
15615
+	 test -z "$ac_c_werror_flag" ||
15616
+	 test ! -s conftest.err
15617
+       } && test -s conftest$ac_exeext &&
15618
+       $as_test_x conftest$ac_exeext; then
15619
+
15620
+   { echo "$as_me:$LINENO: result: yes" >&5
15621
+echo "${ECHO_T}yes" >&6; }
15622
+
15623
+cat >>confdefs.h <<\_ACEOF
15624
+#define HAVE_ICONV 1
15625
+_ACEOF
15626
+
15627
+
15628
+else
15629
+  echo "$as_me: failed program was:" >&5
15630
+sed 's/^/| /' conftest.$ac_ext >&5
15631
+
15632
+
15633
+	{ echo "$as_me:$LINENO: result: no" >&5
15634
+echo "${ECHO_T}no" >&6; }
15635
+
15636
+fi
15637
+
15638
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15639
+      conftest$ac_exeext conftest.$ac_ext
15640
+	LIBS="$save_LIBS"
15641
+fi
15642
+
15493 15643
 # Check whether --enable-pthreads was given.
15494 15644
 if test "${enable_pthreads+set}" = set; then
15495 15645
   enableval=$enable_pthreads; have_pthreads=$enableval
... ...
@@ -17905,7 +17909,11 @@ cat >>conftest.$ac_ext <<_ACEOF
17905 17905
 int
17906 17906
 main ()
17907 17907
 {
17908
-struct { int i __attribute__((packed)); } s;
17908
+#ifdef __GNUC__
17909
+		 struct { int i __attribute__((packed)); } s;
17910
+		 #else
17911
+		 #error Only checking for packed attribute on gcc-like compilers
17912
+		 #endif
17909 17913
   ;
17910 17914
   return 0;
17911 17915
 }
... ...
@@ -309,38 +309,6 @@ fi
309 309
 AC_CHECK_LIB([socket], [bind], [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
310 310
 AC_SEARCH_LIBS([gethostent],[nsl], [(LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl")])
311 311
 
312
-dnl we need to try to link with iconv, otherwise there could be a 
313
-dnl mismatch between a 32-bit and 64-bit lib. Detect this at configure time.
314
-AC_ARG_WITH([iconv], [  --with-iconv supports iconv() (default=auto)],
315
-[
316
- case "$withval" in
317
-	 yes|no) wiconv="$withval";;
318
-	 *) AC_MSG_ERROR([--with-iconv does not take an argument]);;
319
- esac],
320
-[ wiconv=auto ])
321
-if test "X$wiconv" != "Xno"; then
322
-	AC_CHECK_LIB([iconv], [libiconv_open], LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv")
323
-	AC_MSG_CHECKING([for iconv])
324
-	save_LIBS="$LIBS"
325
-	LIBS="$LIBCLAMAV_LIBS"
326
-	AC_TRY_LINK([
327
-		     #include <iconv.h>
328
-	],[
329
-	char** xin,**xout;
330
-	unsigned il,ol;
331
-	int rc;
332
-	iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
333
-	rc = iconv(iconv_struct,xin,&il,xout,&ol);
334
-	iconv_close(iconv_struct);
335
-],[
336
-   AC_MSG_RESULT(yes)
337
-   AC_DEFINE([HAVE_ICONV], 1, [iconv() available])
338
-],[
339
-	AC_MSG_RESULT(no)
340
-])
341
-	LIBS="$save_LIBS"
342
-fi
343
-
344 312
 AC_CHECK_FUNCS([poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat strcasestr inet_ntop setgroups initgroups ctime_r mkstemp])
345 313
 AC_FUNC_MMAP
346 314
 AC_FUNC_FSEEKO
... ...
@@ -410,9 +378,12 @@ want_bzip2=$enableval, want_bzip2="yes")
410 410
 if test "$want_bzip2" = "yes"
411 411
 then
412 412
     AC_LIB_LINKFLAGS([bz2])
413
+    save_LDFLAGS="$LDFLAGS"
414
+    LDFLAGS="$LIBS -L$LIBBZ2_PREFIX/lib";
413 415
     AC_CHECK_LIB([bz2], [bzReadOpen],
414
-		 [AC_DEFINE([NOBZ2PREFIX],1,[bzip funtions do not have bz2 prefix])],,
415
-		 [-L$LIBBZ2_PREFIX/lib])
416
+		 [AC_DEFINE([NOBZ2PREFIX],1,[bzip funtions do not have bz2 prefix])]
417
+		)
418
+    LDFLAGS="$save_LDFLAGS"
416 419
     if test "$HAVE_LIBBZ2" = "yes"; then
417 420
 	AC_CHECK_HEADER([bzlib.h],
418 421
 			[LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2";
... ...
@@ -524,6 +495,39 @@ then
524 524
     fi
525 525
 fi
526 526
 
527
+dnl we need to try to link with iconv, otherwise there could be a 
528
+dnl mismatch between a 32-bit and 64-bit lib. Detect this at configure time.
529
+dnl we need to check after zlib/bzip2, because they can change the include path
530
+AC_ARG_WITH([iconv], [  --with-iconv supports iconv() (default=auto)],
531
+[
532
+ case "$withval" in
533
+	 yes|no) wiconv="$withval";;
534
+	 *) AC_MSG_ERROR([--with-iconv does not take an argument]);;
535
+ esac],
536
+[ wiconv=auto ])
537
+if test "X$wiconv" != "Xno"; then
538
+	AC_CHECK_LIB([iconv], [libiconv_open], LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv")
539
+	AC_MSG_CHECKING([for iconv])
540
+	save_LIBS="$LIBS"
541
+	LIBS="$LIBCLAMAV_LIBS"
542
+	AC_TRY_LINK([
543
+		     #include <iconv.h>
544
+	],[
545
+	char** xin,**xout;
546
+	unsigned il,ol;
547
+	int rc;
548
+	iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
549
+	rc = iconv(iconv_struct,xin,&il,xout,&ol);
550
+	iconv_close(iconv_struct);
551
+],[
552
+   AC_MSG_RESULT(yes)
553
+   AC_DEFINE([HAVE_ICONV], 1, [iconv() available])
554
+],[
555
+	AC_MSG_RESULT(no)
556
+])
557
+	LIBS="$save_LIBS"
558
+fi
559
+
527 560
 AC_ARG_ENABLE([pthreads],
528 561
 [  --disable-pthreads      disable POSIX threads support],
529 562
 have_pthreads=$enableval,)
... ...
@@ -1268,10 +1272,16 @@ then
1268 1268
 fi
1269 1269
 
1270 1270
 dnl check for __attribute__((packed))
1271
+dnl but only on compilers claiming to be gcc compatible
1272
+dnl because for example Sun's compiler silently ignores the packed attribute.
1271 1273
 AC_MSG_CHECKING([for structure packing via __attribute__((packed))])
1272 1274
 AC_CACHE_VAL([have_attrib_packed],[
1273 1275
 	AC_TRY_COMPILE(,
1274
-		[struct { int i __attribute__((packed)); } s; ],
1276
+		[#ifdef __GNUC__
1277
+		 struct { int i __attribute__((packed)); } s;
1278
+		 #else
1279
+		 #error Only checking for packed attribute on gcc-like compilers
1280
+		 #endif],
1275 1281
 		[have_attrib_packed=yes],
1276 1282
 		[have_attrib_packed=no])
1277 1283
 	])
... ...
@@ -21,7 +21,7 @@ SUBDIRS = lzma .
21 21
 AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma
22 22
 
23 23
 if ENABLE_UNRAR
24
-libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la $(top_builddir)/libclamunrar_iface/libclamunrar_iface.la
24
+libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la ../libclamunrar_iface/libclamunrar_iface.la
25 25
 else
26 26
 libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la
27 27
 endif
... ...
@@ -76,7 +76,7 @@ libLTLIBRARIES_INSTALL = $(INSTALL)
76 76
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
77 77
 @ENABLE_UNRAR_FALSE@libclamav_la_DEPENDENCIES = lzma/liblzma.la
78 78
 @ENABLE_UNRAR_TRUE@libclamav_la_DEPENDENCIES = lzma/liblzma.la \
79
-@ENABLE_UNRAR_TRUE@	$(top_builddir)/libclamunrar_iface/libclamunrar_iface.la
79
+@ENABLE_UNRAR_TRUE@	../libclamunrar_iface/libclamunrar_iface.la
80 80
 am_libclamav_la_OBJECTS = matcher-ac.lo matcher-bm.lo matcher.lo \
81 81
 	md5.lo others.lo readdb.lo cvd.lo dsig.lo str.lo scanners.lo \
82 82
 	textdet.lo filetypes.lo rtf.lo blob.lo mbox.lo message.lo \
... ...
@@ -264,7 +264,7 @@ top_srcdir = @top_srcdir@
264 264
 SUBDIRS = lzma .
265 265
 AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma
266 266
 @ENABLE_UNRAR_FALSE@libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la
267
-@ENABLE_UNRAR_TRUE@libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la $(top_builddir)/libclamunrar_iface/libclamunrar_iface.la
267
+@ENABLE_UNRAR_TRUE@libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la ../libclamunrar_iface/libclamunrar_iface.la
268 268
 libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ \
269 269
 	-no-undefined $(am__append_1)
270 270
 include_HEADERS = clamav.h
... ...
@@ -6,7 +6,7 @@ if ENABLE_UNRAR
6 6
 
7 7
 AM_CPPFLAGS = -I$(top_srcdir)
8 8
 
9
-libclamunrar_iface_la_LIBADD = $(top_builddir)/libclamunrar/libclamunrar.la
9
+libclamunrar_iface_la_LIBADD = ../libclamunrar/libclamunrar.la
10 10
 
11 11
 libclamunrar_iface_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
12 12
 
... ...
@@ -58,7 +58,8 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
58 58
 am__installdirs = "$(DESTDIR)$(libdir)"
59 59
 libLTLIBRARIES_INSTALL = $(INSTALL)
60 60
 LTLIBRARIES = $(lib_LTLIBRARIES)
61
-@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_DEPENDENCIES = $(top_builddir)/libclamunrar/libclamunrar.la
61
+@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_DEPENDENCIES =  \
62
+@ENABLE_UNRAR_TRUE@	../libclamunrar/libclamunrar.la
62 63
 am__libclamunrar_iface_la_SOURCES_DIST = unrar_iface.c unrar_iface.h
63 64
 @ENABLE_UNRAR_TRUE@am_libclamunrar_iface_la_OBJECTS = unrar_iface.lo
64 65
 libclamunrar_iface_la_OBJECTS = $(am_libclamunrar_iface_la_OBJECTS)
... ...
@@ -210,7 +211,7 @@ target_vendor = @target_vendor@
210 210
 top_builddir = @top_builddir@
211 211
 top_srcdir = @top_srcdir@
212 212
 @ENABLE_UNRAR_TRUE@AM_CPPFLAGS = -I$(top_srcdir)
213
-@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LIBADD = $(top_builddir)/libclamunrar/libclamunrar.la
213
+@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LIBADD = ../libclamunrar/libclamunrar.la
214 214
 @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LDFLAGS = @TH_SAFE@ \
215 215
 @ENABLE_UNRAR_TRUE@	-version-info @LIBCLAMAV_VERSION@ \
216 216
 @ENABLE_UNRAR_TRUE@	-no-undefined $(am__append_1)