build-sys: introduce a special build flag to explicitly disables running from build tree

It is helpful to improve reproducibility build [1] since
PA_SRCDIR/PA_BUILDDIR contains build path,
--disable-running-from-build-tree could drop these macros at
precompilation.

[1] https://reproducible-builds.org/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
This commit is contained in:
Hongxu Jia 2018-12-07 15:48:49 +08:00 committed by Tanu Kaskinen
parent bae8c16bfa
commit 3d9deb1e56
7 changed files with 29 additions and 5 deletions

View file

@ -989,6 +989,16 @@ AS_IF([test "x$enable_asyncns" = "xyes" && test "x$HAVE_LIBASYNCNS" = "x0"],
AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
AS_IF([test "x$HAVE_LIBASYNCNS" = "x1"], AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?]))
#### Running from build tree (optional) ####
AC_ARG_ENABLE([running-from-build-tree],
AS_HELP_STRING([--disable-running-from-build-tree],[Disable running from build tree]))
AS_IF([test "x$enable_running_from_build_tree" != "xno"],
AC_DEFINE([HAVE_RUNNING_FROM_BUILD_TREE], 1, [Have running from build tree]))
AC_SUBST(HAVE_RUNNING_FROM_BUILD_TREE)
#### TCP wrappers (optional) ####
AC_ARG_ENABLE([tcpwrap],