don't let environment settings perturb build
authorJim Meyering <meyering@redhat.com>
Thu, 15 Oct 2009 19:04:51 +0000 (21:04 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 15 Oct 2009 19:04:51 +0000 (21:04 +0200)
commit2d437590196e3c6880ca5c06029fcd73f0e16442
tree560ccf5b081f655565fe0474b4efc5001a51aa1f
parent1506e4147b4177990e6cde062536ea8bc63f9588
don't let environment settings perturb build

Setting the envvars, LIB_CLOCK_GETTIME, LIB_EACCESS or LIB_NANOSLEEP
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/clock_time.m4 (gl_CLOCK_TIME): Initialize AC_SUBST'd var.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
ChangeLog
m4/clock_time.m4
m4/euidaccess.m4
m4/nanosleep.m4