added AX_USE_ETC to handle configuration files

master
Marc Wäckerlin 8 years ago
parent 7072d83d3f
commit c82bf7fba5
  1. 7
      scripts/ax_init_standard_project.m4
  2. 13
      scripts/bootstrap.sh

@ -137,6 +137,8 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AX_SUBST(PREFIX) AX_SUBST(PREFIX)
SYSCONFDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${sysconfdir}") SYSCONFDIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${sysconfdir}")
AX_SUBST(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}") DATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${datadir}")
AX_SUBST(DATADIR) AX_SUBST(DATADIR)
PKGDATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${DATADIR}/${PACKAGE_NAME}") PKGDATADIR=$(test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo "${DATADIR}/${PACKAGE_NAME}")
@ -571,6 +573,11 @@ distclean-rpm-targets:
EOF 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 # use this in configure.ac to support scripts, e.g. bash scripts
AC_DEFUN([AX_USE_SCRIPTS], [ AC_DEFUN([AX_USE_SCRIPTS], [
AC_CONFIG_FILES([scripts/makefile]) AC_CONFIG_FILES([scripts/makefile])

@ -147,6 +147,7 @@ GENERATED FILES
* src/makefile.am - if you enabled AX_USE_CXX * src/makefile.am - if you enabled AX_USE_CXX
* src/version.hxx - if you enabled AX_USE_CXX * src/version.hxx - if you enabled AX_USE_CXX
* src/version.cxx - 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 * html/makefile.am - if you enabled AX_BUILD_HTML
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS * scripts/makefile.am - if you enabled AX_USE_SCRIPTS
* nodejs/makefile.am - if you add AX_USE_NODEJS * nodejs/makefile.am - if you add AX_USE_NODEJS
@ -256,6 +257,7 @@ FILES
number. In git, git rev-list --all --count is used. number. In git, git rev-list --all --count is used.
The following macros are supported in configure.ac: The following macros are supported in configure.ac:
* Enable C++: AX_USE_CXX * Enable C++: AX_USE_CXX
* Enable system config files in /etc: AX_USE_ETC
* Enable LibTool library creation: AX_USE_LIBTOOL * Enable LibTool library creation: AX_USE_LIBTOOL
* Enable Scripts: AX_USE_SCRIPTS * Enable Scripts: AX_USE_SCRIPTS
* Enable NodeJS project: AX_USE_NODEJS * Enable NodeJS project: AX_USE_NODEJS
@ -569,6 +571,7 @@ AX_INIT_STANDARD_PROJECT
# requirements, uncomment, what you need: # requirements, uncomment, what you need:
#AX_USE_CXX #AX_USE_CXX
#AX_USE_ETC
#AX_USE_LIBTOOL #AX_USE_LIBTOOL
#AX_USE_SCRIPTS #AX_USE_SCRIPTS
#AX_USE_NODEJS #AX_USE_NODEJS
@ -859,6 +862,13 @@ namespace NAMESPACE {
const std::string IDENT("\$Id: " PACKAGE_STRING); const std::string IDENT("\$Id: " PACKAGE_STRING);
} }
EOF 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 to --condition AX_USE_SCRIPTS scripts/makefile.am <<EOF
${HEADER}dist_bin_SCRIPTS = ${HEADER}dist_bin_SCRIPTS =
@ -1680,6 +1690,9 @@ SUBDIRS=""
if testtag AX_USE_CXX; then if testtag AX_USE_CXX; then
SUBDIRS="${SUBDIRS} src" SUBDIRS="${SUBDIRS} src"
fi fi
if testtag AX_USE_ETC; then
SUBDIRS="${SUBDIRS} etc"
fi
if testtag AX_BUILD_TEST AX_USE_CPPUNIT; then if testtag AX_BUILD_TEST AX_USE_CPPUNIT; then
SUBDIRS="${SUBDIRS} test" SUBDIRS="${SUBDIRS} test"
fi fi

Loading…
Cancel
Save