[lfs-dev] LFS SVN and Systemd Report

Dan Nicholson dbn.lists at gmail.com
Thu May 31 10:03:46 PDT 2012


On 5/31/12, Andrew Benton <andy at benton.eu.com> wrote:
> On Thu, 31 May 2012 14:05:19 +0100
> Dan Nicholson <dbn.lists at gmail.com> wrote:
>
>> Here's an update. I forgot that [] are quotes in autoconf, so you
>> usually end up using test instead. I still didn't test it works all
>> the way, but I think configure should run.
>
> Withthis patch automake fails with:
>
> Makefile.am:1447: Cannot apply `+=' because `MANPAGES' is not defined in
> Makefile.am:1447: the following conditions:
> Makefile.am:1447:   UDEV_ONLY
> Makefile.am:1447: Either define `MANPAGES' in these conditions, or use
> Makefile.am:1447: `+=' in the same conditions as the definitions.
> Makefile.am:1511: Cannot apply `+=' because `bin_PROGRAMS' is not defined
> in
> Makefile.am:1511: the following conditions:
> Makefile.am:1511:   UDEV_ONLY
> Makefile.am:1511: Either define `bin_PROGRAMS' in these conditions, or use
> Makefile.am:1511: `+=' in the same conditions as the definitions.
> Makefile.am:2773: Cannot apply `+=' because `rootlibexec_PROGRAMS' is not
> defined in
> Makefile.am:2773: the following conditions:
> Makefile.am:2773:   ENABLE_LOGIND and UDEV_ONLY
> Makefile.am:2773: Either define `rootlibexec_PROGRAMS' in these conditions,
> or use
> Makefile.am:2773: `+=' in the same conditions as the definitions.
>
> I can fix that by making some changes to Makefile.am (see the attached
> diff) so that autoreconf now completes without error. However, when I
> try to run ./configure --enable-udev-only I get:
>
> checking for library containing clock_gettime... -lrt
> checking for library containing dlsym... -ldl
> checking for library containing cap_init... no
> configure: error: *** POSIX caps library not found

Congratulations, you're off and running with the autotools! A couple notes here:

1. I definitely did not get that patch to a working state. I only was
just trying to get it going in the right direction.

2. Bryan has sent a couple patches to the hotplug list to decouple
things a bit. One of them has to do with getting a capability include
out of a udev file. You probably want to have a look at those to not
duplicate work.

3. Here it seems that the capability system is being included unconditionally.

save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps
library not found])])
AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps
headers not found])])
CAP_LIBS="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(CAP_LIBS)

The 5th argument of AC_SEARCH_LIBS and 4th argument of
AC_CHECK_HEADERS are "action-not-found". I.e., what to do if you
didn't find a libcap library providing cap_init or the
sys/capability.h header. You could wrap those AC_MSG_ERRORs in
$enable_udev_only, but I think you could probably wrap this whole
section in an if test $enable_udev_only = no block. You will need
Bryan's patches to untangle capabilities from the shared sources,
though.

--
Dan



More information about the lfs-dev mailing list