From 2882b2ba63ea65c806643f86d996513414c827d0 Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 2 Apr 2007 17:06:14 +0000 Subject: r22029: Make sure we respect $srcdir correctly for the srcdir != builddir case. (This used to be commit 0db4256a472975c5097135fa87315038a1350a72) --- source4/lib/replace/samba.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/lib/replace') diff --git a/source4/lib/replace/samba.m4 b/source4/lib/replace/samba.m4 index 3769c7f50e..a2e04f53b1 100644 --- a/source4/lib/replace/samba.m4 +++ b/source4/lib/replace/samba.m4 @@ -3,8 +3,16 @@ AC_LIBREPLACE_BROKEN_CHECKS SMB_EXT_LIB(LIBREPLACE_EXT, [${LIBDL}]) SMB_ENABLE(LIBREPLACE_EXT) +# remove leading ./ LIBREPLACE_DIR=`echo ${libreplacedir} |sed -e 's/^\.\///g'` +# remove leading srcdir .. we are looking for the relative +# path within the samba source tree or wherever libreplace is. +# We need to make sure the object is not forced to end up in +# the source directory because we might be using a separate +# build directory. +LIBREPLACE_DIR=`echo ${LIBREPLACE_DIR} | sed -e "s|^$srcdir/||g"` + LIBREPLACE_OBJS="" for obj in ${LIBREPLACEOBJ}; do LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}" -- cgit