2015-03-25 Niels Möller <nisse@diamant.hack.org>
+ * configure.ac (MAJOR_VERSION, MINOR_VERSION): Tweak sed
+ expressions, to tolerate version suffixes.
+
* Makefile.in (distdir): Include assembly files from the new
x86_64/aesni, x86_64/fat, and arm/fat directories.
LIBHOGWEED_MAJOR=4
LIBHOGWEED_MINOR=0
-MAJOR_VERSION=`echo $PACKAGE_VERSION | sed 's/\(.*\)\..*/\1/g'`
-MINOR_VERSION=`echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)/\1/g'`
+dnl Note double square brackets, for extra m4 quoting.
+MAJOR_VERSION=`echo $PACKAGE_VERSION | sed 's/^\([[^.]]*\)\..*/\1/'`
+MINOR_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*\.\([[0-9]]*\).*/\1/'`
AC_SUBST([MAJOR_VERSION])
AC_SUBST([MINOR_VERSION])