Permalink
Browse files

work around m4_include problems with ancient automake

  • Loading branch information...
1 parent fbe64d5 commit 5247be37991ec0559a65aef15a314fd15aaacd38 @novas0x2a novas0x2a committed Feb 26, 2010
Showing with 17 additions and 11 deletions.
  1. +13 −9 autogen
  2. +4 −2 m4/fixups.m4
View
22 autogen
@@ -1,13 +1,17 @@
#!/bin/sh
-if test -n "$1" && "$1" = "old" ; then
- export AUTOCONF=autoconf-2.59
- export AUTOMAKE=automake-1.6
- export ACLOCAL=aclocal-1.6
- export AUTOHEADER=autoheader-2.59
- reconf=autoreconf-2.59
-else
- reconf=autoreconf
+am_version=$(automake --version | head -n1 | cut -d ' ' -f 4)
+if test "$am_version" \< "1.9.5b" ; then
+ topdir="$(cd `dirname $0` && pwd)"
+
+ echo "WARNING: automake < 1.9.5b doesn't know how to handle relative"
+ echo "m4_include paths. Working around it."
+ echo
+ set -x
+ mkdir -p "$topdir/m4/m4"
+ ln -sf $topdir/m4/fixups.m4 $topdir/m4/m4/fixups.m4
+ set +x
+ echo
fi
-$reconf --force --verbose --install -I m4 -I thirdparty/m4
+autoreconf --force --verbose --install -I m4 -I thirdparty/m4
View
6 m4/fixups.m4
@@ -5,8 +5,10 @@ dnl All Rights Reserved.
dnl __END_LICENSE__
-dnl caller must protect themselves from multiple inclusion, like:
-dnl m4_ifdef([_AX_FIXUPS], [], [m4_include([m4/fixups.m4])])
+dnl caller must protect themselves from multiple inclusion
+dnl m4_ifdef([_AX_FIXUPS], [], [m4_exclude([fixups.m4])])
+dnl ^--- this code isn't quite right; the correct code is "include", not "exclude".
+dnl automake 1.9.? will break on includes inside comments.
dnl 2.65 added an additional level of quoting for upper and lower
m4_pushdef([AAA],[---])dnl

0 comments on commit 5247be3

Please sign in to comment.