• Idar Tollefsen's avatar
    configure.in: Require- and unconditionally use- AM_PROG_AR. · 38e50768
    Idar Tollefsen authored
    The problem was discovered as part of issue #296.
    
    AM_PROG_AR was introduced in Automake 1.11.2. The m4_ifdef() check around
    its use was there to make it possible to regenerate the `configure`
    script with `autoreconf` also on systems with older Automake
    versions. However, `ar` is required and not running AM_PROG_AR will lead
    to build failures.
    
    Starting with Automake 1.12, AM_PROG_AR is "required" when building
    libraries with Automake. libsrtp does not use Automake, but has a
    handwritten Makefile.in template instead. That template has a AR variable
    that `configure` is supposed to set.
    
    The logic for doing so comes from AM_PROG_AR, which does a AC_SUBST() on
    the variable to set it. If AM_PROG_AR is not available/used, AR will not
    be set and the build will fail with rather obscure message.
    
    There's only two solutions to this; either do what this patch does, which
    is to require Automake 1.11.2 or newer on systems that are to regenerate
    the `configure` script, or write a "else" part to the m4_ifdef() check
    and roll your own AR check. The latter is probably non-trivial given
    various systems, cross compilers, etc.
    38e50768