diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 7b42dd6..21f467c 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2992,6 +2992,12 @@ The directory for installing modifiable architecture-independent data. The directory for installing read-only single-machine data. @end defvar +@defvar adminconfdir +@ovindex adminconfdir +The directory for reading administrator-provided single-machine data in +systems where @code{sysconfdir} could be read-only. +@end defvar + Most of these variables have values that rely on @code{prefix} or @code{exec_prefix}. It is deliberate that the directory output @@ -27274,7 +27280,7 @@ introduced in this document. @c LocalWords: Systemology Checkpointing Changequote INTERCAL changequote dfn @c LocalWords: Quadrigraphs builtins Shellology acconfig Bugward LIBOBJ Imake @c LocalWords: LIBOBJS IFELSE cindex flushright Pinard Metaconfig uref Simons -@c LocalWords: distclean uninstall noindent versioning Tromey dir vr +@c LocalWords: distclean uninstall noindent versioning Tromey dir vr adminconfdir @c LocalWords: SAMS samp aclocal acsite underquoted emph itemx prepend SUBST @c LocalWords: evindex automake Gettext autopoint gettext symlink libtoolize @c LocalWords: defmac INIT tarname ovindex cvindex BUGREPORT PREREQ asis PROG diff --git a/doc/make-stds.texi b/doc/make-stds.texi index b0745a8..d5e993e 100644 --- a/doc/make-stds.texi +++ b/doc/make-stds.texi @@ -504,6 +504,26 @@ files that are modified in the normal course of their use (programs whose purpose is to change the configuration of the system excluded). Those probably belong in @file{$(localstatedir)}. +@item adminconfdir +This directory is not meant for installation. Administrators of systems +where @samp{sysconfdir} is in a read-only filesystem can copy the files +to @samp{adminconfdir} and edit them. + + + +Programs that rely on configuration files should look for them in +@samp{adminconfdir} before looking in @samp{sysconfdir}. These programs +should also make the value of the --adminconfdir option available to the +program by defining a C macro ADMINCONFDIR: + +E.g. in packages that use Automake: + +AM_CPPFLAGS += -DADMINCONFDIR=\"$(adminconfdir)\" + +This directory should normally be @file{/etc}, but write it as +@file{$(prefix)/etc}. (If you are using Autoconf, write it as +@samp{@@adminconfdir@@}.) + @item sharedstatedir The directory for installing architecture-independent data files which the programs modify while they run. This should normally be diff --git a/doc/standards.texi b/doc/standards.texi index e5ae3cb..04cd0ef 100644 --- a/doc/standards.texi +++ b/doc/standards.texi @@ -4239,7 +4239,7 @@ corresponding to most of the standard directory variables @example --prefix --exec-prefix --bindir --sbindir --libexecdir --sysconfdir ---sharedstatedir --localstatedir --runstatedir +--adminconfdir --sharedstatedir --localstatedir --runstatedir --libdir --includedir --oldincludedir --datarootdir --datadir --infodir --localedir --mandir --docdir --htmldir --dvidir --pdfdir --psdir diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 053130b..5a9ffc3 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -600,6 +600,7 @@ AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl AC_SUBST([datarootdir], ['${prefix}/share'])dnl AC_SUBST([datadir], ['${datarootdir}'])dnl AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl +AC_SUBST([adminconfdir], ['${prefix}/etc'])dnl AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl AC_SUBST([localstatedir], ['${prefix}/var'])dnl AC_SUBST([runstatedir], ['${localstatedir}/run'])dnl @@ -870,6 +871,13 @@ do | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; + -adminconfdir | --adminconfdir | --adminconfdi | --adminconfd | --adminconf \ + | --admincon | --adminco | --adminc | --admin | --admi | --adm) + ac_prev=adminconfdir ;; + -adminconfdir=* | --adminconfdir=* | --adminconfdi=* | --adminconfd=* | --adminconf=* \ + | --admincon=* | --adminco=* | --adminc=* | --admin=* | --admi=* | --adm=*) + adminconfdir=$ac_optarg ;; + -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) @@ -945,7 +953,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir runstatedir adminconfdir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1080,6 +1088,8 @@ Fine tuning of the installation directories: --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --adminconfdir=DIR alternate configuration directory [PREFIX/etc] + installer should not place files here! --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]