From 48ee13ed3cafd3e4b0c76eedf1355f512173d4fd Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 9 Feb 2017 17:10:34 +0000 Subject: [PATCH] Define a macro directory in the autotools build As libtool suggest we do; this also allows using ACLOCAL_AMFLAGS inside build that create a separate environment with their own m4 macros, like jhbuild and Cerberus. In order to avoid a warning from autoreconf, we create the empty macros directory during the autogen.sh step; aclocal would create the directory for us anyway, but different versions of autotools may have different behaviours. Closes: #58 --- Makefile.am | 2 ++ autogen.sh | 2 ++ configure.ac | 1 + 3 files changed, 5 insertions(+) diff --git a/Makefile.am b/Makefile.am index 8b5eb01..8fead48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,8 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. +ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = include/epoxy src SUBDIRS += test diff --git a/autogen.sh b/autogen.sh index f4cdee4..02b81ef 100755 --- a/autogen.sh +++ b/autogen.sh @@ -6,6 +6,8 @@ test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd "$srcdir" +mkdir m4 || exit 1 + autoreconf -v --install || exit $? cd "$ORIGDIR" || exit $? diff --git a/configure.ac b/configure.ac index 50b9d5e..cc1fc50 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,7 @@ AC_INIT([libepoxy], [libepoxy]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) # Initialize Automake AM_INIT_AUTOMAKE([foreign -Wno-portability dist-xz no-dist-gzip tar-ustar subdir-objects])