[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tr and automake
From: |
James Laird |
Subject: |
tr and automake |
Date: |
Mon, 10 Oct 2005 13:11:31 -0500 (CDT) |
Hello, all.
My package (hdf.ncsa.uiuc.edu/HDF5) has historically tested that the tr
utility works correctly at configure time. Apparently there are two
kinds of tr which expect slightly different syntax for their input.
We have now encountered a platform where setting the path to point to the
"correct" tr confuses the path to some libraries that the compiler needs.
What we'd like to do is to set an environment variable for tr rather than
changing the global path. We can change our own configure tests, but it
looks like aclocal.m4 uses tr by name.
If aclocal is happy with either version of tr, so much the better. If
not, I'd like to suggest that it replace "tr" with the environment
variable "$TR" and add a test in configure to ensure that the correct
version of tr is being used. Such a test might look like this:
AC_MSG_CHECKING([if tr works])
if test "X${TR}" = "X"; then
TR=tr
fi
TR_TEST="`echo Test | ${TR} 'a-z,' 'A-Z '`"
if test "${TR_TEST}" != "TEST"; then
AC_MSG_ERROR([tr program doesn't work])
else
AC_MSG_RESULT([yes])
fi
Thanks,
James Laird
(Please CC me on replies)
- tr and automake,
James Laird <=