+dnl Arguments: LIB = the name of the library (and the package)
+dnl NAME = a presentable version of the library's name
+dnl VERSION = version of the library
+dnl PACKAGE = package name to pass on to AM_INIT_AUTOMAKE
+dnl
+dnl Use: Sets up various useful variables. This macro calls
+dnl AM_INIT_AUTOMAKE, which might be considered useful. It also
+dnl provides variables for the use of `lib-config.in'.
+
+AC_DEFUN([mdw_INIT_LIB],
+[AM_INIT_AUTOMAKE(ifelse([$4], [], [$1], [$4]), [$3])
+LIBRARY="$1" AC_SUBST(LIBRARY)
+LIBNAME="$2" AC_SUBST(LIBNAME)])
+
+dnl *@-mdw_LIB_CONFIG-@*
+dnl
+dnl Author: Mark Wooding
+dnl
+dnl Synopsis: mdw_LIB_CONFIG(LIB, NAME, VERSION, IF-FOUND, IF-NOT-FOUND)
+dnl
+dnl Arguments: LIB = the name of the library (and its configuration program)
+dnl NAME = a presentable version of the library's name
+dnl VERSION = version of library required