automake
[Top][All Lists]
Advanced

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

AC_SUBST'ing foodir correctly?


From: Wouter Verhelst
Subject: AC_SUBST'ing foodir correctly?
Date: Tue, 24 May 2016 17:12:41 +0200
User-agent: Mutt/1.6.0 (2016-04-01)

Hi,

I'm adding a systemd unit to my package. To that end, I'm checking if
there is a pkg-config .pc file for systemd which sets a variable
"systemdsystemunitdir", and am trying to install the systemd unit in
that location.

I'm currently doing this:

AC_MSG_CHECKING([for systemd unit file locations])
AC_ARG_ENABLE(
  systemd,
  AS_HELP_STRING([--disable-systemd],[Do not install systemd support files (or 
use --enable-systemd to fail build when not available)]),
  [
    if test "x$enableval" = "xyes"; then
      ENABLE_SYSTEMD=yes
    else
      ENABLE_SYSTEMD=no
    fi
  ],[]
)

if test "x$ENABLE_SYSTEMD" != "xno"; then
        
PKG_CHECK_VAR([SYSTEMDUNIT],[systemd],systemdsystemunitdir],[AC_SUBST([systemdunitdir],
 [$SYSTEMDUNIT])])
fi

and then in my Makefile.am:

if SYSTEMD
systemdunit_DATA = address@hidden
endif

(if you need the full files, they're in the git repository at
git.debian.org/users/wouter/nbd.git)

However, now my "make distcheck" fails, because the "make install"
target disregards DESTDIR and tries to install files in the actual
systemd unit directory, rather than the staging one. Clearly this means
I'm doing something wrong, but I'm not sure what the proper way for
doing this would be.

Help?

-- 
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
       people in the world who think they really understand all of its rules,
       and pretty much all of them are just lying to themselves too.
 -- #debian-devel, OFTC, 2016-02-12



reply via email to

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