diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index ad245dc..e063051 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -137,6 +137,8 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_SUBST(PREFIX) SYSCONFDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${sysconfdir}") AX_SUBST(SYSCONFDIR) + PKGSYSCONFDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${SYSCONFDIR}/${PACKAGE_NAME}") + AX_SUBST(PKGSYSCONFDIR) DATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${datadir}") AX_SUBST(DATADIR) PKGDATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${DATADIR}/${PACKAGE_NAME}") @@ -571,6 +573,11 @@ distclean-rpm-targets: EOF ]) +# use this in configure.ac to support scripts, e.g. bash scripts +AC_DEFUN([AX_USE_ETC], [ + AC_CONFIG_FILES([etc/makefile]) +]) + # use this in configure.ac to support scripts, e.g. bash scripts AC_DEFUN([AX_USE_SCRIPTS], [ AC_CONFIG_FILES([scripts/makefile]) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index ccd3856..a547611 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -147,6 +147,7 @@ GENERATED FILES * src/makefile.am - if you enabled AX_USE_CXX * src/version.hxx - if you enabled AX_USE_CXX * src/version.cxx - if you enabled AX_USE_CXX + * etc/makefile.am - if you enable AX_USE_ETC * html/makefile.am - if you enabled AX_BUILD_HTML * scripts/makefile.am - if you enabled AX_USE_SCRIPTS * nodejs/makefile.am - if you add AX_USE_NODEJS @@ -256,6 +257,7 @@ FILES number. In git, git rev-list --all --count is used. The following macros are supported in configure.ac: * Enable C++: AX_USE_CXX + * Enable system config files in /etc: AX_USE_ETC * Enable LibTool library creation: AX_USE_LIBTOOL * Enable Scripts: AX_USE_SCRIPTS * Enable NodeJS project: AX_USE_NODEJS @@ -569,6 +571,7 @@ AX_INIT_STANDARD_PROJECT # requirements, uncomment, what you need: #AX_USE_CXX +#AX_USE_ETC #AX_USE_LIBTOOL #AX_USE_SCRIPTS #AX_USE_NODEJS @@ -859,6 +862,13 @@ namespace NAMESPACE { const std::string IDENT("\$Id: " PACKAGE_STRING); } EOF +to --condition AX_USE_ETC etc/makefile.am <