]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
enable to set Global configuration file correctly 386/head
authorHideki Yamane <henrich@debian.org>
Sat, 27 Jan 2018 17:05:28 +0000 (02:05 +0900)
committerHideki Yamane <henrich@debian.org>
Sat, 27 Jan 2018 17:05:28 +0000 (02:05 +0900)
--with-conf option can set Global configuration file directory, but manpage
still specifies static /etc/sysconfig/.

configure.ac
doc/snapper.xml.in

index 2a4e98f76a2bacd55629323a81d1f6bd3b6f91c9..3c54c502d62ac8706286da6a8242b3109dc2e587 100644 (file)
@@ -58,11 +58,15 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 CFLAGS="${CFLAGS} -std=c99 -Wall -Wextra -Wformat=2 -Wmissing-prototypes -Wno-unused-parameter"
 CXXFLAGS="${CXXFLAGS} -std=c++11 -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter"
 
+SYSCONFIG=/etc/sysconfig
+
 AC_ARG_WITH([conf], AC_HELP_STRING([--with-conf], [Use a custom sysconfig directory (default is /etc/sysconfig)]),
        [with_conf=$withval], [with_conf=no])
 
-AS_IF([test "x$with_conf" != xno], [CPPFLAGS="${CPPFLAGS} -DCONFDIR='\"${with_conf}\"'"],
-       [CPPFLAGS="${CPPFLAGS} -DCONFDIR='\"/etc/sysconfig\"'"])
+AS_IF([test "x$with_conf" != xno], [SYSCONFIG="${with_conf}"])
+
+CPPFLAGS="${CPPFLAGS} -DCONFDIR='\"${SYSCONFIG}\"'"
+
 
 AC_ARG_ENABLE([btrfs], AC_HELP_STRING([--disable-btrfs],[Disable Btrfs internal snapshots support]),
                [with_btrfs=$enableval],[with_btrfs=yes])
@@ -151,6 +155,7 @@ AC_SUBST(LIBVERSION_MAJOR)
 AC_SUBST(LIBVERSION_MINOR)
 AC_SUBST(LIBVERSION_PATCHLEVEL)
 AC_SUBST(LIBVERSION_INFO)
+AC_SUBST(SYSCONFIG)
 AC_SUBST(docdir)
 
 AC_OUTPUT(
index 1507b5d6fdfb2f80be9a71a019c87bcbe7baf98a..9073ab320c73b525b501a70a63375a1a3c1d8f72 100644 (file)
     <title>FILES</title>
     <variablelist>
       <varlistentry>
-       <term><filename>/etc/sysconfig/snapper</filename></term>
+       <term><filename>@SYSCONFIG@/snapper</filename></term>
        <listitem>
          <para>Global configuration file.</para>
        </listitem>