From f89a8b81cf795d9e658341b4755046b3824acdaa Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Tue, 25 Jun 2013 12:26:40 +0200 Subject: [PATCH] configure: add configure --with-default-profile-subdir Configuration profiles are selected configuration items that can be loaded dynamically on demand and overlayed over existing configuration on demand (either on cmd line by selecting the profile name to be used globally or retrieved from metadata and used per VG/LV basis only). The default directory where profiles are stored is configurable at compile time with --with-default-profile-subdir. --- configure | 19 +++++++++++++++++++ configure.in | 8 ++++++++ lib/misc/configure.h.in | 3 +++ 3 files changed, 30 insertions(+) diff --git a/configure b/configure index e8ef786f1..8a1db7432 100755 --- a/configure +++ b/configure @@ -671,6 +671,7 @@ DEFAULT_RUN_DIR DEFAULT_DM_RUN_DIR DEFAULT_LOCK_DIR DEFAULT_DATA_ALIGNMENT +DEFAULT_PROFILE_SUBDIR DEFAULT_CACHE_SUBDIR DEFAULT_BACKUP_SUBDIR DEFAULT_ARCHIVE_SUBDIR @@ -873,6 +874,7 @@ with_tmpfilesdir with_dmeventd_pidfile with_dmeventd_path with_default_system_dir +with_default_profile_subdir with_default_archive_subdir with_default_backup_subdir with_default_cache_subdir @@ -1638,6 +1640,8 @@ Optional Packages: dmeventd path [[EPREFIX/sbin/dmeventd]] --with-default-system-dir=DIR default LVM system directory [[/etc/lvm]] + --with-default-profile-subdir=SUBDIR + default configuration profile subdir [[profile]] --with-default-archive-subdir=SUBDIR default metadata archive subdir [[archive]] --with-default-backup-subdir=SUBDIR @@ -10555,6 +10559,20 @@ _ACEOF +# Check whether --with-default-profile-subdir was given. +if test "${with_default_profile_subdir+set}" = set; then : + withval=$with_default_profile_subdir; DEFAULT_PROFILE_SUBDIR=$withval +else + DEFAULT_PROFILE_SUBDIR=profile +fi + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_PROFILE_SUBDIR "$DEFAULT_PROFILE_SUBDIR" +_ACEOF + + + # Check whether --with-default-archive-subdir was given. if test "${with_default_archive_subdir+set}" = set; then : withval=$with_default_archive_subdir; DEFAULT_ARCHIVE_SUBDIR=$withval @@ -10788,6 +10806,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'` + ################################################################################ diff --git a/configure.in b/configure.in index b286358dd..d90eb1ac2 100644 --- a/configure.in +++ b/configure.in @@ -1421,6 +1421,13 @@ AC_ARG_WITH(default-system-dir, AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"], [Path to LVM system directory.]) +AC_ARG_WITH(default-profile-subdir, + AC_HELP_STRING([--with-default-profile-subdir=SUBDIR], + [default configuration profile subdir [[profile]]]), + DEFAULT_PROFILE_SUBDIR=$withval, DEFAULT_PROFILE_SUBDIR=profile) +AC_DEFINE_UNQUOTED(DEFAULT_PROFILE_SUBDIR, ["$DEFAULT_PROFILE_SUBDIR"], + [Name of default configuration profile subdirectory.]) + AC_ARG_WITH(default-archive-subdir, AC_HELP_STRING([--with-default-archive-subdir=SUBDIR], [default metadata archive subdir [[archive]]]), @@ -1521,6 +1528,7 @@ AC_SUBST(DEFAULT_SYS_DIR) AC_SUBST(DEFAULT_ARCHIVE_SUBDIR) AC_SUBST(DEFAULT_BACKUP_SUBDIR) AC_SUBST(DEFAULT_CACHE_SUBDIR) +AC_SUBST(DEFAULT_PROFILE_SUBDIR) AC_SUBST(DEFAULT_DATA_ALIGNMENT) AC_SUBST(DEFAULT_LOCK_DIR) AC_SUBST(DEFAULT_DM_RUN_DIR) diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in index fdc5a2617..aae4f240a 100644 --- a/lib/misc/configure.h.in +++ b/lib/misc/configure.h.in @@ -53,6 +53,9 @@ /* Default directory to keep PID files in. */ #undef DEFAULT_PID_DIR +/* Name of default configuration profile subdirectory. */ +#undef DEFAULT_PROFILE_SUBDIR + /* Default LVM run directory. */ #undef DEFAULT_RUN_DIR