added AX_USE_ETC to handle configuration files
This commit is contained in:
@@ -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])
|
||||
|
@@ -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 <<EOF
|
||||
${HEADER}pkgsysconfdir = \${sysconfdir}/@PACKAGE_NAME@
|
||||
|
||||
dist_pkgsysconf_DATA =
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
EOF
|
||||
to --condition AX_USE_SCRIPTS scripts/makefile.am <<EOF
|
||||
${HEADER}dist_bin_SCRIPTS =
|
||||
|
||||
@@ -1680,6 +1690,9 @@ SUBDIRS=""
|
||||
if testtag AX_USE_CXX; then
|
||||
SUBDIRS="${SUBDIRS} src"
|
||||
fi
|
||||
if testtag AX_USE_ETC; then
|
||||
SUBDIRS="${SUBDIRS} etc"
|
||||
fi
|
||||
if testtag AX_BUILD_TEST AX_USE_CPPUNIT; then
|
||||
SUBDIRS="${SUBDIRS} test"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user