Permalink
Browse files

Port some fixes from VW

This corrects the whole include mess up where autoconf will do m4/m4/fixups.m4 instead of the correct 
m4/fixups.m4.

I accidentally forgot about this before. Sorry.
  • Loading branch information...
1 parent 5064d59 commit d76428c65cf35076f3d8d60f02706009ae63629f Zack Moratto committed Apr 1, 2010
Showing with 29 additions and 0 deletions.
  1. +25 −0 autogen
  2. +4 −0 configure.ac
View
25 autogen
@@ -1,3 +1,28 @@
#!/bin/sh
+# Make an ASCII-comparible copy of a version number by zero-padding it
+# 1.20.3.4 becomes 01200304
+# It removes letters
+ugly_version() {
+ echo $1 | tr . ' ' | tr -d -c '[0-9 ]' | xargs -n1 printf "%03i"
+}
+
+am_version=$(automake --version | head -n1 | cut -d ' ' -f 4)
+
+am_v2=$(ugly_version "$am_version")
+am_broken=$(ugly_version "1.9.5b")
+
+if test "$am_v2" \< "$am_broken" ; 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
+
autoreconf --force --verbose --install -I m4 -I thirdparty/m4
View
@@ -33,6 +33,10 @@ AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([nostdinc 1.8.5])
AX_CONFIG_HEADER_PREFIX([src/asp/asp_config.h], [ASP_])
+dnl Fix for early autoconf that doesn't export these
+AC_SUBST([abs_top_srcdir])
+AC_SUBST([abs_top_builddir])
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl TODO RIGHT BEFORE RELEASE: update libtool version

0 comments on commit d76428c

Please sign in to comment.