* Dries Kimpe wrote on Mon, May 08, 2006 at 08:46:49PM CEST: > > 2) The $ in grep 'pvfs$' was added by me as a temporary hack to > prevent it from building pvfs along with pvfs2. > It's not a good solution anyway, because $FILE_SYSTEM contains things > as "nfs ufs pvfs pvfs2" > > Really, the correct fix is just to use $file_system_pvfs, > $file_system_pvfs2, ...
Nah. Don't use two processes per conditional if you can get away with none. Let's not make the build slower than necessary. > Dries Kimpe wrote: > > AM_CONDITIONAL(BUILD_GRIDFTP, [test -n "`echo $FILE_SYSTEM | grep > > gridftp`"]) AM_CONDITIONAL(BUILD_GRIDFTP, [{ case " $FILE_SYSTEM " in " gridftp ") :;; *) false;; esac; }]) If you don't want to type each, you could use something along these lines: m4_foreach([my_fs], [hfs, nfs, panfs, ...], [AM_CONDITIONAL(BUILD_[]AS_TR_CPP(my_fs), [{ case " $FILE_SYSTEM " in \ my_fs\ ) :;; *) false;; esac; }]) ]) Cheers, Ralf