Browse code

Fix build on Solaris8: bzip2 is present both in /usr/lib and /opt/csw/lib, configure checks the latter, why libclamav is linked to the former. We need to check the actual library we'll be linking to.

Török Edvin authored on 2009/11/15 00:17:55
Showing 2 changed files
... ...
@@ -15508,7 +15508,8 @@ $as_echo "$ac_cv_libbz2_libs" >&6; }
15508 15508
 
15509 15509
 
15510 15510
     save_LDFLAGS="$LDFLAGS"
15511
-    LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem";
15511
+    # Only add -L if prefix is not empty
15512
+    test -z "$LIBBZ2_PREFIX" || LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem";
15512 15513
 
15513 15514
     have_bzprefix="no"
15514 15515
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzReadOpen in -lbz2" >&5
... ...
@@ -571,7 +571,8 @@ if test "$want_bzip2" = "yes"
571 571
 then
572 572
     AC_LIB_LINKFLAGS([bz2])
573 573
     save_LDFLAGS="$LDFLAGS"
574
-    LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem";
574
+    # Only add -L if prefix is not empty
575
+    test -z "$LIBBZ2_PREFIX" || LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem";
575 576
 
576 577
     have_bzprefix="no"
577 578
     AC_CHECK_LIB([bz2], [BZ2_bzReadOpen], [have_bzprefix="yes"])