[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moving getloadavg and fnmatch from Autoconf to Gnulib (1/2)

From: Ralf Wildenhues
Subject: Re: moving getloadavg and fnmatch from Autoconf to Gnulib (1/2)
Date: Fri, 1 Sep 2006 09:03:39 +0200
User-agent: Mutt/1.5.12 (2006-08-10)

Hello Paul,

Just a couple of quick notes:

* Paul Eggert wrote on Fri, Sep 01, 2006 at 12:35:09AM CEST:
> getloadavg and fnmatch properly belong to Gnulib[...]

> One way to fix this is to migrate the relevant test into the Autoconf
> code, so that it no longer uses getloadavg.c, but the test is really
> tricky and for now I'd just like to fix things.

Sounds a bit like you'd like to break things at a later point again...

> +# -------------
> +AN_FUNCTION([getloadavg], [gl_GETLOADAVG])

AN_FUNCTION isn't public interface of Autoconf.  Hmm, I guess it should
be, together with the other AN_* macros.


> +# Some definitions of getloadavg require that the program be installed 
> setgid.
> +AC_CACHE_CHECK(whether getloadavg requires setgid,
> +            gl_cv_func_getloadavg_setgid,
> +[AC_EGREP_CPP([Yowza Am I SETGID yet],
> +[#define gl_GETLOADAVG

This `gl_GETLOADAVG' will appear in the output, and will upset the
m4_pattern_forbid that gnulib-tool adds (untested).  Also, I just now
noticed that AC_EGREP_CPP adds one level of quoting (I was going to
complain that this should lead to an infinite loop, expanding the m4
macro gl_GETLOADAVG here...); that should probably be documented, too.

> +  # If we got an error (system does not support symlinks), try without -L.
> +  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
> +  gl_cv_group_kmem=`echo $ac_ls_output \
> +    | sed -ne ['s/[   ][      ]*/ /g;
> +            s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/;
> +            / /s/.* //;p;']`

FWIW, no need for the semi-colons before the newlines in the script
(but IIRC they shouldn't hurt either).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]