This is a library of m4 macros which may be useful in autoconf projects.
A Makefile.am if included, so that this tree can be dropped into a project as a submodule.
Be sure to add the following to your top-level
ACLOCAL_AMFLAGS = -I m4
And add the following to your top-level
The license terms for each
.m4 file are included within the files
All macros are prefixed with
BT_ (standing for "buildtools", the project
which preceded this one).
The included macros are:
BT_PROG_CC_WARN: Enable the
-W -WallC compiler flags if using GCC.
INCLUDEDIRso that they're available at build-time.
BT_ENABLE_DOCS: Enable building HTML and manpages from DocBook-XML.
BT_ENABLE_NLS: Check for NLS support.
BT_REQUIRE_MYSQL: Check for MySQL client libraries.
BT_REQUIRE_LIBUUID: Check for the library containing
BT_REQUIRE_LIBEDIT: Check for the library containing
libedit, which may be included in the source tree.
BT_REQUIRE_LIBURI: Build an in-tree copy of
BT_REQUIRE_LIBTIFF: Check for
BT_CHECK_LIB, a generic framework for
checking for libraries, including support for dealing with bundled
sub-projects within the source tree.
BT_CHECK_LIB is defined as:
BT_CHECK_LIB(name, [local-subdir], [pkg-config modules], [test-code], [use-local-code], [action-if-found],[action-if-not-found])
name is the name of the library, such as
libtiff, and is used to
construct variables and help strings.
local-subdir is specified, it is the name of the subdirectory within
the source tree which will optionally contain a bundled copy of the library.
pkg-config modules is a list of
pkg-config modules which, if specified,
will be tested for and whose
libs will be used to populate
NAME_LIBS if found.
test-code is a fragment which will test for the presence of the library,
yes if it is present (e.g.,
The fragment should not invoke
AC_MSG_ERROR if the library is not found.
use-local-code is a fragment which will be invoked if the bundled copy
of the code is selected. It should set the variables
NAME_LOCAL_LIBS as necessary.
action-if-found is omitted,
LOCAL_LIBS will be updated if the library was found. If
action-if-not-found is ommitted, no action will be performed if the
library was not found.