build: handle AM_PROG_AR not present in autoconf 1.11
authorDetlef Riekenberg <wine.dev@web.de>
Sun, 7 Oct 2012 20:09:29 +0000 (22:09 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 8 Oct 2012 15:32:14 +0000 (17:32 +0200)
AM_PROG_AR is a new feature since autoconf 1.12.
autogen.sh failed on Ubuntu 11.10 without this patch with:

configure.ac:30: error: possibly undefined macro: AM_PROG_AR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

AM_PROG_AR is required only for autoconf-1.12 so we can just skip it if
using an autoconf version that does not include it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
configure.ac

index 19780be..969e171 100644 (file)
@@ -27,7 +27,7 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CC
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
-AM_PROG_AR
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
 LT_PREREQ(2.2)
 LT_INIT