Hi Bruno,

    Hi Reuben,

    >/The test for whether to use valgrind runs:/
    >//
    >//bin/bash -c 'exit 0'/
    >//
    >/This looks pretty harmless; unfortunately, bash itself causes problems:/

    I'd suggest that you change m4/valgrind-tests.m4 to use the AC_CACHE_CHECK
    macro instead of "lone" AC_MSG_CHECKING and AC_MSG_RESULT invocations.
    Then you have an cache variable that you set as an environment variable
    in order to override the result of this test, e.g.
      $ env gl_cv_use_valgrind=yes ./configure

    Remember, nowadays that the autoconf cache is disabled by default, the
    major benefit of AC_CACHE_CHECK is that it provides the user a way to
    selectively override configure test results.

    Bruno

Today I have run into the same problem (namely that valgrind and bash
are not going along very well).

While your proposed solution would work for anyone who is aware of this
problem, it won't work for an unaware user who would simply run
./configure, wondering why valgrind isn't detected. As it seems rather
involved to resolve the incompatibility between bash and valgrind, I
would like to ask to have gnulib's valgrind-tests changed upstream. As
this change amounts simply in replacing $(SHELL) by any other well-known
utility, the changes to be done are trivial.

Having an updated version upstream makes it much easier for everyone  to
pick up the necessary changes to make valgrind-tests work.

Marc

Reply via email to