]> sourceware.org Git - lvm2.git/commitdiff
Install example config file by default if there isn't one already.
authorAlasdair Kergon <agk@redhat.com>
Wed, 14 Apr 2004 17:39:55 +0000 (17:39 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 14 Apr 2004 17:39:55 +0000 (17:39 +0000)
Makefile.in
configure
configure.in
doc/Makefile.in [new file with mode: 0644]
make.tmpl.in

index 479d49214627fc3ba46e6bd1feef18ca09820b5d..4d9597b3646a56e5848ae5b51a49c2cdfc7ee902 100644 (file)
@@ -16,7 +16,7 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 
-SUBDIRS = include man 
+SUBDIRS = doc include man 
 
 ifeq ("@INTL@", "yes")
   SUBDIRS += po
index cba1df8efbdcd5c931ccf2d990188c938123dff3..8aa7dab4199b3a238bae6aa96eb6a23d622fa7de 100755 (executable)
--- a/configure
+++ b/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
 #endif"
 
 ac_default_prefix=/usr
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MSGFMT JOBS STATIC_LINK LVM1 OWNER GROUP CLDFLAGS CLDWHOLEARCHIVE CLDNOWHOLEARCHIVE LD_DEPS LD_FLAGS SOFLAG LVM_VERSION LVM1_FALLBACK DEBUG DEVMAPPER HAVE_LIBDL HAVE_SELINUX CMDLIB LOCALEDIR INTL_PACKAGE INTL LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MSGFMT JOBS STATIC_LINK LVM1 OWNER GROUP CLDFLAGS CLDWHOLEARCHIVE CLDNOWHOLEARCHIVE LD_DEPS LD_FLAGS SOFLAG LVM_VERSION LVM1_FALLBACK DEBUG DEVMAPPER HAVE_LIBDL HAVE_SELINUX CMDLIB LOCALEDIR CONFDIR INTL_PACKAGE INTL LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -865,6 +865,7 @@ Optional Packages:
   --with-lvm1=TYPE        LVM1 metadata support: internal/shared/none
                           TYPE=internal
   --with-localedir=DIR    Translation files in DIR PREFIX/share/locale
+  --with-confdir=DIR      Configuration files in DIR EXEC_PREFIX/etc
 
 Some influential environment variables:
   CC          C compiler command
@@ -5056,6 +5057,15 @@ else
 fi;
 fi
 
+
+# Check whether --with-confdir or --without-confdir was given.
+if test "${with_confdir+set}" = set; then
+  withval="$with_confdir"
+   CONFDIR="$withval"
+else
+   CONFDIR='${exec_prefix}/etc'
+fi;
+
 if test "-f VERSION"; then
   LVM_VERSION="\"`cat VERSION`\""
 else
@@ -5087,7 +5097,8 @@ fi
 
 
 
-                                                                                                                                            ac_config_files="$ac_config_files Makefile make.tmpl include/Makefile lib/Makefile lib/format1/Makefile man/Makefile po/Makefile tools/Makefile tools/version.h test/mm/Makefile test/device/Makefile test/format1/Makefile test/regex/Makefile test/filters/Makefile"
+
+                                                                                                                                                      ac_config_files="$ac_config_files Makefile make.tmpl doc/Makefile include/Makefile lib/Makefile lib/format1/Makefile man/Makefile po/Makefile tools/Makefile tools/version.h test/mm/Makefile test/device/Makefile test/format1/Makefile test/regex/Makefile test/filters/Makefile"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -5640,6 +5651,7 @@ do
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "make.tmpl" ) CONFIG_FILES="$CONFIG_FILES make.tmpl" ;;
+  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
   "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
   "lib/format1/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/format1/Makefile" ;;
@@ -5784,6 +5796,7 @@ s,@HAVE_LIBDL@,$HAVE_LIBDL,;t t
 s,@HAVE_SELINUX@,$HAVE_SELINUX,;t t
 s,@CMDLIB@,$CMDLIB,;t t
 s,@LOCALEDIR@,$LOCALEDIR,;t t
+s,@CONFDIR@,$CONFDIR,;t t
 s,@INTL_PACKAGE@,$INTL_PACKAGE,;t t
 s,@INTL@,$INTL,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
index 1897d9b8fc9b0bbbbd21d5d620ee7787b857edcd..d31199dd9f3d77dee037ec58ecaf41643d800197 100644 (file)
@@ -258,6 +258,11 @@ if test x$INTL = xyes; then
                    [ LOCALEDIR='${prefix}/share/locale' ])
 fi
 
+AC_ARG_WITH(confdir,
+           [  --with-confdir=DIR      Configuration files in DIR [EXEC_PREFIX/etc]],
+           [ CONFDIR="$withval" ],
+           [ CONFDIR='${exec_prefix}/etc' ])
+
 if test "-f VERSION"; then
   LVM_VERSION="\"`cat VERSION`\""
 else
@@ -286,6 +291,7 @@ AC_SUBST(HAVE_SELINUX)
 AC_SUBST(CMDLIB)
 AC_SUBST(MSGFMT)
 AC_SUBST(LOCALEDIR)
+AC_SUBST(CONFDIR)
 AC_SUBST(INTL_PACKAGE)
 AC_SUBST(INTL)
 
@@ -294,6 +300,7 @@ dnl keep utility scripts running properly
 AC_OUTPUT(                                                             \
 Makefile                                                               \
 make.tmpl                                                               \
+doc/Makefile                                                           \
 include/Makefile                                                       \
 lib/Makefile                                                           \
 lib/format1/Makefile                                                   \
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644 (file)
index 0000000..554f9ed
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2004 Red Hat, Inc. All rights reserved.
+#
+# This file is part of the LVM2.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CONFSRC=example.conf
+CONFDEST=lvm.conf
+
+include ../make.tmpl
+
+install:
+       @if [ ! -e $(confdir)/$(CONFDEST) ]; then \
+               echo "Installing $(CONFSRC) as $(confdir)/$(CONFDEST)"; \
+               @INSTALL@ -D -o $(OWNER) -g $(GROUP) -m 644 $(CONFSRC) \
+                       $(confdir)/$(CONFDEST); \
+       fi
+
index 5e51ea83b8ae8478ba10efd8a9d4fca2c74e9034..b87b3b91ae9effc36ca5ba131fc87a3337fd45c9 100644 (file)
@@ -36,6 +36,7 @@ SOFLAG += @SOFLAG@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = $(DESTDIR)@bindir@
+confdir = $(DESTDIR)@CONFDIR@/lvm
 includedir = $(DESTDIR)@includedir@
 libdir = $(DESTDIR)@libdir@
 sbindir = $(DESTDIR)@sbindir@
This page took 0.084379 seconds and 5 git commands to generate.