Skip to content
Snippets Groups Projects
configure.ac 1.2 KiB
Newer Older
AC_PREREQ(2.59)
Guillaume ROUSSE's avatar
Guillaume ROUSSE committed
AC_INIT([access-check], 2.0.0)
AM_INIT_AUTOMAKE([foreign])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_LN_S
confdir=$sysconfdir/access-check
Guillaume ROUSSE's avatar
Guillaume ROUSSE committed
PKG_PROG_PKG_CONFIG
AC_ARG_WITH([systemd-unitdir],
     [AS_HELP_STRING([--with-systemd-unitdir=DIR], [Directory for systemd service file @<:@default=automatic@:>@])],
     [systemdunitdir=$with_systemd_unitdir],
     [systemdunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
)
AC_ARG_WITH([systemd-user],
     [AS_HELP_STRING([--with-systemd-user=USER], [User for systemd service @<:@default=root@:>@])],
     [systemduser=$with_systemd_user],
     [systemduser="root"]
)
AC_ARG_WITH([systemd-group],
     [AS_HELP_STRING([--with-systemd-group=GROUP], [Group for systemd service @<:@default=root@:>@])],
     [systemdgroup=$with_systemd_group],
     [systemdgroup="root"]
)
systemdconfdir=$sysconfdir/sysconfig
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$systemdunitdir" != "x"])

Guillaume ROUSSE's avatar
Guillaume ROUSSE committed
AC_SUBST(systemdunitdir)
AC_SUBST(systemdconfdir)
AC_SUBST(systemduser)
AC_SUBST(systemdgroup)

AC_CONFIG_FILES(
    Makefile
    bin/Makefile
    conf/Makefile
    lib/Makefile
    templates/Makefile
Guillaume ROUSSE's avatar
Guillaume ROUSSE committed
    systemd/Makefile