2 # Copyright (C) 2007-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 PKG_LIBTOOL_PATHS?
=$(CONFIGURE_PATH
)
9 PKG_AUTOMAKE_PATHS?
=$(CONFIGURE_PATH
)
10 PKG_REMOVE_FILES?
=aclocal.m4
12 autoconf_bool
= $(patsubst %,$(if
$($(1)),--enable
,--disable
)-%,$(2))
14 # delete *.la-files from staging_dir - we can not yet remove respective lines within all package
15 # Makefiles, since backfire still uses libtool v1.5.x which (may) require those files
16 define libtool_remove_files
17 find
$(1) -name
'*.la' |
$(XARGS
) rm -f
;
21 (cd
$(PKG_BUILD_DIR
); \
22 $(patsubst %,rm -f
%;,$(PKG_REMOVE_FILES
)) \
23 $(foreach p
,$(PKG_AUTOMAKE_PATHS
), \
24 if
[ -x
$(p
)/autogen.sh
]; then \
25 $(p
)/autogen.sh || true
; \
26 elif
[ -f
$(p
)/configure.ac
] ||
[ -f
$(p
)/configure.in
]; then \
27 [ -f
$(p
)/aclocal.m4
] && [ ! -f
$(p
)/acinclude.m4
] && mv aclocal.m4 acinclude.m4
; \
28 [ -d
$(p
)/autom4te.cache
] && rm -rf autom4te.cache
; \
29 $(STAGING_DIR_HOST
)/bin
/autoreconf
-v
-f
-i
-s \
30 -B
$(STAGING_DIR_HOST
)/share
/aclocal \
31 -B
$(STAGING_DIR
)/host
/share
/aclocal \
32 $(patsubst %,-I
%,$(PKG_LIBTOOL_PATHS
)) $(PKG_LIBTOOL_PATHS
) || true
; \
38 Hooks
/InstallDev
/Post
+= libtool_remove_files
40 ifneq ($(filter libtool
,$(PKG_FIXUP
)),)
41 PKG_BUILD_DEPENDS
+= libtool
42 ifeq ($(filter no-autoreconf
,$(PKG_FIXUP
)),)
43 Hooks
/Configure
/Pre
+= autoreconf
47 ifneq ($(filter libtool-ucxx
,$(PKG_FIXUP
)),)
48 PKG_BUILD_DEPENDS
+= libtool
49 ifeq ($(filter no-autoreconf
,$(PKG_FIXUP
)),)
50 Hooks
/Configure
/Pre
+= autoreconf
54 ifneq ($(filter autoreconf
,$(PKG_FIXUP
)),)
55 ifeq ($(filter autoreconf
,$(Hooks
/Configure
/Pre
)),)
56 Hooks
/Configure
/Pre
+= autoreconf