• Pavel Raiskup's avatar
    gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash · f8fe25fa
    Pavel Raiskup authored
    The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR
    and ARFLAGS variables.  Doing this unconditionally could break
    later Automake's AM_PROG_AR invocation (at least it's
    AC_CHECK_TOOLS call to detect correct 'ar' binary).
    Original purpose of the gl_PROG_AR_RANLIB was only to handle the
    Amsterdam Compiler Kit, so make the previous code to have effects
    only on ACK, and rather automatically call the Automake's
    AM_PROG_AR as soon as possible to decide other cases.
    * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR.
    Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR.  If neither
    is possible, keep setting AR/ARFLAGS to reasonable defaults.
    * gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS
    right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the
    'extensions' module is used.
    * modules/extensions (configure.ac-early): Remove as this snippet
    is added to gnulib-comp.m4 earlier anyway.