Hi everyone, Bruce Korb implemented a library for straightforward config file parsing (among other things). We thought it would make sense to use it for GNU Hello, as an example of how it can be done.
Of course, it involves a new Autoconf macro to test whether the library is available. And of course again, I don't want that macro to live in GNU Hello, since the goal is not Hello functionality, it's to be an example. So I want it to be in a common place. Which I guess is gnulib. Does all that sound reasonable? If so, my question is how to do this -- I guess define a new module. I confess I am not clear on the exact steps to do this. Should have paid better attention in school, I know ... Following is the macro Bruce wrote; he named the file libopts.m4, since that's the name of the library. http://directory.fsf.org/GNU/libopts.html (I guess "; then" would be preferred to "<newline>then"?) Thanks, karl +AC_DEFUN([ag_FIND_LIBOPTS], + [if test "X${ac_cv_header_autoopts_options_h}" == Xno + then + : + else + f=`autoopts-config cflags` 2>/dev/null + test X"${f}" = X && f=`libopts-config cflags` 2>/dev/null + if test X"${f}" = X + then + : + else + AC_DEFINE([HAVE_LIBOPTS],[1],[define if we can find libopts]) + CFLAGS="${CFLAGS} ${f}" + f=`autoopts-config ldflags` 2>/dev/null + test X"${f}" = X && f=`libopts-config ldflags` 2>/dev/null + LIBS="${LIBS} ${f}" + fi + fi]) _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib