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
macos/v1.5.9
Emmanuele Bassi 8 years ago
parent cf81586a6c
commit 48ee13ed3c
  1. 2
      Makefile.am
  2. 2
      autogen.sh
  3. 1
      configure.ac

@ -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

@ -6,6 +6,8 @@ test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd "$srcdir"
mkdir m4 || exit 1
autoreconf -v --install || exit $?
cd "$ORIGDIR" || exit $?

@ -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])

Loading…
Cancel
Save