Commit bc2ea2c3 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

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
source.
parent acd4c296
# Copyright (c) 2016 Varnish Software AS
# Copyright (c) 2016-2017 Varnish Software AS
# All rights reserved.
#
# Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
......@@ -29,7 +29,7 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
# 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], [
[$VARNISHAPI_SBINDIR:$VARNISHAPI_BINDIR:$PATH])
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
libdir=$VARNISHAPI_LIBDIR
fi
dnl Define the VCL directory for automake
vcldir=$($PKG_CONFIG --define-variable=datadir=$datadir \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment