summaryrefslogtreecommitdiff
path: root/m4/jm-macros.m4
diff options
context:
space:
mode:
authorJim Meyering <meyering@vm.meyering.net.localdomain>2009-10-15 20:54:02 +0200
committerJim Meyering <meyering@redhat.com>2009-10-15 21:03:40 +0200
commit2fa407885c5fbcbcf92ef640859440b896d3c6b1 (patch)
tree3129eb3b52d800dbf02386cb2f361771797d0423 /m4/jm-macros.m4
parentb3cfa712ca5c28ad755f4a85147b32538766a417 (diff)
downloadcoreutils-2fa407885c5fbcbcf92ef640859440b896d3c6b1.tar.xz
build: don't let environment settings perturb build
Setting the envvars, LIB_FDATASYNC, LIB_XATTR or LIB_CRYPT could cause a configure-time and/or build-time malfunction. Typically, a configure-time function-in-library test is performed via code like this: LIB_VAR= AC_SUBST([LIB_VAR]) prefix_saved_LIBS=$LIBS AC_SEARCH_LIBS([FUNC], [LIB_NAME], [test "$ac_cv_search_FUNC" = "none required" || LIB_VAR=$ac_cv_search_FUNC]) LIBS=$prefix_saved_LIBS However, in each of the files affected by this change, the LIB_VAR= initialization was omitted. Thus, when set in the environment, its value would propagate into generated Makefiles when FUNC is not found in LIB_NAME. * m4/jm-macros.m4 (coreutils_MACROS): Initialize AC_SUBST'd var * m4/lib-check.m4 (cu_LIB_CHECK): Likewise. * m4/xattr.m4 (gl_FUNC_XATTR): Likewise.
Diffstat (limited to 'm4/jm-macros.m4')
-rw-r--r--m4/jm-macros.m41
1 files changed, 1 insertions, 0 deletions
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 833940469..f42f67c21 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -94,6 +94,7 @@ AC_DEFUN([coreutils_MACROS],
# for dd.c and shred.c
coreutils_saved_libs=$LIBS
+ LIB_FDATASYNC=
AC_SEARCH_LIBS([fdatasync], [rt posix4],
[test "$ac_cv_search_fdatasync" = "none required" ||
LIB_FDATASYNC=$ac_cv_search_fdatasync])