sysconfdir defaults to /etc

This commit is contained in:
IgnorantGuru 2015-04-27 14:13:11 -06:00
parent 6ae9c2db36
commit a7ec4d38d1
10 changed files with 121 additions and 43 deletions

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.14 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@ -656,9 +656,10 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \

77
aclocal.m4 vendored
View File

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.14 -*- Autoconf -*-
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
@ -337,7 +337,6 @@ msgstr ""
dnl
glib_DEFUN([GLIB_GNU_GETTEXT],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
GLIB_LC_MESSAGES
GLIB_WITH_NLS
@ -1978,7 +1977,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@ -1999,7 +1998,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
ppc64-*linux*|powerpc64-*linux*)
powerpc64le-*)
LD="${LD-ld} -m elf32lppclinux"
;;
powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@ -2018,7 +2020,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
powerpcle-*)
LD="${LD-ld} -m elf64lppc"
;;
powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@ -9461,6 +9466,61 @@ else
fi[]dnl
])# PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@ -9476,7 +9536,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.14], [],
m4_if([$1], [1.14.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -9492,7 +9552,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.14])dnl
[AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@ -10014,7 +10074,8 @@ to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi])
fi
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further

24
configure vendored
View File

@ -2811,7 +2811,7 @@ fi
# Define the identity of the package.
PACKAGE=udevil
VERSION=0.4.1+
VERSION=0.4.3+etc
cat >>confdefs.h <<_ACEOF
@ -2905,6 +2905,7 @@ END
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
$as_echo_n "checking whether NLS is requested... " >&6; }
# Check whether --enable-nls was given.
@ -7260,7 +7261,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@ -7285,7 +7286,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
ppc64-*linux*|powerpc64-*linux*)
powerpc64le-*)
LD="${LD-ld} -m elf32lppclinux"
;;
powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@ -7304,7 +7308,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
powerpcle-*)
LD="${LD-ld} -m elf64lppc"
;;
powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@ -12198,6 +12205,8 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
# sysconfdir defaults to /usr/local/etc if this is not done:
test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $LD accepts --as-needed" >&5
$as_echo_n "checking whether $LD accepts --as-needed... " >&6; }
@ -15809,11 +15818,12 @@ echo setfacl program.............................. : $setfaclprog
else
echo setfacl program.............................. : /usr/bin/setfacl
fi
echo install devmon systemd service............... : $use_systemd
echo
echo Install devmon systemd service files ?....... : $use_systemd
echo Installation Prefix.......................... : $prefix
echo " The binary will be installed as $prefix/bin/udevil"
echo sysconfdir................................... : $sysconfdir
echo " The configuration will be installed in $sysconfdir/udevil"
echo
echo 'Homepage: http://ignorantguru.github.com/udevil/'
echo 'Homepage: http://ignorantguru.github.io/udevil/'
echo

View File

@ -3,7 +3,7 @@ AC_PREREQ(2.52)
AC_INIT(src/udevil.c)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(udevil, 0.4.1+)
AM_INIT_AUTOMAKE(udevil, 0.4.3+etc)
AC_PROG_INTLTOOL([0.21])
@ -16,6 +16,8 @@ AC_PROG_INSTALL
AC_DEFINE_UNQUOTED(UDEVIL_VERSION, "$VERSION", [udevil version])
# sysconfdir defaults to /usr/local/etc if this is not done:
test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
dnl linker optimizations
AC_MSG_CHECKING([whether $LD accepts --as-needed])
@ -168,11 +170,12 @@ echo setfacl program.............................. : $setfaclprog
else
echo setfacl program.............................. : /usr/bin/setfacl
fi
echo install devmon systemd service............... : $use_systemd
echo
echo Install devmon systemd service files ?....... : $use_systemd
echo Installation Prefix.......................... : $prefix
echo " The binary will be installed as $prefix/bin/udevil"
echo sysconfdir................................... : $sysconfdir
echo " The configuration will be installed in $sysconfdir/udevil"
echo
echo 'Homepage: http://ignorantguru.github.com/udevil/'
echo 'Homepage: http://ignorantguru.github.io/udevil/'
echo

View File

@ -5,17 +5,17 @@ EXTRA_DIST = udevil.conf
endif
install-data-hook:
test -d $(DESTDIR)$(sysconfdir)/udevil || mkdir -p -- \
$(DESTDIR)$(sysconfdir)/udevil
test -f $(DESTDIR)$(sysconfdir)/udevil/udevil.conf || $(INSTALL_DATA) \
test -d $(DESTDIR)/$(sysconfdir)/udevil || mkdir -p -- \
$(DESTDIR)/$(sysconfdir)/udevil
test -f $(DESTDIR)/$(sysconfdir)/udevil/udevil.conf || $(INSTALL_DATA) \
$(srcdir)/udevil.conf \
$(DESTDIR)$(sysconfdir)/udevil/udevil.conf
$(DESTDIR)/$(sysconfdir)/udevil/udevil.conf
if ADD_SYSTEMD
test -d $(DESTDIR)$(sysconfdir)/conf.d || mkdir -p -- \
$(DESTDIR)$(sysconfdir)/conf.d
test -f $(DESTDIR)$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \
test -d $(DESTDIR)/$(sysconfdir)/conf.d || mkdir -p -- \
$(DESTDIR)/$(sysconfdir)/conf.d
test -f $(DESTDIR)/$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \
$(srcdir)/systemd/devmon \
$(DESTDIR)$(sysconfdir)/conf.d/devmon
$(DESTDIR)/$(sysconfdir)/conf.d/devmon
test -d $(DESTDIR)/$(libdir)/systemd/system || \
mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system
$(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.14 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@ -457,16 +457,16 @@ uninstall-am:
install-data-hook:
test -d $(DESTDIR)$(sysconfdir)/udevil || mkdir -p -- \
$(DESTDIR)$(sysconfdir)/udevil
test -f $(DESTDIR)$(sysconfdir)/udevil/udevil.conf || $(INSTALL_DATA) \
test -d $(DESTDIR)/$(sysconfdir)/udevil || mkdir -p -- \
$(DESTDIR)/$(sysconfdir)/udevil
test -f $(DESTDIR)/$(sysconfdir)/udevil/udevil.conf || $(INSTALL_DATA) \
$(srcdir)/udevil.conf \
$(DESTDIR)$(sysconfdir)/udevil/udevil.conf
@ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)$(sysconfdir)/conf.d || mkdir -p -- \
@ADD_SYSTEMD_TRUE@ $(DESTDIR)$(sysconfdir)/conf.d
@ADD_SYSTEMD_TRUE@ test -f $(DESTDIR)$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \
$(DESTDIR)/$(sysconfdir)/udevil/udevil.conf
@ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)/$(sysconfdir)/conf.d || mkdir -p -- \
@ADD_SYSTEMD_TRUE@ $(DESTDIR)/$(sysconfdir)/conf.d
@ADD_SYSTEMD_TRUE@ test -f $(DESTDIR)/$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \
@ADD_SYSTEMD_TRUE@ $(srcdir)/systemd/devmon \
@ADD_SYSTEMD_TRUE@ $(DESTDIR)$(sysconfdir)/conf.d/devmon
@ADD_SYSTEMD_TRUE@ $(DESTDIR)/$(sysconfdir)/conf.d/devmon
@ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)/$(libdir)/systemd/system || \
@ADD_SYSTEMD_TRUE@ mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system
@ADD_SYSTEMD_TRUE@ $(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \

View File

@ -1,13 +1,16 @@
devmon systemd service
======================
To Install:
Note: If using a sysconfdir other than /etc or an install prefix other than
/usr, the file devmon@.service must be edited to use the correct paths.
To Install: (this is done by the build system)
cd etc/systemd
install -Dm644 devmon /etc/conf.d/devmon
install -Dm644 devmon@.service /usr/lib/systemd/system/devmon@.service
To Start:
To Start: (this is not done automatically)
systemctl start devmon@<user>

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.14 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.14 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.

View File

@ -4952,7 +4952,7 @@ printf("\n-----------------------\n");
//printf( "R=%d:%d E=%d:%d\n", getuid(), getgid(), geteuid(), getegid() );
// read config
// read config - success returns normal "read config" msg
if ( !( config_msg = parse_config( &config_warning ) ) )
return 1;