[5.1] bc2ea2c Support multi-lib systems for out-of-tree builds

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Apr 10 13:59:06 CEST 2017

commit bc2ea2c35ebd1dcf613b5b9ab2b3957d0b4b4839
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Mar 27 21:26:15 2017 +0200

    Support multi-lib systems for out-of-tree builds
    On systems where both 32 and 64-bit libraries can co-exist, simply
    inheriting Varnish's prefix is not enough because VMODs might land
    in the wrong directory. For instance, on rhel you will find both
    /usr/lib and /usr/lib64.
    This is usually not a problem with package managers, because they
    usually take care of everything at configure time, for example RPMs
    may use a %configure macro that defines all well-known directories.
    It can however be overlooked when a VMOD is manually built from

diff --git a/varnish.m4 b/varnish.m4
index 58248fb..400e087 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Varnish Software AS
+# Copyright (c) 2016-2017 Varnish Software AS
 # All rights reserved.
 # Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
@@ -29,7 +29,7 @@
 # varnish.m4 - Macros to define VMOD builds.            -*- Autoconf -*-
-# serial 6 (varnish-5.1.0)
+# serial 7 (varnish-5.1.2)
 # This collection of macros helps create VMODs or tools interacting with
 # Varnish Cache using the GNU build system (autotools). In order to work
@@ -93,7 +93,12 @@ AC_DEFUN([_VARNISH_PKG_CONFIG], [
 	dnl Inherit Varnish's prefix if undefined
-	test "$prefix" = NONE && ac_default_prefix=$VARNISHAPI_PREFIX
+	dnl Also the libdir for multi-lib systems
+	if test "$prefix" = NONE
+	then
+		ac_default_prefix=$VARNISHAPI_PREFIX
+	fi
 	dnl Define the VCL directory for automake
 	vcldir=$($PKG_CONFIG --define-variable=datadir=$datadir \

More information about the varnish-commit mailing list