Add files from parent branch HEAD:
[pkgsrc.git] / mk / automake.mk
1 # $NetBSD: automake.mk,v 1.7 2004/03/27 23:05:07 wiz Exp $
2 #
3 # makefile fragment for packages that use automake
4 # AUTOMAKE_REQD can be set to the minimum version required.
5 # It adds a build dependency on the appropriate automake and autoconf
6 # packages and sets the following variables:
7 #       AUTOMAKE:       automake binary to use
8 #       ACLOCAL:        aclocal binary to use
9 # autoconf required version will default to 2.13 if automake 1.4* is used,
10 # and to 2.58 otherwise.
11 #
12
13 .if !defined(AUTOMAKE_MK)
14 AUTOMAKE_MK=    # defined
15
16 # minimal required version
17 AUTOMAKE_REQD?= 1.9
18
19 .if !empty(AUTOMAKE_REQD:M1.4*)
20 BUILD_DEPENDS+=         automake14>=${AUTOMAKE_REQD}:../../devel/automake14
21 _AUTOMAKE_API_VERSION=  1.4
22 AUTOCONF_REQD?=         2.13
23 .else
24 BUILD_DEPENDS+=         automake>=${AUTOMAKE_REQD}:../../devel/automake
25 _AUTOMAKE_API_VERSION=  1.9
26 AUTOCONF_REQD?=         2.58
27 .endif
28
29 AUTOMAKE=               ${LOCALBASE}/bin/automake-${_AUTOMAKE_API_VERSION}
30 ACLOCAL=                ${LOCALBASE}/bin/aclocal-${_AUTOMAKE_API_VERSION}
31
32 .if defined(BUILD_USES_GETTEXT_M4)
33 BUILD_DEPENDS+=         {gettext-0.10.35nb1,gettext-m4-[0-9]*}:../../devel/gettext-m4
34 .endif
35
36 .include "../mk/autoconf.mk"
37 .endif # AUTOMAKE_MK