X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/1f79a056146f0b172111b8379ccc344002848e66..407625c794eee748e4c2cb4ea52cc5467e0ed5be:/aclocal.glob diff --git a/aclocal.glob b/aclocal.glob index 283f695..7c15e1e 100644 --- a/aclocal.glob +++ b/aclocal.glob @@ -36,20 +36,16 @@ dnl dnl Use: Defines an m4 macro AUTO_VERSION which contains the current dnl version number, worked out in some clever way. -dnl AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...]) +AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...]) m4_define([mdw_AUTO_VERSION], [m4_define([AUTO_VERSION], m4_esyscmd([ - if test -d .git && version=$(git describe --abbrev=4 2>/dev/null); then - case "$(git diff-index --name-only HEAD)" in - "") ;; *) version="$version+" ;; - esac - elif cat RELEASE 2>/dev/null; then - version=$(cat RELEASE) - elif test -f debian/changelog; then - version=$(sed -n '/^.*(\(.*\)).*$/ { s::\1:p; q; }' debian/changelog) - else - echo UNKNOWN - fi - echo -n $version + ver=UNKNOWN + for pre in ./ config/; do + for post in "" .in; do + try=${pre}auto-version${post} + if test -x $try; then ver=$("$try"); break; fi + done + done + echo -n "$ver" ]))]) dnl --- *@-mdw_LIBTOOL_VERSION_INFO-@* --- @@ -72,6 +68,24 @@ AC_DEFUN([mdw_LIBTOOL_VERSION_INFO], [ AC_SUBST([LIBTOOL_VERSION_INFO]) ]) +dnl --- *@-mdw_SILENT_RULES-@* --- +dnl +dnl Author: Mark Wooding +dnl +dnl Synopsis: mdw_SILENT_RULES +dnl +dnl Arguments: --- +dnl +dnl Use: Enables the Automake `silent-rules' feature, if available. + +AC_DEFUN([mdw_SILENT_RULES], [ + m4_ifdef([AM_SILENT_RULES], [ + AM_SILENT_RULES([yes]) + ], [ + AC_SUBST([AM_DEFAULT_VERBOSITY], [1]) + ]) +]) + dnl --- *@-mdw_DECL_ENVIRON-@* --- dnl dnl Author: Mark Wooding @@ -161,4 +175,33 @@ AC_ARG_WITH([man-ext], [manext=$withval], [manext=mLib]) AC_SUBST(manext)]) +dnl --- *@-mdw_DIR_TEXMF-@* --- +dnl +dnl Author: Mark Wooding +dnl +dnl Synopsis: mdw_DIR_TEXMF +dnl +dnl Arguments: --- +dnl +dnl Use: Sets the substitution `texmfdir' as a sensible TeX install +dnl tree. + +AC_DEFUN([mdw_DIR_TEXMF], [ +AC_ARG_WITH([texmfdir], +[ --with-texmfdir=DIR set the TeX install directory to DIR], +[texmfdir=$withval], +[AC_MSG_CHECKING([where to put installed TeX files]) +mdw_DEFINE_PATHS([ +texmfdir='${datadir}/texmf' +for d in \ + '${datadir}/texmf' '${prefix}/lib/texmf' \ + '${prefix}/texmf' '${libdir}/lib/texmf'; do + if test -d "mdw_PATH([$d])"; then + texmfdir=$d + break + fi +done +AC_MSG_RESULT([$texmfdir])])]) +AC_SUBST(texmfdir)]) + dnl----- That's all, folks --------------------------------- *@--GLOB-END--@*